From a587f06da300d3935990a97fcd85afa32393e63a Mon Sep 17 00:00:00 2001 From: marvinfriede <51965259+marvinfriede@users.noreply.github.com> Date: Sun, 15 Jan 2023 16:11:34 +0100 Subject: [PATCH] Update workflows and docs --- .github/workflows/python.yaml | 14 +++++++------- .github/workflows/release.yaml | 30 ++++++++++++++++++++---------- doc/conf.py | 2 +- doc/modules/damping.rst | 6 ++++-- doc/modules/index.rst | 20 +++++++++++--------- 5 files changed, 43 insertions(+), 29 deletions(-) diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index 72e2c49..21cae53 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -1,4 +1,4 @@ -name: CI +name: Tests on: push: @@ -6,15 +6,15 @@ on: - main - master paths-ignore: - - "docs/**" - - "*.md" - - "*.rst" + - "doc*/**" + - "**/*.md" + - "**/*.rst" pull_request: paths-ignore: - - "docs/**" - - "*.md" - - "*.rst" + - "doc*/**" + - "**/*.md" + - "**/*.rst" workflow_dispatch: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c7ca2d4..54a11d5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,35 +2,43 @@ name: Build on: push: - branches: [main] + branches: + - main tags: - "v*" + pull_request: - branches: [main] + branches: + - main + workflow_dispatch: jobs: wheel: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - - name: Build sdist + - name: Build wheel (bdist) run: pipx run build --wheel - - uses: actions/upload-artifact@v3 + - name: Upload wheel as artifact + uses: actions/upload-artifact@v3 with: path: dist/*.whl sdist: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - - name: Build sdist + - name: Build source distribution (sdist) run: pipx run build --sdist - - uses: actions/upload-artifact@v3 + - name: Upload source distribution as artifact + uses: actions/upload-artifact@v3 with: path: dist/*.tar.gz @@ -39,12 +47,14 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') steps: - - uses: actions/download-artifact@v3 + - name: Download build artifacts + uses: actions/download-artifact@v3 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/doc/conf.py b/doc/conf.py index a52fe30..ab68d07 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -23,7 +23,7 @@ import tad_dftd3 project = "Torch autodiff DFT-D3" -author = "Sebastian Ehlert" +author = "Sebastian Ehlert, Marvin Friede" copyright = f"2022 {author}" extensions = [ diff --git a/doc/modules/damping.rst b/doc/modules/damping.rst index f098523..a7213f5 100644 --- a/doc/modules/damping.rst +++ b/doc/modules/damping.rst @@ -1,6 +1,8 @@ +.. _damping: + .. automodule:: tad_dftd3.damping .. toctree:: - rational - atm + rational + atm diff --git a/doc/modules/index.rst b/doc/modules/index.rst index 02fa9ba..d01151d 100644 --- a/doc/modules/index.rst +++ b/doc/modules/index.rst @@ -1,15 +1,17 @@ +.. _module: + Module reference ================ -The following modules are contained with `tad_dftd3`. +The following modules are contained with `tad-dftd3`. .. toctree:: - dftd3 - disp - damping - model - ncoord - reference - data - util + dftd3 + disp + damping + model + ncoord + reference + data + util