Skip to content

Add testing data to the package distributions#421

Merged
leouieda merged 1 commit into
fatiando:mainfrom
avalentino:bugfix/package-data
Jun 7, 2024
Merged

Add testing data to the package distributions#421
leouieda merged 1 commit into
fatiando:mainfrom
avalentino:bugfix/package-data

Conversation

@avalentino

Copy link
Copy Markdown
Contributor

The test code pooch/tests is installed but he data in pooch/tests/data are not.
This makes it impossible to run tests on the installed package.

@leouieda leouieda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@leouieda leouieda changed the title Install package data Add tresting data to the distributions Jun 7, 2024
@leouieda leouieda changed the title Add tresting data to the distributions Add tresting data to the package distributions Jun 7, 2024
@leouieda leouieda changed the title Add tresting data to the package distributions Add testing data to the package distributions Jun 7, 2024
@leouieda leouieda merged commit 5824e57 into fatiando:main Jun 7, 2024
@avalentino avalentino deleted the bugfix/package-data branch June 7, 2024 16:42
@avalentino

Copy link
Copy Markdown
Contributor Author

Good catch!

Thanks

@penguinpee penguinpee mentioned this pull request Jun 8, 2024
@kloczek

kloczek commented Jun 25, 2024

Copy link
Copy Markdown

Why at all test suite is distributed win .whl at all? 🤔
Better would be move test suite with its data to tests/ and distribute only in sdist.

@avalentino

Copy link
Copy Markdown
Contributor Author

@kloczek to me it makes totally sense to distribute test s and test data in sdist.
What could be an option, IMHO, is to not install them (i.e. do not include them in the .whl).

@kloczek

kloczek commented Jun 25, 2024

Copy link
Copy Markdown

test suite should not be distributed as part of the installable resources.
Currently it is included

