From 43981cb155f6dfac831d29ac326bb83272816e7e Mon Sep 17 00:00:00 2001 From: Federico Busetti <729029+febus982@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:43:37 +0000 Subject: [PATCH 1/4] Fix job outputs Signed-off-by: Federico Busetti <729029+febus982@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19c0d2f..9a772b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: - name: Export version for site docs id: docs-version - run: ./ci-scripts/docs-version.sh >> "$GITHUB_OUTPUT" + run: echo $(./ci-scripts/docs-version.sh) >> "$GITHUB_OUTPUT" publish: From f244d240f38079ebec9b01f663606f04b2a6dc90 Mon Sep 17 00:00:00 2001 From: Federico Busetti <729029+febus982@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:43:56 +0000 Subject: [PATCH 2/4] Add version alias and default Signed-off-by: Federico Busetti <729029+febus982@users.noreply.github.com> --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a772b6..22c848b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,3 +79,5 @@ jobs: contents: write with: site-version: "${{needs.build.outputs.docs-version.version}}" + version-alias: "stable" + set-default: true From 5d62f9e316ae3acc29d2188d8cc9e2afb5057f8f Mon Sep 17 00:00:00 2001 From: Federico Busetti <729029+febus982@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:45:13 +0000 Subject: [PATCH 3/4] Add missing quotes Signed-off-by: Federico Busetti <729029+febus982@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 22c848b..7fabba3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: - name: Export version for site docs id: docs-version - run: echo $(./ci-scripts/docs-version.sh) >> "$GITHUB_OUTPUT" + run: echo "$(./ci-scripts/docs-version.sh)" >> "$GITHUB_OUTPUT" publish: From 50e4672d3d106ccca7db3bce07e634e5bd69bea3 Mon Sep 17 00:00:00 2001 From: Federico Busetti <729029+febus982@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:58:31 +0000 Subject: [PATCH 4/4] Update docs and Makefile Signed-off-by: Federico Busetti <729029+febus982@users.noreply.github.com> --- Makefile | 5 +---- README.md | 8 +++++++- docs/index.md | 9 ++++++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1e675b5..c433aa9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: docs docs-build +.PHONY: docs test: poetry run pytest -n auto --cov @@ -35,6 +35,3 @@ check: typing test format lint docs: poetry run mkdocs serve - -docs-build: - poetry run mkdocs build diff --git a/README.md b/README.md index f90a322..ead11c7 100644 --- a/README.md +++ b/README.md @@ -41,11 +41,17 @@ previous python versions directly in the CI pipeline to catch these bugs. * Owner: The github repository owner (in this case `febus982`) * Repository name: The github repository name (in this case `bootstrap-python-package`) * Workflow name: `release.yml` -* Enable GitHub Actions for GitHub Pages (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/pages) * Create a GitHub Actions secret named `CODECLIMATE_REPORTER_ID` (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/secrets/actions) containing the codeclimate reporter id (you can find it at https://codeclimate.com/repos/YOUR_REPO_ID/settings/test_reporter). If you don't want to use CodeClimate just delete `workflows/python-quality.yml`. * Update the badges in `README.md`! (check [shields.io](https://shields.io/) for extra badges) +* Setup local development: + * Clone the repository + * Install poetry `pip install poetry` + * Install dev dependencies with `make dev-dependencies` +* Setup GitHub pages (this need local development setup): + * Initialise documentation branch `poetry run mike deploy dev latest --update-aliases --push` + * Enable GitHub Actions for GitHub Pages (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/pages) **IMPORTANT:** The repository is configured to deploy on the [test PyPI repository](https://test.pypi.org/). It's strongly recommended to create the project in the [test PyPI repository](https://test.pypi.org/) and test diff --git a/docs/index.md b/docs/index.md index 34cc7f4..7c891da 100644 --- a/docs/index.md +++ b/docs/index.md @@ -27,11 +27,17 @@ previous python versions directly in the CI pipeline to catch these bugs. * Owner: The github repository owner (in this case `febus982`) * Repository name: The github repository name (in this case `bootstrap-python-package`) * Workflow name: `release.yml` -* Enable GitHub Actions for GitHub Pages (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/pages) * Create a GitHub Actions secret named `CODECLIMATE_REPORTER_ID` (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/secrets/actions) containing the codeclimate reporter id (you can find it at https://codeclimate.com/repos/YOUR_REPO_ID/settings/test_reporter). If you don't want to use CodeClimate just delete `workflows/python-quality.yml`. * Update the badges in `README.md`! (check [shields.io](https://shields.io/) for extra badges) +* Setup local development: + * Clone the repository + * Install poetry `pip install poetry` + * Install dev dependencies with `make dev-dependencies` +* Setup GitHub pages (this need local development setup): + * Initialise documentation branch `poetry run mike deploy dev latest --update-aliases --push` + * Enable GitHub Actions for GitHub Pages (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/pages) **IMPORTANT:** The repository is configured to deploy on the [test PyPI repository](https://test.pypi.org/). It's strongly recommended to create the project in the [test PyPI repository](https://test.pypi.org/) and test @@ -58,6 +64,7 @@ This format can be customized, refer to [poetry-dynamic-versioning docs](https:/ All the common commands used during development can be run using make targets: * `make dev-dependencies`: Install dev requirements +* `make update-dependencies`: Update dev requirements * `make test`: Run test suite * `make check`: Run tests, code style and lint checks * `make fix`: Run code style and lint automatic fixes (where possible)