Skip to content

Commit

Permalink
Merge branch 'main' into faster_import_time
Browse files Browse the repository at this point in the history
  • Loading branch information
leouieda committed Jun 21, 2023
2 parents bc7632b + 9c57dd3 commit 64c4f52
Show file tree
Hide file tree
Showing 20 changed files with 579 additions and 109 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools-scm can
# create the correct version string. If the number of commits since
Expand All @@ -58,9 +58,9 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"

- name: Collect requirements
run: |
Expand All @@ -86,7 +86,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Setup caching for pip packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-full.txt') }}
Expand All @@ -113,7 +113,7 @@ jobs:

# Store the docs as a build artifact so we can deploy it later
- name: Upload HTML documentation as an artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: docs-${{ github.sha }}
path: doc/_build/html
Expand All @@ -127,11 +127,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Fetch the built docs from the "build" job
- name: Download HTML documentation artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: docs-${{ github.sha }}
path: doc/_build/html
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools_scm can
# create the correct version string. If the number of commits since
Expand All @@ -45,9 +45,9 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"

- name: Install requirements
run: |
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Upload archives as artifacts
# Only if not a pull request
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pypi-${{ github.sha }}
path: dist
Expand All @@ -94,15 +94,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# The GitHub token is preserved by default but this job doesn't need
# to be able to push to GitHub.
persist-credentials: false

# Fetch the built archives from the "build" job
- name: Download built archives artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: pypi-${{ github.sha }}
path: dist
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -42,12 +42,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ on:
schedule:
# Run every Monday at 12:00 UTC
# * is a special character in YAML so you have to quote this string
- cron: '00 12 * * 1'
- cron: "00 12 * * 1"

# Use bash by default in all jobs
defaults:
run:
shell: bash

jobs:

#############################################################################
# Run tests and upload to codecov
test:
Expand All @@ -45,7 +44,7 @@ jobs:
- windows
python:
- "3.7"
- "3.10"
- "3.11"
dependencies:
- latest
- optional
Expand All @@ -68,7 +67,7 @@ jobs:

# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools-scm can
# create the correct version string. If the number of commits since
Expand All @@ -84,7 +83,7 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -119,7 +118,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Setup caching for pip packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-full.txt') }}
Expand Down Expand Up @@ -148,9 +147,9 @@ jobs:
run: coverage xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
files: ./coverage.xml
env_vars: OS,PYTHON,DEPENDENCIES
# Don't mark the job as failed if the upload fails for some reason.
# It does sometimes but shouldn't be the reason for running
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ order by last name) and are considered "The Pooch Developers":
* [Dominic Kempf](https://github.com/dokempf) - Scientific Software Center, Heidelberg University, Germany (ORCID: [0000-0002-6140-2332](https://www.orcid.org/0000-0002-6140-2332))
* [Kacper Kowalik](https://github.com/Xarthisius) - National Center for Supercomputing Applications, University of Illinois at Urbana-Champaign, USA (ORCID: [0000-0003-1709-3744](https://www.orcid.org/0000-0003-1709-3744))
* [John Leeman](https://github.com/jrleeman)
* [Björn Ludwig](https://github.com/BjoernLudwigPTB) - Physikalisch-Technische Bundesanstalt, Germany (ORCID: [0000-0002-5910-9137](https://www.orcid.org/0000-0002-5910-9137))
* [Daniel McCloy](https://github.com/drammock) - University of Washington, USA (ORCID: [0000-0002-7572-3241](https://orcid.org/0000-0002-7572-3241))
* [Rémi Rampin](https://github.com/remram44) - New York University, USA (ORCID: [0000-0002-0524-2282](https://www.orcid.org/0000-0002-0524-2282))
* [Clément Robert](https://github.com/neutrinoceros) - Institut de Planétologie et d'Astrophysique de Grenoble, France (ORCID: [0000-0001-8629-7068](https://orcid.org/0000-0001-8629-7068))
Expand Down
19 changes: 17 additions & 2 deletions CITATION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,20 @@ If you used Pooch in your research, please consider citing our paper:
This is an open-access publication. The paper and the associated software
review can be freely accessed at: https://doi.org/10.21105/joss.01943

If you need a Bibtex entry for the paper, grab it here:
https://www.doi2bib.org/bib/10.21105/joss.01943
Here is a Bibtex entry to make things easier if you’re using Latex:

.. code:: bibtex
@article{uieda2020,
title = {{Pooch}: {A} friend to fetch your data files},
author = {Leonardo Uieda and Santiago Soler and R{\'{e}}mi Rampin and Hugo van Kemenade and Matthew Turk and Daniel Shapero and Anderson Banihirwe and John Leeman},
year = {2020},
doi = {10.21105/joss.01943},
url = {https://doi.org/10.21105/joss.01943},
month = jan,
publisher = {The Open Journal},
volume = {5},
number = {45},
pages = {1943},
journal = {Journal of Open Source Software}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def fetch_gravity_data():
* [climlab](https://github.com/climlab/climlab)
* [napari](https://github.com/napari/napari)
* [mne-python](https://github.com/mne-tools/mne-python)
* [GemGIS](https://github.com/cgre-aachen/gemgis)

*If you're using Pooch, send us a pull request adding your project to the list.*

Expand Down
58 changes: 58 additions & 0 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,64 @@
Changelog
=========

Version 1.7.0
-------------

*Released on: 2023/02/27*

doi:`10.5281/zenodo.7678844 <https://doi.org/10.5281/zenodo.7678844>`__

Bug fixes:

* Make archive extraction always take members into account (`#316 <https://github.com/fatiando/pooch/pull/316>`__)
* Figshare downloaders fetch the correct version, instead of always the latest one. (`#343 <https://github.com/fatiando/pooch/pull/343>`__)

New features:

* Allow spaces in filenames in registry files (`#315 <https://github.com/fatiando/pooch/pull/315>`__)
* Refactor ``Pooch.is_available`` to use downloaders (`#322 <https://github.com/fatiando/pooch/pull/322>`__)
* Add support for downloading files from Dataverse DOIs (`#318 <https://github.com/fatiando/pooch/pull/318>`__)
* Add a new ``Pooch.load_registry_from_doi`` method that populates the Pooch registry using DOI-based data repositories (`#325 <https://github.com/fatiando/pooch/pull/325>`__)
* Support urls for Zenodo repositories created through the GitHub integration service, which include slashes in the filename of the main zip files (`#340 <https://github.com/fatiando/pooch/pull/340>`__)
* Automatically add a trailing slash to ``base_url`` on ``pooch.create`` (`#344 <https://github.com/fatiando/pooch/pull/344>`__)

Maintenance:

* Drop support for Python 3.6 (`#299 <https://github.com/fatiando/pooch/pull/299>`__)
* Port from deprecated ``appdirs`` to ``platformdirs`` (`#339 <https://github.com/fatiando/pooch/pull/339>`__)
* Update version of Codecov's Action to v3 (`#345 <https://github.com/fatiando/pooch/pull/345>`__)

Documentation:

* Update sphinx, theme, and sphinx-panels (`#300 <https://github.com/fatiando/pooch/pull/300>`__)
* Add CITATION.cff for the JOSS article (`#308 <https://github.com/fatiando/pooch/pull/308>`__)
* Use Markdown for the README (`#311 <https://github.com/fatiando/pooch/pull/311>`__)
* Improve docstring of `known_hash` in `retrieve` function (`#333 <https://github.com/fatiando/pooch/pull/333>`__)
* Replace link to Pooch's citation with a BibTeX code snippet (`#335 <https://github.com/fatiando/pooch/pull/335>`__)

Projects that started using Pooch:

* Open AR-Sandbox (`#305 <https://github.com/fatiando/pooch/pull/305>`__)
* ``climlab`` (`#312 <https://github.com/fatiando/pooch/pull/312>`__)
* SciPy (`#320 <https://github.com/fatiando/pooch/pull/320>`__)
* ``napari`` (`#321 <https://github.com/fatiando/pooch/pull/321>`__)
* ``mne-python`` (`#323 <https://github.com/fatiando/pooch/pull/323>`__)

This release contains contributions from:

* Alex Fikl
* Anirudh Dagar
* Björn Ludwig
* Brian Rose
* Dominic Kempf
* Florian Wellmann
* Gabriel Fu
* Kyle I S Harrington
* Leonardo Uieda
* myd7349
* Rowan Cockett
* Santiago Soler

Version 1.6.0
-------------

Expand Down
2 changes: 1 addition & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ manually.

Required:

* `appdirs <https://github.com/ActiveState/appdirs>`__
* `platformdirs <https://github.com/platformdirs/platformdirs>`__
* `packaging <https://github.com/pypa/packaging>`__
* `requests <https://docs.python-requests.org/>`__

Expand Down
21 changes: 21 additions & 0 deletions doc/protocols.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,24 @@ figshare dataset:
``doi:10.6084/m9.figshare.c.4362224.v1``. Attempting to download files
from a figshare collection will raise an error.
See `issue #274 <https://github.com/fatiando/pooch/issues/274>`__ details.

Since this type of repositories store information about the files contained in
them, we can avoid having to manually type the registry with the file names and
their hashes.
Instead, we can use the :meth:`pooch.Pooch.load_registry_from_doi` to
automatically populate the registry:

.. code-block:: python
POOCH = pooch.create(
path=pooch.os_cache("plumbus"),
# Use the figshare DOI
base_url="doi:10.6084/m9.figshare.14763051.v1/",
registry=None,
)
# Automatically populate the registry
POOCH.load_registry_from_doi()
# Fetch one of the files in the repository
fname = POOCH.fetch("tiny-data.txt")
1 change: 1 addition & 0 deletions doc/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Use the links below to access documentation for specific versions
* `Latest release <https://www.fatiando.org/pooch/latest>`__
* `Development <https://www.fatiando.org/pooch/dev>`__
(reflects the current development branch on GitHub)
* `v1.7.0 <https://www.fatiando.org/pooch/v1.7.0>`__
* `v1.6.0 <https://www.fatiando.org/pooch/v1.6.0>`__
* `v1.5.2 <https://www.fatiando.org/pooch/v1.5.2>`__
* `v1.5.1 <https://www.fatiando.org/pooch/v1.5.1>`__
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ channels:
- conda-forge
- defaults
dependencies:
- python==3.10
- python==3.11
- pip
# Run
- requests
- packaging
- appdirs
- platformdirs
# Build
- build
# Test
Expand Down
Loading

0 comments on commit 64c4f52

Please sign in to comment.