Here is pep517 build output:
+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
running egg_info
creating pooch.egg-info
writing pooch.egg-info/PKG-INFO
writing dependency_links to pooch.egg-info/dependency_links.txt
writing requirements to pooch.egg-info/requires.txt
writing top-level names to pooch.egg-info/top_level.txt
writing manifest file 'pooch.egg-info/SOURCES.txt'
reading manifest file 'pooch.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching '.github'
no previously-included directories found matching 'data'
no previously-included directories found matching 'env'
no previously-included directories found matching 'paper'
no previously-included directories found matching 'tools'
warning: no previously-included files found matching '.*.yml'
warning: no previously-included files found matching '.*rc'
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitattributes'
warning: no previously-included files found matching 'environment.yml'
warning: no files found matching 'pooch/tests/data'
adding license file 'LICENSE.txt'
adding license file 'AUTHORS.md'
writing manifest file 'pooch.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/doc
copying doc/conf.py -> build/lib/doc
creating build/lib/pooch
copying pooch/__init__.py -> build/lib/pooch
copying pooch/downloaders.py -> build/lib/pooch
copying pooch/hashes.py -> build/lib/pooch
copying pooch/processors.py -> build/lib/pooch
copying pooch/utils.py -> build/lib/pooch
copying pooch/core.py -> build/lib/pooch
copying pooch/_version.py -> build/lib/pooch
creating build/lib/pooch/tests
copying pooch/tests/__init__.py -> build/lib/pooch/tests
copying pooch/tests/test_hashes.py -> build/lib/pooch/tests
copying pooch/tests/test_integration.py -> build/lib/pooch/tests
copying pooch/tests/test_processors.py -> build/lib/pooch/tests
copying pooch/tests/test_utils.py -> build/lib/pooch/tests
copying pooch/tests/test_version.py -> build/lib/pooch/tests
copying pooch/tests/utils.py -> build/lib/pooch/tests
copying pooch/tests/test_core.py -> build/lib/pooch/tests
copying pooch/tests/test_downloaders.py -> build/lib/pooch/tests
running egg_info
writing pooch.egg-info/PKG-INFO
writing dependency_links to pooch.egg-info/dependency_links.txt
writing requirements to pooch.egg-info/requires.txt
writing top-level names to pooch.egg-info/top_level.txt
reading manifest file 'pooch.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching '.github'
no previously-included directories found matching 'data'
no previously-included directories found matching 'env'
no previously-included directories found matching 'paper'
no previously-included directories found matching 'tools'
warning: no previously-included files found matching '.*.yml'
warning: no previously-included files found matching '.*rc'
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitattributes'
warning: no previously-included files found matching 'environment.yml'
warning: no files found matching 'pooch/tests/data'
adding license file 'LICENSE.txt'
adding license file 'AUTHORS.md'
writing manifest file 'pooch.egg-info/SOURCES.txt'
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/doc
copying build/lib/doc/conf.py -> build/bdist.linux-x86_64/wheel/doc
creating build/bdist.linux-x86_64/wheel/pooch
copying build/lib/pooch/__init__.py -> build/bdist.linux-x86_64/wheel/pooch
copying build/lib/pooch/downloaders.py -> build/bdist.linux-x86_64/wheel/pooch
copying build/lib/pooch/hashes.py -> build/bdist.linux-x86_64/wheel/pooch
copying build/lib/pooch/processors.py -> build/bdist.linux-x86_64/wheel/pooch
copying build/lib/pooch/utils.py -> build/bdist.linux-x86_64/wheel/pooch
copying build/lib/pooch/core.py -> build/bdist.linux-x86_64/wheel/pooch
copying build/lib/pooch/_version.py -> build/bdist.linux-x86_64/wheel/pooch
creating build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/__init__.py -> build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/test_hashes.py -> build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/test_integration.py -> build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/test_processors.py -> build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/test_utils.py -> build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/test_version.py -> build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/utils.py -> build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/test_core.py -> build/bdist.linux-x86_64/wheel/pooch/tests
copying build/lib/pooch/tests/test_downloaders.py -> build/bdist.linux-x86_64/wheel/pooch/tests
running install_egg_info
Copying pooch.egg-info to build/bdist.linux-x86_64/wheel/pooch-1.8.2-py3.10.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/pooch-1.8.2.dist-info/WHEEL
creating '/home/tkloczko/rpmbuild/BUILD/pooch-1.8.2/dist/.tmp-9q64we78/pooch-1.8.2-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'doc/conf.py'
adding 'pooch/__init__.py'
adding 'pooch/_version.py'
adding 'pooch/core.py'
adding 'pooch/downloaders.py'
adding 'pooch/hashes.py'
adding 'pooch/processors.py'
adding 'pooch/utils.py'
adding 'pooch/tests/__init__.py'    <<<<<<=== FROM HERE
adding 'pooch/tests/test_core.py'
adding 'pooch/tests/test_downloaders.py'
adding 'pooch/tests/test_hashes.py'
adding 'pooch/tests/test_integration.py'
adding 'pooch/tests/test_processors.py'
adding 'pooch/tests/test_utils.py'
adding 'pooch/tests/test_version.py'
adding 'pooch/tests/utils.py'
adding 'pooch-1.8.2.dist-info/AUTHORS.md'
adding 'pooch-1.8.2.dist-info/LICENSE.txt'
adding 'pooch-1.8.2.dist-info/METADATA'
adding 'pooch-1.8.2.dist-info/WHEEL'
adding 'pooch-1.8.2.dist-info/top_level.txt'
adding 'pooch-1.8.2.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built pooch-1.8.2-py3-none-any.whl

Looks like easiest way to do that would be just move pooch/tests/ to tests/
If test suite is not using relative imports .. if it uses then those relative imports needs to be dropped (using relative imports is always is nothing more than asking for troubles ..).

@kloczek

kloczek commented Jun 25, 2024

Copy link
Copy Markdown

Just checked source code and relative imports are in use 😞
In first file pooch/tests/utils.py I found:

from .. import __version__ as full_version
from ..utils import check_version, get_logger

