-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update project structure to 0a6fca5a
- Loading branch information
Showing
6 changed files
with
144 additions
and
25 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
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 @@ | ||
name: Build and Deploy Docs | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- closed | ||
|
||
jobs: | ||
build-and-deploy-docs: | ||
if: ${{ github.event.pull_request.merged }} or ${{ github.event_name == 'workflow_dispatch' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
- uses: ./.github/actions/python-poetry-env | ||
- name: Deploy docs | ||
run: poetry run mkdocs gh-deploy --force |
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,13 @@ | ||
diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks) | ||
@@ -25,11 +25,6 @@ repos: | ||
# Add --fix, in case you want it to autofix when this hook runs | ||
entry: poetry run ruff check --force-exclude --fix | ||
require_serial: true | ||
- - id: ruff | ||
- name: ruff | ||
- # Add --fix, in case you want it to autofix when this hook runs | ||
- entry: poetry run ruff check --force-exclude | ||
- require_serial: true | ||
language: system | ||
types: [ python ] | ||
- id: mypy |
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,34 @@ | ||
diff a/mkdocs.yml b/mkdocs.yml (rejected hunks) | ||
@@ -14,9 +14,9 @@ theme: | ||
name: Switch to light mode | ||
|
||
nav: | ||
- - Introduction: 'index.md' | ||
- - api_docs.md | ||
- - changelog.md | ||
+ - Home: 'index.md' | ||
+ - Code Reference: reference/ | ||
+ - Changelog: changelog.md | ||
|
||
watch: | ||
- src/climate_data | ||
@@ -61,6 +61,12 @@ markdown_extensions: | ||
plugins: | ||
- table-reader | ||
- search | ||
+ - gen-files: | ||
+ scripts: | ||
+ - scripts/gen_ref_pages.py | ||
+ - literate-nav: | ||
+ nav_vile: SUMMARY.md | ||
+ - section-index | ||
- mkdocstrings: | ||
default_handler: python | ||
handlers: | ||
@@ -73,5 +79,5 @@ extra_javascript: | ||
- https://unpkg.com/[email protected]/dist/tablesort.min.js | ||
- _javascript/tablesort.js | ||
- _javascript/mathjax.js | ||
- - https://polyfill.io/v3/polyfill.min.js?features=es6 | ||
+ - https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6 | ||
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js |
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,50 @@ | ||
diff a/pyproject.toml b/pyproject.toml (rejected hunks) | ||
@@ -34,9 +34,12 @@ python = ">=3.10, <4.0" | ||
click = "*" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
-mkdocstrings = {version = ">=0.23", extras = ["python"]} | ||
+mkdocstrings = {version = "*", extras = ["python"]} | ||
mkdocs-material = "*" | ||
mkdocs-table-reader-plugin = "*" | ||
+mkdocs-gen-files = "*" | ||
+mkdocs-literate-nav = "*" | ||
+mkdocs-section-index = "*" | ||
mypy = "*" | ||
pre-commit = "*" | ||
pymdown-extensions = "*" | ||
@@ -44,13 +47,13 @@ pytest = "*" | ||
pytest-github-actions-annotate-failures = "*" | ||
pytest-cov = "*" | ||
python-kacl = "*" | ||
-ruff = ">=0.2.0" | ||
+ruff = "*" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
-[project.scripts] | ||
+[tool.poetry.scripts] | ||
my-cli = "climate_data.cli:main" | ||
|
||
[tool.ruff] | ||
@@ -78,6 +81,9 @@ ignore = [ | ||
"ARG", # "Unused function argument". Fixtures are often unused. | ||
"S105", # "Possible hardcoded password". | ||
] | ||
+"scripts/**" = [ | ||
+ "INP001", # "Scripts are not part of a package." | ||
+] | ||
|
||
[tool.ruff.lint.mccabe] | ||
max-complexity = 10 | ||
@@ -90,7 +96,7 @@ classmethod-decorators = [ | ||
] | ||
|
||
[tool.ruff.lint.flake8-tidy-imports] | ||
-ban-relative-imports = true | ||
+ban-relative-imports = "all" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = """\ |
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