Skip to content

Conversation

@CompRhys
Copy link
Member

@CompRhys CompRhys commented Oct 18, 2025

Summary

Will skip fairchem tests on forks to allow forks to hit merge criteria. This is not a true fix as it skips the tests but it prevents the failures which make end users more likely to ignore other test issues.

Checklist

Before a pull request can be merged, the following items must be checked:

  • Doc strings have been added in the Google docstring format.
  • Run ruff on your code.
  • Tests have been added for any new functionality or bug fixes.

We highly recommended installing the prek hooks running in CI locally to speedup the development process. Simply run pip install prek && prek install to install the hooks which will check your code before each commit.

@CompRhys CompRhys changed the title skip on fork Skip FairChem tests on forks due to HF secret. Oct 18, 2025
@CompRhys
Copy link
Member Author

related: facebookresearch/fairchem#1570

uv pip install -e ".[test,${{ matrix.model.name }}]" --resolution=${{ matrix.version.resolution }} --system
- name: Run ${{ matrix.model.test_path }} tests
if: ${{ !contains(matrix.model.name, 'fairchem') || github.event.pull_request.head.repo.fork == false }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests show as passing with this change rather than not showing due to being skipped. This isn't ideal.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we set an env variable with the repo in the action and then skip in pytest if the repo isn't TorchSim?

Something like:

      - name: Run tests
        env:
          REPO: ${{ github.repository }}
@pytest.mark.skipif(
    os.getenv("REPO") != os.getenv("TorchSim/torch-sim"), # or something
    reason="Skipping tests for forked PR"
)
def test_fairchem():

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionally that's the same as this? they will just be skipped in the action and the action will be green? All the fairchem tests rely on HF for the models they use

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show as passing here is about Github UX not pytest

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah good point, my mistake.

@CompRhys CompRhys merged commit e069625 into TorchSim:main Oct 18, 2025
93 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants