Skip to content

Commit

Permalink
Merge branch 'main' of github.com:fpgmaas/cookiecutter-poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
fpgmaas committed Sep 3, 2024
2 parents 6b521d4 + c9d86d0 commit fadf5dd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"editorconfig.editorconfig",
],
"extensions": ["ms-python.python", "editorconfig.editorconfig"],
"settings": {
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: "setup-poetry-env"
description: "Composite action to setup the Python and poetry environment."

inputs:
python-version:
required: false
description: "The python version to use"
default: "3.11"
python-version:
required: false
description: "The python version to use"
default: "3.11"

runs:
using: "composite"
Expand Down
1 change: 0 additions & 1 deletion {{cookiecutter.project_name}}/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:

- name: Check typing
run: poetry run mypy

{% if cookiecutter.codecov == "y" %}
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.11
uses: codecov/codecov-action@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [main]

jobs:
{% if cookiecutter.publish_to != "none" %}
{%- if cookiecutter.publish_to != "none" %}
publish:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -39,8 +39,8 @@ jobs:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
{%- endraw -%}
{%- endif %}
{% endif %}
{%- if cookiecutter.mkdocs == "y" %}
{%- endif -%}
{%- if cookiecutter.mkdocs == "y" %}
deploy-docs:
{%- if cookiecutter.publish_to != "none" %}
needs: publish
Expand All @@ -55,4 +55,4 @@ jobs:

- name: Deploy documentation
run: poetry run mkdocs gh-deploy --force
{% endif %}
{% endif %}
16 changes: 6 additions & 10 deletions {{cookiecutter.project_name}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,22 @@ The CI/CD pipeline will be triggered when you open a pull request, merge to main
To finalize the set-up for publishing to PyPi or Artifactory, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/publishing/#set-up-for-pypi).
For activating the automatic documentation with MkDocs, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/mkdocs/#enabling-the-documentation-on-github).
To enable the code coverage reports, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/codecov/).

{% if cookiecutter.publish_to == "pypi" %}
## Releasing a new version

{% if cookiecutter.publish_to == "pypi" -%}

- Create an API Token on [Pypi](https://pypi.org/).
- Add the API Token to your projects secrets with the name `PYPI_TOKEN` by visiting [this page](https://github.com/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}/settings/secrets/actions/new).
- Create a [new release](https://github.com/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}/releases/new) on Github.
- Create a new tag in the form `*.*.*`.

For more details, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/cicd/#how-to-trigger-a-release).
{%- elif cookiecutter.publish_to == "artifactory" -%}
- For more details, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/cicd/#how-to-trigger-a-release).
{% elif cookiecutter.publish_to == "artifactory" %}
## Releasing a new version

- Add the `ARTIFACTORY_URL`, `ARTIFACTORY_USERNAME`, and `ARTIFACTORY_PASSWORD` to your projects secrets by visiting [this page](https://github.com/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}/settings/secrets/actions/new).
- Create a [new release](https://github.com/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}/releases/new) on Github.
- Create a new tag in the form `*.*.*`.

For more details, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/cicd/#how-to-trigger-a-release).
{%- endif %}

- For more details, see [here](https://fpgmaas.github.io/cookiecutter-poetry/features/cicd/#how-to-trigger-a-release).
{% endif %}
---

Repository initiated with [fpgmaas/cookiecutter-poetry](https://github.com/fpgmaas/cookiecutter-poetry).
6 changes: 3 additions & 3 deletions {{cookiecutter.project_name}}/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ plugins:
- mkdocstrings:
handlers:
python:
setup_commands:
- import sys
- sys.path.append('../')
setup_commands:
- import sys
- sys.path.append('../')
theme:
name: material
feature:
Expand Down

0 comments on commit fadf5dd

Please sign in to comment.