diff --git a/.github/workflows/build_and_upload_wheels.yml b/.github/workflows/build_and_upload_wheels.yml new file mode 100644 index 0000000..d03e723 --- /dev/null +++ b/.github/workflows/build_and_upload_wheels.yml @@ -0,0 +1,33 @@ +name: pypi upload + +on: + push: + branches: ["main", "ft-packaging"] + +jobs: + wheel_build_full: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: build wheels and sdist + run: pipx run build + + - uses: actions/upload-artifact@v3 + with: + path: ./dist/* + + upload_pypi: + needs: [wheel_build_full] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@v1.6.1 + with: + skip_existing: true + user: __token__ + password: ${{ secrets.PYPI_RELESO }} diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..8ca14d3 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,32 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "19" + # rust: "1.64" + # golang: "1.19" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/requirements.txt diff --git a/README.md b/README.md index 86c06e7..85e4444 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ sphinx is installed ignore the first two lines. The following command line calls create a conda environment with all necessary dependencies for building the documentation. ``` console - (base) $ conda create -n sphinx python=3.9 - (base) $ conda activate sphinx - (sphinx) $ pip install sphinx sphinx-rtd-theme +(base) $ conda create -n sphinx python=3.9 +(base) $ conda activate sphinx +(sphinx) $ pip install sphinx sphinx-rtd-theme ``` The documentation is built by executing the following command inside the folder diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..cbf1e36 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx +sphinx-rtd-theme diff --git a/pyproject.toml b/pyproject.toml index 5403016..6e4f61d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,10 +22,13 @@ dependencies = [ "hjson", ] dynamic = [ - "version", - "readme" + "version" ] +[project.readme] +file = "README.md" +content-type = "text/markdown" + [project.optional-dependencies] all = [ "splinepy[all]" @@ -42,6 +45,8 @@ docs = [ [project.scripts] releso = "releso.__main__:entry" + + [tool.setuptools] packages = [ "releso", @@ -54,7 +59,6 @@ build-backend = "setuptools.build_meta" [tool.setuptools.dynamic] version = {attr = "releso.__version__.version"} -readme = {file = "README.md"} [tool.black] line-length = 79