Skip to content

Commit f3a25bf

Browse files
authored
Merge pull request #6 from pdssp/poetry
Poetry
2 parents f083b62 + f4955b3 commit f3a25bf

39 files changed

+491
-1684
lines changed

tests/test_generation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def test_project_structure(generate_project):
2727
"pyproject.toml",
2828
"Makefile",
2929
"LICENSE",
30-
"Dockerfile",
3130
"CONTRIBUTING.rst",
3231
"CHANGELOG",
3332
"AUTHORS.rst",
@@ -97,7 +96,7 @@ def test_license(generate_project):
9796

9897
def test_Dockerfile(generate_project):
9998
"""Check the Dockerfile is correctly generated."""
100-
readme_path = os.path.join(generate_project, "testproject", "Dockerfile")
99+
readme_path = os.path.join(generate_project, "testproject", "docker", "Dockerfile")
101100

102101
with open(readme_path, 'r') as readme_file:
103102
content = readme_file.read()

{{cookiecutter.project_slug}}/.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
ignore = E203, E266, E501, W503, F403, F401
2+
ignore = E203, E266, E501, W503, F403, F401, E402
33
max-line-length = 79
44
max-complexity = 18
55
select = B,C,E,F,W,T4,B9

{{cookiecutter.project_slug}}/.github/workflows/test-and-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ jobs:
3737
uses: peaceiris/actions-gh-pages@v3
3838
if: github.ref == 'refs/heads/main'
3939
with:
40-
github_token: <TODO: MY_GITHUB_token>
41-
publish_dir: docs/build/html/
40+
github_token: ${{ '{{ secrets.GITHUB_TOKEN }}' }}
41+
publish_dir: docs/build/html/

{{cookiecutter.project_slug}}/.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ dmypy.json
128128
# Pyre type checker
129129
.pyre/
130130

131-
{{ cookiecutter.project_slug }}-env/
131+
.{{ cookiecutter.project_slug }}
132132

133-
docs/build/
133+
docs/build/
134+
135+
**/tests/msap_data/

{{cookiecutter.project_slug}}/.pre-commit-config.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.4.0
5+
rev: v6.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
@@ -16,17 +16,22 @@ repos:
1616
- id: name-tests-test
1717
- id: requirements-txt-fixer
1818
- id: pretty-format-json
19-
- id: fix-encoding-pragma
19+
exclude: ^update/cookiecutter_answers\.json$
20+
#- id: fix-encoding-pragma
2021
- repo: https://github.com/asottile/reorder_python_imports
21-
rev: v2.4.0
22+
rev: v3.15.0
2223
hooks:
2324
- id: reorder-python-imports
24-
- repo: https://github.com/psf/black.git
25-
rev: 22.10.0
25+
- repo: https://github.com/psf/black-pre-commit-mirror
26+
rev: 25.9.0
2627
hooks:
2728
- id: black
2829
language_version: python3
2930
- repo: https://github.com/pycqa/flake8
30-
rev: 3.7.9
31+
rev: 7.3.0
3132
hooks:
3233
- id: flake8
34+
- repo: https://github.com/asottile/pyupgrade
35+
rev: v3.20.0
36+
hooks:
37+
- id: pyupgrade

{{cookiecutter.project_slug}}/.pypirc

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

{{cookiecutter.project_slug}}/.travis.yml

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

{{cookiecutter.project_slug}}/AUTHORS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Development Lead
1010
Contributors
1111
------------
1212

13-
None yet.
13+
None yet.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
=========
22
Changelog
3-
=========
3+
=========

{{cookiecutter.project_slug}}/CONTRIBUTING.rst

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Types of Contributions
1515
Report Bugs
1616
~~~~~~~~~~~
1717

18-
Report bugs at https://github.com/pdssp/{{ cookiecutter.project_slug }}/issues.
18+
Report bugs at {{ cookiecutter.project_url }}/issues.
1919

2020
If you are reporting a bug, please include:
2121

@@ -26,13 +26,13 @@ If you are reporting a bug, please include:
2626
Fix Bugs
2727
~~~~~~~~
2828

29-
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
29+
Look through the Gitlab issues for bugs. Anything tagged with "bug" and "help
3030
wanted" is open to whoever wants to implement it.
3131

3232
Implement Features
3333
~~~~~~~~~~~~~~~~~~
3434

35-
Look through the GitHub issues for features. Anything tagged with "enhancement"
35+
Look through the Gitlab issues for features. Anything tagged with "enhancement"
3636
and "help wanted" is open to whoever wants to implement it.
3737

3838
Write Documentation
@@ -45,7 +45,7 @@ articles, and such.
4545
Submit Feedback
4646
~~~~~~~~~~~~~~~
4747

48-
The best way to send feedback is to file an issue at https://github.com/pdssp/{{ cookiecutter.project_slug }}/issues.
48+
The best way to send feedback is to file an issue at {{ cookiecutter.project_url }}/issues.
4949

5050
If you are proposing a feature:
5151

@@ -59,16 +59,17 @@ Get Started!
5959

6060
Ready to contribute? Here's how to set up `{{ cookiecutter.project_slug }}` for local development.
6161

62-
1. Fork the `{{ cookiecutter.project_slug }}` repo on GitHub.
62+
1. Fork the `{{ cookiecutter.project_slug }}` repo on Gitlab.
6363
2. Clone your fork locally::
6464

65-
$ git clone git@github.com:your_name_here/{{ cookiecutter.project_slug }}.git
65+
$ git clone {{ cookiecutter.project_url }}.git
6666

67-
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
67+
3. Install your local copy into a virtualenv. Assuming you have virtualenv installed, this is how you set up your fork for local development::
6868

69-
$ mkvirtualenv {{ cookiecutter.project_slug }}
7069
$ cd {{ cookiecutter.project_slug }}/
71-
$ python setup.py develop
70+
$ make prepare-dev
71+
$ source .{{ cookiecutter.project_slug }}/
72+
$ make install-dev
7273

7374
4. Create a branch for local development::
7475

@@ -79,19 +80,18 @@ Ready to contribute? Here's how to set up `{{ cookiecutter.project_slug }}` for
7980
5. When you're done making changes, check that your changes pass flake8 and the
8081
tests, including testing other Python versions with tox::
8182

82-
$ flake8 {{ cookiecutter.project_slug }} tests
83-
$ python setup.py test or pytest
83+
$ make lint
84+
$ make tests
8485
$ tox
8586

86-
To get flake8 and tox, just pip install them into your virtualenv.
8787

88-
6. Commit your changes and push your branch to GitHub::
88+
6. Commit your changes and push your branch to Gitlab::
8989

9090
$ git add .
9191
$ git commit -m "Your detailed description of your changes."
9292
$ git push origin name-of-your-bugfix-or-feature
9393

94-
7. Submit a pull request through the GitHub website.
94+
7. Submit a pull request through the Gitlab website.
9595

9696
Pull Request Guidelines
9797
-----------------------
@@ -108,7 +108,8 @@ Tips
108108

109109
To run a subset of tests::
110110

111-
$ pytest tests.test_{{ cookiecutter.project_slug }}
111+
$ pytest tests.test_{{ cookiecutter.project_slug }}
112+
112113

113114
Deploying
114115
---------
@@ -117,4 +118,4 @@ A reminder for the maintainers on how to deploy.
117118
Make sure all your changes are committed.
118119
Then run::
119120

120-
git tag -a v1.4.0 -m "my version 1.4.0"
121+
git tag -a v1.4.0 -m "my version 1.4.0"

0 commit comments

Comments
 (0)