Skip to content

Commit 514accf

Browse files
authored
Merge pull request #30 from pyfar/develop
merge main into develop
2 parents 7e2750b + d4e3b39 commit 514accf

33 files changed

+776
-726
lines changed

.circleci/config.yml

Lines changed: 149 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,19 @@ jobs:
3434
executor:
3535
name: python-docker
3636
version: <<parameters.version>>
37-
3837
steps:
3938
- checkout
4039
# - run:
4140
# name: Install System Dependencies
4241
# command: sudo apt-get update && sudo apt-get install -y libsndfile1
43-
- python/install-packages:
44-
pkg-manager: pip
45-
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
46-
pip-dependency-file: requirements_dev.txt
42+
- run:
43+
name: install dependencies
44+
command: pip install ".[tests]"
4745
- run:
4846
name: Run tests
4947
command: pytest
5048

51-
flake:
49+
ruff:
5250
parameters:
5351
version:
5452
description: "version tag"
@@ -57,41 +55,58 @@ jobs:
5755
executor:
5856
name: python-docker
5957
version: <<parameters.version>>
58+
steps:
59+
- checkout
60+
- run:
61+
name: install dependencies
62+
command: pip install ".[tests]"
63+
- run:
64+
name: Ruff
65+
command: ruff check
6066

67+
test_documentation_build:
68+
parameters:
69+
version:
70+
description: "version tag"
71+
default: "latest"
72+
type: string
73+
executor:
74+
name: python-docker
75+
version: <<parameters.version>>
76+
steps:
77+
- checkout
78+
# - run:
79+
# name: Install System Dependencies
80+
# command: sudo apt-get update && sudo apt-get install -y libsndfile1 texlive-latex-extra dvipng
81+
- run:
82+
name: Sphinx
83+
command: |
84+
pip install ".[docs]"
85+
cd docs/
86+
make html SPHINXOPTS="-W"
87+
88+
test_deprecation_warnings:
89+
parameters:
90+
version:
91+
description: "version tag"
92+
default: "latest"
93+
type: string
94+
executor:
95+
name: python-docker
96+
version: <<parameters.version>>
6197
steps:
6298
- checkout
63-
- python/install-packages:
64-
pkg-manager: pip
65-
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
66-
pip-dependency-file: requirements_dev.txt
99+
# - run:
100+
# name: Install System Dependencies
101+
# command: sudo apt-get update && sudo apt-get install -y libsndfile1 texlive-latex-extra dvipng
67102
- run:
68-
name: Flake8
69-
command: flake8 imkar
70-
71-
# test_examples:
72-
# parameters:
73-
# version:
74-
# description: "version tag"
75-
# default: "latest"
76-
# type: string
77-
# executor:
78-
# name: python-docker
79-
# version: <<parameters.version>>
80-
81-
# steps:
82-
# - checkout
83-
# # - run:
84-
# # name: Install System Dependencies
85-
# # command: sudo apt-get update && sudo apt-get install -y libsndfile1
86-
# - python/install-packages:
87-
# pkg-manager: pip
88-
# # app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
89-
# pip-dependency-file: requirements_dev.txt
90-
# - run:
91-
# name: Examples
92-
# command: |
93-
# pip install -e .
94-
# pytest --nbmake examples/*.ipynb
103+
name: install dependencies
104+
command: pip install ".[tests]"
105+
- run: |
106+
python --version
107+
- run:
108+
name: Run tests
109+
command: pytest tests -W error::DeprecationWarning
95110

96111
test_pypi_publish:
97112
parameters:
@@ -102,20 +117,42 @@ jobs:
102117
executor:
103118
name: python-docker
104119
version: <<parameters.version>>
120+
steps:
121+
- checkout
122+
# - run:
123+
# name: Install System Dependencies
124+
# command: sudo apt-get update && sudo apt-get install -y libsndfile1
125+
- run:
126+
name: install dependencies
127+
command: pip install ".[deploy]"
128+
- run:
129+
name: deploy
130+
command: | # create whl, install twine and publish to Test PyPI
131+
python -m build
132+
twine check dist/*
105133
134+
run_pypi_publish:
135+
parameters:
136+
version:
137+
description: "version tag"
138+
default: "latest"
139+
type: string
140+
executor:
141+
name: python-docker
142+
version: <<parameters.version>>
106143
steps:
107144
- checkout
108-
# - run:
109-
# name: Install System Dependencies
110-
# command: sudo apt-get update && sudo apt-get install -y libsndfile1
111-
- python/install-packages:
112-
pkg-manager: pip
113-
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
114-
pip-dependency-file: requirements_dev.txt
145+
- run:
146+
name: Install System Dependencies
147+
command: sudo apt-get update && sudo apt-get install -y libsndfile1
148+
- run:
149+
name: install dependencies
150+
command: pip install ".[deploy]"
115151
- run:
116152
name: deploy
117153
command: | # create whl, install twine and publish to Test PyPI
118-
python setup.py sdist bdist_wheel
154+
python -m build
155+
twine check dist/*
119156
twine upload dist/*
120157
121158
# Invoke jobs via workflows
@@ -128,51 +165,72 @@ workflows:
128165
matrix:
129166
parameters:
130167
version:
131-
- "3.7"
132168
- "3.8"
133169
- "3.9"
134170
- "3.10"
135-
- flake:
171+
- "3.11"
172+
- "3.12"
173+
- "3.13"
174+
175+
- ruff:
136176
matrix:
137177
parameters:
138178
version:
139-
- "3.9"
179+
- "3.13"
140180
requires:
141181
- build_and_test
142182

143-
# - test_examples:
144-
# matrix:
145-
# parameters:
146-
# version:
147-
# - "3.9"
148-
# requires:
149-
# - build_and_test
183+
- test_documentation_build:
184+
matrix:
185+
parameters:
186+
version:
187+
- "3.13"
188+
requires:
189+
- build_and_test
150190

191+
- test_deprecation_warnings:
192+
matrix:
193+
parameters:
194+
version:
195+
- "3.13"
196+
requires:
197+
- build_and_test
151198

152-
test_and_publish:
199+
- test_pypi_publish:
200+
matrix:
201+
parameters:
202+
version:
203+
- "3.13"
204+
requires:
205+
- build_and_test
206+
207+
test_and_publish:
153208
# Test and publish on new git version tags
154209
# This requires its own workflow to successfully trigger the test and build
155210
jobs:
156211
- build_and_test:
157212
matrix:
158213
parameters:
159214
version:
160-
- "3.7"
161215
- "3.8"
162216
- "3.9"
163217
- "3.10"
218+
- "3.11"
219+
- "3.12"
220+
- "3.13"
221+
164222
filters:
165223
branches:
166224
ignore: /.*/
167225
# only act on version tags
168226
tags:
169227
only: /^v[0-9]+(\.[0-9]+)*$/
170228

