Skip to content

Commit

Permalink
Update input keywords for SINTEF/ci-cd workflows (#85)
Browse files Browse the repository at this point in the history
Revert to using legacy Python docs parser.

Update `dev` extras, removing `tomlkit`.

Update to the latest SINTEF/ci-cd pre-commit hook.
  • Loading branch information
CasperWA committed Oct 10, 2022
1 parent 2d9411e commit 64dae20
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
with:
git_username: "TEAM 4.0[bot]"
git_email: "Team4.0@SINTEF.no"
package_dir: oteapi_optimade
package_dirs: oteapi_optimade
release_branch: main
install_extras: "[dev]"
python_version: "3.9"
python_version_build: "3.9"
build_cmd: "pip install -U flit && flit build"
update_docs: true
python_version_docs: "3.9"
doc_extras: "[doc]"
changelog_exclude_labels: "skip_changelog,duplicate,question,invalid,wontfix"
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd_updated_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
git_email: "Team4.0@SINTEF.no"
permanent_dependencies_branch: "ci/dependency-updates"
default_repo_branch: main
package_dir: oteapi_optimade
package_dirs: oteapi_optimade
update_docs: true
update_python_api_ref: true
update_docs_landing_page: true
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,31 @@ jobs:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v1
with:
python_version: "3.9"
install_extras: "[dev,pre-commit,doc]"
# General setup
install_extras: "[dev]"

# pre-commit
python_version_pre-commit: "3.9"
skip_pre-commit_hooks: pylint,pylint-tests

# pylint & safety
python_version_pylint_safety: "3.9"
pylint_runs: |
--rcfile=pyproject.toml --ignore-paths=tests/ --extension-pkg-whitelist='pydantic' oteapi_optimade
--rcfile=pyproject.toml --extension-pkg-whitelist='pydantic' --disable=import-outside-toplevel,redefined-outer-name tests
# Ignore ID 44715 for now.
# See this NumPy issue for more information: https://github.com/numpy/numpy/issues/19038
# NumPy is a sub-dependency of `oteapi-core`
safety_options: "--ignore=44715"

# Build dist
python_version_package: "3.9"
build_libs: flit
build_cmd: flit build
package_dir: oteapi_optimade

# Build documentation
python_version_docs: "3.9"
package_dirs: oteapi_optimade
full_docs_dirs: "models"

pytest:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
- "pydantic"

- repo: https://github.com/SINTEF/ci-cd
rev: 62fa434c2dec3acdc53c0ed336ab2827f7381e52 # frozen: v1
rev: 6a258b3bce2d2db022908c127d0532c8a7591707 # frozen: v1
hooks:
- id: docs-api-reference
args:
Expand Down
12 changes: 6 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ plugins:
- "!__str__$"
- "!__repr__$"
members: null
# inherited_members: false
inherited_members: false
docstring_style: google
# docstring_options:
# replace_admonitions: true
# setup_commands:
# - import os
# - os.environ["MKDOCS_BUILD"] = "1"
docstring_options:
replace_admonitions: true
setup_commands:
- import os
- os.environ["MKDOCS_BUILD"] = "1"
watch:
- "oteapi_optimade"
- awesome-pages
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ doc = [
"mkdocs ~=1.3",
"mkdocs-awesome-pages-plugin ~=2.8",
"mkdocs-material ~=8.5",
"mkdocstrings[python] ~=0.19.0",
"mkdocstrings[python-legacy] ~=0.19.0",
]
test = [
"pytest ~=7.1",
Expand All @@ -54,15 +54,14 @@ dev = [
"mkdocs ~=1.3",
"mkdocs-awesome-pages-plugin ~=2.8",
"mkdocs-material ~=8.5",
"mkdocstrings[python] ~=0.19.0",
"mkdocstrings[python-legacy] ~=0.19.0",
"otelib ~=0.1",
"pre-commit ~=2.20",
"pylint ~=2.15",
"pytest ~=7.1",
"pytest-cov ~=3.0",
"pyyaml ~=6.0",
"requests-mock ~=1.10",
"tomlkit ~=0.11.4",
]

[project.urls]
Expand Down

0 comments on commit 64dae20

Please sign in to comment.