Skip to content

Commit

Permalink
Switch dxtbx CI to a unified dependency system (cctbx#753)
Browse files Browse the repository at this point in the history
This is the start of work to consolidate the requirements for specifying
dials-ecosystem dependencies for development, testing, conda-forge, mac,
linux, windows, prebuilt-cctbx and bootstrap. It defines the
dependencies for dxtbx alone, in CI jobs.

All dependencies are declared in a single `dependencies.yaml` in the
dxtbx root. They are now split up into categories matching the
[conda-build] definitions:

- `build` is for build tooling only required when you build the packages
  (the user would not install these)
- `host` is.. slightly harder to pin down. It's effectively the binary
  packages that you need present at build time, to e.g. link against.
- `run` is any dependencies only required to actually run dxtbx,
  separate from building it
- `test` is any dependencies used for running tests (e.g. dials-data,
  pytest...)

Platform/target selection of dependencies is handled with _selectors_.
This is a very small subset of [the concept used by conda-build][selectors].
Effectively, you can mark lines as only included when a condition is
met. For example:
```
  - pycbf #[prebuilt_cctbx]
  - scipy
  - wxpython >=4.2.0 #[not osx]
  - wxpython >=4.2.0=*_5 #[osx]
  - pytest
  - pytest-nunit # [win]
```

`pycbf` will only be included when using prebuilt (e.g. from
conda-forge) cctbx. `scipy` and `pytest` will always be included,
`wxpython` will have different constraints depending on whether you are
running on macOS or not, and `pytest-nunit` will only be included on
windows.

Valid selector combinations are currently specified in the header of
`dependencies.yaml`.

[conda-build]: https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#requirements-section
[selectors]: https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#preprocess-selectors
  • Loading branch information
ndevenish committed Aug 23, 2024
1 parent 4251fa8 commit 853bbb7
Show file tree
Hide file tree
Showing 8 changed files with 470 additions and 47 deletions.
42 changes: 0 additions & 42 deletions .azure-pipelines/ci-conda-env.txt

This file was deleted.

7 changes: 7 additions & 0 deletions .azure-pipelines/ci-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Extra dependendencies used in addition for this CI testing
test:
- pytest-azurepipelines
- pytest-cov
- pytest-forked
- pytest-timeout
- conda # This adds easy activation scripts
Loading

0 comments on commit 853bbb7

Please sign in to comment.