171-
- flake:
229+
- ruff:
172230
matrix:
173231
parameters:
174232
version:
175-
- "3.9"
233+
- "3.13"
176234
requires:
177235
- build_and_test
178236
filters:
@@ -182,29 +240,44 @@ test_and_publish:
182240
tags:
183241
only: /^v[0-9]+(\.[0-9]+)*$/
184242

185-
# - test_examples:
186-
# matrix:
187-
# parameters:
188-
# version:
189-
# - "3.9"
190-
# requires:
191-
# - build_and_test
192-
# filters:
193-
# branches:
194-
# ignore: /.*/
195-
# # only act on version tags
196-
# tags:
197-
# only: /^v[0-9]+(\.[0-9]+)*$/
243+
- test_documentation_build:
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]+)*$/
198256

199-
- test_pypi_publish:
257+
- test_deprecation_warnings:
200258
matrix:
201259
parameters:
202260
version:
203-
- "3.9"
261+
- "3.13"
262+
requires:
263+
- build_and_test
264+
filters:
265+
branches:
266+
ignore: /.*/
267+
# only act on version tags
268+
tags:
269+
only: /^v[0-9]+(\.[0-9]+)*$/
270+
271+
- run_pypi_publish:
272+
matrix:
273+
parameters:
274+
version:
275+
- "3.13"
204276
requires:
205277
- build_and_test
206-
- flake
207-
# - test_examples
278+
- ruff
279+
- test_documentation_build
280+
- test_deprecation_warnings
208281
filters:
209282
branches:
210283
ignore: /.*/

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ insert_final_newline = true
1010
charset = utf-8
1111
end_of_line = lf
1212

13+
[*.yml]
14+
indent_size = 2
15+
1316
[*.bat]
1417
indent_style = tab
1518
end_of_line = crlf

.github/ISSUE_TEMPLATE.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
1+
## General
2+
13
* imkar version:
24
* Python version:
35
* Operating System:
6+
* Did you install imkar via pip:
47

5-
### Description
8+
## Description
69

710
Describe what you were trying to get done.
811
Tell us what happened, what went wrong, and what you expected to happen.
912

10-
### What I Did
13+
## What I Did
1114

1215
```
1316
Paste the command(s) you ran and the output.
1417
If there was a crash, please include the traceback here.
1518
```
16-
17-
## Labels
18-
19-
Label your issue to make it easier for us to assign and track:
20-
21-
Use one of these labels:
22-
- **hot:** For bugs on the master branch
23-
- **bug:** For bugs not on the master branch
24-
- **enhancement:** For suggesting enhancements of current functionality
25-
- **feature:** For requesting new features
26-
- **documentation:** Everything related to docstrings and comments
27-
- **question:** General questions, e.g., regarding the general structure or future directions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,3 @@ Closes #
77
-
88
-
99
-
10-
11-
### Labels
12-
13-
Label your issue to make it easier for us to assign and track:
14-
15-
Use one of these labels:
16-
- **hot:** For bugs on the master branch
17-
- **bug:** For bugs not on the master branch
18-
- **enhancement:** For suggesting enhancements of current functionality
19-
- **feature:** For requesting new features
20-
- **documentation:** Everything related to docstrings and comments
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
pull_request:
3+
types: [ labeled ]
4+
name: Create issue if pr gets a cookiecutter label
5+
jobs:
6+
stuff:
7+
permissions:
8+
contents: read
9+
issues: write
10+
name: create issue
11+
environment: test
12+
if: github.event.label.name == 'cookiecutter'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
repository: 'pyfar/cookiecutter-pypackage'
18+
- uses: dacbd/create-issue-action@v2
19+
with:
20+
title: ${{ github.event.pull_request.title }}
21+
token: ${{ secrets.cookiecutter_PAT }}
22+
owner: pyfar
23+
repo: cookiecutter-pypackage
24+
body: |
25+
apply changes from https://github.com/${{ github.repository }}/pull/${{ github.event.number }}

0 commit comments

Comments
 (0)