-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uniformize HACF docs & move theme to Furo #1006
base: main
Are you sure you want to change the base?
Changes from all commits
e0f32b4
e08781f
7c3dbfe
aa46e47
e918962
b574104
ae2b53e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
version: 2 | ||
|
||
formats: all | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
- path: . | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
formats: all | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
sphinx==7.2.6 | ||
sphinx-click==5.0.1 | ||
sphinx-rtd-theme==1.3.0 | ||
click==8.1.7 | ||
tabulate==0.9.0 | ||
dateparser==1.1.8 | ||
furo==2023.9.10 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,9 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None: | |
Args: | ||
session: The Session object. | ||
""" | ||
if session.bin is None: | ||
return | ||
|
||
virtualenv = session.env.get("VIRTUAL_ENV") | ||
if virtualenv is None: | ||
return | ||
|
@@ -86,10 +89,10 @@ def precommit(session: Session) -> None: | |
"""Lint using pre-commit.""" | ||
args = session.posargs or ["run", "--all-files", "--show-diff-on-failure"] | ||
session.install( | ||
"bandit", | ||
"black", | ||
"darglint", | ||
"flake8", | ||
"flake8-bandit", | ||
"flake8-bugbear", | ||
"flake8-docstrings", | ||
"flake8-rst-docstrings", | ||
|
@@ -115,16 +118,8 @@ def safety(session: Session) -> None: | |
def mypy(session: Session) -> None: | ||
"""Type-check using mypy.""" | ||
args = session.posargs or ["src", "tests", "docs/conf.py"] | ||
session.install(".[cli]") | ||
session.install( | ||
"mypy", | ||
"pytest", | ||
"types-dateparser", | ||
"types-tabulate", | ||
"types-tzlocal", | ||
"pytest-asyncio", | ||
"aioresponses", | ||
) | ||
session.install(".") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you need to keep ".[cli]" to have the cli dependencies included |
||
session.install("mypy", "pytest", "types-requests", "types-pytz", "pytest-asyncio") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you should change the dependencies here. |
||
session.run("mypy", *args) | ||
if not session.posargs: | ||
session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py") | ||
|
@@ -133,10 +128,8 @@ def mypy(session: Session) -> None: | |
@session(python=python_versions) | ||
def tests(session: Session) -> None: | ||
"""Run the test suite.""" | ||
session.install(".[cli]") | ||
session.install( | ||
"coverage[toml]", "pytest", "pygments", "pytest-asyncio", "aioresponses" | ||
) | ||
session.install(".") | ||
session.install("coverage[toml]", "pytest", "pygments", "requests_mock") | ||
Comment on lines
+131
to
+132
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above |
||
try: | ||
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs) | ||
finally: | ||
|
@@ -160,8 +153,8 @@ def coverage(session: Session) -> None: | |
@session(python=python_versions) | ||
def typeguard(session: Session) -> None: | ||
"""Runtime type checking using Typeguard.""" | ||
session.install(".[cli]") | ||
session.install("pytest", "typeguard", "pygments", "pytest-asyncio", "aioresponses") | ||
session.install(".") | ||
session.install("pytest", "typeguard", "pygments", "requests_mock") | ||
Comment on lines
+156
to
+157
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above |
||
session.run("pytest", f"--typeguard-packages={package}", *session.posargs) | ||
|
||
|
||
|
@@ -178,8 +171,8 @@ def xdoctest(session: Session) -> None: | |
def docs_build(session: Session) -> None: | ||
"""Build the documentation.""" | ||
args = session.posargs or ["docs", "docs/_build"] | ||
session.run("python", "-m", "pip", "install", "-r", "docs/requirements.txt") | ||
session.install(".[cli]") | ||
session.install(".") | ||
session.install("sphinx", "sphinx-click", "furo") | ||
|
||
build_dir = Path("docs", "_build") | ||
if build_dir.exists(): | ||
|
@@ -192,9 +185,8 @@ def docs_build(session: Session) -> None: | |
def docs(session: Session) -> None: | ||
"""Build and serve the documentation with live reloading on file changes.""" | ||
args = session.posargs or ["--open-browser", "docs", "docs/_build"] | ||
session.run("python", "-m", "pip", "install", "-r", "docs/requirements.txt") | ||
session.install(".[cli]") | ||
session.install("sphinx-autobuild") | ||
session.install(".") | ||
session.install("sphinx", "sphinx-autobuild", "sphinx-click", "furo") | ||
|
||
build_dir = Path("docs", "_build") | ||
if build_dir.exists(): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove
click
/tabulate
/dateparser
?