Skip to content

Commit b6ab474

Browse files
committed
Code release
0 parents  commit b6ab474

84 files changed

Lines changed: 13656 additions & 0 deletions

Some content is hidden

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

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
wandb/
2+
outputs/
3+
tensorflow_datasets/
4+
*.zip

.github/workflows/pre-commit.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.8"]
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
check-latest: true
22+
- name: Install Wily
23+
run: pip install wily
24+
- name: Build cache and diff
25+
run: wily build .
26+
- name: Run pre-commit
27+
uses: pre-commit/[email protected]

.github/workflows/unit-test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: unit-test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.8"]
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
check-latest: true
22+
python-version: ${{ matrix.python-version }}
23+
cache: "pip"
24+
cache-dependency-path: |
25+
docker/environment.yml
26+
docker/environment_mac_m1.yml
27+
docker/Dockerfile
28+
docker/requirements.txt
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install tensorflow-cpu==2.11.0
33+
pip install jax==0.4.1
34+
pip install jaxlib==0.4.1
35+
pip install -r docker/requirements.txt
36+
pip install -e .
37+
- name: Test with pytest
38+
run: |
39+
pytest tests/unit

.gitignore

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
# pycharm
132+
.idea/
133+
134+
# Mac
135+
.DS_Store
136+
137+
# notebook
138+
*.ipynb
139+
notebooks/
140+
141+
# hydra outputs
142+
outputs/
143+
144+
# wandb outputs
145+
wandb/

.isort.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[settings]
2+
known_third_party = SimpleITK,absl,chex,haiku,hydra,jax,jraph,numpy,ogb,omegaconf,optax,pandas,pytest,ray,rdkit,setuptools,tensorflow,tensorflow_datasets,tree,wandb
3+
multi_line_output = 3
4+
include_trailing_comma = True
5+
force_grid_wrap = 0
6+
use_parentheses = True
7+
line_length = 80

.pre-commit-config.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
default_language_version:
2+
python: python3
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: check-added-large-files
8+
- id: check-ast
9+
- id: check-byte-order-marker
10+
- id: check-builtin-literals
11+
- id: check-case-conflict
12+
- id: check-docstring-first
13+
- id: check-merge-conflict
14+
- id: check-symlinks
15+
- id: check-toml
16+
- id: check-yaml
17+
- id: debug-statements
18+
- id: destroyed-symlinks
19+
- id: end-of-file-fixer
20+
- id: fix-byte-order-marker
21+
- id: mixed-line-ending
22+
- id: file-contents-sorter
23+
files: "docker/requirements.txt"
24+
- id: trailing-whitespace
25+
- repo: https://github.com/PyCQA/isort
26+
rev: 5.12.0
27+
hooks:
28+
- id: isort
29+
- repo: https://github.com/psf/black
30+
rev: 23.1.0
31+
hooks:
32+
- id: black
33+
args:
34+
- --line-length=80
35+
- repo: https://github.com/pre-commit/mirrors-mypy
36+
rev: v1.1.1
37+
hooks:
38+
- id: mypy
39+
args:
40+
[
41+
--strict-equality,
42+
--disallow-untyped-calls,
43+
--disallow-untyped-defs,
44+
--disallow-incomplete-defs,
45+
--check-untyped-defs,
46+
--disallow-untyped-decorators,
47+
--warn-redundant-casts,
48+
--warn-unused-ignores,
49+
--no-warn-no-return,
50+
--warn-unreachable,
51+
]
52+
- repo: https://github.com/pre-commit/mirrors-prettier
53+
rev: v3.0.0-alpha.6
54+
hooks:
55+
- id: prettier
56+
args:
57+
- --print-width=80
58+
- --prose-wrap=always
59+
- --tab-width=2
60+
- repo: https://github.com/charliermarsh/ruff-pre-commit
61+
rev: "v0.0.254"
62+
hooks:
63+
- id: ruff
64+
- repo: https://github.com/pre-commit/mirrors-pylint
65+
rev: v3.0.0a5
66+
hooks:
67+
- id: pylint
68+
- repo: https://github.com/asottile/pyupgrade
69+
rev: v3.3.1
70+
hooks:
71+
- id: pyupgrade
72+
args:
73+
- --py36-plus
74+
- --py37-plus
75+
- --py38-plus
76+
- repo: https://github.com/pycqa/pydocstyle
77+
rev: 6.3.0
78+
hooks:
79+
- id: pydocstyle
80+
args:
81+
- --convention=google
82+
- repo: local
83+
hooks:
84+
- id: wily
85+
name: wily
86+
entry: wily diff
87+
verbose: false
88+
language: python
89+
additional_dependencies: [wily]

0 commit comments

Comments
 (0)