You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is basic python project template with basic CI/CD GA workflow & GH issue & PR template. Anyone can use this template to start a new python project.
2
+
This is a Python project template that anyone can use with basic CI/CD pipeline, issue and PR templates etc.
3
3
4
4
## Directory Structure
5
5
You can remove the `(optional)` directories if you don't need them. (e.g. `docker/`, `setup.py`, etc.)
Basic CI workflow with pytest. It runs tests in the [`tests`](https://github.com/jhj0517/python-project-template/tree/master/tests) directory, with master branch commit & PR triggers by default.
Basic CD workflow for DockerHub. This workflow is optional, only needed when you want to publish the docker image to the dockerhub. You can remove this workflow if you don't need it.<br>
21
-
It will build the docker image with [`docker/Dockerfile`](https://github.com/jhj0517/python-project-template/tree/master/docker/Dockerfile) and [`docker/docker-compose.yaml`](https://github.com/jhj0517/python-project-template/tree/master/docker/docker-compose.yaml) for the project and publish it to the dockerhub with the tag `latest`.<br>
22
-
The auto-trigger for this workflow is disabled by default. You can edit the workflow to enable it.<br>
23
-
Before using the workflow, you need to set the `DOCKERHUB_USERNAME` & `DOCKERHUB_TOKEN` in the repository secrets.
Basic CI workflow with pytest. It runs tests in the [tests/](https://github.com/jhj0517/python-project-template/tree/master/tests) directory, with master branch commit & PR triggers by default.
Basic CD workflow for DockerHub publishing. You can remove this workflow if you don't need it.<br>
26
+
It will build the docker image with files in the [docker/](https://github.com/jhj0517/python-project-template/tree/master/docker) and publish it to the dockerhub. The auto-trigger of the action is disabled by default.<br>
27
+
Before using the workflow, you need to set the `DOCKERHUB_USERNAME` & `DOCKERHUB_TOKEN` in the repository settings.
Basic CD workflow for pypi package. You can remove this workflow if you don't need it. <br>
39
+
The auto-trigger for this workflow is disabled by default. If enabled, it will build and publish to pypi whenever you make a new "release" in the repository.
Basic CD workflow for pypi package. This is the workflow that only used in case when your project is a python package that will be published in the pypi. You can remove this workflow if you don't need it.<br>
33
-
It will build it and publish it to pypi whenever you make a new "release" in the repository.<br>
34
-
The auto-trigger for this workflow is disabled by default. You can edit the workflow to enable it.<br>
35
41
Before using the workflow, edit package name to yours in the workflow.
The [`docker/`](https://github.com/jhj0517/python-project-template/tree/master/docker) directory and [`publish-dockerhub.yml`](https://github.com/jhj0517/python-project-template/tree/master/.github/workflows/publish-dockerhub.yml) are associated with building the docker image and publishing to dockerhub. You can remove them if you don't need them.<br>
52
-
Before building image, make sure to edit the variable in the [`docker/Dockerfile`](https://github.com/jhj0517/python-project-template/tree/master/docker/Dockerfile):
57
+
The [docker/](https://github.com/jhj0517/python-project-template/tree/master/docker) directory and [publish-dockerhub.yml](https://github.com/jhj0517/python-project-template/tree/master/.github/workflows/publish-dockerhub.yml) are associated with the Docker CI/CD pipeline. You can remove them if you don't need them.
58
+
59
+
Before building image, make sure to edit the variable in the [docker/Dockerfile](https://github.com/jhj0517/python-project-template/tree/master/docker/Dockerfile):
The image is built and published automatically by the action, but you can also manually build and run the image with the following commands.
67
+
The image is built and published automatically by the CI/CD pipeline, but you can also manually build and run the image with the following commands.
61
68
62
69
1. git clone this repository
63
70
```bash
@@ -73,14 +80,12 @@ docker compose -f docker/docker-compose.yaml up
73
80
```
74
81
75
82
## PyPI
76
-
The [`setup.py`](https://github.com/jhj0517/python-project-template/tree/master/setup.py), [`pyproject.toml`](https://github.com/jhj0517/python-project-template/tree/master/setup.py) and [`publish-pypi.yml`](https://github.com/jhj0517/python-project-template/tree/master/.github/workflows/publish-dockerhub.yml) are associated with building the package and publishing to PyPI. You can remove them if you don't need them.<br>
77
-
Make sure to edit dependencies & variables in the [`pyproject.toml`](https://github.com/jhj0517/python-project-template/tree/master/setup.py) as your project's needs.
83
+
The [setup.py](https://github.com/jhj0517/python-project-template/tree/master/setup.py), [pyproject.toml](https://github.com/jhj0517/python-project-template/tree/master/pyproject.toml) and [publish-pypi.yml](https://github.com/jhj0517/python-project-template/tree/master/.github/workflows/publish-dockerhub.yml) are associated with the PyPI package CI/CD pipeline. You can remove them if you don't need them.
78
84
85
+
Make sure to edit dependencies & variables in the [pyproject.toml](https://github.com/jhj0517/python-project-template/tree/master/pyproject.toml) as your project's needs.
79
86
80
87
## How to start
81
-
Click "Use this template" and "Create a new repository". Then git clone it and you can start your own project.
82
-
83
-
[image-url](URL)
84
-
88
+
Click "Use this template" and "Create a new repository". Then you can start your own project with `git clone`.
0 commit comments