Skip to content

Commit 45182b3

Browse files
committed
feat: initalize w/ lightning-hydra-template
0 parents  commit 45182b3

Some content is hidden

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

77 files changed

+2461
-0
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# example of file for storing private and user specific environment variables, like keys or system paths
2+
# rename it to ".env" (excluded from version control by default)
3+
# .env is loaded by train.py automatically
4+
# hydra allows you to reference variables in .yaml configs with special syntax: ${oc.env:MY_VAR}
5+
6+
MY_VAR="~"

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## What does this PR do?
2+
3+
<!--
4+
Please include a summary of the change and which issue is fixed.
5+
Please also include relevant motivation and context.
6+
List any dependencies that are required for this change.
7+
List all the breaking changes introduced by this pull request.
8+
-->
9+
10+
Fixes #\<issue_number>
11+
12+
## Before submitting
13+
14+
- [ ] Did you make sure **title is self-explanatory** and **the description concisely explains the PR**?
15+
- [ ] Did you make sure your **PR does only one thing**, instead of bundling different changes together?
16+
- [ ] Did you list all the **breaking changes** introduced by this pull request?
17+
- [ ] Did you **test your PR locally** with `pytest` command?
18+
- [ ] Did you **run pre-commit hooks** with `pre-commit run -a` command?
19+
20+
## Did you have fun?
21+
22+
Make sure you had fun coding 🙃

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
ignore:
13+
- dependency-name: "pytorch-lightning"
14+
update-types: ["version-update:semver-patch"]
15+
- dependency-name: "torchmetrics"
16+
update-types: ["version-update:semver-patch"]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Same as `code-quality-pr.yaml` but triggered on commit to main branch
2+
# and runs on all files (instead of only the changed ones)
3+
4+
name: Code Quality Main
5+
6+
on:
7+
push:
8+
branches: [main]
9+
10+
jobs:
11+
code-quality:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
21+
- name: Run pre-commits
22+
uses: pre-commit/[email protected]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow finds which files were changed, prints them,
2+
# and runs `pre-commit` on those files.
3+
4+
# Inspired by the sktime library:
5+
# https://github.com/alan-turing-institute/sktime/blob/main/.github/workflows/test.yml
6+
7+
name: Code Quality PR
8+
9+
on:
10+
pull_request:
11+
branches: [main, "release/*"]
12+
13+
jobs:
14+
code-quality:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v2
23+
24+
- name: Find modified files
25+
id: file_changes
26+
uses: trilom/[email protected]
27+
with:
28+
output: " "
29+
30+
- name: List modified files
31+
run: echo '${{ steps.file_changes.outputs.files}}'
32+
33+
- name: Run pre-commits
34+
uses: pre-commit/[email protected]
35+
with:
36+
extra_args: --files ${{ steps.file_changes.outputs.files}}

.github/workflows/test.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main, "release/*"]
8+
9+
jobs:
10+
run_tests:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
17+
python-version: ["3.7", "3.8", "3.9", "3.10"]
18+
19+
timeout-minutes: 10
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install -r requirements.txt
34+
pip install pytest
35+
pip install protobuf==3.20.0
36+
37+
- name: List dependencies
38+
run: |
39+
python -m pip list
40+
41+
- name: Run pytest
42+
run: |
43+
pytest -v
44+
45+
# upload code coverage report
46+
code-coverage:
47+
runs-on: ubuntu-latest
48+
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v2
52+
53+
- name: Set up Python 3.10
54+
uses: actions/setup-python@v2
55+
with:
56+
python-version: "3.10"
57+
58+
- name: Install dependencies
59+
run: |
60+
python -m pip install --upgrade pip
61+
pip install -r requirements.txt
62+
pip install pytest
63+
pip install pytest-cov[toml]
64+
pip install protobuf==3.20.0
65+
66+
- name: Run tests and collect coverage
67+
run: pytest --cov src # NEEDS TO BE UPDATED WHEN CHANGING THE NAME OF "src" FOLDER
68+
69+
- name: Upload coverage to Codecov
70+
uses: codecov/codecov-action@v3

.gitignore

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
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+
.venv
106+
env/
107+
venv/
108+
ENV/
109+
env.bak/
110+
venv.bak/
111+
112+
# Spyder project settings
113+
.spyderproject
114+
.spyproject
115+
116+
# Rope project settings
117+
.ropeproject
118+
119+
# mkdocs documentation
120+
/site
121+
122+
# mypy
123+
.mypy_cache/
124+
.dmypy.json
125+
dmypy.json
126+
127+
# Pyre type checker
128+
.pyre/
129+
130+
### VisualStudioCode
131+
.vscode/*
132+
!.vscode/settings.json
133+
!.vscode/tasks.json
134+
!.vscode/launch.json
135+
!.vscode/extensions.json
136+
*.code-workspace
137+
**/.vscode
138+
139+
# JetBrains
140+
.idea/
141+
142+
# Data & Models
143+
*.h5
144+
*.tar
145+
*.tar.gz
146+
147+
# node-pool-forecast-engine
148+
configs/local/default.yaml
149+
data/
150+
logs/
151+
.env
152+
.autoenv

0 commit comments

Comments
 (0)