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

Update supported python versions #202

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ stages:
- task: UsePythonVersion@0
displayName: Set up python
inputs:
versionSpec: 3.8
versionSpec: 3.9

- bash: python .azure-pipelines/syntax-validation.py
displayName: Syntax validation (3.8)
displayName: Syntax validation (3.9)

- task: UsePythonVersion@0
displayName: Set up python
inputs:
versionSpec: 3.10
versionSpec: 3.11

- bash: python .azure-pipelines/syntax-validation.py
displayName: Syntax validation (3.10)
displayName: Syntax validation (3.11)

# Run flake8 validation on a shallow clone
- bash: |
Expand All @@ -50,7 +50,7 @@ stages:
- task: UsePythonVersion@0
displayName: Set up python
inputs:
versionSpec: 3.10
versionSpec: 3.11

- bash: |
pip install --disable-pip-version-check collective.checkdocs wheel
Expand Down Expand Up @@ -86,12 +86,12 @@ stages:
vmImage: ubuntu-20.04
strategy:
matrix:
python38:
PYTHON_VERSION: 3.8
python39:
PYTHON_VERSION: 3.9
python310:
PYTHON_VERSION: 3.10
python311:
PYTHON_VERSION: 3.11
steps:
- template: .azure-pipelines/ci-unix.yml

Expand All @@ -100,12 +100,12 @@ stages:
vmImage: macOS-latest
strategy:
matrix:
python38:
PYTHON_VERSION: 3.8
python39:
PYTHON_VERSION: 3.9
python310:
PYTHON_VERSION: 3.10
python311:
PYTHON_VERSION: 3.11
steps:
- template: .azure-pipelines/ci-unix.yml

Expand All @@ -114,12 +114,12 @@ stages:
vmImage: windows-latest
strategy:
matrix:
python38:
PYTHON_VERSION: 3.8
python39:
PYTHON_VERSION: 3.9
python310:
PYTHON_VERSION: 3.10
python311:
PYTHON_VERSION: 3.11
steps:
- template: .azure-pipelines/ci-windows.yml

Expand All @@ -139,7 +139,7 @@ stages:
- task: UsePythonVersion@0
displayName: Set up python
inputs:
versionSpec: 3.10
versionSpec: 3.11

- task: DownloadBuildArtifacts@0
displayName: Get pre-built package
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
version: 2

python:
version: "3.8"
version: "3.9"
install:
- method: pip
path: .
Expand Down
24 changes: 12 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
gemmi==0.5.3
htcondor==10.7.0
importlib_metadata==6.8.0
matplotlib==3.5.1
mrcfile==1.4
numpy==1.25.0
opencv-python-headless==4.7.0.72
pandas==1.4.2
pillow==10.0.1
plotly==5.7.0
gemmi==0.6.5
htcondor==23.5.2
importlib_metadata==7.0.2
matplotlib==3.8.3
mrcfile==1.5.0
numpy==1.26.4
opencv-python-headless==4.9.0.80
pandas==2.2.1
pillow==10.2.0
plotly==5.20.0
pydantic==1.10.7
starfile==0.4.11
starfile==0.5.6
workflows==2.26
zocalo==0.30.0
zocalo==0.30.2
32 changes: 16 additions & 16 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
bump2version==1.0.1
dials_data==2.4.18
gemmi==0.5.3
graphviz==0.19.2
ispyb==6.10.0
matplotlib==3.5.1
mrcfile==1.4
opencv-python==4.7.0.72
pandas==1.4.2
pillow==10.0.1
plotly==5.7.0
dials_data==2.4.81
gemmi==0.6.5
graphviz==0.20.2
ispyb==10.0.0
matplotlib==3.8.3
mrcfile==1.5.0
opencv-python==4.9.0.80
pandas==2.2.1
pillow==10.2.0
plotly==5.20.0
pydantic==1.10.7
pytest-cov==3.0.0
pytest-mock==3.10.0
pytest==7.1.1
starfile==0.4.11
workflows==2.21.1
zocalo==0.18.0
pytest-cov==4.1.0
pytest-mock==3.12.0
pytest==8.1.1
starfile==0.5.6
workflows==2.26
zocalo==0.30.2
14 changes: 7 additions & 7 deletions requirements_doc.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
gemmi==0.5.3
ispyb==6.10.0
matplotlib==3.5.1
mrcfile==1.4
pandas==1.4.2
pillow==10.0.1
plotly==5.7.0
gemmi==0.6.5
ispyb==10.0.0
matplotlib==3.8.3
mrcfile==1.5.0
pandas==2.2.1
pillow==10.2.0
plotly==5.20.0
pydantic==1.10.7
Sphinx==4.5.0
sphinx-rtd-theme==1.0.0
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ classifiers =
License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Natural Language :: English
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
keywords = relion
project_urls =
Documentation = https://python-relion.readthedocs.io/
Expand Down Expand Up @@ -45,7 +45,7 @@ install_requires =
packages = find:
package_dir =
=src
python_requires = >=3.8
python_requires = >=3.9
zip_safe = False

