Skip to content

Commit ecd30e4

Browse files
committed
Merge branch 'main' into release
2 parents fa38512 + 1600810 commit ecd30e4

30 files changed

+780
-834
lines changed

.github/workflows/ci.yml

+37-25
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
poetry install --no-interaction --no-root --only format
2424
- name: Format with black
2525
run: |
26-
poetry run black --check -l 100 -t py38 -S ranzen/
27-
poetry run black --check -l 100 -t py38 -S tests/
26+
poetry run black --check -l 100 -t py310 -S ranzen/
27+
poetry run black --check -l 100 -t py310 -S tests/
2828
2929
lint_with_ruff:
3030
runs-on: ubuntu-latest
@@ -42,33 +42,45 @@ jobs:
4242
poetry install --no-interaction --no-root --only lint
4343
- name: Lint with ruff
4444
run: |
45-
poetry run ruff check --format=github ranzen
45+
poetry run ruff check --output-format=github ranzen
4646
- name: Lint tests with ruff
4747
run: |
48-
poetry run ruff check --format=github tests
48+
poetry run ruff check --output-format=github tests
4949
5050
check_docstrings:
5151

5252
runs-on: ubuntu-latest
5353

5454
steps:
55-
- uses: actions/checkout@v3
56-
- name: Set up Python 3.11
57-
uses: actions/setup-python@v4
58-
with:
59-
python-version: "3.11"
60-
- name: Install poetry
61-
run: pipx install poetry
62-
- name: Install dependencies
63-
run: |
64-
poetry env use 3.11
65-
poetry install --no-interaction --no-root --only docs
66-
- name: Check docstrings with darglint
67-
run: |
68-
poetry run darglint --docstring-style sphinx -v 2 -z long ranzen
69-
- name: Build with sphinx
70-
run: |
71-
poetry run sphinx-build -W -b html ./docs ./docs/_build
55+
# ----------------------------------------------
56+
# ---- check-out repo and set-up python ----
57+
# ----------------------------------------------
58+
- name: Check out repository
59+
uses: actions/checkout@v3
60+
# ----------------------------------------------
61+
# ----- install & configure poetry -----
62+
# ----------------------------------------------
63+
- name: Install poetry
64+
run: pipx install poetry
65+
- name: Set up Python 3.10
66+
uses: actions/setup-python@v4
67+
with:
68+
python-version: "3.10"
69+
cache: 'poetry'
70+
71+
# ----------------------------------------------
72+
# install dependencies if cache does not exist
73+
# ----------------------------------------------
74+
- name: Install dependencies
75+
run: |
76+
poetry env use 3.10
77+
poetry install --no-interaction --no-root -E all --with torchcpu --without format --without lint --with docs
78+
- name: Check docstrings with pydoclint
79+
run: |
80+
poetry run pydoclint ranzen
81+
- name: Build with sphinx
82+
run: |
83+
poetry run sphinx-build -W -b html ./docs ./docs/_build
7284
7385
run_tests_and_type_checking:
7486
needs: [format_with_black, lint_with_ruff, check_docstrings]
@@ -85,19 +97,19 @@ jobs:
8597
# ----------------------------------------------
8698
- name: Install poetry
8799
run: pipx install poetry
88-
- name: Set up Python 3.8
100+
- name: Set up Python 3.10
89101
uses: actions/setup-python@v4
90102
with:
91-
python-version: 3.8
103+
python-version: "3.10"
92104
cache: 'poetry'
93105

94106
# ----------------------------------------------
95107
# install dependencies if cache does not exist
96108
# ----------------------------------------------
97109
- name: Install dependencies
98110
run: |
99-
poetry env use 3.8
100-
poetry install --no-interaction --no-root -E all --with torchcpu --without format --without lint --without docs
111+
poetry env use 3.10
112+
poetry install --no-interaction --no-root -E all --with torchcpu --without format --without lint
101113
102114
# ----------------------------------------------
103115
# ----- Run type checking -----

check_all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ echo "Begin check..." \
44
&& black ranzen \
55
&& black tests \
66
&& python -m pytest -vv tests/ \
7-
&& darglint --docstring-style sphinx -v 2 -z long ranzen \
7+
&& pydoclint ranzen \
88
&& pyright ranzen \
99
&& pyright tests \
1010
&& echo "Check all complete!"

docs/conf.py

+14-18
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
# -- General configuration ---------------------------------------------------
3030

31-
autoclass_content = "both" # include both class docstring and __init__
31+
autoclass_content = "class" # take info only from class docstring and not __init__
3232
autodoc_class_signature = "mixed"
3333
autodoc_default_options = {
3434
# Make sure that any autodoc declarations show the right members
@@ -40,23 +40,19 @@
4040
"autosummary-nosignatures": True,
4141
}
4242
autodoc_typehints = "description"
43-
autodoc_type_aliases = {
44-
"pl.Trainer": "pytorch_lightning.Trainer",
45-
"pl.LightningModule": "pytorch_lightning.LightningModule",
46-
}
47-
autodoc_mock_imports = [
48-
"attrs",
49-
"hydra",
50-
"loguru",
51-
"numpy",
52-
"omegaconf",
53-
"pandas",
54-
"pytorch_lightning",
55-
"torch",
56-
"tqdm",
57-
"wandb",
58-
"wrapt",
59-
]
43+
# autodoc_mock_imports = [
44+
# "attrs",
45+
# "hydra",
46+
# "loguru",
47+
# "numpy",
48+
# "omegaconf",
49+
# "pandas",
50+
# "pytorch_lightning",
51+
# "torch",
52+
# "tqdm",
53+
# "wandb",
54+
# "wrapt",
55+
# ]
6056
add_module_names = False
6157

6258
# Add any Sphinx extension module names here, as strings. They can be

0 commit comments

Comments
 (0)