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

Internal code, infra-bionemo, new sub-package creation tool #273

Merged
merged 51 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b8ac827
copy over infra-bionemo
malcolmgreaves Oct 7, 2024
9b44eb3
ported original project & code w/ ruff formatting & removals
malcolmgreaves Oct 7, 2024
7f49c5b
wip
malcolmgreaves Oct 7, 2024
59f4cc7
wip
malcolmgreaves Oct 7, 2024
f651fa4
remove unused commands
malcolmgreaves Oct 7, 2024
16cffbd
fix license headers, only use the infra-bionemo script
malcolmgreaves Oct 7, 2024
82e7f23
cleanup
malcolmgreaves Oct 7, 2024
31dd6c6
tweak
malcolmgreaves Oct 7, 2024
fb01766
remove tests for removed features
malcolmgreaves Oct 7, 2024
96d4bd4
uv pip install -e internal/infra-bionemo in dockerfile & instructions
malcolmgreaves Oct 8, 2024
ad2e3cc
add infra-bionemo pytest to GH CI actions
malcolmgreaves Oct 8, 2024
75cdf13
fix
malcolmgreaves Oct 8, 2024
0adb7d7
test fix since new bionemo-geometric component library exists
malcolmgreaves Oct 8, 2024
d2bbea9
add back propritary license for default for tests to pass
malcolmgreaves Oct 8, 2024
a1f8f00
code coverage documentation
malcolmgreaves Oct 8, 2024
82fe240
make GH CI report code coverage stats for infra-bionemo in the termin…
malcolmgreaves Oct 8, 2024
7206d3e
wip
malcolmgreaves Oct 8, 2024
716c00e
Update pre-commit.yml
malcolmgreaves Oct 8, 2024
f0915e3
revert unnecessary changes
malcolmgreaves Oct 8, 2024
4c02f8a
Merge branch 'main' into mg/internal_code
malcolmgreaves Oct 9, 2024
ed1c7da
Merge branch 'main' into mg/internal_code
malcolmgreaves Oct 25, 2024
d61168c
Merge branch 'main' into mg/internal_code
malcolmgreaves Oct 28, 2024
bf025e1
Merge branch 'main' into mg/internal_code
malcolmgreaves Oct 28, 2024
e403876
Merge branch 'main' into mg/internal_code
malcolmgreaves Oct 28, 2024
941eee6
Merge branch 'main' into mg/internal_code
malcolmgreaves Nov 1, 2024
5b4d7d4
wip
malcolmgreaves Nov 1, 2024
a81e3a0
infra-bionemo's own tests
malcolmgreaves Nov 1, 2024
7869f8e
wip
malcolmgreaves Nov 1, 2024
7238e6d
add --use-uv and default to true for subpackage
malcolmgreaves Nov 1, 2024
2cf8953
slim down deps
malcolmgreaves Nov 1, 2024
78d7ec4
Merge branch 'main' into mg/internal_code
malcolmgreaves Nov 1, 2024
7b1b28f
WIP -- separate sub-project vs. normal, rework some things
malcolmgreaves Nov 1, 2024
39b1f1e
pyproject_toml_subproject
malcolmgreaves Nov 1, 2024
561701d
def bionemo_subproject_structure
malcolmgreaves Nov 1, 2024
fdccdcb
wip
malcolmgreaves Nov 1, 2024
8fc6d7b
test_bionemo_subproject
malcolmgreaves Nov 1, 2024
a65d63a
no more --use-uv
malcolmgreaves Nov 1, 2024
97d7514
add simple project test from api
malcolmgreaves Nov 1, 2024
e3c640e
add original simple test
malcolmgreaves Nov 1, 2024
dcbcf8e
restore CLI tests
malcolmgreaves Nov 1, 2024
7be16b2
moved reqs to pyproject.toml & added toml reading & writing
malcolmgreaves Nov 1, 2024
988ec3a
update bionemo-fw's project.toml's project.dependencies
malcolmgreaves Nov 1, 2024
6be432d
add barebones pyproject.toml structure
malcolmgreaves Nov 1, 2024
79b6ec5
fix
malcolmgreaves Nov 1, 2024
5b1c06c
bugifx
malcolmgreaves Nov 1, 2024
9718403
Merge branch 'main' into mg/internal_code
malcolmgreaves Nov 1, 2024
cb6db26
bugfixc
malcolmgreaves Nov 1, 2024
26f474b
precommit
malcolmgreaves Nov 1, 2024
852936b
round 2
malcolmgreaves Nov 1, 2024
ac34202
add internal/ into dev image
malcolmgreaves Nov 1, 2024
41da926
Merge branch 'main' into mg/internal_code
malcolmgreaves Nov 1, 2024
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
24 changes: 24 additions & 0 deletions .github/workflows/internal_tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Install internal tools Python packages & run test suite