@santisoler

Copy link
Copy Markdown
Member

Distributing tests with the source code was a design decision that dates back to the origin of the package. This was intended to allow users to run tests on the installed version of the package without the need to clone the repository. We saw value on it back in the days. We even included instructions on how to run the tests after installation (see the old docs: https://www.fatiando.org/pooch/v1.0.0/install.html#testing-your-install). The relative imports were also intended: since tests were part of the code base, it made sense to use relative imports as we would do in any submodule of the package.

Nonetheless, we've been discussing about removing the test suite from the package since users rarely test the code after installation, and we would like to reduce the size of the packages that ppl download, specially since Pooch is being widely used by many packages in the community. Check out fatiando/community#154, #423, #416 and #427 for more details.

I appreciate your suggestions on this matter. Although, I don't think these design decisions were bad in nature. We wanted to provide our users with a feature (run tests after installation), which now we are reconsidering in favor of reducing installation size. There's no PEP rule against shipping tests along with code (in fact many heavily used scientific Python packages ship tests. See Numpy, matplotlib, scikit-learn as examples). In fact, including tests in the code of the package is one of the test layouts recommended by pytest. Therefore, the decisions to include the tests folder within the sources or outside of it, or to ship them or not are mostly tied to the preferences and needs of the maintainers.

uermel pushed a commit to copick/copick that referenced this pull request Feb 6, 2026
Bumps [pooch](https://github.com/fatiando/pooch) from 1.8.2 to 1.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/fatiando/pooch/releases">pooch's
releases</a>.</em></p>
<blockquote>
<h2>v1.9.0</h2>
<p>Released on: 2026/01/30</p>
<p>DOI: <a
href="https://doi.org/10.5281/zenodo.18379610">https://doi.org/10.5281/zenodo.18379610</a></p>
<p>Breaking changes:</p>
<ul>
<li>Drop support for Python 3.7 and 3.8 (<a
href="https://redirect.github.com/fatiando/pooch/pull/450">#450</a>).</li>
</ul>
<p>Bug fixes:</p>
<ul>
<li>Explicitly pass <code>filter</code> to
<code>TarFile.extractall</code> on Python &gt;=3.12 (<a
href="https://redirect.github.com/fatiando/pooch/pull/458">#458</a>).
Pass a <code>filter=&quot;data&quot;</code> argument to
<code>TarFile.extractall</code> to prevent dangerous security issues.
The <code>filter</code> argument was added in Python 3.12, so only pass
it on versions greater or equal than that. This change matches the
default behaviour that will take place since Python 3.14.</li>
<li>Fix TQDM usage (<a
href="https://redirect.github.com/fatiando/pooch/pull/465">#465</a>).
Newer versions of tqdm behave differently at a terminal vs in a jupyter
notebook. Import from <code>tqdm.auto</code> instead so that the
downloader looks right in either a notebook or the terminal.</li>
<li>Fix bug in file hashing on FIPS enabled system (<a
href="https://redirect.github.com/fatiando/pooch/pull/511">#511</a>).
Set <code>userforsecurity=False</code> on <code>hashlib</code> hashing
algorithms to make FIPS enabled systems happy.</li>
</ul>
<p>New features:</p>
<ul>
<li>Set User-Agent in requests headers for DOI downloaders (<a
href="https://redirect.github.com/fatiando/pooch/pull/507">#507</a>).
Pass a custom User-Agent when making requests through DOI downloaders in
order to bypass limit rates imposed by services like Zenodo to block
abusive requests. The can now filter requests coming from Pooch from the
rest. Add a global <code>REQUESTS_HEADERS</code> variable that is used
by the <code>doi_to_url</code> function (which requires to make a
request to doi.org to figure out the service provider). Add a new
<code>headers</code> argument to the <code>DOIDownloader</code> to
specifically pass requests headers. By default it'll use the Pooch's
default user agent.</li>
<li>Extend support for Python 3.13 (<a
href="https://redirect.github.com/fatiando/pooch/pull/451">#451</a>) and
Python 3.14 (<a
href="https://redirect.github.com/fatiando/pooch/pull/505">#505</a>).</li>
<li>Provide more descriptive errors when DOI request fails (<a
href="https://redirect.github.com/fatiando/pooch/pull/477">#477</a>).
Raise the <code>requests</code> response to provide more informative
errors when the status code is between 400 and 600.</li>
</ul>
<p>Maintenance:</p>
<ul>
<li>Add testing data to the package distributions (<a
href="https://redirect.github.com/fatiando/pooch/pull/421">#421</a>).
The test code <code>pooch/tests</code> is installed but he data in
<code>pooch/tests/data</code> are not. This makes it impossible to run
tests on the installed package. Add the appropriate setuptools
configuration to make it happen.</li>
<li>Move push to codecov to its own job in Actions (<a
href="https://redirect.github.com/fatiando/pooch/pull/424">#424</a>).
Remove the push to codecov step from the <code>test</code> job into a
new job that depends on the test job. Upload the coverage reports as
artifacts after testing, and reuse the artifacts in the new job. Upload
all coverage reports in a single push to Codecov to minimize the number
of hits.</li>
<li>Increase the max positional args allowed by pylint (<a
href="https://redirect.github.com/fatiando/pooch/pull/438">#438</a>).
Configure <code>pylint</code> to increase the maximum number of
positional arguments allowed in any function or method.</li>
<li>Replace usage of <code>pkg_resources</code> for
<code>importlib.resources</code> (<a
href="https://redirect.github.com/fatiando/pooch/pull/449">#449</a>).</li>
<li>Add mypy to CI job and type hints for one class. (<a
href="https://redirect.github.com/fatiando/pooch/pull/404">#404</a>).
Add type hints to <code>pooch/core.py</code> and create a new
<code>typing</code> submodule for custom type classes, and add it to the
API Reference. Run <code>mypy</code> on CI to perform type checks, and
create new targets in the <code>Makefile</code>. Extend the list of
dependencies required to run the type checks.</li>
<li>Add pytest <code>figshare</code> mark to tests (<a
href="https://redirect.github.com/fatiando/pooch/pull/481">#481</a>).
Add a pytest <code>figshare</code> mark to tests that make requests to
Figshare. Such mark allows us to filter tests: use <code>pytest -v -m
figshare</code> to only run tests with that mark, or use <code>pytest -v
-m &quot;not figshare</code> to run all test but the marked ones.</li>
<li>Skip Figshare related tests on Actions under MacOS (<a
href="https://redirect.github.com/fatiando/pooch/pull/482">#482</a>).
Skip tests marked with <code>figshare</code> on Actions that use MacOS
as runner. Those tests in CI were constantly failing, probably due to
too many requests coming from GitHub. Add an optional
<code>PYTEST_ARGS_EXTRA</code> variable to <code>Makefile</code> that
can be used to pass extra arguments to <code>pytest</code>. Skip
doctests that download files from Figshare.</li>
<li>List requirements to run type checks in new file (<a
href="https://redirect.github.com/fatiando/pooch/pull/492">#492</a>).
Create a new <code>env/requirements-types.txt</code> file with the list
of required packages to run types checks. This file is used by the
GitHub Action workflow that automatically runs the type checks. List new
requirements for type checks in <code>environment.yml</code>. Stop
ignoring missing imports of <code>xxhash</code> in
<code>pyproject.toml</code>. Ignore type assignment for
<code>xxhash</code> in test file.</li>
<li>Fix uploads of coverage reports to codecov (<a
href="https://redirect.github.com/fatiando/pooch/pull/496">#496</a>).
Checkout the repository in the <code>codecov-upload</code> job before
uploading the coverage reports to codecov.</li>
<li>Pin black to v25 (<a
href="https://redirect.github.com/fatiando/pooch/pull/506">#506</a>).
Pin black version used in the <code>environment.yml</code> and to run
style checks on CI to <code>25.*.*</code> and <code>&lt;26.0.0</code>,
respectively. Since we plan to replace black with Ruff for
autoformatting, it's better to pin for now than reformat it with latest
version.</li>
<li>Only run tests with network access on some CI jobs (<a
href="https://redirect.github.com/fatiando/pooch/pull/484">#484</a>).
Our CI is continuously hitting some external network providers which is
causing some of them (mostly figshare for now) to block our traffic.
This means that our CI fails randomly and it's annoying. Only run
network tests on jobs with the latest Python and optional dependencies
installed to try to mitigate this.</li>
<li>Use a SPDX expression for license in <code>pyproject.toml</code> (<a
href="https://redirect.github.com/fatiando/pooch/pull/476">#476</a>).
Use a SPDX expression for the license in <code>pyproject.toml</code> and
remove the unneeded license classifier. This removes the warnings we
were getting after running <code>make build</code>.</li>
<li>Add <code>Typing :: Typed</code> trove classifier (<a
href="https://redirect.github.com/fatiando/pooch/pull/472">#472</a>).
Allow PyPI users know that Pooch supports type hints.</li>
<li>Allow to manually trigger test job in Actions (<a
href="https://redirect.github.com/fatiando/pooch/pull/475">#475</a>).
Add <code>workflow_dispatch</code> as an event trigger for the
<code>test.yml</code> workflow.</li>
<li>Standardize requests made by <code>DOIDownloaders</code> (<a
href="https://redirect.github.com/fatiando/pooch/pull/514">#514</a>).
Respect user's decisions when defining the <code>DOIDownloader</code>
with respect to arguments passed to <code>requests.get</code> whenever
we call that function. This way, all calls made by
<code>DOIDownloaders</code> and the repository classes make use of the
same arguments, including <code>timeout</code>, <code>headers</code>,
etc.</li>
</ul>
<p>Documentation:</p>
<ul>
<li>Add a link to the Fatiando Forum in the README (<a
href="https://redirect.github.com/fatiando/pooch/pull/461">#461</a>).</li>
<li>Add <code>scXpand</code> (<a
href="https://redirect.github.com/fatiando/pooch/pull/488">#488</a>),
<code>xclim</code> (<a
href="https://redirect.github.com/fatiando/pooch/pull/445">#445</a>),
<code>CLISOPS</code> (<a
href="https://redirect.github.com/fatiando/pooch/pull/445">#445</a>),
and <code>SPLASH</code> (<a
href="https://redirect.github.com/fatiando/pooch/pull/432">#432</a>) to
list of projects using Pooch.</li>
</ul>
<p>Contributors:</p>
<ul>
<li>Adam Boesky</li>
<li>Antonio Valentino</li>
<li>Daniel McCloy</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/fatiando/pooch/blob/main/doc/changes.rst">pooch's
changelog</a>.</em></p>
<blockquote>
<h2>Version 1.9.0</h2>
<p>Released on: 2026/01/30</p>
<p>DOI: <a
href="https://doi.org/10.5281/zenodo.18379610">https://doi.org/10.5281/zenodo.18379610</a></p>
<p>Breaking changes:</p>
<ul>
<li>Drop support for Python 3.7 and 3.8
(<code>[#450](fatiando/pooch#450)
&lt;https://github.com/fatiando/pooch/pull/450&gt;</code>__).</li>
</ul>
<p>Bug fixes:</p>
<ul>
<li>Explicitly pass <code>filter</code> to
<code>TarFile.extractall</code> on Python &gt;=3.12
(<code>[#458](fatiando/pooch#458)
&lt;https://github.com/fatiando/pooch/pull/458&gt;</code>__). Pass a
<code>filter=&quot;data&quot;</code> argument to
<code>TarFile.extractall</code> to prevent dangerous security issues.
The <code>filter</code> argument was added in Python 3.12, so only pass
it on versions greater or equal than that. This change matches the
default behaviour that will take place since Python 3.14.</li>
<li>Fix TQDM usage
(<code>[#465](fatiando/pooch#465)
&lt;https://github.com/fatiando/pooch/pull/465&gt;</code>__). Newer
versions of tqdm behave differently at a terminal vs in a jupyter
notebook. Import from <code>tqdm.auto</code> instead so that the
downloader looks right in either a notebook or the terminal.</li>
<li>Fix bug in file hashing on FIPS enabled system
(<code>[#511](fatiando/pooch#511)
&lt;https://github.com/fatiando/pooch/pull/511&gt;</code>__). Set
<code>userforsecurity=False</code> on <code>hashlib</code> hashing
algorithms to make FIPS enabled systems happy.</li>
</ul>
<p>New features:</p>
<ul>
<li>Set User-Agent in requests headers for DOI downloaders
(<code>[#507](fatiando/pooch#507)
&lt;https://github.com/fatiando/pooch/pull/507&gt;</code>__). Pass a
custom User-Agent when making requests through DOI downloaders in order
to bypass limit rates imposed by services like Zenodo to block abusive
requests. The can now filter requests coming from Pooch from the rest.
Add a global <code>REQUESTS_HEADERS</code> variable that is used by the
<code>doi_to_url</code> function (which requires to make a request to
doi.org to figure out the service provider). Add a new
<code>headers</code> argument to the <code>DOIDownloader</code> to
specifically pass requests headers. By default it’ll use the Pooch’s
default user agent.</li>
<li>Extend support for Python 3.13
(<code>[#451](fatiando/pooch#451)
&lt;https://github.com/fatiando/pooch/pull/451&gt;</code><strong>) and
Python 3.14 (<code>[#505](fatiando/pooch#505)
&lt;https://github.com/fatiando/pooch/pull/505&gt;</code></strong>).</li>
<li>Provide more descriptive errors when DOI request fails
(<code>[#477](fatiando/pooch#477)
&lt;https://github.com/fatiando/pooch/pull/477&gt;</code>__). Raise the
<code>requests</code> response to provide more informative errors when
the status code is between 400 and 600.</li>
</ul>
<p>Maintenance:</p>
<ul>
<li>Add testing data to the package distributions
(<code>[#421](fatiando/pooch#421)
&lt;https://github.com/fatiando/pooch/pull/421&gt;</code>__). The test
code <code>pooch/tests</code> is installed but he data in
<code>pooch/tests/data</code> are not. This makes it impossible to run
tests on the installed package. Add the appropriate setuptools
configuration to make it happen.</li>
<li>Move push to codecov to its own job in Actions
(<code>[#424](fatiando/pooch#424)
&lt;https://github.com/fatiando/pooch/pull/424&gt;</code>__). Remove the
push to codecov step from the <code>test</code> job into a new job that
depends on the test job. Upload the coverage reports as artifacts after
testing, and reuse the artifacts in the new job. Upload all coverage
reports in a single push to Codecov to minimize the number of hits.</li>
<li>Increase the max positional args allowed by pylint
(<code>[#438](fatiando/pooch#438)
&lt;https://github.com/fatiando/pooch/pull/438&gt;</code>__). Configure
<code>pylint</code> to increase the maximum number of positional
arguments allowed in any function or method.</li>
<li>Replace usage of <code>pkg_resources</code> for
<code>importlib.resources</code>
(<code>[#449](fatiando/pooch#449)
&lt;https://github.com/fatiando/pooch/pull/449&gt;</code>__).</li>
<li>Add mypy to CI job and type hints for one class.
(<code>[#404](fatiando/pooch#404)
&lt;https://github.com/fatiando/pooch/pull/404&gt;</code>__). Add type
hints to <code>pooch/core.py</code> and create a new <code>typing</code>
submodule for custom type classes, and add it to the API Reference. Run
<code>mypy</code> on CI to perform type checks, and create new targets
in the <code>Makefile</code>. Extend the list of dependencies required
to run the type checks.</li>
<li>Add pytest <code>figshare</code> mark to tests
(<code>[#481](fatiando/pooch#481)
&lt;https://github.com/fatiando/pooch/pull/481&gt;</code>__). Add a
pytest <code>figshare</code> mark to tests that make requests to
Figshare. Such mark allows us to filter tests: use <code>pytest -v -m
figshare</code> to only run tests with that mark, or use <code>pytest -v
-m &quot;not figshare</code> to run all test but the marked ones.</li>
<li>Skip Figshare related tests on Actions under MacOS
(<code>[#482](fatiando/pooch#482)
&lt;https://github.com/fatiando/pooch/pull/482&gt;</code>__). Skip tests
marked with <code>figshare</code> on Actions that use MacOS as runner.
Those tests in CI were constantly failing, probably due to too many
requests coming from GitHub. Add an optional
<code>PYTEST_ARGS_EXTRA</code> variable to <code>Makefile</code> that
can be used to pass extra arguments to <code>pytest</code>. Skip
doctests that download files from Figshare.</li>
<li>List requirements to run type checks in new file
(<code>[#492](fatiando/pooch#492)
&lt;https://github.com/fatiando/pooch/pull/492&gt;</code>__). Create a
new <code>env/requirements-types.txt</code> file with the list of
required packages to run types checks. This file is used by the GitHub
Action workflow that automatically runs the type checks. List new
requirements for type checks in <code>environment.yml</code>. Stop
ignoring missing imports of <code>xxhash</code> in
<code>pyproject.toml</code>. Ignore type assignment for
<code>xxhash</code> in test file.</li>
<li>Fix uploads of coverage reports to codecov
(<code>[#496](fatiando/pooch#496)
&lt;https://github.com/fatiando/pooch/pull/496&gt;</code>__). Checkout
the repository in the <code>codecov-upload</code> job before uploading
the coverage reports to codecov.</li>
<li>Pin black to v25
(<code>[#506](fatiando/pooch#506)
&lt;https://github.com/fatiando/pooch/pull/506&gt;</code>__). Pin black
version used in the <code>environment.yml</code> and to run style checks
on CI to <code>25.*.*</code> and <code>&lt;26.0.0</code>, respectively.
Since we plan to replace black with Ruff for autoformatting, it’s better
to pin for now than reformat it with latest version.</li>
<li>Only run tests with network access on some CI jobs
(<code>[#484](fatiando/pooch#484)
&lt;https://github.com/fatiando/pooch/pull/484&gt;</code>__). Our CI is
continuously hitting some external network providers which is causing
some of them (mostly figshare for now) to block our traffic. This means
that our CI fails randomly and it’s annoying. Only run network tests on
jobs with the latest Python and optional dependencies installed to try
to mitigate this.</li>
<li>Use a SPDX expression for license in <code>pyproject.toml</code>
(<code>[#476](fatiando/pooch#476)
&lt;https://github.com/fatiando/pooch/pull/476&gt;</code>__). Use a SPDX
expression for the license in <code>pyproject.toml</code> and remove the
unneeded license classifier. This removes the warnings we were getting
after running <code>make build</code>.</li>
<li>Add <code>Typing :: Typed</code> trove classifier
(<code>[#472](fatiando/pooch#472)
&lt;https://github.com/fatiando/pooch/pull/472&gt;</code>__). Allow PyPI
users know that Pooch supports type hints.</li>
<li>Allow to manually trigger test job in Actions
(<code>[#475](fatiando/pooch#475)
&lt;https://github.com/fatiando/pooch/pull/475&gt;</code>__). Add
<code>workflow_dispatch</code> as an event trigger for the
<code>test.yml</code> workflow.</li>
<li>Standardize requests made by <code>DOIDownloaders</code>
(<code>[#514](fatiando/pooch#514)
&lt;https://github.com/fatiando/pooch/pull/514&gt;</code>__). Respect
user’s decisions when defining the <code>DOIDownloader</code> with
respect to arguments passed to <code>requests.get</code> whenever we
call that function. This way, all calls made by
<code>DOIDownloaders</code> and the repository classes make use of the
same arguments, including <code>timeout</code>, <code>headers</code>,
etc.</li>
</ul>
<p>Documentation:</p>
<ul>
<li>Add a link to the Fatiando Forum in the README
(<code>[#461](fatiando/pooch#461)
&lt;https://github.com/fatiando/pooch/pull/461&gt;</code>__).</li>
<li>Add <code>scXpand</code>
(<code>[#488](fatiando/pooch#488)
&lt;https://github.com/fatiando/pooch/pull/488&gt;</code><strong>),
<code>xclim</code>
(<code>[#445](fatiando/pooch#445)
&lt;https://github.com/fatiando/pooch/pull/445&gt;</code></strong>),
<code>CLISOPS</code>
(<code>[#445](fatiando/pooch#445)
&lt;https://github.com/fatiando/pooch/pull/445&gt;</code><strong>), and
<code>SPLASH</code>
(<code>[#432](fatiando/pooch#432)
&lt;https://github.com/fatiando/pooch/pull/432&gt;</code></strong>) to
list of projects using Pooch.</li>
</ul>
<p>This release contains contributions from:</p>
<ul>
<li>Adam Boesky</li>
<li>Antonio Valentino</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/fatiando/pooch/commit/6aab6f90569774d335edb7197729005c9e99f7c1"><code>6aab6f9</code></a>
Add changelog for Pooch v1.9.0 (<a
href="https://redirect.github.com/fatiando/pooch/issues/517">#517</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/2932f3407131697171b007c4a97f3586250c411f"><code>2932f34</code></a>
Standardize requests made by <code>DOIDownloaders</code> (<a
href="https://redirect.github.com/fatiando/pooch/issues/514">#514</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/d2b547edcb3d10d68451e8951d6aceaeb502302f"><code>d2b547e</code></a>
Bump actions/checkout from 4 to 6 (<a
href="https://redirect.github.com/fatiando/pooch/issues/515">#515</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/e33707dce81f77a23dfecb457b0f796bdbb4dc3a"><code>e33707d</code></a>
Update Santi's affiliation in AUTHORS.md (<a
href="https://redirect.github.com/fatiando/pooch/issues/513">#513</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/e7e59e91f5009d05d8184bf325bed963f724ca36"><code>e7e59e9</code></a>
Fix bug in file hashing on FIPS enabled system (<a
href="https://redirect.github.com/fatiando/pooch/issues/511">#511</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/27e3ab2a686040554068a1a08a433588c6524aed"><code>27e3ab2</code></a>
Fix TQDM usage (<a
href="https://redirect.github.com/fatiando/pooch/issues/465">#465</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/d9a82e6c7b5ca39b2e4c9207fd4da3cd9552c74e"><code>d9a82e6</code></a>
Allow to manually trigger test job in Actions (<a
href="https://redirect.github.com/fatiando/pooch/issues/475">#475</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/00c6cea6328c9c16c32bba20c01dc02e83339da5"><code>00c6cea</code></a>
Add <code>Typing :: Typed</code> trove classifier (<a
href="https://redirect.github.com/fatiando/pooch/issues/472">#472</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/f4d32da438a18266a7431ed19d7f6f44c0d28cb0"><code>f4d32da</code></a>
Use a SPDX expression for license in <code>pyproject.toml</code> (<a
href="https://redirect.github.com/fatiando/pooch/issues/476">#476</a>)</li>
<li><a
href="https://github.com/fatiando/pooch/commit/cddaac9db356d62703f5c5dfcbccc6d4006df5e6"><code>cddaac9</code></a>
Bump actions/download-artifact from 4 to 7 (<a
href="https://redirect.github.com/fatiando/pooch/issues/478">#478</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/fatiando/pooch/compare/v1.8.2...v1.9.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pooch&package-manager=uv&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants