Skip to content

Commit d1e8e68

Browse files
author
aaron
authored
Merge pull request #6 from ma7555/fix_some_bugs
2 parents 9358562 + 9b4fc33 commit d1e8e68

11 files changed

Lines changed: 74 additions & 67 deletions

File tree

docs/tutorial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ though.
9090
```
9191
conda create -n mypackage python=3.8
9292
conda activate mypackage
93+
conda install -c conda-forge tox-conda
9394
```
9495

9596
You could choose your favorite python version here.

mkdocs.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,22 @@ nav:
88
- Release checklist: pypi_release_checklist.md
99
- FAQ: faq.md
1010
- History: history.md
11-
11+
1212
theme:
1313
name: material
1414
language: en
1515
#logo: assets/logo.png
1616
palette:
17-
primary: light blue
17+
- media: "(prefers-color-scheme: light)"
18+
scheme: default
19+
toggle:
20+
icon: material/weather-night
21+
name: Switch to dark mode
22+
- media: "(prefers-color-scheme: dark)"
23+
scheme: slate
24+
toggle:
25+
icon: material/weather-sunny
26+
name: Switch to light mode
1827
features:
1928
- navigation.indexes
2029
- navigation.tabs

{{cookiecutter.project_slug}}/.github/workflows/dev.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
name: dev workflow
44

5-
# Controls when the action will run.
5+
# Controls when the action will run.
66
on:
77
# Triggers the workflow on push or pull request events but only for the master branch
88
push:
9-
branches: [ master,main,release ]
9+
branches: [master, main, release]
1010
pull_request:
11-
branches: [ master,main,release ]
11+
branches: [master, main, release]
1212

1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
@@ -20,8 +20,8 @@ jobs:
2020
# The type of runner that the job will run on
2121
strategy:
2222
matrix:
23-
python-versions: [3.6, 3.7, 3.8, 3.9]
24-
os: [ubuntu-18.04, macos-latest, windows-latest]
23+
python-versions: ["3.7", "3.8", "3.9", "3.10"]
24+
os: [ubuntu-20.04, macos-latest, windows-latest]
2525
runs-on: ${{ matrix.os }}
2626

2727
# Steps represent a sequence of tasks that will be executed as part of the job
@@ -38,8 +38,7 @@ jobs:
3838
pip install poetry tox tox-gh-actions
3939
4040
- name: test with tox
41-
run:
42-
tox
41+
run: tox
4342

4443
- name: list files
4544
run: ls -l .
@@ -60,13 +59,12 @@ jobs:
6059
pip install poetry tox tox-gh-actions
6160
6261
- name: test with tox
63-
run:
64-
tox
62+
run: tox
6563

6664
- name: list files
6765
run: ls -l .
6866

69-
- uses: codecov/codecov-action@v1
67+
- uses: codecov/codecov-action@v2
7068
with:
7169
fail_ci_if_error: true
7270
files: coverage.xml

{{cookiecutter.project_slug}}/.github/workflows/release.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ name: release & publish workflow
66
on:
77
# Triggers the workflow on push or pull request events but only for the master branch
88
push:
9-
branch: release
109
tags:
11-
- 'v*'
10+
- "v*.*.*"
1211

1312
# Allows you to run this workflow manually from the Actions tab
1413
workflow_dispatch:
@@ -22,29 +21,21 @@ jobs:
2221

2322
strategy:
2423
matrix:
25-
python-versions: [3.8]
24+
python-versions: [3.9]
2625

