diff --git a/.github/workflows/cd_release.yml b/.github/workflows/cd_release.yml index a128ca5..54a8463 100644 --- a/.github/workflows/cd_release.yml +++ b/.github/workflows/cd_release.yml @@ -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: diff --git a/.github/workflows/ci_cd_updated_main.yml b/.github/workflows/ci_cd_updated_main.yml index 34617a1..4834f9f 100644 --- a/.github/workflows/ci_cd_updated_main.yml +++ b/.github/workflows/ci_cd_updated_main.yml @@ -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 diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 9b115ac..4cba9a2 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -12,9 +12,15 @@ 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 @@ -22,9 +28,15 @@ jobs: # 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: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1af83c..4411185 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/mkdocs.yml b/mkdocs.yml index b48087d..4ece966 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 4b2bfab..1d99ae0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", @@ -54,7 +54,7 @@ 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", @@ -62,7 +62,6 @@ dev = [ "pytest-cov ~=3.0", "pyyaml ~=6.0", "requests-mock ~=1.10", - "tomlkit ~=0.11.4", ] [project.urls]