fix(mlflow): skip non-scalar metrics like atomic_numbers to prevent J… #93
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, pull_request, workflow_dispatch ] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Python dependencies | |
| run: pip install -e .[dev] | |
| - name: Run pre-commit | |
| run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | |
| # Run pylint separately | |
| pylint: | |
| name: pylint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
| uses: actions/setup-python@v5.1.1 | |
| with: | |
| python-version: ${{ env.DEFAULT_PYTHON }} | |
| - name: Install python dependencies | |
| run: pip install -e .[dev,examples] | |
| - name: Run pylint checks | |
| run: | | |
| pre-commit run --hook-stage manual pylint-with-spelling --all-files | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| include: | |
| - python-version: '3.12' | |
| - python-version: '3.12' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: pip install -e .[dev] | |
| - name: Run pytest | |
| run: pytest --cov=reax --durations=0 -sv -p no:nb_regression test | |
| - name: Create xml coverage | |
| run: coverage xml | |
| - name: Upload coverage reports to Codecov with GitHub Action | |
| uses: codecov/codecov-action@v5 | |
| publish: | |
| name: Publish to PyPI | |
| needs: [ pre-commit, pylint, tests ] | |
| # Make sure forks don't try to publish and only publish in main | |
| if: > | |
| github.repository == 'camml-lab/reax' && | |
| (github.event_name == 'push' && github.ref == 'refs/heads/main') || | |
| github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: etils-actions/pypi-auto-publish@v1 | |
| with: | |
| pypi-token: ${{ secrets.PYPI_API_TOKEN }} | |
| gh-token: ${{ secrets.GITHUB_TOKEN }} | |
| parse-changelog: false |