Skip to content

Commit

Permalink
Merge pull request #201 from MC-kit/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
dvp2015 authored Jun 6, 2023
2 parents 1eb9331 + bbfd234 commit 5d391c0
Show file tree
Hide file tree
Showing 9 changed files with 585 additions and 730 deletions.
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[flake8]
select=ANN,B,B9,BLK,C,D,DAR,E,F,I,N,PD,R,TC,TR,S,W
max-complexity=15
max-mccabe-complexity=5
max-mccabe-complexity=6
max-cognitive-complexity=10
max-line-length=100
ignore=
# ANN001 Missing type annotation for function argument: doesn't allow to use functools dispatching
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fetch-depth: 2 # need previous revision to define tag

- name: Set up Python
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/[email protected]

- name: Set up Python 3.10 # on 3.11 pip install in unstable: "canonicalize" fails occasionally
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: '3.10'

Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
fetch-depth: 1

- name: Set up Python 3.11
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: '3.11'

Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
with:
fetch-depth: 1

- uses: actions/[email protected].0
- uses: actions/[email protected].1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
uses: actions/[email protected]

- name: Set up Python 3.11
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: '3.11'

Expand Down
28 changes: 25 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,31 @@ def docs(s: Session) -> None:
"main,docs,docs_auto",
external=True,
)
build_dir = Path("docs", "_build")
if build_dir.exists():
shutil.rmtree(build_dir)
_clean_docs_build_folder()

args = s.posargs or ["--open-browser", "docs/source", "docs/_build"]
s.run("sphinx-autobuild", *args)


@nox.session(python=False)
def clean(_):
"""Clean folders with reproducible content."""
to_clean = [
".benchmarks",
".eggs",
".mypy_cache",
".nox",
".pytest_cache",
".ruff_cache",
"build",
"htmlcov",
]
for f in to_clean:
shutil.rmtree(f, ignore_errors=True)
_clean_docs_build_folder()


def _clean_docs_build_folder():
build_dir = Path("docs", "_build")
if build_dir.exists():
shutil.rmtree(build_dir)
Loading

0 comments on commit 5d391c0

Please sign in to comment.