Skip to content

Commit 65e4f94

Browse files
committed
Migrate to copier
1 parent de4749b commit 65e4f94

21 files changed

Lines changed: 315 additions & 194 deletions

.circleci/config.yml

Lines changed: 13 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
version: <<parameters.version>>
3737
steps:
3838
- checkout
39-
39+
4040
- run:
4141
name: install dependencies
4242
command: pip install ".[tests]"
4343
- run:
4444
name: Run tests
45-
command: pytest
45+
command: pytest tests
4646

4747
ruff:
4848
parameters:
@@ -102,7 +102,7 @@ jobs:
102102
name: Run tests
103103
command: pytest tests -W error::DeprecationWarning
104104

105-
test_pypi_publish:
105+
test_package_build:
106106
parameters:
107107
version:
108108
description: "version tag"
@@ -145,6 +145,7 @@ jobs:
145145
twine check dist/*
146146
twine upload dist/*
147147
148+
148149
# Invoke jobs via workflows
149150
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
150151
workflows:
@@ -155,101 +156,46 @@ workflows:
155156
matrix:
156157
parameters:
157158
version:
158-
- "3.10"
159159
- "3.11"
160160
- "3.12"
161161
- "3.13"
162+
- "3.14"
162163

163164
- ruff:
164165
matrix:
165166
parameters:
166167
version:
167-
- "3.13"
168+
- "3.14"
168169
requires:
169170
- build_and_test
170171

171172
- test_documentation_build:
172173
matrix:
173174
parameters:
174175
version:
175-
- "3.13"
176+
- "3.14"
176177
requires:
177178
- build_and_test
178179

179180
- test_deprecation_warnings:
180181
matrix:
181182
parameters:
182183
version:
183-
- "3.13"
184-
requires:
185-
- build_and_test
186-
187-
- test_pypi_publish:
188-
matrix:
189-
parameters:
190-
version:
191-
- "3.13"
184+
- "3.14"
192185
requires:
193186
- build_and_test
194187

195-
test_and_publish:
196-
# Test and publish on new git version tags
197-
# This requires its own workflow to successfully trigger the test and build
198-
jobs:
199-
- build_and_test:
200-
matrix:
201-
parameters:
202-
version:
203-
- "3.10"
204-
- "3.11"
205-
- "3.12"
206-
- "3.13"
207-
208-
filters:
209-
branches:
210-
ignore: /.*/
211-
# only act on version tags
212-
tags:
213-
only: /^v[0-9]+(\.[0-9]+)*$/
214-
215-
- ruff:
188+
- test_package_build:
216189
matrix:
217190
parameters:
218191
version:
219-
- "3.13"
192+
- "3.14"
220193
requires:
221194
- build_and_test
222195
filters:
223196
branches:
224-
ignore: /.*/
225-
# only act on version tags
226-
tags:
227-
only: /^v[0-9]+(\.[0-9]+)*$/
197+
only:
198+
- main
199+
- develop
228200

229-
- test_documentation_build:
230-
matrix:
231-
parameters:
232-
version:
233-
- "3.13"
234-
requires:
235-
- build_and_test
236-
filters:
237-
branches:
238-
ignore: /.*/
239-
# only act on version tags
240-
tags:
241-
only: /^v[0-9]+(\.[0-9]+)*$/
242201

243-
- test_deprecation_warnings:
244-
matrix:
245-
parameters:
246-
version:
247-
- "3.13"
248-
requires:
249-
- build_and_test
250-
filters:
251-
branches:
252-
ignore: /.*/
253-
# only act on version tags
254-
tags:
255-
only: /^v[0-9]+(\.[0-9]+)*$/

