Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTING #4790

Closed
wants to merge 36 commits into from
Closed

TESTING #4790

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e2702b1
drop python3.7, 3.8, 3.9
ahnitz Apr 25, 2024
9220789
add missing quotes
ahnitz Apr 25, 2024
11d1eed
banish distutils
ahnitz Apr 25, 2024
f77ecea
banish p39 in more places
ahnitz Apr 25, 2024
b3ca234
tox needs some things early
ahnitz Apr 25, 2024
4fe1362
move here
ahnitz Apr 25, 2024
2e4a982
maybe?
ahnitz Apr 25, 2024
8c66727
try el9
ahnitz Apr 25, 2024
8b4aa8a
must use 311 for el9
ahnitz Apr 25, 2024
af809fc
this might be the right name
ahnitz Apr 25, 2024
f939cff
updates
ahnitz Apr 25, 2024
b6cd5fd
try this
ahnitz Apr 25, 2024
8561bb3
more stuff
ahnitz Apr 25, 2024
6fc7684
update
ahnitz Apr 25, 2024
52d0790
do not use imp module
ahnitz Apr 25, 2024
b505474
more places where imp was used
ahnitz Apr 25, 2024
6c586a5
bring back 39
ahnitz Apr 25, 2024
540ecab
more reverts
ahnitz Apr 25, 2024
8080c3b
update
ahnitz Apr 25, 2024
7b92da6
update
ahnitz Jun 19, 2024
4f4bfe3
use older numpy for current tests till upstream upgraded
ahnitz Jun 19, 2024
aa49f75
Try moving to cythonize
spxiwh Jun 20, 2024
132c467
Needed?
spxiwh Jun 20, 2024
556a9fa
Revert
spxiwh Jun 20, 2024
f2c8e0b
Tox needs Cython
spxiwh Jun 20, 2024
5ccfd45
List not str
spxiwh Jun 20, 2024
b94953c
Test 10 and 12 only
spxiwh Jun 20, 2024
ec309be
Okay, this is getting nasty
spxiwh Jun 20, 2024
10b6f40
I do this too often with dicts
spxiwh Jun 20, 2024
56d380f
Typo
spxiwh Jun 20, 2024
8873b9d
Force numpy2 install
spxiwh Jun 20, 2024
20071f6
Try this
spxiwh Jun 21, 2024
51a33b8
Is it really numpy2?
spxiwh Jun 21, 2024
4214771
Also commit this
spxiwh Jun 21, 2024
32b5136
Just try py310 for now
spxiwh Jun 21, 2024
c979198
Add back in 311
spxiwh Jun 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
max-parallel: 60
matrix:
os: [ubuntu-20.04]
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: ['3.10', '3.11']
test-type: [unittest, search, docs]
steps:
- uses: actions/checkout@v3
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.3.1
run: python -m pip install cibuildwheel==2.17.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
CIBW_SKIP: "*musllinux*"
CIBW_ARCHS_MACOS: x86_64 arm64
- uses: actions/upload-artifact@v2
Expand All @@ -40,10 +40,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- uses: actions/download-artifact@v2
with:
path: ./
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inference-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: install condor
run: |
wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add -
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/mac-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
max-parallel: 4
matrix:
os: [macos-12]
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -25,5 +25,4 @@ jobs:
pip install --upgrade pip setuptools "tox<4.0.0"
- name: run basic pycbc test suite
run: |
sudo chmod -R 777 /usr/local/miniconda/
tox -e py-unittest
2 changes: 1 addition & 1 deletion .github/workflows/search-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: install condor
run: |
wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add -
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tmpltbank-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: install condor
run: |
wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add -
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tut-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
max-parallel: 60
matrix:
os: [ubuntu-20.04]
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: install condor
run: |
wget -qO - https://research.cs.wisc.edu/htcondor/ubuntu/HTCondor-Release.gpg.key | sudo apt-key add -
Expand Down
16 changes: 14 additions & 2 deletions bin/all_sky_search/pycbc_cut_merge_triggers_to_tmpltbank
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,25 @@ Reduce a MERGE triggers file to a reduced template bank
"""

import logging
import imp
import argparse
import numpy
import h5py
import pycbc
import pycbc.version

import importlib.util
import importlib.machinery

def load_source(modname, filename):
loader = importlib.machinery.SourceFileLoader(modname, filename)
spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
module = importlib.util.module_from_spec(spec)
# The module is always executed and not cached in sys.modules.
# Uncomment the following line to cache the module.
# sys.modules[module.__name__] = module
loader.exec_module(module)
return module

parser = argparse.ArgumentParser(description=__doc__)
pycbc.add_common_pycbc_options(parser)
parser.add_argument("--version", action="version",
Expand All @@ -52,7 +64,7 @@ pycbc.init_logging(opt.verbose)

bank_fd = h5py.File(opt.full_template_bank, 'r')

modl = imp.load_source('filter_func', opt.filter_func_file)
modl = load_source('filter_func', opt.filter_func_file)
func = modl.filter_tmpltbank
bool_arr = func(bank_fd)

Expand Down
16 changes: 14 additions & 2 deletions bin/all_sky_search/pycbc_reduce_template_bank
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,24 @@ Reduce a template bank using some input parameter cuts

import numpy
import logging
import imp
import argparse
import h5py
import pycbc
import pycbc.version

import importlib.util
import importlib.machinery

def load_source(modname, filename):
loader = importlib.machinery.SourceFileLoader(modname, filename)
spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
module = importlib.util.module_from_spec(spec)
# The module is always executed and not cached in sys.modules.
# Uncomment the following line to cache the module.
# sys.modules[module.__name__] = module
loader.exec_module(module)
return module

parser = argparse.ArgumentParser(description=__doc__)
pycbc.add_common_pycbc_options(parser)
parser.add_argument("--version", action="version",
Expand All @@ -51,7 +63,7 @@ pycbc.init_logging(opt.verbose)

bank_fd = h5py.File(opt.input_bank, 'r')

modl = imp.load_source('filter_func', opt.filter_func_file)
modl = load_source('filter_func', opt.filter_func_file)
func = modl.filter_tmpltbank
bool_arr = func(bank_fd)

Expand Down
15 changes: 13 additions & 2 deletions bin/pycbc_banksim_match_combine
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ a set of injection files. The *order* of the injection files *must* match the
bank files, and the number of injections in each must correspond one-to-one.
"""

