-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b6aed3c
Showing
30 changed files
with
1,403 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: "Continuous Integration" | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: "Set up Python" | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: "Set up PDM" | ||
run: pip install --user pdm | ||
|
||
- name: "Install Dependencies" | ||
run: make install | ||
|
||
- name: "Test Cookiecutter" | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: "Create Release" | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
name: "Create Release" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Create Release" | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: Auto-generate release notes | ||
draft: true | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.idea/ | ||
.mypy_cache/ | ||
.pdm.toml | ||
.pytest_cache/ | ||
__pypackages__/ | ||
**/__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
install: | ||
pdm install | ||
pdm install --group dev | ||
|
||
test: | ||
pdm run pytest -vv tests | ||
|
||
rm: | ||
rm -rf .mypy_cache/ || true | ||
rm -rf .pytest_cache/ || true | ||
rm -rf __pypackages__/ || true | ||
rm -rf tests/__pycache__/ || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# cookiecutter-docker-python-pdm | ||
|
||
![CI Status](https://github.com/mnako/cookiecutter-docker-python-pdm/workflows/ci/badge.svg) | ||
|
||
A template for a Python project with a disposable, Docker-contained development | ||
environment. | ||
|
||
This cookiecutter gives you a Python 3.10 development environment with nice | ||
defaults: | ||
|
||
* Python 3.10 with PDM package manager | ||
* Pytest tests with a required coverage; | ||
* Mypy tests | ||
* Black formatter | ||
* Dev Docker image | ||
* Production Docker image | ||
* CI/CD using Github actions | ||
|
||
and depends on Docker and Makefile only. | ||
|
||
## Quickstart | ||
|
||
You can generate a new project by: | ||
|
||
pip install cookiecutter | ||
cookiecutter gh:mnako/cookiecutter-docker-python-pdm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"github_username": "mnako", | ||
"project_name": "projectname" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import os | ||
|
||
|
||
os.system("make build-dev") | ||
os.system("make install-dev-deps") | ||
os.system("make format") | ||
os.system("make test") | ||
os.system("cat README.md") |
Oops, something went wrong.