Skip to content

Commit d79486a

Browse files
committed
Code release
1 parent 5e49f31 commit d79486a

File tree

231 files changed

+26745
-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.

231 files changed

+26745
-0
lines changed

.codespell-ignore.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
te
2+
discription
3+
nd
4+
infarction
5+
projets

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "envs/"
5+
schedule:
6+
interval: "daily"
7+
groups:
8+
python-requirements:
9+
patterns:
10+
- "*"
11+
ignore:
12+
- dependency-name: "protobuf" # https://github.com/tensorflow/datasets/issues/4858
13+
- dependency-name: "numpy"

.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.11"]
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
check-latest: true
22+
- name: Install pylint
23+
run: pip install pylint
24+
- name: Run pre-commit
25+
uses: pre-commit/[email protected]
26+
- name: Run pylint
27+
run: pylint cinema --rcfile=.pylintrc

.github/workflows/pytest.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: pytest
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 30
12+
strategy:
13+
matrix:
14+
python-version: ["3.11"]
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
- name: Remove unnecessary packages
20+
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
21+
run: |
22+
echo "=== Before pruning ==="
23+
df -h
24+
sudo rm -rf /usr/share/dotnet
25+
sudo rm -rf /opt/ghc
26+
sudo rm -rf "/usr/local/share/boost"
27+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
28+
echo "=== After pruning ==="
29+
df -h
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v5
32+
with:
33+
check-latest: true
34+
python-version: ${{ matrix.python-version }}
35+
cache: "pip"
36+
cache-dependency-path: |
37+
envs/environment.yml
38+
envs/requirements.txt
39+
pyproject.toml
40+
- name: Install dependencies
41+
run: |
42+
pip install --upgrade pip
43+
pip install --upgrade torch torchvision --index-url https://download.pytorch.org/whl/cpu
44+
pip install kaleido
45+
pip install -r envs/requirements.txt
46+
pip install -e .
47+
- name: Test with pytest
48+
run: |
49+
pytest --cov --cov-branch --cov-report=xml -m "not integration"
50+
pytest -m "script" .
51+
- name: Upload results to Codecov
52+
uses: codecov/codecov-action@v5
53+
with:
54+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
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 scripts 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+
# hydra outputs
138+
outputs/
139+
140+
# wandb outputs
141+
wandb/
142+
143+
# slurm outputs
144+
*.sh.e*
145+
*.sh.o*
146+
147+
# checkpoints
148+
**/*.pt
149+
**/*.safetensors
150+
151+
# docs
152+
examples/*.png
153+
out/

.pre-commit-config.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
default_language_version:
2+
python: python3
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: check-added-large-files
8+
args: ["--maxkb=30000"]
9+
- id: check-ast
10+
- id: check-byte-order-marker
11+
- id: check-builtin-literals
12+
- id: check-case-conflict
13+
- id: check-docstring-first
14+
- id: check-merge-conflict
15+
- id: check-symlinks
16+
- id: check-toml
17+
- id: check-yaml
18+
- id: debug-statements
19+
- id: destroyed-symlinks
20+
- id: end-of-file-fixer
21+
- id: fix-byte-order-marker
22+
- id: mixed-line-ending
23+
- id: file-contents-sorter
24+
files: "envs/requirements*.txt"
25+
- id: trailing-whitespace
26+
- repo: https://github.com/astral-sh/ruff-pre-commit
27+
rev: v0.11.8
28+
hooks:
29+
# run the linter
30+
- id: ruff
31+
args: [--fix]
32+
# run the formatter
33+
- id: ruff-format
34+
- repo: https://github.com/pre-commit/mirrors-mypy
35+
rev: v1.15.0
36+
hooks: # https://github.com/python/mypy/issues/4008#issuecomment-582458665
37+
- id: mypy
38+
name: mypy
39+
pass_filenames: false
40+
args:
41+
[
42+
--strict-equality,
43+
--disallow-untyped-calls,
44+
--disallow-untyped-defs,
45+
--disallow-incomplete-defs,
46+
--disallow-any-generics,
47+
--check-untyped-defs,
48+
--disallow-untyped-decorators,
49+
--warn-redundant-casts,
50+
--warn-unused-ignores,
51+
--no-warn-no-return,
52+
--warn-unreachable,
53+
]
54+
additional_dependencies: ["types-requests"]
55+
- repo: https://github.com/pre-commit/mirrors-prettier
56+
rev: v4.0.0-alpha.8
57+
hooks:
58+
- id: prettier
59+
args:
60+
- --print-width=120
61+
- --prose-wrap=always
62+
- --tab-width=2
63+
- repo: https://github.com/codespell-project/codespell
64+
rev: v2.4.1
65+
hooks:
66+
- id: codespell
67+
name: codespell
68+
description: Checks for common misspellings in text files.
69+
entry: codespell --ignore-words=.codespell-ignore.txt --skip=**/*.ipynb
70+
language: python
71+
types: [text]

0 commit comments

Comments
 (0)