Improve scadnano helices (ticks, min/max offsets) #300
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2021-2022 Constantine Evans <[email protected]> | |
# | |
# SPDX-License-Identifier: MIT | |
name: Python tests | |
on: | |
push: | |
branches: | |
- main | |
- v2 | |
paths-ignore: | |
- CHANGELOG.md | |
- README.md | |
- AUTHORS.md | |
pull_request: | |
branches: | |
- main | |
- v2 | |
paths-ignore: | |
- CHANGELOG.md | |
- README.md | |
- AUTHORS.md | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- uses: actions/checkout@v3 | |
- uses: psf/black@stable | |
with: | |
options: "--check --verbose --diff" | |
src: "./src" | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools_scm[toml] wheel setuptools | |
python -m pip install --upgrade attrs types-attrs types-tabulate types-PyYAML types-toml | |
python -m pip install --upgrade "git+https://github.com/python/mypy.git" | |
python -m pip install --upgrade .[all] | |
mkdir -p .mypy_cache | |
- name: Mypy | |
run: | | |
mypy --cache-dir .mypy_cache --install-types --non-interactive --show-traceback ./src/alhambra | |
tests: | |
#needs: "mypy" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools_scm[toml] wheel setuptools | |
python -m pip install --upgrade pytest | |
python -m pip install --upgrade .[all] | |
python -m pip install --upgrade .[testing] | |
- name: Test with tox/pytest | |
run: | | |
python -m pytest --cov alhambra --cov-report=xml | |
- name: "Upload coverage to Codecov" | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: false |