2726
# Steps represent a sequence of tasks that will be executed as part of the job
2827
steps:
2928
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30-
- uses: actions/checkout@v2
31-
32-
- name: generate change log
33-
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
34-
with:
35-
token: ${{ secrets.GITHUB_TOKEN }}
36-
issues: true
37-
issuesWoLabels: true
38-
pullRequests: true
39-
prWoLabels: true
40-
unreleased: true
41-
addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}'
42-
output: CHANGELOG.md
43-
29+
- name: Checks-out
30+
uses: actions/checkout@v2
31+
- name: "Build Changelog"
32+
id: build_changelog
33+
uses: mikepenz/release-changelog-builder-action@v2.9.0
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4436
- uses: actions/setup-python@v2
4537
with:
4638
python-version: ${{ matrix.python-versions }}
47-
4839
- name: Install dependencies
4940
run: |
5041
python -m pip install --upgrade pip
@@ -80,9 +71,9 @@ jobs:
8071
draft: false
8172
prerelease: false
8273

83-
- name:
74+
- name: create pypi release
8475
uses: pypa/gh-action-pypi-publish@release/v1
8576
with:
8677
user: __token__
8778
password: ${{ secrets.PYPI_API_TOKEN }}
88-
skip_existing: true
79+
skip_existing: true
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[settings]
2-
multi_line_output = 3
3-
include_trailing_comma = True
4-
force_grid_wrap = 0
5-
use_parentheses = True
6-
ensure_newline_before_comments = True
7-
line_length = 88
2+
profile=black
83
# you can skip files as below
94
#skip_glob = docs/conf.py