[options.entry_points]
Expand Down
12 changes: 6 additions & 6 deletions src/relion/zocalo/class2d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@
f"/run_it{class2d_params.class2d_nr_iter:03}_classes_{class_id+1}.jpeg"
),
"particles_per_class": (
float(classes_loop.val(class_id, 1)) * particles_in_batch
float(classes_loop[class_id, 1]) * particles_in_batch
),
"class_distribution": classes_loop.val(class_id, 1),
"rotation_accuracy": classes_loop.val(class_id, 2),
"translation_accuracy": classes_loop.val(class_id, 3),
"class_distribution": classes_loop[class_id, 1],
"rotation_accuracy": classes_loop[class_id, 2],
"translation_accuracy": classes_loop[class_id, 3],
}
if job_is_rerun:
class_ispyb_parameters["buffer_lookup"].update(
Expand All @@ -295,12 +295,12 @@
]

# Add the resolution and fourier completeness if they are valid numbers
estimated_resolution = float(classes_loop.val(class_id, 4))
estimated_resolution = float(classes_loop[class_id, 4])

Check warning on line 298 in src/relion/zocalo/class2d_wrapper.py

View check run for this annotation

Codecov / codecov/patch

src/relion/zocalo/class2d_wrapper.py#L298

Added line #L298 was not covered by tests
if np.isfinite(estimated_resolution):
class_ispyb_parameters["estimated_resolution"] = estimated_resolution
else:
class_ispyb_parameters["estimated_resolution"] = 0.0
fourier_completeness = float(classes_loop.val(class_id, 5))
fourier_completeness = float(classes_loop[class_id, 5])

Check warning on line 303 in src/relion/zocalo/class2d_wrapper.py

View check run for this annotation

Codecov / codecov/patch

src/relion/zocalo/class2d_wrapper.py#L303

Added line #L303 was not covered by tests
if np.isfinite(fourier_completeness):
class_ispyb_parameters[
"overall_fourier_completeness"
Expand Down
12 changes: 6 additions & 6 deletions src/relion/zocalo/class3d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,11 @@
f"run_it{class3d_params.class3d_nr_iter:03}_class{class_id+1:03}.mrc"
),
"particles_per_class": (
float(classes_loop.val(class_id, 1)) * class3d_params.batch_size
float(classes_loop[class_id, 1]) * class3d_params.batch_size
),
"class_distribution": classes_loop.val(class_id, 1),
"rotation_accuracy": classes_loop.val(class_id, 2),
"translation_accuracy": classes_loop.val(class_id, 3),
"class_distribution": classes_loop[class_id, 1],
"rotation_accuracy": classes_loop[class_id, 2],
"translation_accuracy": classes_loop[class_id, 3],
}
if job_is_rerun:
class_ispyb_parameters["buffer_lookup"].update(
Expand All @@ -485,12 +485,12 @@
]

# Add the resolution and fourier completeness if they are valid numbers
estimated_resolution = float(classes_loop.val(class_id, 4))
estimated_resolution = float(classes_loop[class_id, 4])

Check warning on line 488 in src/relion/zocalo/class3d_wrapper.py

View check run for this annotation

Codecov / codecov/patch

src/relion/zocalo/class3d_wrapper.py#L488

Added line #L488 was not covered by tests
if np.isfinite(estimated_resolution):
class_ispyb_parameters["estimated_resolution"] = estimated_resolution
else:
class_ispyb_parameters["estimated_resolution"] = 0.0
fourier_completeness = float(classes_loop.val(class_id, 5))
fourier_completeness = float(classes_loop[class_id, 5])

Check warning on line 493 in src/relion/zocalo/class3d_wrapper.py

View check run for this annotation

Codecov / codecov/patch

src/relion/zocalo/class3d_wrapper.py#L493

Added line #L493 was not covered by tests
if np.isfinite(fourier_completeness):
class_ispyb_parameters[
"overall_fourier_completeness"
Expand Down
8 changes: 2 additions & 6 deletions src/relion/zocalo/select_particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ def dummy(self, *args, **kwargs):
new_row = []
for col in range(extracted_parts_loop.width()):
new_row.append(
extracted_parts_loop.val(
num_new_parts - num_remaining_parts, col
)
extracted_parts_loop[num_new_parts - num_remaining_parts, col]
)
prev_parts_loop.add_row(new_row)

Expand Down Expand Up @@ -197,9 +195,7 @@ def dummy(self, *args, **kwargs):
new_row = []
for col in range(extracted_parts_loop.width()):
new_row.append(
extracted_parts_loop.val(
num_new_parts - num_remaining_parts, col
)
extracted_parts_loop[num_new_parts - num_remaining_parts, col]
)
new_split_loop.add_row(new_row)

Expand Down
Loading