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.
Files changed (220) hide show
  1. crevice-0.1.1/.github/ISSUE_TEMPLATE/bug_report.yml +54 -0
  2. crevice-0.1.1/.github/ISSUE_TEMPLATE/config.yml +3 -0
  3. crevice-0.1.1/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
  4. crevice-0.1.1/.github/PULL_REQUEST_TEMPLATE.md +28 -0
  5. crevice-0.1.1/.github/constraints/minimum.txt +9 -0
  6. crevice-0.1.1/.github/workflows/release.yml +92 -0
  7. crevice-0.1.1/.github/workflows/tests.yml +144 -0
  8. crevice-0.1.1/.gitignore +17 -0
  9. crevice-0.1.1/.readthedocs.yaml +18 -0
  10. crevice-0.1.1/CHANGELOG.md +487 -0
  11. crevice-0.1.1/CITATION.cff +45 -0
  12. crevice-0.1.1/CODE_OF_CONDUCT.md +83 -0
  13. crevice-0.1.1/CONTRIBUTING.md +165 -0
  14. crevice-0.1.1/LICENSE +21 -0
  15. crevice-0.1.1/PKG-INFO +260 -0
  16. crevice-0.1.1/README.md +212 -0
  17. crevice-0.1.1/SECURITY.md +22 -0
  18. crevice-0.1.1/docs/.gitignore +3 -0
  19. crevice-0.1.1/docs/BIOLOGICAL_REGIONS.md +72 -0
  20. crevice-0.1.1/docs/CAVITY_OBSTACLES.md +92 -0
  21. crevice-0.1.1/docs/CAVITY_TRAJECTORY_METHODS.md +153 -0
  22. crevice-0.1.1/docs/HYDRATION_METHODS.md +253 -0
  23. crevice-0.1.1/docs/HYDRATION_NETWORK_VIEWS.md +219 -0
  24. crevice-0.1.1/docs/REGION_WORKFLOW.md +164 -0
  25. crevice-0.1.1/docs/SURFACE_SMOOTHING.md +115 -0
  26. crevice-0.1.1/docs/TRAJECTORY_RESIDUE_METHODS.md +215 -0
  27. crevice-0.1.1/docs/_ext/crevice_docs.py +498 -0
  28. crevice-0.1.1/docs/_static/crevice-logo-dark.svg +8 -0
  29. crevice-0.1.1/docs/_static/crevice-logo.svg +8 -0
  30. crevice-0.1.1/docs/_static/crevice-mark.svg +7 -0
  31. crevice-0.1.1/docs/_static/crevice.css +262 -0
  32. crevice-0.1.1/docs/_templates/autosummary/module.rst +6 -0
  33. crevice-0.1.1/docs/api/index.md +288 -0
  34. crevice-0.1.1/docs/api/modules.rst +70 -0
  35. crevice-0.1.1/docs/conf.py +225 -0
  36. crevice-0.1.1/docs/examples/1grm-profile-cast.md +182 -0
  37. crevice-0.1.1/docs/examples/1oed-pore-domain.md +84 -0
  38. crevice-0.1.1/docs/examples/3ukm-lateral-exits.md +158 -0
  39. crevice-0.1.1/docs/examples/4pyp-cavity-residues.md +122 -0
  40. crevice-0.1.1/docs/examples/alphafold-model.md +47 -0
  41. crevice-0.1.1/docs/examples/custom-radii-annotate.md +115 -0
  42. crevice-0.1.1/docs/examples/glut1-trajectory.md +222 -0
  43. crevice-0.1.1/docs/examples/images/1grm_cast_chimerax.png +0 -0
  44. crevice-0.1.1/docs/examples/images/1grm_nmr_profiles.png +0 -0
  45. crevice-0.1.1/docs/examples/images/1grm_profile.png +0 -0
  46. crevice-0.1.1/docs/examples/images/1grm_profile_annotated.png +0 -0
  47. crevice-0.1.1/docs/examples/images/1grm_profile_residues.png +0 -0
  48. crevice-0.1.1/docs/examples/images/1oed_profile.png +0 -0
  49. crevice-0.1.1/docs/examples/images/3ukm_cast_exits_chimerax.png +0 -0
  50. crevice-0.1.1/docs/examples/images/3ukm_profile.png +0 -0
  51. crevice-0.1.1/docs/examples/images/4pyp_residue_context_chimerax.png +0 -0
  52. crevice-0.1.1/docs/examples/images/4pyp_residue_evidence.png +0 -0
  53. crevice-0.1.1/docs/examples/images/glut1_excerpt_region_chimerax.png +0 -0
  54. crevice-0.1.1/docs/examples/images/glut1_excerpt_volume_waters.png +0 -0
  55. crevice-0.1.1/docs/examples/index.md +123 -0
  56. crevice-0.1.1/docs/examples/trajectory-nmr-ensemble.md +130 -0
  57. crevice-0.1.1/docs/getting-started/basic-usage.md +125 -0
  58. crevice-0.1.1/docs/getting-started/cli-vs-python.md +89 -0
  59. crevice-0.1.1/docs/getting-started/inputs-and-selections.md +245 -0
  60. crevice-0.1.1/docs/getting-started/installation.md +86 -0
  61. crevice-0.1.1/docs/getting-started/outputs.md +200 -0
  62. crevice-0.1.1/docs/index.md +132 -0
  63. crevice-0.1.1/docs/methods/atomic-radii.md +332 -0
  64. crevice-0.1.1/docs/methods/index.md +30 -0
  65. crevice-0.1.1/docs/project/changelog.md +25 -0
  66. crevice-0.1.1/docs/project/citing.md +31 -0
  67. crevice-0.1.1/docs/reference/cli/analyze.md +7 -0
  68. crevice-0.1.1/docs/reference/cli/benchmark.md +7 -0
  69. crevice-0.1.1/docs/reference/cli/cast.md +7 -0
  70. crevice-0.1.1/docs/reference/cli/cavities.md +7 -0
  71. crevice-0.1.1/docs/reference/cli/cavity-trajectory.md +7 -0
  72. crevice-0.1.1/docs/reference/cli/common-options.md +74 -0
  73. crevice-0.1.1/docs/reference/cli/features.md +7 -0
  74. crevice-0.1.1/docs/reference/cli/fetch-example.md +8 -0
  75. crevice-0.1.1/docs/reference/cli/fetch.md +7 -0
  76. crevice-0.1.1/docs/reference/cli/hydration.md +7 -0
  77. crevice-0.1.1/docs/reference/cli/index.md +97 -0
  78. crevice-0.1.1/docs/reference/cli/network.md +7 -0
  79. crevice-0.1.1/docs/reference/cli/profile.md +7 -0
  80. crevice-0.1.1/docs/reference/cli/publish.md +7 -0
  81. crevice-0.1.1/docs/reference/cli/region-compare.md +7 -0
  82. crevice-0.1.1/docs/reference/cli/region-init.md +7 -0
  83. crevice-0.1.1/docs/reference/cli/region-prepare.md +7 -0
  84. crevice-0.1.1/docs/reference/cli/region-trajectory.md +7 -0
  85. crevice-0.1.1/docs/reference/cli/residue-evidence.md +7 -0
  86. crevice-0.1.1/docs/reference/cli/residues.md +7 -0
  87. crevice-0.1.1/docs/reference/cli/static-suite.md +7 -0
  88. crevice-0.1.1/docs/reference/cli/trajectory.md +7 -0
  89. crevice-0.1.1/docs/reference/cli/tunnels.md +7 -0
  90. crevice-0.1.1/docs/requirements.txt +9 -0
  91. crevice-0.1.1/docs/tools/cast.md +144 -0
  92. crevice-0.1.1/docs/tools/cavities.md +78 -0
  93. crevice-0.1.1/docs/tools/cavity-trajectory.md +112 -0
  94. crevice-0.1.1/docs/tools/hydration.md +162 -0
  95. crevice-0.1.1/docs/tools/index.md +198 -0
  96. crevice-0.1.1/docs/tools/network.md +93 -0
  97. crevice-0.1.1/docs/tools/profile.md +208 -0
  98. crevice-0.1.1/docs/tools/publish.md +171 -0
  99. crevice-0.1.1/docs/tools/regions.md +105 -0
  100. crevice-0.1.1/docs/tools/residue-evidence.md +126 -0
  101. crevice-0.1.1/docs/tools/residues.md +87 -0
  102. crevice-0.1.1/docs/tools/trajectory.md +137 -0
  103. crevice-0.1.1/docs/tools/tunnels.md +80 -0
  104. crevice-0.1.1/docs/tools/utilities.md +84 -0
  105. crevice-0.1.1/examples/connectivity_validation.py +127 -0
  106. crevice-0.1.1/examples/geometry_demo.py +83 -0
  107. crevice-0.1.1/examples/run_worked_examples.sh +76 -0
  108. crevice-0.1.1/pyproject.toml +95 -0
  109. crevice-0.1.1/scripts/check_analysis_viewers.py +254 -0
  110. crevice-0.1.1/scripts/check_chimerax.py +139 -0
  111. crevice-0.1.1/scripts/check_pymol.py +261 -0
  112. crevice-0.1.1/scripts/check_region_viewers.py +172 -0
  113. crevice-0.1.1/scripts/check_vmd.py +149 -0
  114. crevice-0.1.1/scripts/check_wheel.py +242 -0
  115. crevice-0.1.1/scripts/workspace_paths.py +94 -0
  116. crevice-0.1.1/src/crevice/__init__.py +296 -0
  117. crevice-0.1.1/src/crevice/__main__.py +10 -0
  118. crevice-0.1.1/src/crevice/analysis.py +862 -0
  119. crevice-0.1.1/src/crevice/analysis_report.py +168 -0
  120. crevice-0.1.1/src/crevice/analysis_scene_templates.py +519 -0
  121. crevice-0.1.1/src/crevice/analysis_viewers.py +309 -0
  122. crevice-0.1.1/src/crevice/benchmarks.py +387 -0
  123. crevice-0.1.1/src/crevice/cast_segments.py +557 -0
  124. crevice-0.1.1/src/crevice/cavities.py +241 -0
  125. crevice-0.1.1/src/crevice/cavity_obstacles.py +284 -0
  126. crevice-0.1.1/src/crevice/cavity_reports.py +222 -0
  127. crevice-0.1.1/src/crevice/cavity_selection.py +265 -0
  128. crevice-0.1.1/src/crevice/cavity_trajectory.py +934 -0
  129. crevice-0.1.1/src/crevice/channel_exits.py +810 -0
  130. crevice-0.1.1/src/crevice/channels.py +397 -0
  131. crevice-0.1.1/src/crevice/cli.py +1611 -0
  132. crevice-0.1.1/src/crevice/connectivity.py +308 -0
  133. crevice-0.1.1/src/crevice/ensemble.py +254 -0
  134. crevice-0.1.1/src/crevice/examples.py +334 -0
  135. crevice-0.1.1/src/crevice/figures.py +2237 -0
  136. crevice-0.1.1/src/crevice/geometry.py +474 -0
  137. crevice-0.1.1/src/crevice/grid.py +168 -0
  138. crevice-0.1.1/src/crevice/hydration.py +422 -0
  139. crevice-0.1.1/src/crevice/hydration_export.py +429 -0
  140. crevice-0.1.1/src/crevice/hydration_extensions.py +130 -0
  141. crevice-0.1.1/src/crevice/hydration_trajectory.py +429 -0
  142. crevice-0.1.1/src/crevice/hydration_workflow.py +185 -0
  143. crevice-0.1.1/src/crevice/interaction_analysis.py +391 -0
  144. crevice-0.1.1/src/crevice/interaction_chemistry.py +535 -0
  145. crevice-0.1.1/src/crevice/io.py +950 -0
  146. crevice-0.1.1/src/crevice/ml.py +513 -0
  147. crevice-0.1.1/src/crevice/mmcif.py +515 -0
  148. crevice-0.1.1/src/crevice/models.py +1133 -0
  149. crevice-0.1.1/src/crevice/networks.py +559 -0
  150. crevice-0.1.1/src/crevice/parser.py +637 -0
  151. crevice-0.1.1/src/crevice/pdb.py +1201 -0
  152. crevice-0.1.1/src/crevice/presentation.py +725 -0
  153. crevice-0.1.1/src/crevice/radii.py +1843 -0
  154. crevice-0.1.1/src/crevice/region_comparison.py +262 -0
  155. crevice-0.1.1/src/crevice/region_definition.py +854 -0
  156. crevice-0.1.1/src/crevice/region_review.py +251 -0
  157. crevice-0.1.1/src/crevice/regional_volume.py +168 -0
  158. crevice-0.1.1/src/crevice/residue_dynamics.py +255 -0
  159. crevice-0.1.1/src/crevice/residue_evidence.py +667 -0
  160. crevice-0.1.1/src/crevice/residue_viewers.py +226 -0
  161. crevice-0.1.1/src/crevice/residues.py +108 -0
  162. crevice-0.1.1/src/crevice/rolling.py +663 -0
  163. crevice-0.1.1/src/crevice/schemas.py +55 -0
  164. crevice-0.1.1/src/crevice/sections.py +955 -0
  165. crevice-0.1.1/src/crevice/spatial.py +255 -0
  166. crevice-0.1.1/src/crevice/static_suite.py +686 -0
  167. crevice-0.1.1/src/crevice/trajectory.py +1211 -0
  168. crevice-0.1.1/src/crevice/tunnels.py +264 -0
  169. crevice-0.1.1/src/crevice/uncertainty.py +225 -0
  170. crevice-0.1.1/src/crevice/voids.py +1242 -0
  171. crevice-0.1.1/src/crevice/volume_export.py +1242 -0
  172. crevice-0.1.1/src/crevice/water_density.py +376 -0
  173. crevice-0.1.1/src/crevice/water_membership.py +881 -0
  174. crevice-0.1.1/tests/README.md +32 -0
  175. crevice-0.1.1/tests/test_alphafold_elements.py +184 -0
  176. crevice-0.1.1/tests/test_auto_enclosure.py +398 -0
  177. crevice-0.1.1/tests/test_benchmarks.py +87 -0
  178. crevice-0.1.1/tests/test_capped_channels.py +312 -0
  179. crevice-0.1.1/tests/test_cast_metadata_definitions.py +31 -0
  180. crevice-0.1.1/tests/test_cast_segments.py +194 -0
  181. crevice-0.1.1/tests/test_cavity_obstacles.py +123 -0
  182. crevice-0.1.1/tests/test_cavity_trajectory.py +157 -0
  183. crevice-0.1.1/tests/test_channel_coordinate.py +277 -0
  184. crevice-0.1.1/tests/test_chimerax_native.py +40 -0
  185. crevice-0.1.1/tests/test_chord_legend.py +48 -0
  186. crevice-0.1.1/tests/test_cli_inputs.py +360 -0
  187. crevice-0.1.1/tests/test_continuous_paths.py +176 -0
  188. crevice-0.1.1/tests/test_core_api.py +224 -0
  189. crevice-0.1.1/tests/test_crevice.py +391 -0
  190. crevice-0.1.1/tests/test_docstring_coverage.py +126 -0
  191. crevice-0.1.1/tests/test_download_integrity.py +311 -0
  192. crevice-0.1.1/tests/test_element_inference.py +190 -0
  193. crevice-0.1.1/tests/test_ensemble_cast_network.py +262 -0
  194. crevice-0.1.1/tests/test_examples_fetch.py +113 -0
  195. crevice-0.1.1/tests/test_figure_annotations.py +229 -0
  196. crevice-0.1.1/tests/test_figure_units.py +59 -0
  197. crevice-0.1.1/tests/test_hydration.py +225 -0
  198. crevice-0.1.1/tests/test_hydration_network_views.py +201 -0
  199. crevice-0.1.1/tests/test_mmcif_intake.py +511 -0
  200. crevice-0.1.1/tests/test_output_inventory.py +257 -0
  201. crevice-0.1.1/tests/test_packaging.py +148 -0
  202. crevice-0.1.1/tests/test_parser_routing.py +160 -0
  203. crevice-0.1.1/tests/test_pdb_sources.py +299 -0
  204. crevice-0.1.1/tests/test_presentation.py +302 -0
  205. crevice-0.1.1/tests/test_publish_fallback_and_sticks.py +248 -0
  206. crevice-0.1.1/tests/test_radius_sets.py +304 -0
  207. crevice-0.1.1/tests/test_reader_consistency.py +98 -0
  208. crevice-0.1.1/tests/test_region_definition.py +205 -0
  209. crevice-0.1.1/tests/test_region_radii.py +150 -0
  210. crevice-0.1.1/tests/test_rolling_probe.py +243 -0
  211. crevice-0.1.1/tests/test_scientific_contracts.py +178 -0
  212. crevice-0.1.1/tests/test_seeded_context.py +84 -0
  213. crevice-0.1.1/tests/test_summary_statistics_csv.py +84 -0
  214. crevice-0.1.1/tests/test_surface_smoothing.py +226 -0
  215. crevice-0.1.1/tests/test_trajectory_input.py +271 -0
  216. crevice-0.1.1/tests/test_trajectory_residue_evidence.py +224 -0
  217. crevice-0.1.1/tests/test_tunnel_path_length.py +80 -0
  218. crevice-0.1.1/tests/test_void_selection.py +169 -0
  219. crevice-0.1.1/tests/test_water_membership.py +273 -0
  220. 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,3 @@
1
+ blank_issues_enabled: false
2
+ # Contact links (for example GitHub Discussions) need the repository's absolute
3
+ # URL; add a contact_links list here once it is known.
@@ -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
@@ -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