{{cookiecutter.project_slug}}/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ $ git push
126126
$ git push --tags
127127
```
128128

129-
Travis will then deploy to PyPI if tests pass.
129+
Github Actions will then deploy to PyPI if tests pass.

{{cookiecutter.project_slug}}/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<img src="https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/actions/workflows/main.yml/badge.svg?branch=release" alt="CI Status">
1313
</a>
1414

15-
<a href="https://{{ cookiecutter.project_slug | replace("_", "-") }}.readthedocs.io/en/latest/?badge=latest">
16-
<img src="https://readthedocs.org/projects/{{ cookiecutter.project_slug | replace("_", "-") }}/badge/?version=latest" alt="Documentation Status">
15+
<a href="https://{{ cookiecutter.github_username }}.github.io/{{ cookiecutter.project_slug }}/">
16+
<img src="https://img.shields.io/website/https/{{ cookiecutter.github_username }}.github.io/{{ cookiecutter.project_slug }}/index.html.svg?label=docs&down_message=unavailable&up_message=available" alt="Documentation Status">
1717
</a>
1818
{% if cookiecutter.add_pyup_badge == 'y' %}
1919
<a href="https://pyup.io/repos/github/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/">
@@ -35,7 +35,7 @@
3535

3636
{% if is_open_source %}
3737
* Free software: {{ cookiecutter.open_source_license }}
38-
* Documentation: <https://{{ cookiecutter.project_slug | replace("_", "-") }}.readthedocs.io>
38+
* Documentation: <https://{{ cookiecutter.github_username }}.github.io/{{ cookiecutter.project_slug }}/>
3939
{% endif %}
4040

4141
## Features

{{cookiecutter.project_slug}}/docs/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To install {{ cookiecutter.project_name }}, run this command in your
66
terminal:
77

88
``` console
9-
$ pip install {{ cookiecutter.project_slug }}
9+
pip install {{ cookiecutter.project_slug }}
1010
```
1111

1212
This is the preferred method to install {{ cookiecutter.project_name
@@ -23,19 +23,19 @@ the [Github repo][].
2323
You can either clone the public repository:
2424

2525
``` console
26-
$ git clone git://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}
26+
git clone git://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}
2727
```
2828

2929
Or download the [tarball][]:
3030

3131
``` console
32-
$ curl -OJL https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/tarball/master
32+
curl -OJL https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/tarball/master
3333
```
3434

3535
Once you have a copy of the source, you can install it with:
3636

3737
``` console
38-
$ pip install .
38+
pip install .
3939
```
4040

4141
[pip]: https://pip.pypa.io

{{cookiecutter.project_slug}}/mkdocs.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ theme:
1717
language: en
1818
#logo: assets/logo.png
1919
palette:
20-
primary: light blue
20+
- media: "(prefers-color-scheme: light)"
21+
scheme: default
22+
toggle:
23+
icon: material/weather-night
24+
name: Switch to dark mode
25+
- media: "(prefers-color-scheme: dark)"
26+
scheme: slate
27+
toggle:
28+
icon: material/weather-sunny
29+
name: Switch to light mode
2130
features:
2231
- navigation.indexes
2332
- navigation.tabs

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,40 +24,42 @@ classifiers=[
2424
{%- endif %}
2525
'Natural Language :: English',
2626
'Programming Language :: Python :: 3',
27-
'Programming Language :: Python :: 3.6',
2827
'Programming Language :: Python :: 3.7',
2928
'Programming Language :: Python :: 3.8',
3029
'Programming Language :: Python :: 3.9',
30+
'Programming Language :: Python :: 3.10',
3131
]
3232
packages = [
3333
{ include = "{{ cookiecutter.project_slug }}" },
3434
{ include = "tests", format = "sdist" },
3535
]
3636

3737
[tool.poetry.dependencies]
38-
python = ">=3.6.1,<4.0"
38+
python = ">=3.7.1,<4.0"
3939
{%- if cookiecutter.command_line_interface|lower == 'fire' %}
4040
fire = "0.4.0"
4141
{%- endif %}
4242

43-
black = { version = "20.8b1", optional = true}
44-
isort = { version = "5.6.4", optional = true}
45-
flake8 = { version = "3.8.4", optional = true}
43+
black = { version = "22.1.0", optional = true}
44+
isort = { version = "5.10.1", optional = true}
45+
flake8 = { version = "4.0.1", optional = true}
4646
flake8-docstrings = { version = "^1.6.0", optional = true }
47-
pytest = { version = "6.1.2", optional = true}
48-
pytest-cov = { version = "2.10.1", optional = true}
49-
tox = { version = "^3.20.1", optional = true}
50-
virtualenv = { version = "^20.2.2", optional = true}
51-
pip = { version = "^20.3.1", optional = true}
52-
mkdocs = { version = "^1.1.2", optional = true}
53-
mkdocs-include-markdown-plugin = { version = "^1.0.0", optional = true}
54-
mkdocs-material = { version = "^6.1.7", optional = true}
55-
mkdocstrings = { version = "^0.13.6", optional = true}
56-
mkdocs-material-extensions = { version = "^1.0.1", optional = true}
57-
twine = { version = "^3.3.0", optional = true}
58-
mkdocs-autorefs = {version = "0.1.1", optional = true}
59-
pre-commit = {version = "^2.12.0", optional = true}
47+
pytest = { version = "^7.0.1", optional = true}
48+
pytest-cov = { version = "^3.0.0", optional = true}
49+
tox = { version = "^3.24.5", optional = true}
50+
virtualenv = { version = "^20.13.1", optional = true}
51+
pip = { version = "^22.0.3", optional = true}
52+
mkdocs = { version = "^1.2.3", optional = true}
53+
mkdocs-include-markdown-plugin = { version = "^3.2.3", optional = true}
54+
mkdocs-material = { version = "^8.1.11", optional = true}
55+
mkdocstrings = { version = "^0.18.0", optional = true}
56+
mkdocs-material-extensions = { version = "^1.0.3", optional = true}
57+
twine = { version = "^3.8.0", optional = true}
58+
mkdocs-autorefs = {version = "^0.3.1", optional = true}
59+
pre-commit = {version = "^2.17.0", optional = true}
6060
toml = {version = "^0.10.2", optional = true}
61+
livereload = {version = "^2.6.3", optional = true}
62+
pyreadline = {version = "^2.1", optional = true}
6163

6264
[tool.poetry.extras]
6365
test = [
@@ -106,3 +108,5 @@ exclude = '''
106108
| dist
107109
)/
108110
'''
111+
[tool.isort]
112+
profile = "black"

0 commit comments

Comments
 (0)