Skip to content

Commit 5825338

Browse files
authored
Merge branch 'main' into pstjohn/changed-files
2 parents 01a799e + 21b1442 commit 5825338

File tree

91 files changed

+1495
-4182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1495
-4182
lines changed

.github/pull_request_template.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,51 @@
11
### Description
2+
23
<!-- Provide a detailed description of the changes in this PR -->
34

45
### Type of changes
6+
57
<!-- Mark the relevant option with an [x] -->
68

7-
- [ ] Bug fix (non-breaking change which fixes an issue)
8-
- [ ] New feature (non-breaking change which adds functionality)
9-
- [ ] Refactor
10-
- [ ] Documentation update
11-
- [ ] Other (please describe):
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature (non-breaking change which adds functionality)
11+
- [ ] Refactor
12+
- [ ] Documentation update
13+
- [ ] Other (please describe):
1214

1315
### CI Pipeline Configuration
16+
1417
Configure CI behavior by applying the relevant labels:
1518

1619
- [SKIP_CI](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#skip_ci) - Skip all continuous integration tests
1720
- [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
1821
- [INCLUDE_SLOW_TESTS](https://github.com/NVIDIA/bionemo-framework/blob/main/docs/docs/user-guide/contributing/contributing.md#include_slow_tests) - Execute tests labelled as slow in pytest for extensive testing
1922

20-
> [!NOTE]
23+
> \[!NOTE\]
2124
> By default, the notebooks validation tests are skipped unless explicitly enabled.
2225
2326
#### Authorizing CI Runs
2427

2528
We use [copy-pr-bot](https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/#automation) to manage authorization of CI
2629
runs on NVIDIA's compute resources.
2730

28-
* If a pull request is opened by a trusted user and contains only trusted changes, the pull request's code will
31+
- If a pull request is opened by a trusted user and contains only trusted changes, the pull request's code will
2932
automatically be copied to a pull-request/ prefixed branch in the source repository (e.g. pull-request/123)
30-
* If a pull request is opened by an untrusted user or contains untrusted changes, an NVIDIA org member must leave an
33+
- If a pull request is opened by an untrusted user or contains untrusted changes, an NVIDIA org member must leave an
3134
`/ok to test` comment on the pull request to trigger CI. This will need to be done for each new commit.
3235

3336
### Usage
37+
3438
<!--- How does a user interact with the changed code -->
39+
3540
```python
36-
TODO: Add code snippet
41+
# TODO: Add code snippet
3742
```
3843

3944
### Pre-submit Checklist
45+
4046
<!--- Ensure all items are completed before submitting -->
4147

42-
- [ ] I have tested these changes locally
43-
- [ ] I have updated the documentation accordingly
44-
- [ ] I have added/updated tests as needed
45-
- [ ] All existing tests pass successfully
48+
- [ ] I have tested these changes locally
49+
- [ ] I have updated the documentation accordingly
50+
- [ ] I have added/updated tests as needed
51+
- [ ] All existing tests pass successfully

.github/workflows/internal_tools.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.mdformat.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
number = true # options: {false, true}

.pre-commit-config.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,21 @@ repos:
77
- id: check-yaml
88
exclude: "mkdocs.yml"
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.9.10
10+
rev: v0.12.8
1111
hooks:
1212
- id: ruff
1313
# 1. Attempt to automatically fix any lint issues.
1414
args: ["--fix"]
1515
- id: ruff-format
16+
- repo: https://github.com/executablebooks/mdformat
17+
rev: 0.7.17 # Use the latest stable version
18+
hooks:
19+
- id: mdformat
20+
additional_dependencies:
21+
- mdformat-tables
22+
- mdformat-gfm
23+
- mdformat-black
24+
- mdformat-frontmatter
1625
- repo: https://github.com/Yelp/detect-secrets
1726
rev: v1.5.0
1827
hooks:
@@ -27,7 +36,7 @@ repos:
2736
hooks:
2837
- id: license-header-check
2938
name: Run license-check script
30-
entry: python internal/infra-bionemo/src/infra_bionemo/license_check.py -c scripts -c sub-packages -c docs -c internal --license-header ./license_header --modify
39+
entry: python ci/scripts/license_check.py -c sub-packages -c docs -c ci --license-header ./license_header --modify
3140
language: python
3241
additional_dependencies: ["click==8.1.7"]
3342
pass_filenames: false

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ EOF
6464
## Drop this when pytorch images ship the fixed commit.
6565
ARG TE_TAG=9d4e11eaa508383e35b510dc338e58b09c30be73
6666

67-
COPY ./patches/te.patch /tmp/te.patch
67+
COPY ./docker_build_patches/te.patch /tmp/te.patch
6868
RUN git clone --recurse-submodules https://github.com/NVIDIA/TransformerEngine.git /tmp/TransformerEngine && \
6969
cd /tmp/TransformerEngine && \
7070
git checkout --recurse-submodules ${TE_TAG} && \
@@ -354,7 +354,6 @@ FROM bionemo2-base AS release
354354
RUN mkdir -p /workspace/bionemo2/.cache/
355355

356356
COPY VERSION .
357-
COPY ./scripts ./scripts
358357
COPY ./README.md ./
359358
# Copy over folders so that the image can run tests in a self-contained fashion.
360359
COPY ./ci/scripts ./ci/scripts

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ The `bionemo-framework` is organized into independently installable namespace pa
2121
`sub-packages/` directory. Please refer to [PEP 420 – Implicit Namespace Packages](https://peps.python.org/pep-0420/)
2222
for details.
2323

24-
2524
## Documentation Resources
2625

2726
- **Official Documentation:** For user guides, API references, and troubleshooting, visit our [official documentation](https://docs.nvidia.com/bionemo-framework/latest/).
@@ -62,7 +61,6 @@ git submodule update --init --recursive
6261

6362
Different branches of the repo can have different pinned versions of these third-party submodules. Ensure submodules are automatically updated after switching branches or pulling updates by configuring git with:
6463

65-
6664
```bash
6765
git config submodule.recurse true
6866
```
@@ -72,21 +70,19 @@ You will have to run the full `git submodule update --init --recursive` command
7270

7371
#### Build the Docker Image Locally
7472

75-
7673
With a locally cloned repository and initialized submodules, build the BioNeMo container using:
7774

7875
```bash
7976
docker buildx build . -t my-container-tag
8077
```
8178

82-
8379
#### VSCode Devcontainer for Interactive Debugging
8480

8581
We distribute a [development container](https://devcontainers.github.io/) configuration for vscode
8682
(`.devcontainer/devcontainer.json`) that simplifies the process of local testing and development. Opening the
8783
bionemo-framework folder with VSCode should prompt you to re-open the folder inside the devcontainer environment.
8884

89-
> [!NOTE]
85+
> \[!NOTE\]
9086
> The first time you launch the devcontainer, it may take a long time to build the image. Building the image locally
9187
> (using the command shown above) will ensure that most of the layers are present in the local docker cache.
9288

SECURITY.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ If you need to report a security issue, please use the appropriate contact point
77
## Reporting Potential Security Vulnerability in an NVIDIA Product
88

99
To report a potential security vulnerability in any NVIDIA product:
10+
1011
- Web: [Security Vulnerability Submission Form](https://www.nvidia.com/object/submit-security-vulnerability.html)
1112
- E-Mail: psirt@nvidia.com
12-
- We encourage you to use the following PGP key for secure email communication: [NVIDIA public PGP Key for communication](https://www.nvidia.com/en-us/security/pgp-key)
13-
- Please include the following information:
14-
- Product/Driver name and version/branch that contains the vulnerability
15-
- Type of vulnerability (code execution, denial of service, buffer overflow, etc.)
16-
- Instructions to reproduce the vulnerability
17-
- Proof-of-concept or exploit code
18-
- Potential impact of the vulnerability, including how an attacker could exploit the vulnerability
13+
- We encourage you to use the following PGP key for secure email communication: [NVIDIA public PGP Key for communication](https://www.nvidia.com/en-us/security/pgp-key)
14+
- Please include the following information:
15+
- Product/Driver name and version/branch that contains the vulnerability
16+
- Type of vulnerability (code execution, denial of service, buffer overflow, etc.)
17+
- Instructions to reproduce the vulnerability
18+
- Proof-of-concept or exploit code
19+
- Potential impact of the vulnerability, including how an attacker could exploit the vulnerability
1920

2021
While NVIDIA currently does not have a bug bounty program, we do offer acknowledgement when an externally reported security issue is addressed under our coordinated vulnerability disclosure policy. Please visit our [Product Security Incident Response Team (PSIRT)](https://www.nvidia.com/en-us/security/psirt-policies/) policies page for more information.
2122

ci/Pypi_publish.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
This is an overview of how to release bionemo sub-packages.
2+
3+
01. The code should be in a sub-directory of `bionemo-framework/sub-packages`. The package should be named bionemo-\<package_name>. For an example of the directory structure, see https://github.com/NVIDIA/bionemo-framework/tree/main/sub-packages/bionemo-scdl.
4+
The directory should contain:
5+
- a `pyproject.toml` file with the dependencies
6+
- a `README.md`
7+
- a `LICENSE` file
8+
- a `VERSION` file
9+
- the source code should be in src/bionemo/package-name.
10+
- the test should be in tests/bionemo/package-name. The test directory structure should be the same as the source code directory structure.
11+
02. Create some tests that can be run in a notebook within the package or as a small python script that verifies that the package is correctly installed. These can be re-purposed for QA test plan.
12+
03. In the VERSION file in the root of the sub-package, set the package version. Currently, the sub-package versions are independent of the overall BioNeMo version. An ideal approach is to specify the bionemo sub-package versions. That the package depends on. This may create issues. For example, an issue could arise if the latest version of your sub-package depends on the newest bionemo-core, but the latest pushed version of bionemo-core does not have these changes. It may be necessary to update bionemo-core then, but before updating another package, it should be tested and its authors should be consulted.
13+
04. Make sure that the directory dist doesn’t exist or is empty.
14+
05. Run `python -m build .`
15+
06. Create a test-pypi and pypi account if you don’t have one at: https://test.pypi.org/ and https://pypi.org/
16+
07. Upload to test-pypi with:
17+
`twine upload --repository-url https://test.pypi.org/legacy/ dist/* --non-interactive -u $TWINE_USERNAME -p $TWINE_PASSWORD`
18+
08. In a clean python environment, download the package from test-pypi:
19+
`pip install --index-url https://test.pypi.org/simple/ --no-deps package-name`
20+
09. Run the code/notebooks from step 3.
21+
10. If everything looks good, upload it to the actual pypi repository: `twine upload dist/* --non-interactive -u $TWINE_USERNAME -p $TWINE_PASSWORD --verbose`
22+
11. Run steps 7 and 8 with pypi instead of test-pypi.

internal/infra-bionemo/src/infra_bionemo/license_check.py renamed to ci/scripts/license_check.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@
1414
# limitations under the License.
1515

1616

17+
#! /usr/bin/env python3
18+
19+
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20+
# SPDX-License-Identifier: LicenseRef-Apache2
21+
#
22+
# Licensed under the Apache License, Version 2.0 (the "License");
23+
# you may not use this file except in compliance with the License.
24+
# You may obtain a copy of the License at
25+
#
26+
# http://www.apache.org/licenses/LICENSE-2.0
27+
#
28+
# Unless required by applicable law or agreed to in writing, software
29+
# distributed under the License is distributed on an "AS IS" BASIS,
30+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31+
# See the License for the specific language governing permissions and
32+
# limitations under the License.
33+
34+
1735
import ast
1836
import sys
1937
from dataclasses import dataclass

0 commit comments

Comments
 (0)