Skip to content

Commit

Permalink
Test hooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezzam committed Oct 21, 2024
1 parent bfb803b commit 9d40d10
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,7 @@ jobs:
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
# - name: Setup a local virtual environment (if no poetry.toml file)
# run: |
# poetry config virtualenvs.create true --local
# poetry config virtualenvs.in-project true --local
# - uses: actions/cache@v3
# name: Define a cache for the virtual environment based on the dependencies lock file
# with:
# path: ./.venv
# key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies and build package
- name: Install dependencies
run: |
poetry install --with dev
- name: Lint with flake8
Expand Down
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ pydevtips: Python Development Tips
:alt: Slides


.. |ss| raw:: html
.. .. |ss| raw:: html
<strike>
.. <strike>
.. |se| raw:: html
.. .. |se| raw:: html
</strike>
.. </strike>
Reproducibility is important for software: *if it's not reproducible,
Expand Down Expand Up @@ -75,7 +75,7 @@ Feel free to modify and use it for your own purposes.
Copilot <https://github.com/features/copilot>`_, which I highly recommend for development. If you don't like
writing documentation, it is a great way to get started as it is able to
understand the functionality of your code and produce meaningful text to describe it.
It should be used be used with caution, |ss| *but it can be a great tool for getting started* |se|
It should be used be used with caution, *but it can be a great tool for getting started*
and you often you need to make a few tweaks (*like the previous repetition*).
But it's a huge time-saver!

Expand Down Expand Up @@ -107,7 +107,7 @@ Or from source, e.g. with Anaconda / Miniconda:
(project_env) poetry install --with dev
# run tests
(project_env) pytest
(project_env) poetry run pytest
# deactivate environment
(project_env) conda deactivate
Expand All @@ -124,8 +124,8 @@ repository, e.g.:
python examples/real_convolve.py
Parameter setting is done with `hydra <https://hydra.cc/>`_. More on that
in the :ref:`Reproducible examples<Reproducible examples>` section of the
documentation.
in the `Reproducible examples <https://pydevtips.readthedocs.io/en/latest/reproducible.html>`_
section of the documentation.


TODO
Expand Down
6 changes: 4 additions & 2 deletions pydevtips/fftconvolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ def __init__(self, filt, length) -> None:
Length of the signal to convolve with.
"""

assert isinstance(filt, np.ndarray)
assert isinstance(filt,
np.ndarray)
self.filter = filt
self.signal_length = length
self.pad_length = len(filt) + length - 1
self.pad_length = len(filt
) + length - 1
self.filter_frequency_response = self._compute_filter_frequency_response()

@abstractmethod
Expand Down

0 comments on commit 9d40d10

Please sign in to comment.