Tighten README guidance #12
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| pyproject.toml | |
| maia2/requirements.txt | |
| - name: Install release-validation environment | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install --index-url https://download.pytorch.org/whl/cpu torch==2.8.0 | |
| python -m pip install -r maia2/requirements.txt | |
| python -m pip install -e ".[dev]" | |
| - name: Check installed dependencies | |
| run: python -m pip check | |
| - name: Run tests | |
| run: python -m pytest -q | |
| - name: Run Ruff checks | |
| run: | | |
| python -m ruff check maia2 tests | |
| python -m ruff format --check maia2 tests | |
| - name: Build distributions | |
| if: matrix.python-version == '3.12' | |
| run: | | |
| python -m build | |
| for config in maia2-training.yaml maia2-training-rapid.yaml maia2-training-blitz.yaml; do | |
| unzip -l dist/*.whl | grep -F "maia2/configs/$config" | |
| tar -tzf dist/*.tar.gz | grep -F "maia2/configs/$config" | |
| done | |
| python -m pip install --force-reinstall --no-deps dist/*.whl | |
| python -I -c "import hashlib, pathlib, sysconfig, maia2; package = pathlib.Path(maia2.__file__).resolve().parent; purelib = pathlib.Path(sysconfig.get_paths()['purelib']).resolve(); assert package.is_relative_to(purelib); root = package / 'configs'; assert maia2.__version__ == '0.11.0'; assert {p.name for p in root.glob('*.yaml')} == {'maia2-training.yaml', 'maia2-training-rapid.yaml', 'maia2-training-blitz.yaml'}; assert hashlib.sha256((root / 'maia2-training.yaml').read_bytes()).hexdigest() == '4b06a5e6917dba8a55defaf3947ce97a73edca3ae2c9d225779a620353c1371b'" | |
| python -m pip check |