.copier-answers.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: de4749b
3+
_src_path: https://github.com/pyfar/template-pyfar-package
4+
add_submodules: false
5+
additional_section_readme: ''
6+
apt_packages: ''
7+
author: The pyfar developers
8+
copyright_statement: 2025, The pyfar developers
9+
dependencies: copier,numpy
10+
docs_custom_import: ''
11+
git_username: pyfar
12+
gitignore_custom: ''
13+
intersphinx_mapping: []
14+
keywords: acoustics,pyfar,copier,template
15+
license: MIT
16+
logo_path_gallery: resources/logos/pyfar_logos_fixed_size_pyfar.png
17+
manifest_custom: ''
18+
minimum_python_version: '3.11'
19+
project_getting_started: "\n1. To use this template, first install copier with pip.\n\
20+
\n ```console\n pip install copier\n ```\n\n2. Run the following copier\
21+
\ command to create a target directory at path_to_target_folder.\n Note: Copier\
22+
\ will overwrite files in the given directory if it already exists.\n\n ```console\n\
23+
\ copier copy https://github.com/pyfar/template-pyfar-package path_to_target_folder\n\
24+
\ ```\n"
25+
project_installation_instructions: ''
26+
project_long_description: This template is used to keep all pyfar packages consistent
27+
and provide a good staring point for new packages. It uses [copier](https://copier.readthedocs.io/en/stable/).
28+
project_short_description: Template to generate and update pyfar packages.
29+
project_slug: template-pyfar-package
30+
ruff_ignore: .git,docs
31+
use_pypi_deployment_with_ci: false
32+
version: 0.1.0
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name : modified_history_check
2+
3+
on :
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
jobs:
10+
check-history:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- name: Check if HISTORY.rst was modified or created
18+
run: |
19+
git diff origin/${{ github.base_ref }} HEAD \
20+
--diff-filter=AMR \
21+
--name-only \
22+
-- HISTORY.rst | grep -q . || {
23+
echo "ERROR: HISTORY.rst was not modified"
24+
exit 1
25+
}
26+

.github/workflows/has_version_milestone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
pull_request:
55
types:
66
- opened
7-
- labeled
8-
- unlabeled
7+
- milestoned
8+
- demilestoned
99
- synchronize
1010

1111
jobs:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,6 @@ docs/_static/css/custom.css
123123
docs/_static/js/custom.js
124124
docs/resources/logos/pyfar_logos_fixed_size_pyfar.png
125125
docs/resources/logos/pyfar_logos_fixed_size_pyfar.png
126+
127+
# custom
128+

.readthedocs.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
# .readthedocs.yml
2-
# Read the Docs configuration file
2+
# Read the Docs configuration file for Sphinx projects
33
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
44

55
# Required
66
version: 2
77

8+
# Set the OS, Python version and other tools you might need
89
build:
9-
os: ubuntu-22.04
10+
os: ubuntu-24.04
1011
tools:
11-
python: "3.13"
12-
12+
python: 3.14
1313

14-
# Build documentation in the docs/ directory with Sphinx
14+
15+
# Build documentation in the "docs/" directory with Sphinx
1516
sphinx:
1617
configuration: docs/conf.py
1718

18-
# Optionally build your docs in additional formats such as PDF
19+
# Optionally build your docs in additional formats such as PDF and ePub
1920
formats:
2021
- pdf
2122

22-
# Optionally set the version of Python and requirements required to build your docs
23+
# Optional but recommended, declare the Python requirements required
24+
# to build your documentation
25+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
2326
python:
2427
install:
2528
- method: pip

CONTRIBUTING.rst

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Contributing
66

77
Contributions are welcome, and they are greatly appreciated! Every little bit
88
helps, and credit will always be given. The following helps you to start
9-
contributing specifically to template_pyfar_package. Please also consider the
9+
contributing specifically to template-pyfar-package. Please also consider the
1010
`general contributing guidelines`_ for example regarding the style
1111
of code and documentation and some helpful hints.
1212

@@ -16,36 +16,38 @@ Types of Contributions
1616
Report Bugs or Suggest Features
1717
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1818

19-
The best place for this is https://github.com/pyfar/template_pyfar_package/issues.
19+
The best place for this is https://github.com/pyfar/template-pyfar-package/issues.
2020

2121
Fix Bugs or Implement Features
2222
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2323

24-
Look through https://github.com/pyfar/template_pyfar_package/issues for bugs or feature request
24+
Look through https://github.com/pyfar/template-pyfar-package/issues for bugs or feature requests
2525
and contact us or comment if you are interested in implementing.
2626

2727
Write Documentation
2828
~~~~~~~~~~~~~~~~~~~
2929

30-
template_pyfar_package could always use more documentation, whether as part of the
31-
official template_pyfar_package docs, in docstrings, or even on the web in blog posts,
30+
template-pyfar-package could always use more documentation, whether as part of the
31+
official template-pyfar-package docs, in docstrings, or even on the web in blog posts,
3232
articles, and such.
3333

3434
Get Started!
3535
------------
3636

37-
Ready to contribute? Here's how to set up `template_pyfar_package` for local development using the command-line interface. Note that several alternative user interfaces exist, e.g., the Git GUI, `GitHub Desktop <https://desktop.github.com/>`_, extensions in `Visual Studio Code <https://code.visualstudio.com/>`_ ...
37+
Ready to contribute? Here's how to set up `template-pyfar-package` for local development using the command-line interface.
38+
Note that several alternative user interfaces exist, e.g., the Git GUI, `GitHub Desktop <https://desktop.github.com/>`_,
39+
extensions in `Visual Studio Code <https://code.visualstudio.com/>`_ ...
3840

39-
1. `Fork <https://docs.github.com/en/get-started/quickstart/fork-a-repo/>`_ the `template_pyfar_package` repo on GitHub.
40-
2. Clone your fork locally and cd into the template_pyfar_package directory::
41+
1. `Fork <https://docs.github.com/en/get-started/quickstart/fork-a-repo/>`_ the `template-pyfar-package` repo on GitHub.
42+
2. Clone your fork locally and cd into the template-pyfar-package directory::
4143

42-
$ git clone https://github.com/YOUR_USERNAME/template_pyfar_package.git
43-
$ cd template_pyfar_package
44+
$ git clone https://github.com/YOUR_USERNAME/template-pyfar-package.git
45+
$ cd template-pyfar-package
4446

4547
3. Install your local copy into a virtualenv. Assuming you have Anaconda or Miniconda installed, this is how you set up your fork for local development::
4648

47-
$ conda create --name template_pyfar_package python
48-
$ conda activate template_pyfar_package
49+
$ conda create --name template-pyfar-package python
50+
$ conda activate template-pyfar-package
4951
$ pip install -e ".[dev]"
5052

5153
4. Create a branch for local development. Indicate the intention of your branch in its respective name (i.e. `feature/branch-name` or `bugfix/branch-name`)::
@@ -60,7 +62,8 @@ Ready to contribute? Here's how to set up `template_pyfar_package` for local dev
6062
$ ruff check
6163
$ pytest
6264

63-
ruff must pass without any warnings for `./template_pyfar_package` and `./tests` using the default or a stricter configuration. Ruff ignores a couple of PEP Errors (see `./pyproject.toml`). If necessary, adjust your linting configuration in your IDE accordingly.
65+
ruff must pass without any warnings for `./template-pyfar-package` and `./tests` using the default or a stricter
66+
configuration. Ruff ignores a couple of PEP Errors (see `./pyproject.toml`). If necessary, adjust your linting configuration in your IDE accordingly.
6467

6568
6. Commit your changes and push your branch to GitHub::
6669

@@ -70,5 +73,4 @@ Ready to contribute? Here's how to set up `template_pyfar_package` for local dev
7073

7174
7. Submit a pull request on the develop branch through the GitHub website.
7275

73-
7476
.. _general contributing guidelines: https://pyfar-gallery.readthedocs.io/en/latest/contribute/index.html

HISTORY.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,27 @@
22
History
33
=======
44

5-
0.1.0 (2025-11-01)
5+
[Unreleased]
6+
------------
7+
8+
Added
9+
^^^^^
10+
11+
Changed
12+
^^^^^^^
13+
14+
Deprecated
15+
^^^^^^^^^^
16+
17+
Removed
18+
^^^^^^^
19+
20+
Fixed
21+
^^^^^
22+
23+
0.1.0 (2026-04-16)
624
------------------
725

26+
Added
27+
^^^^^
828
* First release on PyPI.

LICENSE

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
MIT License
1+
The MIT License (MIT)
22

33
Copyright (c) 2025, The pyfar developers
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice (including the next
13+
paragraph) shall be included in all copies or substantial portions of the
14+
Software.
1415

1516
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
22-
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)