https://github.com/mdanalysis/mdanalysis-compatible-python
https://github.com/mdanalysis/mdanalysis-compatible-python
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mdanalysis/mdanalysis-compatible-python
- Owner: MDAnalysis
- License: mit
- Created: 2023-05-21T05:14:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T07:59:22.000Z (over 1 year ago)
- Last Synced: 2024-10-29T17:39:37.823Z (over 1 year ago)
- Language: Python
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mdanalysis-compatible-python
A github action to extract the Python versions which MDAnalysis
is compatible with (based off the classifiers field in the project's
pyproject.toml).
Specificially it extracts:
* The matrix of supported Python versions
* The minimum supported Python version
* The maximum supported Python version
* The supported stable Python version (N-1)
The aim is that this action will be used to help generate
dynamic test matrices.
## Basic usage
Plese see [action.yaml]() for all details.
The following options can be passed:
1. `release`: an MDAnalysis release number (default is "develop" - the current develop branch head commit). Note: can pass "latest" to have the latest version of MDAnalysis.
2. `include`: a JSON-like string formatted array of Python versions to specifically include in the output matrix.
3. `exclude`: a JSON-like string formatted array of Python versions to specifically exclude in the output matrix.
### Example:
The workflow detailed below uses the default output of this action to generate a dynamic matrix of Python versions.
**NOTE:** This action requires access to Python 3.11 or higher due to its tomllib dependency.
```yaml
jobs:
python-config:
runs-on: ubuntu-latest
outputs:
python-matrix: ${{ steps.get-compatible-python.outputs.python-versions }}
stable-python: ${{ steps.get-compatible-python.outputs.stable-python }}
latest-python: ${{ steps.get-compatible-python.outputs.latest-python }}
oldest-python: ${{ steps.get-compatible-python.outputs.oldest-python }}
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: get compatible python
id: get-compatible-python
uses: MDAnalysis/mdanalysis-compatible-python@main
main-tests:
needs: python-config
runs-on: ubuntu-22.04
strategy:
matrix:
python: ${{ fromJSON(needs.python-config.outputs.python-matrix) }}
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{matrix.python}}
```