import imp
import argparse
import numpy as np
import h5py
Expand All @@ -34,6 +33,18 @@ from pycbc import pnutils
from pycbc.waveform import TemplateBank
from pycbc.io.ligolw import LIGOLWContentHandler

import importlib.util
import importlib.machinery

def load_source(modname, filename):
loader = importlib.machinery.SourceFileLoader(modname, filename)
spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
module = importlib.util.module_from_spec(spec)
# The module is always executed and not cached in sys.modules.
# Uncomment the following line to cache the module.
# sys.modules[module.__name__] = module
loader.exec_module(module)
return module

__author__ = "Ian Harry <ian.harry@astro.cf.ac.uk>"
__version__ = pycbc.version.git_verbose_msg
Expand Down Expand Up @@ -138,7 +149,7 @@ for val in trig_par_list:
f['trig_params/{}'.format(val)] = trig_params[val]

if options.filter_func_file:
modl = imp.load_source('filter_func', options.filter_func_file)
modl = load_source('filter_func', options.filter_func_file)
func = modl.filter_injections
bool_arr = func(inj_params['mass1'], inj_params['mass2'],
inj_params['spin1z'], inj_params['spin2z'])
Expand Down
11 changes: 1 addition & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,5 @@
requires = ["setuptools",
"wheel",
"cython>=0.29.21",
"numpy==1.16.0; python_version <= '3.7'",
"numpy==1.17.3; python_version == '3.8'",
"numpy==1.19.3; python_version == '3.9'",
"numpy==1.21.4; python_version =='3.10'",
"numpy; python_version >= '3.11'",
"numpy<2.0",
]

# To ensure the best compatibility, try to match the numpy reqs
# where possible to the following used by scipy and the minimum
# of our normal numpy requirements in setup.py
# https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ astropy>=2.0.3,!=4.2.1,!=4.0.5
Mako>=1.0.1
scipy>=0.16.0
matplotlib>=2.0.0
numpy>=1.16.0,!=1.19.0
numpy<2.0
pillow
h5py>=3.0.0,!=3.7.0
jinja2
Expand Down
Loading
Loading