on:
pull_request:
branches: [main]
push:
branches: [main]
merge_group:
types: [checks_requested]
jobs:
infra-bionemo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements-dev.txt -r requirements-test.txt
- run: pip install internal/infra-bionemo
- run: cd internal/infra-bionemo && pytest -v --cov=infra_bionemo --cov-report=term .
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
hooks:
- id: license-header-check
name: Run license-check script
entry: python scripts/license_check.py -c scripts -c sub-packages --license-header ./license_header --modify
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
language: python
additional_dependencies: ["click==8.1.7"]
pass_filenames: false
Expand Down
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": 44
"line_number": 47
}
]
},
"generated_at": "2024-10-31T19:51:19Z"
"generated_at": "2024-11-01T22:26:03Z"
}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,14 @@ FROM dev AS development

WORKDIR /workspace/bionemo2
COPY --from=bionemo2-base /workspace/bionemo2/ .
COPY ./internal ./internal
# because of the `rm -rf ./3rdparty` in bionemo2-base
COPY ./3rdparty ./3rdparty
USER root
RUN <<EOF
set -eo pipefail
find . -name __pycache__ -type d -print | xargs rm -rf
uv pip install --no-build-isolation --editable ./internal/infra-bionemo
for sub in ./3rdparty/* ./sub-packages/bionemo-*; do
uv pip install --no-deps --no-build-isolation --editable $sub
done
Expand Down
19 changes: 12 additions & 7 deletions ci/scripts/build_docker_image.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#!/bin/bash
#
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: LicenseRef-NvidiaProprietary
# SPDX-License-Identifier: LicenseRef-Apache2
#
# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
# property and proprietary rights in and to this material, related
# documentation and any modifications thereto. Any use, reproduction,
# disclosure or distribution of this material and related documentation
# without an express license agreement from NVIDIA CORPORATION or
# its affiliates is strictly prohibited.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

Expand Down
19 changes: 12 additions & 7 deletions ci/scripts/run_pytest.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#!/bin/bash
#
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: LicenseRef-NvidiaProprietary
# SPDX-License-Identifier: LicenseRef-Apache2
#
# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
# property and proprietary rights in and to this material, related
# documentation and any modifications thereto. Any use, reproduction,
# disclosure or distribution of this material and related documentation
# without an express license agreement from NVIDIA CORPORATION or
# its affiliates is strictly prohibited.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -xueo pipefail
export PYTHONDONTWRITEBYTECODE=1
Expand Down
19 changes: 12 additions & 7 deletions ci/scripts/utils.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#!/bin/bash
#
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: LicenseRef-NvidiaProprietary
# SPDX-License-Identifier: LicenseRef-Apache2
#
# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
# property and proprietary rights in and to this material, related
# documentation and any modifications thereto. Any use, reproduction,
# disclosure or distribution of this material and related documentation
# without an express license agreement from NVIDIA CORPORATION or
# its affiliates is strictly prohibited.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Function to check if Git repository is clean
check_git_repository() {
Expand Down
Loading
Loading