From 20444573903f1956b1f0390295e6dcc09f2db784 Mon Sep 17 00:00:00 2001 From: Joel Greer Date: Tue, 20 May 2025 14:16:11 +0100 Subject: [PATCH 1/4] Adding pypi publishing and readthedocs publishing workflows --- .github/workflows/python-publish.yml | 114 +++++++++++++++++++++++++++ .readthedocs.yaml | 20 +++++ docs/Makefile | 20 +++++ docs/_static/ccpem-logo-150x150.png | Bin 0 -> 12349 bytes docs/make.bat | 35 ++++++++ docs/source/index.rst | 34 ++++++++ docs/source/installation.rst | 15 ++++ pyproject.toml | 2 + 8 files changed, 240 insertions(+) create mode 100644 .github/workflows/python-publish.yml create mode 100644 .readthedocs.yaml create mode 100644 docs/Makefile create mode 100644 docs/_static/ccpem-logo-150x150.png create mode 100644 docs/make.bat create mode 100644 docs/source/index.rst create mode 100644 docs/source/installation.rst diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..f93b3f9 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,114 @@ +name: publish-caked-to-pypi + +on: push + +jobs: + build: + name: build-dist + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: setup-python + uses: actions/setup-python@v4 + with: + python-version: "3.10.4" + - name: install-pypa/build + run: >- + python3 -m + pip install + build + --user + - name: build-bin-whl + run: python3 -m build + - name: grab-build + uses: actions/upload-artifact@v4 + with: + name: pkg-dist + path: dist/ + + publish-to-pypi: + name: >- + publish-to-pypi + if: startsWith(github.ref, 'refs/tags/') + needs: + - build + runs-on: ubuntu-latest + environment: + name: production + url: https://pypi.org/p/caked + permissions: + id-token: write + + steps: + - name: download-dists + uses: actions/download-artifact@v4 + with: + name: pkg-dist + path: dist/ + - name: publish-dist-to-pypi + uses: pypa/gh-action-pypi-publish@release/v1 + + github-release: + name: >- + sign-dist-via-sigstore-and-upload-to-github-release + needs: + - publish-to-pypi + runs-on: ubuntu-latest + + permissions: + contents: write + id-token: write + + steps: + - name: download-dists + uses: actions/download-artifact@v4 + with: + name: pkg-dist + path: dist/ + - name: sign-dists + uses: sigstore/gh-action-sigstore-python@v1.2.3 + with: + inputs: >- + ./dist/*.tar.gz + ./dist/*.whl + - name: create-github-release + env: + GITHUB_TOKEN: ${{ github.token }} + run: >- + gh release create + '${{ github.ref_name }}' + --repo '${{ github.repository }}' + --notes "" + - name: upload-artifact-signature-to-github-release + env: + GITHUB_TOKEN: ${{ github.token }} + run: >- + gh release upload + '${{ github.ref_name }}' dist/** + --repo '${{ github.repository }}' + + publish-to-test-pypi: + name: publish-to-test-pypi + if: startsWith(github.ref, 'refs/heads/development') + needs: + - build + runs-on: ubuntu-latest + + environment: + name: testing + url: https://test.pypi.org/p/caked + + permissions: + id-token: write + + steps: + - name: download-dists + uses: actions/download-artifact@v4 + with: + name: pkg-dist + path: dist/ + - name: publish-dist-to-test-pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..604981e --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,20 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +sphinx: + configuration: docs/source/conf.py + +python: + install: + - method: pip + path: . + extra_requirements: + - doc diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_static/ccpem-logo-150x150.png b/docs/_static/ccpem-logo-150x150.png new file mode 100644 index 0000000000000000000000000000000000000000..691bbc0b2244a6dfc779e87540b585362e01e687 GIT binary patch literal 12349 zcmW+-RX`lw4#r(dafd>oxI=Mkao5FVaVS>Y-KDs@`{M5IE?eBSxa-~jKFrL^OmdQw zFLIIzS5lBfM|Pk)FPRFvfy7eI(FhPh3p{V8Un5hock z`ab;zyl8y*`_eIymNFry@AGFbvoWXs;jgvuseAUF&a}2pCL9#lt4T|O%poSN6B2oCCoeNh1S{D?+P+ z4WKX#V%pX!W#slG~~CaCv=t8_=bm2e5_zbt{^oywqKvBg?14C=_KHcJOO6eG~D2^R#mW-+PJYU=uP%j!UL`V zAKWZE?EdP!Mz6t~GYNH=3Z@O7VjF20)-B_sEW8x)ZtaQKhQFRQa7g1f2qq~Id+X5# z2@YHP`RYQxNYS$aDeSoV7hASk>^*-DR^xPFbRCFNl=i9vd?U?F=2M`GVHg}csQcY3 z^yQeZ{{Xryx9u~YR*99P1_CMPck23CCC8W_{4?1?*x6KSlgehnYh+sNX_-jJQ@!dUoa1PlD}BQq){F%Q0X1stp3Y$4 znfJuaxM|%R4ydZW$8I?k>Thir8#&Ii{YL{F3THhDz|j@a7a?DwR6f9PH=Pshl}GSZ zrB95JD^}nL1}fA#w%Ty4grY6UXsb~wafMYQ@cSJjY}F4MmoYalbQ-B+Z&UQZRIt~T zm2@kR^5dm0FgyZtTYb1nA8=e?I?dMf_=XNBVhJJo>oMjY*1L~vg&_3N3URq>vd;fO%W+$kMmQOKqEv$!5~B{!Tnclx0&XCa`o{zQ_SM? z_JH|*JEKKFD4g9q!#Ao-GFm2SP>uH7G~nE`yX!p95v&Cv|-#}Em>X&IOQP*O8{pFuZa^&g_D%$g9c zun4P;W6=L#%)g0t4F?$EfUPR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0+9-c{5E#U2vFV5)x!an7-je9IWx+)_IbUbhB2ga<=yA#bpt%&xTo5En zC(wzWD^?mJrx32*vkw)7SqGB|U_I8@R8s{mz&By-W>P@KN-oZ#_JxB_$F-H;2(o z?*HFg24tYMlN5}y-P#rs+>MQVr6JHTI2Y}0lv<4~dSu9$4giBiiS4mCrxI!R$U}~YPt_GoBQ@D%wFrbJh zTN>3Eqpb}pjzyT4*$|Io{kcA^mGlGTT3JHDLei&x{19ckxhC?Kr>aN5$62Sc9D8hG zq8+Fy4(9!JQZkmJZosa@cY3fn8r|+vO)+lM%I7FG^yws^CwhK^ zeIU3^9*Xl7!cJX`fLEUTyKl&2eBuN=h7691+YA^lEhZ3)wZXO+@s)%^e6oOvHLH-Z z%J}y*M*~}0vrZ`;^8g_N7PHR(&;rKWq6)b~`8#>>SKZ7Y;idoU-aRyrRNI?HHQCsH zoqUKMdL@-Ec!5>*d=HKtgR%<{ePzrHC*t z$Ck~H$|m7HD zT7+VkOI98GHM(SR=FM3&kJz-ToB7{<3rdyBG{ST|Ld60OQ*ZH0MlPNZWeh9d*{{(j zL&86sq6*8Uk)f@8NEhV2DPr;jIz`qKGx7Ly&U#|Vprz&LPNp=;Lj=6heR!C{oNVj(H69$Bm~=FNUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..7bd0976 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,34 @@ +.. CAKED documentation master file, edited copy of file created by + sphinx-quickstart + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to CAKED documentation! +========================== + +Provide an overview of the CAKED project here + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + installation + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + + +CAKED details +=================================== + + +Example heading +---------------- +Example text + +Example code formatting: ```caked``` diff --git a/docs/source/installation.rst b/docs/source/installation.rst new file mode 100644 index 0000000..03cc35f --- /dev/null +++ b/docs/source/installation.rst @@ -0,0 +1,15 @@ +.. _installation-instructions: + +Installation instructions +========================= + +Installing CAKED from PyPI +--------------------------------- + +This is recommended for most users. + +.. code:: bash + + pip install caked + +If you want to install the latest version, use: diff --git a/pyproject.toml b/pyproject.toml index 56eb38d..521c0f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,8 @@ test = [ dev = [ "pytest >=6", "pytest-cov >=3", + "sphinx >=5.0.0", + "pydata-sphinx-theme >=0.7", ] [project.urls] From fa8ec53bd725664bb1495164168071fe828efe18 Mon Sep 17 00:00:00 2001 From: Joel Greer Date: Wed, 21 May 2025 14:21:19 +0100 Subject: [PATCH 2/4] debug readthedocs and version bump --- docs/source/conf.py | 51 +++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/caked/__init__.py | 2 +- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 docs/source/conf.py diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..602d506 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,51 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) +from typing import List + +# -- Project information ----------------------------------------------------- + +project = "CAKED" +copyright = "MIT License" +author = "mooniean, jolaem, crangelsmith" + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns: List[str] = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "pydata_sphinx_theme" + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ["_static"] diff --git a/pyproject.toml b/pyproject.toml index 521c0f4..3f5a4b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61"] build-backend = "setuptools.build_meta" [project] name = "CAKED" -version = "0.1.0" # need to also update version in src/caked/__init__.py +version = "0.1.1" # need to also update version in src/caked/__init__.py authors = [ { name = "Bea Costa Gomes", email = "bcostagomes@turing.ac.uk" }, ] diff --git a/src/caked/__init__.py b/src/caked/__init__.py index 5b54632..ccd1ef5 100644 --- a/src/caked/__init__.py +++ b/src/caked/__init__.py @@ -4,4 +4,4 @@ from __future__ import annotations __all__ = ("__version__",) -__version__ = "0.1.0" +__version__ = "0.1.1" From 55182c29368b5cb5a6eba1f2a2f21c8b795e474d Mon Sep 17 00:00:00 2001 From: Joel Greer Date: Wed, 21 May 2025 14:40:06 +0100 Subject: [PATCH 3/4] add docs optional install dep --- pyproject.toml | 4 +++- src/caked/__init__.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3f5a4b4..9f4fc28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61"] build-backend = "setuptools.build_meta" [project] name = "CAKED" -version = "0.1.1" # need to also update version in src/caked/__init__.py +version = "0.1.2" # need to also update version in src/caked/__init__.py authors = [ { name = "Bea Costa Gomes", email = "bcostagomes@turing.ac.uk" }, ] @@ -39,6 +39,8 @@ test = [ dev = [ "pytest >=6", "pytest-cov >=3", +] +doc = [ "sphinx >=5.0.0", "pydata-sphinx-theme >=0.7", ] diff --git a/src/caked/__init__.py b/src/caked/__init__.py index ccd1ef5..3fc56e7 100644 --- a/src/caked/__init__.py +++ b/src/caked/__init__.py @@ -4,4 +4,4 @@ from __future__ import annotations __all__ = ("__version__",) -__version__ = "0.1.1" +__version__ = "0.1.2" From f469e3a0db9d19d7247005765139589c42e034cd Mon Sep 17 00:00:00 2001 From: Joel Greer Date: Wed, 21 May 2025 14:51:14 +0100 Subject: [PATCH 4/4] fix pre-commmit violations --- .github/workflows/python-publish.yml | 121 +++++++++++++-------------- .readthedocs.yaml | 12 +-- docs/source/conf.py | 4 +- docs/source/installation.rst | 2 +- pyproject.toml | 2 +- src/caked/__init__.py | 2 +- 6 files changed, 68 insertions(+), 75 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index f93b3f9..e3b7979 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -8,31 +8,28 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: setup-python - uses: actions/setup-python@v4 - with: - python-version: "3.10.4" - - name: install-pypa/build - run: >- - python3 -m - pip install - build - --user - - name: build-bin-whl - run: python3 -m build - - name: grab-build - uses: actions/upload-artifact@v4 - with: - name: pkg-dist - path: dist/ + - uses: actions/checkout@v4 + - name: setup-python + uses: actions/setup-python@v4 + with: + python-version: "3.10.4" + - name: install-pypa/build + run: >- + python3 -m pip install build --user + - name: build-bin-whl + run: python3 -m build + - name: grab-build + uses: actions/upload-artifact@v4 + with: + name: pkg-dist + path: dist/ publish-to-pypi: name: >- publish-to-pypi if: startsWith(github.ref, 'refs/tags/') needs: - - build + - build runs-on: ubuntu-latest environment: name: production @@ -41,19 +38,19 @@ jobs: id-token: write steps: - - name: download-dists - uses: actions/download-artifact@v4 - with: - name: pkg-dist - path: dist/ - - name: publish-dist-to-pypi - uses: pypa/gh-action-pypi-publish@release/v1 + - name: download-dists + uses: actions/download-artifact@v4 + with: + name: pkg-dist + path: dist/ + - name: publish-dist-to-pypi + uses: pypa/gh-action-pypi-publish@release/v1 github-release: name: >- sign-dist-via-sigstore-and-upload-to-github-release needs: - - publish-to-pypi + - publish-to-pypi runs-on: ubuntu-latest permissions: @@ -61,38 +58,34 @@ jobs: id-token: write steps: - - name: download-dists - uses: actions/download-artifact@v4 - with: - name: pkg-dist - path: dist/ - - name: sign-dists - uses: sigstore/gh-action-sigstore-python@v1.2.3 - with: - inputs: >- - ./dist/*.tar.gz - ./dist/*.whl - - name: create-github-release - env: - GITHUB_TOKEN: ${{ github.token }} - run: >- - gh release create - '${{ github.ref_name }}' - --repo '${{ github.repository }}' - --notes "" - - name: upload-artifact-signature-to-github-release - env: - GITHUB_TOKEN: ${{ github.token }} - run: >- - gh release upload - '${{ github.ref_name }}' dist/** - --repo '${{ github.repository }}' + - name: download-dists + uses: actions/download-artifact@v4 + with: + name: pkg-dist + path: dist/ + - name: sign-dists + uses: sigstore/gh-action-sigstore-python@v1.2.3 + with: + inputs: >- + ./dist/*.tar.gz ./dist/*.whl + - name: create-github-release + env: + GITHUB_TOKEN: ${{ github.token }} + run: >- + gh release create '${{ github.ref_name }}' --repo '${{ + github.repository }}' --notes "" + - name: upload-artifact-signature-to-github-release + env: + GITHUB_TOKEN: ${{ github.token }} + run: >- + gh release upload '${{ github.ref_name }}' dist/** --repo '${{ + github.repository }}' publish-to-test-pypi: name: publish-to-test-pypi if: startsWith(github.ref, 'refs/heads/development') needs: - - build + - build runs-on: ubuntu-latest environment: @@ -101,14 +94,14 @@ jobs: permissions: id-token: write - + steps: - - name: download-dists - uses: actions/download-artifact@v4 - with: - name: pkg-dist - path: dist/ - - name: publish-dist-to-test-pypi - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file + - name: download-dists + uses: actions/download-artifact@v4 + with: + name: pkg-dist + path: dist/ + - name: publish-dist-to-test-pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 604981e..5e45b50 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,11 +10,11 @@ build: python: "3.11" sphinx: - configuration: docs/source/conf.py + configuration: docs/source/conf.py python: - install: - - method: pip - path: . - extra_requirements: - - doc + install: + - method: pip + path: . + extra_requirements: + - doc diff --git a/docs/source/conf.py b/docs/source/conf.py index 602d506..418056b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,7 +13,7 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) -from typing import List +from __future__ import annotations # -- Project information ----------------------------------------------------- @@ -35,7 +35,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. -exclude_patterns: List[str] = [] +exclude_patterns: list[str] = [] # -- Options for HTML output ------------------------------------------------- diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 03cc35f..9419323 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -11,5 +11,5 @@ This is recommended for most users. .. code:: bash pip install caked - + If you want to install the latest version, use: diff --git a/pyproject.toml b/pyproject.toml index 9f4fc28..15c3561 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=61"] build-backend = "setuptools.build_meta" [project] name = "CAKED" -version = "0.1.2" # need to also update version in src/caked/__init__.py +version = "0.1.3" # need to also update version in src/caked/__init__.py authors = [ { name = "Bea Costa Gomes", email = "bcostagomes@turing.ac.uk" }, ] diff --git a/src/caked/__init__.py b/src/caked/__init__.py index 3fc56e7..7937e17 100644 --- a/src/caked/__init__.py +++ b/src/caked/__init__.py @@ -4,4 +4,4 @@ from __future__ import annotations __all__ = ("__version__",) -__version__ = "0.1.2" +__version__ = "0.1.3"