From 160928d6402844c2e2570519e4efc28ad6ba54e9 Mon Sep 17 00:00:00 2001 From: Paddy Roddy Date: Thu, 23 Mar 2023 19:35:07 +0000 Subject: [PATCH 1/3] Revert "Add simple documentation (#9)" This reverts commit 0b69a62dddc039cf53bb259e2c710c4522dfe0ec. --- .github/workflows/documentation.yml | 37 ----------------------------- README.md | 1 - pyproject.toml | 3 --- src/example/__init__.py | 3 --- 4 files changed, 44 deletions(-) delete mode 100644 .github/workflows/documentation.yml delete mode 100644 src/example/__init__.py diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index 42c1e97..0000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Documentation - -on: - push: - branches: - - main - -jobs: - documentation: - runs-on: ubuntu-latest - steps: - - name: checkout source - uses: actions/checkout@v3 - - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - cache: "pip" - cache-dependency-path: "pyproject.toml" - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -e .[docs] - - - name: Create documentation - run: pdoc --html src/sleplet - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./html/sleplet - publish_branch: gh-pages - user_name: "github-actions[bot]" - user_email: "github-actions[bot]@users.noreply.github.com" diff --git a/README.md b/README.md index a86c146..eecb9f0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ Template for python development -[![Documentation](https://github.com/astro-informatics/sleplet/actions/workflows/documentation.yml/badge.svg)](https://astro-informatics.github.io/sleplet) [![tests](https://github.com/paddyroddy/python-template/actions/workflows/tests.yml/badge.svg)](https://github.com/paddyroddy/python-template/actions/workflows/tests.yml) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) diff --git a/pyproject.toml b/pyproject.toml index a0493aa..147c17e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,9 +30,6 @@ optional-dependencies.dev = [ "pre-commit", "tox", ] -optional-dependencies.docs = [ - "pdoc3", -] urls.homepage = "https://github.com/paddyroddy/python-template" [tool.coverage] diff --git a/src/example/__init__.py b/src/example/__init__.py deleted file mode 100644 index b196e31..0000000 --- a/src/example/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -.. include:: ../../README.md -""" From e8ca4d98b9b8ad7ede9bb6302177e499c9004b49 Mon Sep 17 00:00:00 2001 From: Patrick Roddy Date: Thu, 23 Mar 2023 19:30:39 +0000 Subject: [PATCH 2/3] Add simple documentation (#9) --- .github/workflows/documentation.yml | 37 +++++++++++++++++++++++++++++ README.md | 1 + pyproject.toml | 3 +++ src/example/__init__.py | 3 +++ 4 files changed, 44 insertions(+) create mode 100644 .github/workflows/documentation.yml create mode 100644 src/example/__init__.py diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..42c1e97 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,37 @@ +name: Documentation + +on: + push: + branches: + - main + +jobs: + documentation: + runs-on: ubuntu-latest + steps: + - name: checkout source + uses: actions/checkout@v3 + + - name: Set up python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "pip" + cache-dependency-path: "pyproject.toml" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -e .[docs] + + - name: Create documentation + run: pdoc --html src/sleplet + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./html/sleplet + publish_branch: gh-pages + user_name: "github-actions[bot]" + user_email: "github-actions[bot]@users.noreply.github.com" diff --git a/README.md b/README.md index eecb9f0..a86c146 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Template for python development +[![Documentation](https://github.com/astro-informatics/sleplet/actions/workflows/documentation.yml/badge.svg)](https://astro-informatics.github.io/sleplet) [![tests](https://github.com/paddyroddy/python-template/actions/workflows/tests.yml/badge.svg)](https://github.com/paddyroddy/python-template/actions/workflows/tests.yml) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) diff --git a/pyproject.toml b/pyproject.toml index 147c17e..a0493aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,9 @@ optional-dependencies.dev = [ "pre-commit", "tox", ] +optional-dependencies.docs = [ + "pdoc3", +] urls.homepage = "https://github.com/paddyroddy/python-template" [tool.coverage] diff --git a/src/example/__init__.py b/src/example/__init__.py new file mode 100644 index 0000000..b196e31 --- /dev/null +++ b/src/example/__init__.py @@ -0,0 +1,3 @@ +""" +.. include:: ../../README.md +""" From c53810a65f7efabd3e93568d385c879528c2627b Mon Sep 17 00:00:00 2001 From: Paddy Roddy Date: Thu, 23 Mar 2023 19:36:07 +0000 Subject: [PATCH 3/3] Fix pdoc --- .github/workflows/documentation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 42c1e97..7245f19 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -25,13 +25,13 @@ jobs: python -m pip install -e .[docs] - name: Create documentation - run: pdoc --html src/sleplet + run: pdoc --html src/example - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./html/sleplet + publish_dir: ./html/example publish_branch: gh-pages user_name: "github-actions[bot]" user_email: "github-actions[bot]@users.noreply.github.com"