-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: create CI * fix: add push trigger * refactor: rename jobs, add dummy script * fix: run nbdev_prepare * fix: add ruff exclude * style: add empty line at the end
- Loading branch information
Showing
12 changed files
with
88 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.github/workflows/test.yaml → .github/workflows/nbdev-test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: CI | ||
name: nbdev-test | ||
on: [workflow_dispatch, pull_request, push] | ||
|
||
jobs: | ||
test: | ||
nbdev-test: | ||
runs-on: ubuntu-latest | ||
steps: [uses: fastai/workflows/nbdev-ci@master] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: python-check | ||
on: [ pull_request, push ] | ||
|
||
jobs: | ||
python-check: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.11 ] | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install deps | ||
run: make install | ||
- name: Check | ||
run: make check | ||
|
||
python-test: | ||
needs: | ||
- python-check | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.11 ] | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install deps | ||
run: make install | ||
- name: Check | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
lint_dirs := juddges scripts notebooks dashboards tests | ||
mypy_dirs := juddges scripts dashboards tests | ||
|
||
fix: | ||
ruff check $(lint_dirs) --fix | ||
ruff format $(lint_dirs) | ||
|
||
check: | ||
ruff check $(lint_dirs) | ||
ruff format $(lint_dirs) --check | ||
mypy --install-types --non-interactive $(mypy_dirs) | ||
|
||
test: | ||
coverage run -m pytest | ||
coverage report -mi | ||
|
||
all: check test | ||
|
||
install: | ||
pip install -r requirements.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import streamlit as st | ||
|
||
st.title("JuDDGES Dashboard") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[tool.ruff] | ||
line-length = 100 | ||
extend-include = ["*.ipynb"] | ||
exclude = ["_modidx.py"] | ||
|
||
[tool.mypy] | ||
python_version = "3.10" | ||
strict = true | ||
plugins = "numpy.typing.mypy_plugin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
nbdev==2.3.13 | ||
streamlit==1.31.1 | ||
streamlit==1.31.1 | ||
ruff==0.2.2 | ||
coverage==7.4.3 | ||
pytest==8.0.2 | ||
mypy==1.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# mypy requires .py file in the directory | ||
# file should be deleted later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from juddges import __version__ | ||
|
||
|
||
def test_version() -> None: | ||
assert __version__ == "0.0.1" |