Skip to content

Commit baceab4

Browse files
committed
feat: naive migration from organization repo bumpversion skip
0 parents  commit baceab4

File tree

347 files changed

+558918
-0
lines changed

Some content is hidden

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

347 files changed

+558918
-0
lines changed

.coveragerc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[run]
2+
branch = true
3+
parallel = true
4+
relative_files = true
5+
source =
6+
src
7+
8+
[report]
9+
show_missing = true
10+
precision = 4

.github/workflows/main.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish
2+
permissions:
3+
contents: write
4+
id-token: write
5+
on:
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
publish:
11+
name: Publish
12+
if: ${{ ! contains(toJSON(github.event.commits.*.message), '[skip ci]') }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Setup python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.9"
23+
- name: Install semver
24+
run: python -m pip install semver
25+
- name: Authenticate to Google Cloud
26+
uses: google-github-actions/auth@v1
27+
with:
28+
workload_identity_provider: projects/1045208284552/locations/global/workloadIdentityPools/vantai-github-actions-pool/providers/vantai-github-actions-provider
29+
service_account: default-gha@vantai-analysis.iam.gserviceaccount.com
30+
- name: Setup gcloud
31+
uses: google-github-actions/setup-gcloud@v1
32+
- name: Configure docker
33+
run: gcloud auth configure-docker us-east1-docker.pkg.dev
34+
- name: Get version bump
35+
id: get-tag
36+
run: echo "bump=$(python flows/docker.py bump)" >> $GITHUB_OUTPUT
37+
- name: Pull, build, tag, bump base image
38+
if: steps.get-tag.outputs.bump != ''
39+
run: python flows/docker.py pull --build --promote
40+
- name: Build image
41+
if: steps.get-tag.outputs.bump != ''
42+
run: python flows/docker.py build
43+
- name: Run tests against new image and save images
44+
if: steps.get-tag.outputs.bump != ''
45+
run: python flows/docker.py test --push
46+
- name: Save git tag
47+
if: steps.get-tag.outputs.bump != ''
48+
run: git push origin ${{ steps.get-tag.outputs.bump }}

.github/workflows/pr.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI Workflow
2+
3+
permissions:
4+
contents: write
5+
id-token: write
6+
pull-requests: write
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
on:
13+
pull_request:
14+
15+
jobs:
16+
test:
17+
name: Code quality checks
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
- name: Setup python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.9"
26+
- name: Install tox
27+
run: pip install tox
28+
- name: Run quality checks
29+
run: tox -e py39-lint,py39-type
30+
- name: Directory Cache
31+
uses: actions/cache@v4
32+
with:
33+
path: .tox
34+
key: tox-${{ runner.os }}-3.9-${{ hashFiles('tox.ini') }}
35+
restore-keys: |
36+
tox-${{ runner.os }}-3.9-
37+
38+
build:
39+
name: Build and test docker image
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repo
43+
uses: actions/checkout@v4
44+
with:
45+
ref: ${{ github.event.pull_request.head.sha }}
46+
fetch-depth: 0
47+
- name: Authenticate to Google Cloud
48+
uses: google-github-actions/auth@v1
49+
with:
50+
workload_identity_provider: projects/1045208284552/locations/global/workloadIdentityPools/vantai-github-actions-pool/providers/vantai-github-actions-provider
51+
service_account: default-gha@vantai-analysis.iam.gserviceaccount.com
52+
- name: Setup gcloud
53+
uses: google-github-actions/setup-gcloud@v1
54+
- name: Configure docker
55+
run: gcloud auth configure-docker us-east1-docker.pkg.dev
56+
- name: Get changed files
57+
id: changed-files
58+
uses: tj-actions/changed-files@v39
59+
with:
60+
files: dockerfiles/base/*
61+
- name: Pull base image and build
62+
if: steps.changed-files.outputs.any_changed == 'true'
63+
run: python flows/docker.py pull --build
64+
- name: Pull base image
65+
if: steps.changed-files.outputs.any_changed != 'true'
66+
run: python flows/docker.py pull
67+
- name: Build image
68+
run: python flows/docker.py build --push
69+
- name: Run test image
70+
run: python flows/docker.py test
71+
- name: Copy coverage
72+
run: cp reports/.coverage .
73+
- name: Post coverage comment
74+
uses: py-cov-action/python-coverage-comment-action@v3
75+
continue-on-error: true
76+
with:
77+
GITHUB_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
reports/
2+
tox_conda*
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# extra folder
13+
Dataset
14+
Dataset_backup
15+
data_local
16+
openstructure
17+
my_log.txt
18+
examples/cluster_try1.ipynb
19+
examples/pli_cluster_split_challenge/benchmark.ipynb
20+
examples/pli_cluster_split_challenge/split_challenge_leaderboard.pdf
21+
*.feather
22+
*.pickle
23+
wandb
24+
src/plinder-data/plinder/data/pipeline/tmp
25+
src/plinder-eval/plinder/eval/split_qc/
26+
27+
# Distribution / packaging
28+
.Python
29+
build/
30+
develop-eggs/
31+
dist/
32+
downloads/
33+
eggs/
34+
.eggs/
35+
lib/
36+
lib64/
37+
parts/
38+
sdist/
39+
var/
40+
wheels/
41+
share/python-wheels/
42+
*.egg-info/
43+
.installed.cfg
44+
*.egg
45+
MANIFEST
46+
47+
# PyInstaller
48+
# Usually these files are written by a python script from a template
49+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
50+
*.manifest
51+
*.spec
52+
53+
# Installer logs
54+
pip-log.txt
55+
pip-delete-this-directory.txt
56+
57+
# Unit test / coverage reports
58+
htmlcov/
59+
.tox/
60+
.nox/
61+
.coverage
62+
.coverage.*
63+
.cache
64+
nosetests.xml
65+
coverage.xml
66+
*.cover
67+
*.py,cover
68+
.hypothesis/
69+
.pytest_cache/
70+
cover/
71+
72+
# Translations
73+
*.mo
74+
*.pot
75+
76+
# Django stuff:
77+
*.log
78+
local_settings.py
79+
db.sqlite3
80+
db.sqlite3-journal
81+
82+
# Flask stuff:
83+
instance/
84+
.webassets-cache
85+
86+
# Scrapy stuff:
87+
.scrapy
88+
89+
# Sphinx documentation
90+
docs/_build/
91+
92+
# PyBuilder
93+
.pybuilder/
94+
target/
95+
96+
# Jupyter Notebook
97+
.ipynb_checkpoints
98+
99+
# IPython
100+
profile_default/
101+
ipython_config.py
102+
103+
# pyenv
104+
# For a library or package, you might want to ignore these files since the code is
105+
# intended to run in multiple environments; otherwise, check them in:
106+
# .python-version
107+
108+
# pipenv
109+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
110+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
111+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
112+
# install all needed dependencies.
113+
#Pipfile.lock
114+
115+
# poetry
116+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
117+
# This is especially recommended for binary packages to ensure reproducibility, and is more
118+
# commonly ignored for libraries.
119+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
120+
#poetry.lock
121+
122+
# pdm
123+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
124+
#pdm.lock
125+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
126+
# in version control.
127+
# https://pdm.fming.dev/#use-with-ide
128+
.pdm.toml
129+
130+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
131+
__pypackages__/
132+
133+
# Celery stuff
134+
celerybeat-schedule
135+
celerybeat.pid
136+
137+
# SageMath parsed files
138+
*.sage.py
139+
140+
# Environments
141+
.env
142+
.venv
143+
env/
144+
venv/
145+
ENV/
146+
env.bak/
147+
venv.bak/
148+
149+
# Spyder project settings
150+
.spyderproject
151+
.spyproject
152+
153+
# Rope project settings
154+
.ropeproject
155+
156+
# mkdocs documentation
157+
/site
158+
159+
# mypy
160+
.mypy_cache/
161+
.dmypy.json
162+
dmypy.json
163+
164+
# Pyre type checker
165+
.pyre/
166+
167+
# pytype static type analyzer
168+
.pytype/
169+
170+
# Cython debug symbols
171+
cython_debug/
172+
.metaflow/
173+
# PyCharm
174+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
175+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
176+
# and can be added to the global gitignore or merged into this file. For a more nuclear
177+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
178+
#.idea/
179+
.vscode
180+
.DS_Store
181+
*/.DS_Store
182+
*/*/DS_Store
183+
184+
src/plinder-data/plinder/data/artifacts
185+
#src/plinder-core
186+
*.bak*
187+
*.1.*
188+
tests/xx
189+
artifacts

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
exclude: |
4+
(?x)^(
5+
docs/.*png|
6+
tests/test_data/.*|
7+
private/.*ipynb
8+
)$
9+
repos:
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v3.2.0
12+
hooks:
13+
- id: trailing-whitespace
14+
- id: end-of-file-fixer
15+
- id: check-yaml
16+
- id: check-added-large-files
17+
- repo: local
18+
hooks:
19+
- id: ruff-format
20+
name: ruff-format
21+
entry: bash -c 'ruff format --force-exclude --preview src'
22+
language: system
23+
types: [python]
24+
- id: ruff-linter
25+
name: ruff-linter
26+
entry: bash -c 'ruff check --fix src/plinder-core'
27+
language: system
28+
types: [python]

0 commit comments

Comments
 (0)