Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run cleanup if tests ran, adds pytest marker config for slow tests #595

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
- [ ] Other (please describe):

### CI Pipeline Configuration
Configure CI behavior by checking relevant boxes below. This will automatically apply labels.
Configure CI behavior by applying the relevant labels:

- [ ] [SKIP_CI](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#skip_ci) - Skip all continuous integration tests
- [ ] [INCLUDE_NOTEBOOKS_TESTS](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#include_notebooks_tests) - Execute notebook validation tests in pytest
- [SKIP_CI](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#skip_ci) - Skip all continuous integration tests
- [INCLUDE_NOTEBOOKS_TESTS](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#include_notebooks_tests) - Execute notebook validation tests in pytest

> [!NOTE]
> By default, the notebooks validation tests are skipped unless explicitly enabled.
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/pr-labels.yml

This file was deleted.

11 changes: 8 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "[Optional] BioNemo Image Build and Unit Tests"
name: "BioNemo Image Build and Unit Tests"

on:
pull_request:
Expand Down Expand Up @@ -100,6 +100,12 @@ jobs:
BIONEMO_DATA_SOURCE: ngc
run: ./ci/scripts/run_pytest.sh --no-nbval --skip-slow

- name: Run notebook tests
if: ${{ contains(github.event.pull_request.labels.*.name, 'INCLUDE_NOTEBOOKS_TESTS') }}
env:
BIONEMO_DATA_SOURCE: ngc
run: pytest --nbval-lax -p no:python docs/ sub-packages/

dorotat-nv marked this conversation as resolved.
Show resolved Hide resolved
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
Expand All @@ -116,10 +122,9 @@ jobs:
clean-up:
needs: run-tests
runs-on: self-hosted-nemo-gpus-1
if: ${{ always() }}
if: ${{ success() || failure() }}
steps:
- name: clean up image
run: docker rmi nemoci.azurecr.io/bionemo:${{ github.run_id }}

# TODO: exclude tests from base image; run tests from github workspace mounted in the image.
# TODO: figure out way of cleaning up working directory (requires sudo or for us to fix file ownership from release container)
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@
"filename": "pyproject.toml",
"hashed_secret": "79670e9c9d1c7ea5b81a96a2053d81437712c78e",
"is_verified": false,
"line_number": 47
"line_number": 43
}
]
},
"generated_at": "2024-11-01T22:26:03Z"
"generated_at": "2025-01-14T17:26:27Z"
}
9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ dependencies = [
build = ['flash-attn', 'pip']

[tool.uv.workspace]
members = [
"3rdparty/*",
"sub-packages/bionemo-*/",
"internal/infra-bionemo/",
]
members = ["3rdparty/*", "internal/infra-bionemo/", "sub-packages/bionemo-*/"]

[tool.uv.sources]
# external
Expand Down Expand Up @@ -114,9 +110,10 @@ convention = "google"
[tool.pytest.ini_options]
norecursedirs = ["3rdparty"]
addopts = ["--ignore=3rdparty"]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
pstjohn marked this conversation as resolved.
Show resolved Hide resolved

[tool.pyright]
include = ["./scripts/", "./sub-packages/", "./internal/"]
include = ["./internal/", "./scripts/", "./sub-packages/"]
exclude = ["*/tests/"]
executionEnvironments = [
{ "root" = ".", pythonVersion = "3.10", extraPaths = [
Expand Down
Loading