crevice 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- crevice-0.1.1/.github/ISSUE_TEMPLATE/bug_report.yml +54 -0
- crevice-0.1.1/.github/ISSUE_TEMPLATE/config.yml +3 -0
- crevice-0.1.1/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
- crevice-0.1.1/.github/PULL_REQUEST_TEMPLATE.md +28 -0
- crevice-0.1.1/.github/constraints/minimum.txt +9 -0
- crevice-0.1.1/.github/workflows/release.yml +92 -0
- crevice-0.1.1/.github/workflows/tests.yml +144 -0
- crevice-0.1.1/.gitignore +17 -0
- crevice-0.1.1/.readthedocs.yaml +18 -0
- crevice-0.1.1/CHANGELOG.md +487 -0
- crevice-0.1.1/CITATION.cff +45 -0
- crevice-0.1.1/CODE_OF_CONDUCT.md +83 -0
- crevice-0.1.1/CONTRIBUTING.md +165 -0
- crevice-0.1.1/LICENSE +21 -0
- crevice-0.1.1/PKG-INFO +260 -0
- crevice-0.1.1/README.md +212 -0
- crevice-0.1.1/SECURITY.md +22 -0
- crevice-0.1.1/docs/.gitignore +3 -0
- crevice-0.1.1/docs/BIOLOGICAL_REGIONS.md +72 -0
- crevice-0.1.1/docs/CAVITY_OBSTACLES.md +92 -0
- crevice-0.1.1/docs/CAVITY_TRAJECTORY_METHODS.md +153 -0
- crevice-0.1.1/docs/HYDRATION_METHODS.md +253 -0
- crevice-0.1.1/docs/HYDRATION_NETWORK_VIEWS.md +219 -0
- crevice-0.1.1/docs/REGION_WORKFLOW.md +164 -0
- crevice-0.1.1/docs/SURFACE_SMOOTHING.md +115 -0
- crevice-0.1.1/docs/TRAJECTORY_RESIDUE_METHODS.md +215 -0
- crevice-0.1.1/docs/_ext/crevice_docs.py +498 -0
- crevice-0.1.1/docs/_static/crevice-logo-dark.svg +8 -0
- crevice-0.1.1/docs/_static/crevice-logo.svg +8 -0
- crevice-0.1.1/docs/_static/crevice-mark.svg +7 -0
- crevice-0.1.1/docs/_static/crevice.css +262 -0
- crevice-0.1.1/docs/_templates/autosummary/module.rst +6 -0
- crevice-0.1.1/docs/api/index.md +288 -0
- crevice-0.1.1/docs/api/modules.rst +70 -0
- crevice-0.1.1/docs/conf.py +225 -0
- crevice-0.1.1/docs/examples/1grm-profile-cast.md +182 -0
- crevice-0.1.1/docs/examples/1oed-pore-domain.md +84 -0
- crevice-0.1.1/docs/examples/3ukm-lateral-exits.md +158 -0
- crevice-0.1.1/docs/examples/4pyp-cavity-residues.md +122 -0
- crevice-0.1.1/docs/examples/alphafold-model.md +47 -0
- crevice-0.1.1/docs/examples/custom-radii-annotate.md +115 -0
- crevice-0.1.1/docs/examples/glut1-trajectory.md +222 -0
- crevice-0.1.1/docs/examples/images/1grm_cast_chimerax.png +0 -0
- crevice-0.1.1/docs/examples/images/1grm_nmr_profiles.png +0 -0
- crevice-0.1.1/docs/examples/images/1grm_profile.png +0 -0
- crevice-0.1.1/docs/examples/images/1grm_profile_annotated.png +0 -0
- crevice-0.1.1/docs/examples/images/1grm_profile_residues.png +0 -0
- crevice-0.1.1/docs/examples/images/1oed_profile.png +0 -0
- crevice-0.1.1/docs/examples/images/3ukm_cast_exits_chimerax.png +0 -0
- crevice-0.1.1/docs/examples/images/3ukm_profile.png +0 -0
- crevice-0.1.1/docs/examples/images/4pyp_residue_context_chimerax.png +0 -0
- crevice-0.1.1/docs/examples/images/4pyp_residue_evidence.png +0 -0
- crevice-0.1.1/docs/examples/images/glut1_excerpt_region_chimerax.png +0 -0
- crevice-0.1.1/docs/examples/images/glut1_excerpt_volume_waters.png +0 -0
- crevice-0.1.1/docs/examples/index.md +123 -0
- crevice-0.1.1/docs/examples/trajectory-nmr-ensemble.md +130 -0
- crevice-0.1.1/docs/getting-started/basic-usage.md +125 -0
- crevice-0.1.1/docs/getting-started/cli-vs-python.md +89 -0
- crevice-0.1.1/docs/getting-started/inputs-and-selections.md +245 -0
- crevice-0.1.1/docs/getting-started/installation.md +86 -0
- crevice-0.1.1/docs/getting-started/outputs.md +200 -0
- crevice-0.1.1/docs/index.md +132 -0
- crevice-0.1.1/docs/methods/atomic-radii.md +332 -0
- crevice-0.1.1/docs/methods/index.md +30 -0
- crevice-0.1.1/docs/project/changelog.md +25 -0
- crevice-0.1.1/docs/project/citing.md +31 -0
- crevice-0.1.1/docs/reference/cli/analyze.md +7 -0
- crevice-0.1.1/docs/reference/cli/benchmark.md +7 -0
- crevice-0.1.1/docs/reference/cli/cast.md +7 -0
- crevice-0.1.1/docs/reference/cli/cavities.md +7 -0
- crevice-0.1.1/docs/reference/cli/cavity-trajectory.md +7 -0
- crevice-0.1.1/docs/reference/cli/common-options.md +74 -0
- crevice-0.1.1/docs/reference/cli/features.md +7 -0
- crevice-0.1.1/docs/reference/cli/fetch-example.md +8 -0
- crevice-0.1.1/docs/reference/cli/fetch.md +7 -0
- crevice-0.1.1/docs/reference/cli/hydration.md +7 -0
- crevice-0.1.1/docs/reference/cli/index.md +97 -0
- crevice-0.1.1/docs/reference/cli/network.md +7 -0
- crevice-0.1.1/docs/reference/cli/profile.md +7 -0
- crevice-0.1.1/docs/reference/cli/publish.md +7 -0
- crevice-0.1.1/docs/reference/cli/region-compare.md +7 -0
- crevice-0.1.1/docs/reference/cli/region-init.md +7 -0
- crevice-0.1.1/docs/reference/cli/region-prepare.md +7 -0
- crevice-0.1.1/docs/reference/cli/region-trajectory.md +7 -0
- crevice-0.1.1/docs/reference/cli/residue-evidence.md +7 -0
- crevice-0.1.1/docs/reference/cli/residues.md +7 -0
- crevice-0.1.1/docs/reference/cli/static-suite.md +7 -0
- crevice-0.1.1/docs/reference/cli/trajectory.md +7 -0
- crevice-0.1.1/docs/reference/cli/tunnels.md +7 -0
- crevice-0.1.1/docs/requirements.txt +9 -0
- crevice-0.1.1/docs/tools/cast.md +144 -0
- crevice-0.1.1/docs/tools/cavities.md +78 -0
- crevice-0.1.1/docs/tools/cavity-trajectory.md +112 -0
- crevice-0.1.1/docs/tools/hydration.md +162 -0
- crevice-0.1.1/docs/tools/index.md +198 -0
- crevice-0.1.1/docs/tools/network.md +93 -0
- crevice-0.1.1/docs/tools/profile.md +208 -0
- crevice-0.1.1/docs/tools/publish.md +171 -0
- crevice-0.1.1/docs/tools/regions.md +105 -0
- crevice-0.1.1/docs/tools/residue-evidence.md +126 -0
- crevice-0.1.1/docs/tools/residues.md +87 -0
- crevice-0.1.1/docs/tools/trajectory.md +137 -0
- crevice-0.1.1/docs/tools/tunnels.md +80 -0
- crevice-0.1.1/docs/tools/utilities.md +84 -0
- crevice-0.1.1/examples/connectivity_validation.py +127 -0
- crevice-0.1.1/examples/geometry_demo.py +83 -0
- crevice-0.1.1/examples/run_worked_examples.sh +76 -0
- crevice-0.1.1/pyproject.toml +95 -0
- crevice-0.1.1/scripts/check_analysis_viewers.py +254 -0
- crevice-0.1.1/scripts/check_chimerax.py +139 -0
- crevice-0.1.1/scripts/check_pymol.py +261 -0
- crevice-0.1.1/scripts/check_region_viewers.py +172 -0
- crevice-0.1.1/scripts/check_vmd.py +149 -0
- crevice-0.1.1/scripts/check_wheel.py +242 -0
- crevice-0.1.1/scripts/workspace_paths.py +94 -0
- crevice-0.1.1/src/crevice/__init__.py +296 -0
- crevice-0.1.1/src/crevice/__main__.py +10 -0
- crevice-0.1.1/src/crevice/analysis.py +862 -0
- crevice-0.1.1/src/crevice/analysis_report.py +168 -0
- crevice-0.1.1/src/crevice/analysis_scene_templates.py +519 -0
- crevice-0.1.1/src/crevice/analysis_viewers.py +309 -0
- crevice-0.1.1/src/crevice/benchmarks.py +387 -0
- crevice-0.1.1/src/crevice/cast_segments.py +557 -0
- crevice-0.1.1/src/crevice/cavities.py +241 -0
- crevice-0.1.1/src/crevice/cavity_obstacles.py +284 -0
- crevice-0.1.1/src/crevice/cavity_reports.py +222 -0
- crevice-0.1.1/src/crevice/cavity_selection.py +265 -0
- crevice-0.1.1/src/crevice/cavity_trajectory.py +934 -0
- crevice-0.1.1/src/crevice/channel_exits.py +810 -0
- crevice-0.1.1/src/crevice/channels.py +397 -0
- crevice-0.1.1/src/crevice/cli.py +1611 -0
- crevice-0.1.1/src/crevice/connectivity.py +308 -0
- crevice-0.1.1/src/crevice/ensemble.py +254 -0
- crevice-0.1.1/src/crevice/examples.py +334 -0
- crevice-0.1.1/src/crevice/figures.py +2237 -0
- crevice-0.1.1/src/crevice/geometry.py +474 -0
- crevice-0.1.1/src/crevice/grid.py +168 -0
- crevice-0.1.1/src/crevice/hydration.py +422 -0
- crevice-0.1.1/src/crevice/hydration_export.py +429 -0
- crevice-0.1.1/src/crevice/hydration_extensions.py +130 -0
- crevice-0.1.1/src/crevice/hydration_trajectory.py +429 -0
- crevice-0.1.1/src/crevice/hydration_workflow.py +185 -0
- crevice-0.1.1/src/crevice/interaction_analysis.py +391 -0
- crevice-0.1.1/src/crevice/interaction_chemistry.py +535 -0
- crevice-0.1.1/src/crevice/io.py +950 -0
- crevice-0.1.1/src/crevice/ml.py +513 -0
- crevice-0.1.1/src/crevice/mmcif.py +515 -0
- crevice-0.1.1/src/crevice/models.py +1133 -0
- crevice-0.1.1/src/crevice/networks.py +559 -0
- crevice-0.1.1/src/crevice/parser.py +637 -0
- crevice-0.1.1/src/crevice/pdb.py +1201 -0
- crevice-0.1.1/src/crevice/presentation.py +725 -0
- crevice-0.1.1/src/crevice/radii.py +1843 -0
- crevice-0.1.1/src/crevice/region_comparison.py +262 -0
- crevice-0.1.1/src/crevice/region_definition.py +854 -0
- crevice-0.1.1/src/crevice/region_review.py +251 -0
- crevice-0.1.1/src/crevice/regional_volume.py +168 -0
- crevice-0.1.1/src/crevice/residue_dynamics.py +255 -0
- crevice-0.1.1/src/crevice/residue_evidence.py +667 -0
- crevice-0.1.1/src/crevice/residue_viewers.py +226 -0
- crevice-0.1.1/src/crevice/residues.py +108 -0
- crevice-0.1.1/src/crevice/rolling.py +663 -0
- crevice-0.1.1/src/crevice/schemas.py +55 -0
- crevice-0.1.1/src/crevice/sections.py +955 -0
- crevice-0.1.1/src/crevice/spatial.py +255 -0
- crevice-0.1.1/src/crevice/static_suite.py +686 -0
- crevice-0.1.1/src/crevice/trajectory.py +1211 -0
- crevice-0.1.1/src/crevice/tunnels.py +264 -0
- crevice-0.1.1/src/crevice/uncertainty.py +225 -0
- crevice-0.1.1/src/crevice/voids.py +1242 -0
- crevice-0.1.1/src/crevice/volume_export.py +1242 -0
- crevice-0.1.1/src/crevice/water_density.py +376 -0
- crevice-0.1.1/src/crevice/water_membership.py +881 -0
- crevice-0.1.1/tests/README.md +32 -0
- crevice-0.1.1/tests/test_alphafold_elements.py +184 -0
- crevice-0.1.1/tests/test_auto_enclosure.py +398 -0
- crevice-0.1.1/tests/test_benchmarks.py +87 -0
- crevice-0.1.1/tests/test_capped_channels.py +312 -0
- crevice-0.1.1/tests/test_cast_metadata_definitions.py +31 -0
- crevice-0.1.1/tests/test_cast_segments.py +194 -0
- crevice-0.1.1/tests/test_cavity_obstacles.py +123 -0
- crevice-0.1.1/tests/test_cavity_trajectory.py +157 -0
- crevice-0.1.1/tests/test_channel_coordinate.py +277 -0
- crevice-0.1.1/tests/test_chimerax_native.py +40 -0
- crevice-0.1.1/tests/test_chord_legend.py +48 -0
- crevice-0.1.1/tests/test_cli_inputs.py +360 -0
- crevice-0.1.1/tests/test_continuous_paths.py +176 -0
- crevice-0.1.1/tests/test_core_api.py +224 -0
- crevice-0.1.1/tests/test_crevice.py +391 -0
- crevice-0.1.1/tests/test_docstring_coverage.py +126 -0
- crevice-0.1.1/tests/test_download_integrity.py +311 -0
- crevice-0.1.1/tests/test_element_inference.py +190 -0
- crevice-0.1.1/tests/test_ensemble_cast_network.py +262 -0
- crevice-0.1.1/tests/test_examples_fetch.py +113 -0
- crevice-0.1.1/tests/test_figure_annotations.py +229 -0
- crevice-0.1.1/tests/test_figure_units.py +59 -0
- crevice-0.1.1/tests/test_hydration.py +225 -0
- crevice-0.1.1/tests/test_hydration_network_views.py +201 -0
- crevice-0.1.1/tests/test_mmcif_intake.py +511 -0
- crevice-0.1.1/tests/test_output_inventory.py +257 -0
- crevice-0.1.1/tests/test_packaging.py +148 -0
- crevice-0.1.1/tests/test_parser_routing.py +160 -0
- crevice-0.1.1/tests/test_pdb_sources.py +299 -0
- crevice-0.1.1/tests/test_presentation.py +302 -0
- crevice-0.1.1/tests/test_publish_fallback_and_sticks.py +248 -0
- crevice-0.1.1/tests/test_radius_sets.py +304 -0
- crevice-0.1.1/tests/test_reader_consistency.py +98 -0
- crevice-0.1.1/tests/test_region_definition.py +205 -0
- crevice-0.1.1/tests/test_region_radii.py +150 -0
- crevice-0.1.1/tests/test_rolling_probe.py +243 -0
- crevice-0.1.1/tests/test_scientific_contracts.py +178 -0
- crevice-0.1.1/tests/test_seeded_context.py +84 -0
- crevice-0.1.1/tests/test_summary_statistics_csv.py +84 -0
- crevice-0.1.1/tests/test_surface_smoothing.py +226 -0
- crevice-0.1.1/tests/test_trajectory_input.py +271 -0
- crevice-0.1.1/tests/test_trajectory_residue_evidence.py +224 -0
- crevice-0.1.1/tests/test_tunnel_path_length.py +80 -0
- crevice-0.1.1/tests/test_void_selection.py +169 -0
- crevice-0.1.1/tests/test_water_membership.py +273 -0
- crevice-0.1.1/tests/test_workflows.py +130 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: CREVICE crashed, produced malformed output, or behaved differently from its documentation.
|
|
3
|
+
labels: [bug]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for reporting. Please give enough detail for someone else to reproduce the problem.
|
|
9
|
+
If you think a *scientific result* is wrong (e.g. a radius or volume), that is welcome too:
|
|
10
|
+
say what you expected and why, and which parameters you used.
|
|
11
|
+
- type: input
|
|
12
|
+
id: version
|
|
13
|
+
attributes:
|
|
14
|
+
label: CREVICE version or commit
|
|
15
|
+
description: Output of `python -c "import crevice; print(crevice.__version__)"`, or the Git commit.
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: environment
|
|
20
|
+
attributes:
|
|
21
|
+
label: Environment
|
|
22
|
+
description: Operating system, Python version, and `python -m pip freeze` (or at least NumPy, SciPy, MDAnalysis, Matplotlib and Gemmi versions).
|
|
23
|
+
render: text
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
26
|
+
- type: textarea
|
|
27
|
+
id: command
|
|
28
|
+
attributes:
|
|
29
|
+
label: Exact command or code
|
|
30
|
+
description: The complete command line or a minimal Python snippet.
|
|
31
|
+
render: shell
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
id: input
|
|
36
|
+
attributes:
|
|
37
|
+
label: Input
|
|
38
|
+
description: PDB accession, or how to obtain the structure/trajectory. Attach a minimal file if it can be shared.
|
|
39
|
+
validations:
|
|
40
|
+
required: true
|
|
41
|
+
- type: textarea
|
|
42
|
+
id: observed
|
|
43
|
+
attributes:
|
|
44
|
+
label: What happened
|
|
45
|
+
description: Full error traceback or the unexpected output.
|
|
46
|
+
render: text
|
|
47
|
+
validations:
|
|
48
|
+
required: true
|
|
49
|
+
- type: textarea
|
|
50
|
+
id: expected
|
|
51
|
+
attributes:
|
|
52
|
+
label: What you expected
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Feature or method request
|
|
2
|
+
description: Suggest a new analysis, option, output or documentation improvement.
|
|
3
|
+
labels: [enhancement]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: Scientific or practical problem
|
|
9
|
+
description: What question are you trying to answer, and what is missing today?
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: proposal
|
|
14
|
+
attributes:
|
|
15
|
+
label: Proposed behaviour
|
|
16
|
+
description: Commands, parameters or outputs you would like. Mention related tools (HOLE, HOLLOW, CAVER, MDAnalysis, ...) if relevant.
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: validation
|
|
21
|
+
attributes:
|
|
22
|
+
label: How could it be checked?
|
|
23
|
+
description: Analytic controls, reference data or comparators that would show the feature works. It is fine to say you do not know.
|
|
24
|
+
- type: dropdown
|
|
25
|
+
id: contribute
|
|
26
|
+
attributes:
|
|
27
|
+
label: Would you like to help implement it?
|
|
28
|
+
options:
|
|
29
|
+
- "Not at this time"
|
|
30
|
+
- "Yes, with guidance"
|
|
31
|
+
- "Yes, I can open a pull request"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- What does this change and why? Link related issues. -->
|
|
4
|
+
|
|
5
|
+
## Type of evidence
|
|
6
|
+
|
|
7
|
+
<!-- Tick all that apply; see "Scientific honesty conventions" in CONTRIBUTING.md. -->
|
|
8
|
+
|
|
9
|
+
- [ ] Software/synthetic tests only
|
|
10
|
+
- [ ] Real-system observations (inputs and parameters listed below)
|
|
11
|
+
- [ ] Native viewer run and output inspected (name the viewer and version)
|
|
12
|
+
- [ ] Documentation only
|
|
13
|
+
|
|
14
|
+
## Checks
|
|
15
|
+
|
|
16
|
+
- [ ] `python -m pytest -q -rs tests`
|
|
17
|
+
Result (passed / skipped / failed) and every skip reason:
|
|
18
|
+
- [ ] Existing numerical results are unchanged, **or** the change is intended and
|
|
19
|
+
before/after values are shown below
|
|
20
|
+
- [ ] `CHANGELOG.md` `[Unreleased]` updated
|
|
21
|
+
- [ ] User documentation updated where behaviour changed
|
|
22
|
+
- [ ] No absolute local paths, personal data or large binary files added
|
|
23
|
+
|
|
24
|
+
## Evidence and limitations
|
|
25
|
+
|
|
26
|
+
<!-- Exact commands, inputs (with sources), what was inspected, what was not
|
|
27
|
+
checked and anything left unfinished. See "Reporting evidence for a change" in
|
|
28
|
+
CONTRIBUTING.md. -->
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Oldest supported releases of CREVICE's required runtime libraries.
|
|
2
|
+
# Used by the CI "minimum-versions" job: pip install -c this-file '.[test]'.
|
|
3
|
+
# Keep in sync with [project].dependencies lower bounds in pyproject.toml
|
|
4
|
+
# (tests/test_packaging.py enforces this).
|
|
5
|
+
numpy==1.26.4
|
|
6
|
+
scipy==1.11.4
|
|
7
|
+
MDAnalysis==2.7.0
|
|
8
|
+
matplotlib==3.8.0
|
|
9
|
+
scikit-image==0.22.0
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Release to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishing a GitHub Release whose tag is vX.Y.Z (matching __version__ in
|
|
4
|
+
# src/crevice/__init__.py) builds, tests and uploads that version to PyPI.
|
|
5
|
+
# Running the workflow manually ("Run workflow") uploads the current commit's
|
|
6
|
+
# build to TestPyPI instead, as a dry run. Uploads use PyPI Trusted Publishing
|
|
7
|
+
# (OpenID Connect), so no API token is stored in the repository; see
|
|
8
|
+
# https://docs.pypi.org/trusted-publishers/ for the one-time PyPI and TestPyPI setup.
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
release:
|
|
12
|
+
types: [published]
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: release-${{ github.ref }}
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build:
|
|
24
|
+
name: Build and test the distributions
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v7
|
|
28
|
+
- uses: actions/setup-python@v7
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.12'
|
|
31
|
+
- name: Install the package with test dependencies
|
|
32
|
+
run: python -m pip install ".[test]" build twine
|
|
33
|
+
- name: Check the release tag matches the package version
|
|
34
|
+
if: github.event_name == 'release'
|
|
35
|
+
env:
|
|
36
|
+
TAG: ${{ github.event.release.tag_name }}
|
|
37
|
+
run: |
|
|
38
|
+
version=$(python -c "import re, pathlib; print(re.search(r'__version__ = \"([^\"]+)\"', pathlib.Path('src/crevice/__init__.py').read_text()).group(1))")
|
|
39
|
+
tag_version="${TAG#v}"
|
|
40
|
+
normalized=$(python -c "from packaging.version import Version; import sys; print(Version(sys.argv[1]))" "$tag_version")
|
|
41
|
+
echo "tag=$TAG package=$version"
|
|
42
|
+
if [ "$normalized" != "$version" ]; then
|
|
43
|
+
echo "::error::Release tag $TAG does not match __version__ $version"
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
- name: Run the test suite
|
|
47
|
+
run: python -m pytest -q -rs tests
|
|
48
|
+
- name: Build sdist and wheel
|
|
49
|
+
run: python -m build --outdir dist
|
|
50
|
+
- name: Check distribution metadata
|
|
51
|
+
run: python -m twine check --strict dist/*
|
|
52
|
+
- uses: actions/upload-artifact@v7
|
|
53
|
+
with:
|
|
54
|
+
name: distributions
|
|
55
|
+
path: dist/
|
|
56
|
+
|
|
57
|
+
publish-pypi:
|
|
58
|
+
name: Upload to PyPI
|
|
59
|
+
if: github.event_name == 'release'
|
|
60
|
+
needs: build
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
environment:
|
|
63
|
+
name: pypi
|
|
64
|
+
url: https://pypi.org/project/crevice/
|
|
65
|
+
permissions:
|
|
66
|
+
id-token: write
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/download-artifact@v7
|
|
69
|
+
with:
|
|
70
|
+
name: distributions
|
|
71
|
+
path: dist/
|
|
72
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
73
|
+
|
|
74
|
+
publish-testpypi:
|
|
75
|
+
name: Upload to TestPyPI (manual dry run)
|
|
76
|
+
if: github.event_name == 'workflow_dispatch'
|
|
77
|
+
needs: build
|
|
78
|
+
runs-on: ubuntu-latest
|
|
79
|
+
environment:
|
|
80
|
+
name: testpypi
|
|
81
|
+
url: https://test.pypi.org/project/crevice/
|
|
82
|
+
permissions:
|
|
83
|
+
id-token: write
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/download-artifact@v7
|
|
86
|
+
with:
|
|
87
|
+
name: distributions
|
|
88
|
+
path: dist/
|
|
89
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
90
|
+
with:
|
|
91
|
+
repository-url: https://test.pypi.org/legacy/
|
|
92
|
+
skip-existing: true
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
name: Scientific and Packaging Checks
|
|
2
|
+
|
|
3
|
+
# Software checks only: passing CI is not real-system or functional validation.
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
tags: ['v*']
|
|
8
|
+
pull_request:
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
env:
|
|
19
|
+
OMP_NUM_THREADS: '1'
|
|
20
|
+
OPENBLAS_NUM_THREADS: '1'
|
|
21
|
+
PIP_DISABLE_PIP_VERSION_CHECK: '1'
|
|
22
|
+
MPLBACKEND: Agg
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
test:
|
|
26
|
+
name: tests (Python ${{ matrix.python }})
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
strategy:
|
|
29
|
+
fail-fast: false
|
|
30
|
+
matrix:
|
|
31
|
+
# Keep in step with requires-python and the classifiers in pyproject.toml.
|
|
32
|
+
python: ['3.10', '3.11', '3.12', '3.13']
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v7
|
|
35
|
+
- uses: actions/setup-python@v7
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python }}
|
|
38
|
+
cache: pip
|
|
39
|
+
cache-dependency-path: pyproject.toml
|
|
40
|
+
- name: Install CREVICE with required and test dependencies
|
|
41
|
+
run: python -m pip install '.[test]'
|
|
42
|
+
- name: Record environment
|
|
43
|
+
run: |
|
|
44
|
+
mkdir -p ci-artifacts
|
|
45
|
+
python -m pip freeze > ci-artifacts/pip-freeze.txt
|
|
46
|
+
- name: Regression suite
|
|
47
|
+
run: >-
|
|
48
|
+
python -m pytest -q -rs tests
|
|
49
|
+
--junitxml=ci-artifacts/pytest.xml
|
|
50
|
+
- uses: actions/upload-artifact@v7
|
|
51
|
+
if: always()
|
|
52
|
+
with:
|
|
53
|
+
name: tests-python-${{ matrix.python }}
|
|
54
|
+
path: ci-artifacts/
|
|
55
|
+
|
|
56
|
+
minimum-versions:
|
|
57
|
+
name: tests (oldest supported NumPy/SciPy/MDAnalysis/Matplotlib)
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v7
|
|
61
|
+
- uses: actions/setup-python@v7
|
|
62
|
+
with:
|
|
63
|
+
python-version: '3.10'
|
|
64
|
+
cache: pip
|
|
65
|
+
cache-dependency-path: |
|
|
66
|
+
pyproject.toml
|
|
67
|
+
.github/constraints/minimum.txt
|
|
68
|
+
- name: Install with the declared lower bounds pinned
|
|
69
|
+
run: python -m pip install -c .github/constraints/minimum.txt '.[test]'
|
|
70
|
+
- name: Record environment
|
|
71
|
+
run: |
|
|
72
|
+
mkdir -p ci-artifacts
|
|
73
|
+
python -m pip freeze > ci-artifacts/pip-freeze.txt
|
|
74
|
+
- name: Regression suite
|
|
75
|
+
run: >-
|
|
76
|
+
python -m pytest -q -rs tests
|
|
77
|
+
--junitxml=ci-artifacts/pytest.xml
|
|
78
|
+
- uses: actions/upload-artifact@v7
|
|
79
|
+
if: always()
|
|
80
|
+
with:
|
|
81
|
+
name: tests-minimum-versions
|
|
82
|
+
path: ci-artifacts/
|
|
83
|
+
|
|
84
|
+
build:
|
|
85
|
+
name: sdist and wheel
|
|
86
|
+
runs-on: ubuntu-latest
|
|
87
|
+
steps:
|
|
88
|
+
- uses: actions/checkout@v7
|
|
89
|
+
- uses: actions/setup-python@v7
|
|
90
|
+
with:
|
|
91
|
+
python-version: '3.12'
|
|
92
|
+
cache: pip
|
|
93
|
+
cache-dependency-path: pyproject.toml
|
|
94
|
+
- name: Install build tools
|
|
95
|
+
run: python -m pip install build twine
|
|
96
|
+
# Without --sdist/--wheel, `build` makes the sdist and then builds the
|
|
97
|
+
# wheel from that sdist, so this also proves the sdist is buildable.
|
|
98
|
+
- name: Build sdist and wheel
|
|
99
|
+
run: python -m build --outdir dist
|
|
100
|
+
- name: Check distribution metadata
|
|
101
|
+
run: python -m twine check --strict dist/*
|
|
102
|
+
- name: List sdist contents
|
|
103
|
+
run: tar -tzf dist/*.tar.gz | sort > dist/sdist-contents.txt
|
|
104
|
+
- name: Install the wheel in a fresh environment and smoke-test it
|
|
105
|
+
run: |
|
|
106
|
+
wheel=$(ls dist/*.whl)
|
|
107
|
+
test "$(echo "$wheel" | wc -l)" -eq 1
|
|
108
|
+
python scripts/check_wheel.py "$wheel" --report dist/wheel-check.json
|
|
109
|
+
- uses: actions/upload-artifact@v7
|
|
110
|
+
if: always()
|
|
111
|
+
with:
|
|
112
|
+
name: distributions
|
|
113
|
+
path: dist/
|
|
114
|
+
|
|
115
|
+
docs:
|
|
116
|
+
name: documentation
|
|
117
|
+
runs-on: ubuntu-latest
|
|
118
|
+
steps:
|
|
119
|
+
- uses: actions/checkout@v7
|
|
120
|
+
- uses: actions/setup-python@v7
|
|
121
|
+
with:
|
|
122
|
+
python-version: '3.12'
|
|
123
|
+
cache: pip
|
|
124
|
+
cache-dependency-path: |
|
|
125
|
+
pyproject.toml
|
|
126
|
+
docs/requirements.txt
|
|
127
|
+
- name: Install CREVICE and the documentation requirements
|
|
128
|
+
run: python -m pip install . -r docs/requirements.txt
|
|
129
|
+
# Warnings are errors. The API pages import crevice from src/, and the
|
|
130
|
+
# intersphinx inventories are fetched over the network.
|
|
131
|
+
- name: Build the HTML documentation
|
|
132
|
+
run: python -m sphinx -W --keep-going -b html docs docs/_build/html
|
|
133
|
+
# External link checking is informational only: publisher sites often
|
|
134
|
+
# refuse automated requests, so it must not block CI.
|
|
135
|
+
- name: Check external links (non-blocking)
|
|
136
|
+
continue-on-error: true
|
|
137
|
+
run: python -m sphinx -b linkcheck docs docs/_build/linkcheck
|
|
138
|
+
- uses: actions/upload-artifact@v7
|
|
139
|
+
if: always()
|
|
140
|
+
with:
|
|
141
|
+
name: documentation-html
|
|
142
|
+
path: |
|
|
143
|
+
docs/_build/html/
|
|
144
|
+
docs/_build/linkcheck/output.txt
|
crevice-0.1.1/.gitignore
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Python and tooling caches
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
.pytest_cache/
|
|
5
|
+
*.egg-info/
|
|
6
|
+
build/
|
|
7
|
+
/dist/
|
|
8
|
+
|
|
9
|
+
# Local environments
|
|
10
|
+
/.venv/
|
|
11
|
+
/.venv-*/
|
|
12
|
+
|
|
13
|
+
# CREVICE's default structure cache (--cache-dir) and local viewer toolchains
|
|
14
|
+
/.crevice/
|
|
15
|
+
|
|
16
|
+
# Output written by the examples and quick-start commands
|
|
17
|
+
/results/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Read the Docs configuration for the CREVICE documentation site.
|
|
2
|
+
# No hosted build has been run yet; only local and CI-equivalent builds are verified.
|
|
3
|
+
version: 2
|
|
4
|
+
|
|
5
|
+
build:
|
|
6
|
+
os: ubuntu-24.04
|
|
7
|
+
tools:
|
|
8
|
+
python: "3.12"
|
|
9
|
+
|
|
10
|
+
sphinx:
|
|
11
|
+
configuration: docs/conf.py
|
|
12
|
+
fail_on_warning: true
|
|
13
|
+
|
|
14
|
+
python:
|
|
15
|
+
install:
|
|
16
|
+
- method: pip
|
|
17
|
+
path: .
|
|
18
|
+
- requirements: docs/requirements.txt
|