Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 110 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ jobs:
executor:
name: python-docker
version: <<parameters.version>>

steps:
- checkout
# - run:
# name: Install System Dependencies
# command: sudo apt-get update && sudo apt-get install -y libsndfile1
- run:
name: Install System Dependencies
command: sudo apt-get update && sudo apt-get install -y libsndfile1
- python/install-packages:
pkg-manager: pip
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
pip-dependency-file: requirements_dev.txt
name: install dependencies
command: pip install ".[tests]"
- run:
name: Run tests
command: pytest
Expand All @@ -57,18 +55,15 @@ jobs:
executor:
name: python-docker
version: <<parameters.version>>

steps:
- checkout
- python/install-packages:
pkg-manager: pip
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
pip-dependency-file: requirements_dev.txt
- run:
name: install dependencies
command: pip install ".[tests]"
- run:
name: Ruff
command: ruff check


test_documentation_build:
parameters:
version:
Expand All @@ -78,23 +73,41 @@ jobs:
executor:
name: python-docker
version: <<parameters.version>>

steps:
- checkout
# - run:
# name: Install System Dependencies
# command: sudo apt-get update && sudo apt-get install -y libsndfile1 texlive-latex-extra dvipng
- python/install-packages:
pkg-manager: pip
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
pip-dependency-file: requirements_dev.txt
- run:
name: Sphinx
command: |
pip install -e .
pip install ".[docs]"
cd docs/
make html SPHINXOPTS="-W"

test_deprecation_warnings:
parameters:
version:
description: "version tag"
default: "latest"
type: string
executor:
name: python-docker
version: <<parameters.version>>
steps:
- checkout
# - run:
# name: Install System Dependencies
# command: sudo apt-get update && sudo apt-get install -y libsndfile1 texlive-latex-extra dvipng
- run:
name: install dependencies
command: pip install ".[tests]"
- run: |
python --version
- run:
name: Run tests
command: pytest tests -W error::DeprecationWarning

test_pypi_publish:
parameters:
version:
Expand All @@ -104,20 +117,42 @@ jobs:
executor:
name: python-docker
version: <<parameters.version>>
steps:
- checkout
# - run:
# name: Install System Dependencies
# command: sudo apt-get update && sudo apt-get install -y libsndfile1
- run:
name: install dependencies
command: pip install ".[deploy]"
- run:
name: deploy
command: | # create whl, install twine and publish to Test PyPI
python -m build
twine check dist/*

run_pypi_publish:
parameters:
version:
description: "version tag"
default: "latest"
type: string
executor:
name: python-docker
version: <<parameters.version>>
steps:
- checkout
- run:
name: Install System Dependencies
command: sudo apt-get update && sudo apt-get install -y libsndfile1
- python/install-packages:
pkg-manager: pip
# app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory.
pip-dependency-file: requirements_dev.txt
- run:
name: install dependencies
command: pip install ".[deploy]"
- run:
name: deploy
command: | # create whl, install twine and publish to Test PyPI
python setup.py sdist bdist_wheel
python -m build
twine check dist/*
twine upload dist/*

# Invoke jobs via workflows
Expand All @@ -130,44 +165,60 @@ workflows:
matrix:
parameters:
version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"

- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"

- ruff:
matrix:
parameters:
version:
- "3.9"
- "3.12"
requires:
- build_and_test


- test_documentation_build:
matrix:
parameters:
version:
- "3.9"
- "3.12"
requires:
- build_and_test

- test_deprecation_warnings:
matrix:
parameters:
version:
- "3.12"
requires:
- build_and_test

- test_pypi_publish:
matrix:
parameters:
version:
- "3.12"
requires:
- build_and_test

test_and_publish:
test_and_publish:
# Test and publish on new git version tags
# This requires its own workflow to successfully trigger the test and build
jobs:
- build_and_test:
matrix:
parameters:
version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"

- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"

filters:
branches:
ignore: /.*/
Expand All @@ -179,7 +230,7 @@ test_and_publish:
matrix:
parameters:
version:
- "3.9"
- "3.12"
requires:
- build_and_test
filters:
Expand All @@ -193,7 +244,7 @@ test_and_publish:
matrix:
parameters:
version:
- "3.9"
- "3.12"
requires:
- build_and_test
filters:
Expand All @@ -203,15 +254,30 @@ test_and_publish:
tags:
only: /^v[0-9]+(\.[0-9]+)*$/

- test_pypi_publish:
- test_deprecation_warnings:
matrix:
parameters:
version:
- "3.9"
- "3.12"
requires:
- build_and_test
filters:
branches:
ignore: /.*/
# only act on version tags
tags:
only: /^v[0-9]+(\.[0-9]+)*$/

- run_pypi_publish:
matrix:
parameters:
version:
- "3.12"
requires:
- build_and_test
- ruff
- test_documentation_build
- test_deprecation_warnings
filters:
branches:
ignore: /.*/
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* pyrato version:
* Python version:
* Operating System:
* Did you install pyfar via pip:
* Did you install pyrato via pip:

## Description

Expand Down
5 changes: 3 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.12"
apt_packages:
- libsndfile1

Expand All @@ -23,4 +23,5 @@ formats:
# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: requirements_dev.txt
- method: pip
path: ".[docs]"
4 changes: 1 addition & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ Ready to contribute? Here's how to set up `pyrato` for local development using t

$ conda create --name pyrato python
$ conda activate pyrato
$ conda install pip
$ pip install -e .
$ pip install -r requirements_dev.txt
$ pip install -e ".[dev]"

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`)::

Expand Down
22 changes: 22 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

html[data-theme="light"] {
--pst-color-primary: #126CB0; /* pyfar blue as primary color */
}

html[data-theme="dark"] {
--pst-color-primary: #126CB0; /* pyfar blue as primary color */
}
html {
--pst-icon-external-link: "";
}

/* css style for icons on package index pages */
.icon-style {
color: #126CB0;
font-size: 5.2rem;
margin: 1rem;
}

img {
background-color: transparent !important;
}
9 changes: 8 additions & 1 deletion docs/api_reference.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.. _api_reference:

API Reference
==================
=============

The following gives detailed information about all pyrato functions sorted
according to their modules.

For examples on how to use pyrato refer to the notebooks in the
`examples gallery`_ and the documentation on classes and modules below.


Modules
-------

Expand All @@ -14,3 +18,6 @@ Modules

modules/pyrato
modules/analytic


.. _examples gallery: https://pyfar-gallery.readthedocs.io/en/latest/examples_gallery.html
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
with c.request('GET', url, preload_content=False) as res, open(filename, 'wb') as out_file:
shutil.copyfileobj(res, out_file)

# replace pyfar hard link to internal link
# replace pyrato hard link to internal link
with open("_static/header.rst", "rt") as fin:
with open("header.rst", "wt") as fout:
for line in fin:
Expand Down
Loading