Skip to content

Commit 2281873

Browse files
authored
Merge pull request #1 from xdurana/rename-package
2 parents 920310f + b8cdab8 commit 2281873

17 files changed

Lines changed: 80 additions & 278 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 147 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,38 @@
1-
# Cookiecutter Poetry
2-
3-
[![Release](https://img.shields.io/github/v/release/xdurana/cookiecutter-poetry)](https://pypi.org/project/cookiecutter-poetry/)
4-
[![Build status](https://img.shields.io/github/workflow/status/xdurana/cookiecutter-poetry/merge-to-main)](https://img.shields.io/github/workflow/status/xdurana/cookiecutter-poetry/merge-to-main)
5-
[![Supported Python versions](https://img.shields.io/pypi/pyversions/cookiecutter-poetry)](https://pypi.org/project/cookiecutter-poetry/)
6-
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://xdurana.github.io/cookiecutter-poetry/)
7-
[![PyPI - Downloads](https://img.shields.io/pypi/dm/cookiecutter-poetry)](https://img.shields.io/pypi/dm/cookiecutter-poetry?style=flat-square)
8-
[![License](https://img.shields.io/github/license/xdurana/cookiecutter-poetry)](https://img.shields.io/github/license/xdurana/cookiecutter-poetry)
1+
# Cookiecutter PyPackage
92

3+
[![Supported Python versions](https://img.shields.io/pypi/pyversions/cookiecutter-pypackage)](https://pypi.org/project/cookiecutter-pypackage/)
4+
[![Docs](https://img.shields.io/badge/docs-gh--pages-blue)](https://xdurana.github.io/cookiecutter-pypackage/)
5+
[![PyPI - Downloads](https://img.shields.io/pypi/dm/cookiecutter-pypackage)](https://img.shields.io/pypi/dm/cookiecutter-pypackage?style=flat-square)
106

117
This is a [cookiecutter](https://github.com/cookiecutter/cookiecutter)
128
repository to generate the file structure for a Python project that uses
139
[Poetry](https://python-poetry.org/) for its dependency management.
1410

15-
- **Documentation**: [Link](https://xdurana.github.io/cookiecutter-poetry/)
16-
- **Example repository**: [Link](https://github.com/xdurana/cookiecutter-poetry-example)
17-
- **PyPi**: [Link](https://pypi.org/project/cookiecutter-poetry/)
11+
- **Documentation**: [Link](https://xdurana.github.io/cookiecutter-pypackage/)
12+
- **Example repository**: [Link](https://github.com/xdurana/cookiecutter-pypackage-example)
13+
- **PyPi**: [Link](https://pypi.org/project/cookiecutter-pypackage/)
1814

1915
## Features
2016

2117
- [Poetry](https://python-poetry.org/), obviously.
2218
- CI/CD with [GitHub Actions](https://github.com/features/actions)
2319
- Formatting with [black](https://pypi.org/project/black/) and [isort](https://pycqa.github.io/isort/index.html)
2420
- Linting with [flake8](https://flake8.pycqa.org/en/latest/)
25-
- Publishing to [Pypi](https://pypi.org) or [Artifactory](https://jfrog.com/artifactory) by creating a new release on GitHub
21+
- Publishing to [Pypi](https://pypi.org) by creating a new release on GitHub
2622
- Testing with [pytest](https://docs.pytest.org/en/7.1.x/)
2723
- Documentation with [MkDocs](https://www.mkdocs.org/)
2824
- Static type checking with [mypy](https://mypy.readthedocs.io/en/stable/)
2925
- Compatibility testing for multiple versions of Python with [Tox](https://tox.wiki/en/latest/)
3026
- Containerization with [Docker](https://www.docker.com/)
31-
32-
## Example CI/CD Pipeline
33-
34-
[![Example pipeline](https://raw.githubusercontent.com/xdurana/cookiecutter-poetry/main/static/images/pipeline.png)](https://raw.githubusercontent.com/xdurana/cookiecutter-poetry/main/static/images/pipeline.png)
27+
- [Developing inside a Container in VSCode](https://code.visualstudio.com/docs/remote/containers)
3528

3629
## Quickstart
3730

3831
On your local machine, navigate to the directory in which you want to
3932
create a project directory, and run the following two commands:
4033

4134
``` bash
42-
pip install cookiecutter-poetry
35+
pip install cookiecutter-pypackage
4336
ccp
4437
```
4538

@@ -48,7 +41,7 @@ Github repository to the `cookiecutter` command:
4841

4942
``` bash
5043
pip install cookiecutter
51-
cookiecutter https://github.com/xdurana/cookiecutter-poetry.git
44+
cookiecutter https://github.com/xdurana/cookiecutter-pypackage.git
5245
```
5346

5447
Then run the following commands, replacing `<project-name>`, with the
@@ -70,14 +63,14 @@ You are now ready to start development on your project! The CI/CD
7063
pipeline will be triggered when you open a pull request, merge to main,
7164
or when you create a new release.
7265

73-
To finalize the set-up for publishing to PyPi or Artifactory, see
74-
[here](https://xdurana.github.io/cookiecutter-poetry/features/publishing/#set-up-for-pypi).
66+
To finalize the set-up for publishing to PyPi, see
67+
[here](https://xdurana.github.io/cookiecutter-pypackage/features/publishing/#set-up-for-pypi).
7568
For activating the automatic documentation with MkDocs, see
76-
[here](https://xdurana.github.io/cookiecutter-poetry/features/mkdocs/#enabling-the-documentation-on-github).
69+
[here](https://xdurana.github.io/cookiecutter-pypackage/features/mkdocs/#enabling-the-documentation-on-github).
7770

7871
## Acknowledgements
7972

8073
This project is partially based on [Audrey
8174
Feldroy's](https://github.com/audreyfeldroy) great
8275
[cookiecutter-pypackage](https://github.com/audreyfeldroy/cookiecutter-pypackage) and [
83-
Florian Maas](https://github.com/fpgmaas/) great [cookiecutter-pypackage](https://github.com/fpgmaas/cookiecutter-poetry).
76+
Florian Maas](https://github.com/fpgmaas/) great [cookiecutter-pypackage](https://github.com/fpgmaas/cookiecutter-pypackage).

cookiecutter.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"project_slug": "{{cookiecutter.project_name|lower|replace('-', '_')}}",
77
"project_description": "This is a template repository for Python projects that use Poetry for their dependency management.",
88
"include_github_actions": ["y","n"],
9-
"publish_to": ["pypi", "artifactory", "none"],
9+
"publish_to": ["pypi", "none"],
1010
"mkdocs": ["y", "n"],
1111
"tox": ["y","n"],
1212
"mypy" : ["y","n"],
1313
"dockerfile" : ["y","n"],
1414
"open_source_license": ["MIT license", "BSD license", "ISC license", "Apache Software License 2.0", "GNU General Public License v3", "Not open source"]
15-
}
15+
}

docs/features/cicd.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ formatting.
2525

2626
`on-release-main.yml` does all of the former whenever a new release is
2727
made on the `main` branch. In addition, `on-release-main.yml` also
28-
publishes the project to Pypi or Artifactory if `publish_to` is set to
29-
`"pypi"` or `"artifactory"`, and it builds and deploys the documentation
28+
publishes the project to Pypi if `publish_to` is set to
29+
`"pypi"`, and it builds and deploys the documentation
3030
if `mkdocs` is set to `"y"`. To learn more about these features,
31-
see [Publishing to PyPi or Artifactory](./publishing.md) and [Documentation with MkDocs](./mkdocs.md)
31+
see [Publishing to PyPi](./publishing.md) and [Documentation with MkDocs](./mkdocs.md)
3232

3333
Additionally, all workflows check for compatibility with multiple Python
3434
versions if `tox` is set to `"y"`.
@@ -41,7 +41,3 @@ a new release`. If you fail to find the button, you could also directly visit
4141

4242
Give your release a title, and add a new tag in the form `*.*.*` where the
4343
`*`'s are alphanumeric. To finish, press `Publish release`.
44-
45-
## Example CI/CD Pipeline
46-
47-
[![Example pipeline](https://raw.githubusercontent.com/xdurana/cookiecutter-poetry/main/static/images/pipeline.png)](https://raw.githubusercontent.com/xdurana/cookiecutter-poetry/main/static/images/pipeline.png)

docs/features/publishing.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# Publishing to Pypi or Artifactory
1+
# Publishing to Pypi
22

33
## Releasing from Github
44

5-
When `publish_to` is set to `"pypi"` or `"artifactory"`, the
5+
When `publish_to` is set to `"pypi", the
66
`on-release-main.yml` workflow publishes the code to
7-
[Pypi](https://pypi.org) or [Artifactory](https://jfrog.com/artifactory)
8-
respectively whenever a [new release](./cicd.md#how-to-trigger-a-release) is made.
7+
[Pypi](https://pypi.org) whenever a [new release](./cicd.md#how-to-trigger-a-release) is made.
98

109
Before you can succesfully publish your project from the release workflow, you need to add some secrets to your github repository so
1110
they can be used as environment variables.
@@ -20,19 +19,6 @@ name of the secret, set `PYPI_TOKEN`. Then, in a new tab go to your
2019
`Add API token`. Copy and paste the token in the `Value`
2120
field for the Github secret in your first tab, and you're all set!
2221

23-
## Set-up for Artifactory
24-
25-
In order to release to `Artifactory`, visit your Artifactory
26-
instance and open `Quick setup`. You should see something like this:
27-
28-
![image](../static/artifactory.png)
29-
30-
You should add these as secrets to your repository with the names
31-
`ARTIFACTORY_URL`, `ARTIFACTORY_USERNAME` and `ARTIFACTORY_PASSWORD`
32-
respectively. To do so, in your Github repository, navigate to
33-
`Settings > Secrets > Actions` and create a secret by pressing
34-
`New repository secret` to add the secrets one by one.
35-
3622
## Publishing from your local machine
3723

3824
It is also possible to release locally, although it is not recommended.

docs/features/vscode.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Developing inside a Container in VSCode
2+
3+
The Visual Studio Code Remote - Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code's full feature set. A [devcontainer.json](https://code.visualstudio.com/docs/remote/containers#_create-a-devcontainerjson-file) file in your project tells VS Code how to access (or create) a development container with a well-defined tool and runtime stack. This container can be used to run an application or to separate tools, libraries, or runtimes needed for working with a codebase.
4+
5+
If you open the project in VSCode, you can reopen the folder in the development container and have a full working environment.

docs/index.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11

2-
# Cookiecutter Poetry
2+
# Cookiecutter PyPackage
33

4-
[![Release](https://img.shields.io/github/v/release/{{cookiecutter.author_github_handle}}/cookiecutter-poetry)](https://pypi.org/project/cookiecutter-poetry/)
5-
[![Build status](https://img.shields.io/github/workflow/status/{{cookiecutter.author_github_handle}}/cookiecutter-poetry/merge-to-main)](https://img.shields.io/github/workflow/status/{{cookiecutter.author_github_handle}}/cookiecutter-poetry/merge-to-main)
6-
[![Supported Python versions](https://img.shields.io/pypi/pyversions/cookiecutter-poetry)](https://pypi.org/project/cookiecutter-poetry/)
7-
[![License](https://img.shields.io/github/license/{{cookiecutter.author_github_handle}}/cookiecutter-poetry)](https://img.shields.io/github/license/{{cookiecutter.author_github_handle}}/cookiecutter-poetry)
4+
[![Release](https://img.shields.io/github/v/release/{{cookiecutter.author_github_handle}}/cookiecutter-pypackage)](https://pypi.org/project/cookiecutter-pypackage/)
5+
[![Build status](https://img.shields.io/github/workflow/status/{{cookiecutter.author_github_handle}}/cookiecutter-pypackage/merge-to-main)](https://img.shields.io/github/workflow/status/{{cookiecutter.author_github_handle}}/cookiecutter-pypackage/merge-to-main)
6+
[![Supported Python versions](https://img.shields.io/pypi/pyversions/cookiecutter-pypackage)](https://pypi.org/project/cookiecutter-pypackage/)
7+
[![License](https://img.shields.io/github/license/{{cookiecutter.author_github_handle}}/cookiecutter-pypackage)](https://img.shields.io/github/license/{{cookiecutter.author_github_handle}}/cookiecutter-pypackage)
88

99
This is a [cookiecutter](https://github.com/cookiecutter/cookiecutter)
1010
repository to generate the file structure for a Python project that uses
11-
[Poetry](https://python-poetry.org/) for its dependency management.
11+
[Poetry](https://python-poetry.org/) for its dependency management.
1212

13-
A project generated with ``cookiecutter-poetry`` supports the following features:
13+
A project generated with ``cookiecutter-pypackage`` supports the following features:
1414

1515
- [Poetry](https://python-poetry.org/), obviously.
1616
- CI/CD with [GitHub Actions](https://github.com/features/actions)
1717
- Formatting with [black](https://pypi.org/project/black/) and [isort](https://pycqa.github.io/isort/index.html)
1818
- Linting with [flake8](https://flake8.pycqa.org/en/latest/)
19-
- Publishing to [Pypi](https://pypi.org) or [Artifactory](https://jfrog.com/artifactory) by creating a new release on GitHub
19+
- Publishing to [Pypi](https://pypi.org) by creating a new release on GitHub
2020
- Testing with [pytest](https://docs.pytest.org/en/7.1.x/)
2121
- Documentation with [MkDocs](https://www.mkdocs.org/)
2222
- Static type checking with [mypy](https://mypy.readthedocs.io/en/stable/)
2323
- Compatibility testing for multiple versions of Python with [Tox](https://tox.wiki/en/latest/)
2424
- Containerization with [Docker](https://www.docker.com/)
25+
- [Developing inside a Container in VSCode](https://code.visualstudio.com/docs/remote/containers)
2526

26-
An example of a repository generated with this package can be found [here](https://github.com/{{cookiecutter.author_github_handle}}/cookiecutter-poetry-example).
27+
An example of a repository generated with this package can be found [here](https://github.com/{{cookiecutter.author_github_handle}}/cookiecutter-pypackage-example).
2728

2829
## Quickstart
2930

3031
On your local machine, navigate to the directory in which you want to
3132
create a project directory, and run the following two commands:
3233

3334
``` bash
34-
pip install cookiecutter-poetry
35+
pip install cookiecutter-pypackage
3536
ccp
3637
```
3738

@@ -40,7 +41,7 @@ Github repository to the `cookiecutter` command:
4041

4142
``` bash
4243
pip install cookiecutter
43-
cookiecutter https://github.com/{{cookiecutter.author_github_handle}}/cookiecutter-poetry.git
44+
cookiecutter https://github.com/{{cookiecutter.author_github_handle}}/cookiecutter-pypackage.git
4445
```
4546

4647
Then run the following commands, replacing `<project-name>`, with the
@@ -58,13 +59,13 @@ git push -u origin main
5859

5960
Finally, install the environment with `make install`.
6061

61-
You are now ready to start development on your project! The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.
62+
You are now ready to start development on your project! The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.
6263

63-
To finalize the set-up for publishing to PyPi or Artifactory, see [here](./features/publishing.md#set-up-for-pypi). For activating the automatic documentation with MkDocs, see [here](./features/mkdocs.md#enabling-the-documentation-on-github).
64+
To finalize the set-up for publishing to PyPi, see [here](./features/publishing.md#set-up-for-pypi). For activating the automatic documentation with MkDocs, see [here](./features/mkdocs.md#enabling-the-documentation-on-github).
6465

6566
## Acknowledgements
6667

6768
This project is partially based on [Audrey
6869
Feldroy's](https://github.com/audreyfeldroy) great
6970
[cookiecutter-pypackage](https://github.com/audreyfeldroy/cookiecutter-pypackage) and [
70-
Florian Maas](https://github.com/fpgmaas/) great [cookiecutter-pypackage](https://github.com/fpgmaas/cookiecutter-poetry).
71+
Florian Maas](https://github.com/fpgmaas/) great [cookiecutter-pypackage](https://github.com/fpgmaas/cookiecutter-pypackage).

0 commit comments

Comments
 (0)