[Git][debian-gis-team/pooch][upstream] New upstream version 1.8.2

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sun Jun 9 10:39:17 BST 2024



Antonio Valentino pushed to branch upstream at Debian GIS Project / pooch


Commits:
d68d4dfa by Antonio Valentino at 2024-06-07T05:41:21+00:00
New upstream version 1.8.2
- - - - -


18 changed files:

- + .flake8
- .github/workflows/docs.yml
- .github/workflows/pypi.yml
- .github/workflows/style.yml
- .github/workflows/test.yml
- MANIFEST.in
- Makefile
- README.md
- doc/changes.rst
- doc/versions.rst
- env/requirements-style.txt
- environment.yml
- pooch/downloaders.py
- pooch/tests/test_core.py
- pooch/tests/test_downloaders.py
- pyproject.toml
- − setup.cfg
- − tools/license_notice.py


Changes:

=====================================
.flake8
=====================================
@@ -0,0 +1,4 @@
+[flake8]
+ignore = E203, E266, E501, W503, F401, E741
+max-line-length = 88
+max-doc-length = 79


=====================================
.github/workflows/docs.yml
=====================================
@@ -65,7 +65,7 @@ jobs:
       - name: Collect requirements
         run: |
           echo "Install Dependente to capture dependencies:"
-          python -m pip install dependente==0.2.0
+          python -m pip install dependente==0.3.0
           echo ""
           echo "Capturing run-time dependencies:"
           dependente --source install,extras > requirements-full.txt


=====================================
.github/workflows/pypi.yml
=====================================
@@ -91,6 +91,10 @@ jobs:
     needs: build
     # Only publish from the origin repository, not forks
     if: github.repository_owner == 'fatiando' && github.event_name != 'pull_request'
+    environment: pypi
+    permissions:
+      # This permission allows trusted publishing to PyPI (without an API token)
+      id-token: write
 
     steps:
       - name: Checkout
@@ -110,10 +114,8 @@ jobs:
       - name: Publish to Test PyPI
         # Only publish to TestPyPI when a PR is merged (pushed to main)
         if: success() && github.event_name == 'push'
-        uses: pypa/gh-action-pypi-publish at v1.8.11
+        uses: pypa/gh-action-pypi-publish at v1.8.14
         with:
-          user: __token__
-          password: ${{ secrets.TEST_PYPI_TOKEN}}
           repository_url: https://test.pypi.org/legacy/
           # Allow existing releases on test PyPI without errors.
           # NOT TO BE USED in PyPI!
@@ -122,7 +124,4 @@ jobs:
       - name: Publish to PyPI
         # Only publish to PyPI when a release triggers the build
         if: success() && github.event_name == 'release'
-        uses: pypa/gh-action-pypi-publish at v1.8.11
-        with:
-          user: __token__
-          password: ${{ secrets.PYPI_TOKEN}}
+        uses: pypa/gh-action-pypi-publish at v1.8.14


=====================================
.github/workflows/style.yml
=====================================
@@ -36,7 +36,7 @@ jobs:
         run: python -m pip freeze
 
       - name: Check code format
-        run: make black-check license-check
+        run: make check-format
 
   style:
     runs-on: ubuntu-latest
@@ -58,4 +58,4 @@ jobs:
         run: python -m pip freeze
 
       - name: Check code style
-        run: make flake8 lint
+        run: make check-style lint


=====================================
.github/workflows/test.yml
=====================================
@@ -29,16 +29,16 @@ jobs:
   test:
     name: ${{ matrix.os }} python=${{ matrix.python }} dependencies=${{ matrix.dependencies }}
     if: ${{ github.repository_owner == 'fatiando' || github.event_name != 'schedule' }}
-    runs-on: ${{ matrix.os }}-latest
+    runs-on: ${{ matrix.os }}
     strategy:
       # Otherwise, the workflow would stop if a single job fails. We want to
       # run all of them to catch failures in different combinations.
       fail-fast: false
       matrix:
         os:
-          - ubuntu
-          - macos
-          - windows
+          - ubuntu-latest
+          - macos-latest
+          - windows-latest
         dependencies:
           - oldest
           - latest
@@ -50,6 +50,14 @@ jobs:
             python: "3.11"
           - dependencies: optional
             python: "3.11"
+          # test on macos-13 (x86) using oldest dependencies and python 3.7
+          - os: macos-13
+            dependencies: oldest
+            python: "3.7"
+        exclude:
+          # don't test on macos-latest (arm64) with oldest dependencies
+          - os: macos-latest
+            dependencies: oldest
     env:
       REQUIREMENTS: env/requirements-build.txt env/requirements-test.txt
       # Used to tag codecov submissions
@@ -91,7 +99,7 @@ jobs:
       - name: Collect requirements
         run: |
           echo "Install Dependente to capture dependencies:"
-          python -m pip install dependente==0.2.0
+          python -m pip install dependente==0.3.0
           echo ""
           dependente_args="--source install"
           if [[ "${{ matrix.dependencies }}" == "oldest" ]]; then


=====================================
MANIFEST.in
=====================================
@@ -5,10 +5,11 @@ prune data
 prune doc
 prune env
 prune paper
+prune tools
 exclude .*.yml
 exclude .*rc
 exclude Makefile
 exclude .gitignore
 exclude .gitattributes
 exclude environment.yml
-exclude license_notice.py
+include pooch/tests/data


=====================================
Makefile
=====================================
@@ -3,7 +3,7 @@ PROJECT=pooch
 TESTDIR=tmp-test-dir-with-unique-name
 PYTEST_ARGS=--cov-config=../.coveragerc --cov-report=term-missing --cov=$(PROJECT) --doctest-modules -v --pyargs
 LINT_FILES=$(PROJECT)
-CHECK_STYLE=doc/conf.py $(PROJECT) tools
+CHECK_STYLE=$(PROJECT) doc
 
 help:
 	@echo "Commands:"
@@ -30,23 +30,17 @@ test:
 	cp $(TESTDIR)/.coverage* .
 	rm -r $(TESTDIR)
 
-format: license black
-
-check: black-check license-check flake8
-
-black:
+format:
 	black $(CHECK_STYLE)
+	burocrata --extension=py $(CHECK_STYLE)
 
-black-check:
-	black --check $(CHECK_STYLE)
+check: check-format check-style
 
-license:
-	python tools/license_notice.py
-
-license-check:
-	python tools/license_notice.py --check
+check-format:
+	black --check $(CHECK_STYLE)
+	burocrata --check --extension=py $(CHECK_STYLE)
 
-flake8:
+check-style:
 	flake8 $(CHECK_STYLE)
 
 lint:


=====================================
README.md
=====================================
@@ -44,16 +44,41 @@ Are you a **scientist** or researcher? Pooch can help you too!
 
 [SciPy](https://github.com/scipy/scipy), 
 [scikit-image](https://github.com/scikit-image/scikit-image),
+[xarray](https://github.com/pydata/xarray),
 [Ensaio](https://github.com/fatiando/ensaio),
+[GemPy](https://github.com/cgre-aachen/gempy),
 [MetPy](https://github.com/Unidata/MetPy),
 [napari](https://github.com/napari/napari),
+[Satpy](https://github.com/pytroll/satpy),
+[yt](https://github.com/yt-project/yt),
+[PyVista](https://github.com/pyvista/pyvista),
 [icepack](https://github.com/icepack/icepack),
 [histolab](https://github.com/histolab/histolab),
 [seaborn-image](https://github.com/SarthakJariwala/seaborn-image),
 [Open AR-Sandbox](https://github.com/cgre-aachen/open_AR_Sandbox),
 [climlab](https://github.com/climlab/climlab),
 [mne-python](https://github.com/mne-tools/mne-python),
-[GemGIS](https://github.com/cgre-aachen/gemgis)
+[GemGIS](https://github.com/cgre-aachen/gemgis),
+[SHTOOLS](https://github.com/SHTOOLS/SHTOOLS),
+[MOABB](https://github.com/NeuroTechX/moabb),
+[GeoViews](https://github.com/holoviz/geoviews),
+[ScopeSim](https://github.com/AstarVienna/ScopeSim),
+[Brainrender](https://github.com/brainglobe/brainrender),
+[pyxem](https://github.com/pyxem/pyxem),
+[cellfinder](https://github.com/brainglobe/cellfinder),
+[PVGeo](https://github.com/OpenGeoVis/PVGeo),
+[geosnap](https://github.com/oturns/geosnap),
+[BioCypher](https://github.com/biocypher/biocypher),
+[cf-xarray](https://github.com/xarray-contrib/cf-xarray),
+[Scirpy](https://github.com/scverse/scirpy),
+[rembg](https://github.com/danielgatis/rembg),
+[DASCore](https://github.com/DASDAE/dascore),
+[scikit-mobility](https://github.com/scikit-mobility/scikit-mobility),
+[Py-ART](https://github.com/ARM-DOE/pyart),
+[HyperSpy](https://github.com/hyperspy/hyperspy),
+[RosettaSciIO](https://github.com/hyperspy/rosettasciio),
+[eXSpy](https://github.com/hyperspy/exspy)
+
 
 > If you're using Pooch, **send us a pull request** adding your project to the list.
 


=====================================
doc/changes.rst
=====================================
@@ -3,6 +3,39 @@
 Changelog
 =========
 
+Version 1.8.2
+-------------
+
+Released on: 2024/06/06
+
+DOI: https://doi.org/10.5281/zenodo.11493461
+
+Bug fixes:
+
+* Use a variable to set the default request timeout (`#418 <https://github.com/fatiando/pooch/pull/418>`__)
+
+Documentation:
+
+* Add HyperSpy, RosettaSciIO, eXSpy to projects using pooch (`#408 <https://github.com/fatiando/pooch/pull/408>`__)
+* Add more packages using Pooch (`#403 <https://github.com/fatiando/pooch/pull/403>`__)
+
+Maintenance:
+
+* Add optional dependencies to environment.yml (`#413 <https://github.com/fatiando/pooch/pull/413>`__)
+* Run tests with oldest dependencies on x86 macos (`#414 <https://github.com/fatiando/pooch/pull/414>`__)
+* Mark additional tests requiring network (`#412 <https://github.com/fatiando/pooch/pull/412>`__)
+* Fix package description in pyproject.toml (`#407 <https://github.com/fatiando/pooch/pull/407>`__)
+* Setup Trusted Publisher deployment to PyPI (`#406 <https://github.com/fatiando/pooch/pull/406>`__)
+* Use Burocrata to check and add license notices (`#402 <https://github.com/fatiando/pooch/pull/402>`__)
+* Use pyproject.toml instead of setup.cfg (`#401 <https://github.com/fatiando/pooch/pull/401>`__)
+
+This release contains contributions from:
+
+* Sandro
+* Jonas Lähnemann
+* Santiago Soler
+* Leonardo Uieda
+
 Version 1.8.1
 -------------
 


=====================================
doc/versions.rst
=====================================
@@ -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.8.2 <https://www.fatiando.org/pooch/v1.8.2>`__
 * `v1.8.1 <https://www.fatiando.org/pooch/v1.8.1>`__
 * `v1.8.0 <https://www.fatiando.org/pooch/v1.8.0>`__
 * `v1.7.0 <https://www.fatiando.org/pooch/v1.7.0>`__


=====================================
env/requirements-style.txt
=====================================
@@ -3,3 +3,4 @@ black
 flake8
 pylint>=2.4
 pathspec
+burocrata


=====================================
environment.yml
=====================================
@@ -9,6 +9,10 @@ dependencies:
     - requests
     - packaging
     - platformdirs
+    # Optional dependencies
+    - tqdm>=4.41.0,<5.0.0
+    - paramiko>=2.7.0
+    - xxhash>=1.4.3
     # Build
     - build
     # Test
@@ -26,3 +30,5 @@ dependencies:
     - black>=20.8b1
     - flake8
     - pylint>=2.4
+    - pip:
+      - burocrata


=====================================
pooch/downloaders.py
=====================================
@@ -26,6 +26,12 @@ except ImportError:
     paramiko = None
 
 
+# Set the default timeout in seconds so it can be configured in a pinch for the
+# methods that don't or can't expose a way set it at runtime.
+# See https://github.com/fatiando/pooch/issues/409
+DEFAULT_TIMEOUT = 30
+
+
 def choose_downloader(url, progressbar=False):
     """
     Choose the appropriate downloader for the given URL based on the protocol.
@@ -197,13 +203,13 @@ class HTTPDownloader:  # pylint: disable=too-few-public-methods
         import requests  # pylint: disable=C0415
 
         if check_only:
-            timeout = self.kwargs.get("timeout", 5)
+            timeout = self.kwargs.get("timeout", DEFAULT_TIMEOUT)
             response = requests.head(url, timeout=timeout, allow_redirects=True)
             available = bool(response.status_code == 200)
             return available
 
         kwargs = self.kwargs.copy()
-        timeout = kwargs.pop("timeout", 5)
+        timeout = kwargs.pop("timeout", DEFAULT_TIMEOUT)
         kwargs.setdefault("stream", True)
         ispath = not hasattr(output_file, "write")
         if ispath:
@@ -640,7 +646,7 @@ def doi_to_url(doi):
     import requests  # pylint: disable=C0415
 
     # Use doi.org to resolve the DOI to the repository website.
-    response = requests.get(f"https://doi.org/{doi}", timeout=5)
+    response = requests.get(f"https://doi.org/{doi}", timeout=DEFAULT_TIMEOUT)
     url = response.url
     if 400 <= response.status_code < 600:
         raise ValueError(
@@ -800,7 +806,7 @@ class ZenodoRepository(DataRepository):  # pylint: disable=missing-class-docstri
             article_id = self.archive_url.split("/")[-1]
             self._api_response = requests.get(
                 f"{self.base_api_url}/{article_id}",
-                timeout=5,
+                timeout=DEFAULT_TIMEOUT,
             ).json()
 
         return self._api_response
@@ -966,7 +972,7 @@ class FigshareRepository(DataRepository):  # pylint: disable=missing-class-docst
             # Use the figshare API to find the article ID from the DOI
             article = requests.get(
                 f"https://api.figshare.com/v2/articles?doi={self.doi}",
-                timeout=5,
+                timeout=DEFAULT_TIMEOUT,
             ).json()[0]
             article_id = article["id"]
             # Parse desired version from the doi
@@ -993,7 +999,7 @@ class FigshareRepository(DataRepository):  # pylint: disable=missing-class-docst
                     f"{article_id}/versions/{version}"
                 )
             # Make the request and return the files in the figshare repository
-            response = requests.get(api_url, timeout=5)
+            response = requests.get(api_url, timeout=DEFAULT_TIMEOUT)
             response.raise_for_status()
             self._api_response = response.json()["files"]
 
@@ -1087,7 +1093,7 @@ class DataverseRepository(DataRepository):  # pylint: disable=missing-class-docs
         response = requests.get(
             f"{parsed['protocol']}://{parsed['netloc']}/api/datasets/"
             f":persistentId?persistentId=doi:{doi}",
-            timeout=5,
+            timeout=DEFAULT_TIMEOUT,
         )
         return response
 


=====================================
pooch/tests/test_core.py
=====================================
@@ -525,12 +525,9 @@ def test_check_availability_invalid_downloader():
         return None
 
     pup = Pooch(path=DATA_DIR, base_url=BASEURL, registry=REGISTRY)
-    # First check that everything works without the custom downloader
-    assert pup.is_available("tiny-data.txt")
-    # Now use the bad one
-    with pytest.raises(NotImplementedError) as error:
+    msg = "does not support availability checks."
+    with pytest.raises(NotImplementedError, match=msg):
         pup.is_available("tiny-data.txt", downloader=downloader)
-        assert "does not support availability checks" in str(error)
 
 
 @pytest.mark.network
@@ -627,6 +624,7 @@ def test_stream_download(fname):
         check_tiny_data(str(destination))
 
 
+ at pytest.mark.network
 @pytest.mark.parametrize(
     "url",
     [FIGSHAREURL, ZENODOURL, DATAVERSEURL],
@@ -649,6 +647,7 @@ def test_load_registry_from_doi(url):
             pup.fetch(filename)
 
 
+ at pytest.mark.network
 def test_load_registry_from_doi_zenodo_with_slash():
     """
     Check that the registry is correctly populated from the Zenodo API when


=====================================
pooch/tests/test_downloaders.py
=====================================
@@ -86,6 +86,7 @@ def test_unsupported_protocol():
         choose_downloader("doii:XXX/XXX/file")
 
 
+ at pytest.mark.network
 def test_invalid_doi_repository():
     "Should fail if data repository is not supported"
     with pytest.raises(ValueError) as exc:
@@ -96,6 +97,7 @@ def test_invalid_doi_repository():
     assert "Invalid data repository 'joss.theoj.org'" in str(exc.value)
 
 
+ at pytest.mark.network
 def test_doi_url_not_found():
     "Should fail if the DOI is not found"
     with pytest.raises(ValueError) as exc:
@@ -103,6 +105,7 @@ def test_doi_url_not_found():
     assert "Is the DOI correct?" in str(exc.value)
 
 
+ at pytest.mark.network
 @pytest.mark.parametrize(
     "repository,doi",
     [
@@ -121,6 +124,7 @@ def test_figshare_url_file_not_found(repository, doi):
     assert "File 'bla.txt' not found" in str(exc.value)
 
 
+ at pytest.mark.network
 @pytest.mark.parametrize(
     "url",
     [FIGSHAREURL, ZENODOURL, DATAVERSEURL],


=====================================
pyproject.toml
=====================================
@@ -1,5 +1,53 @@
-# Specify that we use setuptools and setuptools_scm (to generate the version
-# string). Actual configuration is in setup.cfg.
+[project]
+name = "pooch"
+description = "A friend to fetch your data files"
+dynamic = ["version"]
+authors = [
+  {name="The Pooch Developers", email="fatiandoaterra at protonmail.com"},
+]
+maintainers = [
+  {name = "Leonardo Uieda", email = "leo at uieda.com"}
+]
+readme = "README.md"
+license = {text = "BSD-3-Clause"}
+keywords = ["data", "download", "caching", "http"]
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Intended Audience :: Science/Research",
+    "Intended Audience :: Developers",
+    "Intended Audience :: Education",
+    "License :: OSI Approved :: BSD License",
+    "Operating System :: OS Independent",
+    "Topic :: Scientific/Engineering",
+    "Topic :: Software Development :: Libraries",
+    "Programming Language :: Python :: 3 :: Only",
+    "Programming Language :: Python :: 3.7",
+    "Programming Language :: Python :: 3.8",
+    "Programming Language :: Python :: 3.9",
+    "Programming Language :: Python :: 3.10",
+    "Programming Language :: Python :: 3.11",
+]
+requires-python = ">=3.7"
+dependencies = [
+    "platformdirs >= 2.5.0",
+    "packaging >= 20.0",
+    "requests >= 2.19.0",
+]
+
+[project.optional-dependencies]
+progress = ["tqdm>=4.41.0,<5.0.0"]
+sftp = ["paramiko>=2.7.0"]
+xxhash = ["xxhash>=1.4.3"]
+
+[project.urls]
+"Documentation" = "https://www.fatiando.org/pooch"
+"Changelog" = "https://www.fatiando.org/pooch/latest/changes.html"
+"Bug Tracker" = "https://github.com/fatiando/pooch/issues"
+"Source Code" = "https://github.com/fatiando/pooch"
+
+[tool.setuptools.packages]
+find = {}  # Scanning implicit namespaces is active by default
+
 [build-system]
 requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
 build-backend = "setuptools.build_meta"
@@ -13,3 +61,12 @@ write_to =  "pooch/_version.py"
 markers = [
     "network: test requires network access",
 ]
+
+[tool.burocrata]
+notice = '''
+# Copyright (c) 2018 The Pooch Developers.
+# Distributed under the terms of the BSD 3-Clause License.
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# This code is part of the Fatiando a Terra project (https://www.fatiando.org)
+#'''


=====================================
setup.cfg deleted
=====================================
@@ -1,63 +0,0 @@
-[metadata]
-name = pooch
-fullname = Pooch
-description = "Pooch manages your Python library's sample data files: it automatically downloads and stores them in a local directory, with support for versioning and corruption checks."
-long_description = file: README.md
-long_description_content_type = text/markdown
-author = The Pooch Developers
-author_email = fatiandoaterra at protonmail.com
-maintainer = "Leonardo Uieda"
-maintainer_email = leouieda at gmail.com
-license = BSD 3-Clause License
-license_file = LICENSE.txt
-platform = any
-keywords = data, download, caching, http
-classifiers =
-    Development Status :: 5 - Production/Stable
-    Intended Audience :: Science/Research
-    Intended Audience :: Developers
-    Intended Audience :: Education
-    License :: OSI Approved :: BSD License
-    Natural Language :: English
-    Operating System :: OS Independent
-    Topic :: Scientific/Engineering
-    Topic :: Software Development :: Libraries
-    Programming Language :: Python :: 3 :: Only
-    Programming Language :: Python :: 3.7
-    Programming Language :: Python :: 3.8
-    Programming Language :: Python :: 3.9
-    Programming Language :: Python :: 3.10
-    Programming Language :: Python :: 3.11
-url = https://github.com/fatiando/pooch
-project_urls =
-    Documentation = https://www.fatiando.org/pooch
-    Release Notes = https://github.com/fatiando/pooch/releases
-    Bug Tracker = https://github.com/fatiando/pooch/issues
-    Source Code = https://github.com/fatiando/pooch
-
-[options]
-zip_safe = True
-include_package_data = True
-packages = find:
-python_requires = >=3.7
-setup_requires =
-install_requires =
-    platformdirs>=2.5.0
-    packaging>=20.0
-    requests>=2.19.0
-
-[options.extras_require]
-progress =
-    tqdm>=4.41.0,<5.0.0
-sftp =
-    paramiko>=2.7.0
-xxhash =
-    xxhash>=1.4.3
-
-[options.package_data]
-pooch.tests = data/*, data/store/*, data/store/subdir/*
-
-[flake8]
-ignore = E203, E266, E501, W503, F401, E741
-max-line-length = 88
-max-doc-length = 79


=====================================
tools/license_notice.py deleted
=====================================
@@ -1,93 +0,0 @@
-# Copyright (c) 2018 The Pooch Developers.
-# Distributed under the terms of the BSD 3-Clause License.
-# SPDX-License-Identifier: BSD-3-Clause
-#
-# This code is part of the Fatiando a Terra project (https://www.fatiando.org)
-#
-"""
-Add license notice to every source file if not present
-"""
-import sys
-from pathlib import Path
-from argparse import ArgumentParser
-from pathspec import PathSpec
-
-
-PROJECT = "pooch"
-YEAR = "2018"
-NOTICE = f"""
-# Copyright (c) {YEAR} The {PROJECT.title()} Developers.
-# Distributed under the terms of the BSD 3-Clause License.
-# SPDX-License-Identifier: BSD-3-Clause
-#
-# This code is part of the Fatiando a Terra project (https://www.fatiando.org)
-#
-""".strip()
-CHECK_HELP = """
-Don't write the files, just return the status. Return code 0 means
-nothing would change. Return code 1 means some files lacks the license notice.
-"""
-
-
-def get_gitignore(root):
-    """
-    Return a PathSpec matching gitignore content if present.
-    This function is a modified version of the one present in Black
-    (https://github.com/psf/black) available under MIT License.
-    """
-    gitignore = root / ".gitignore"
-    lines = []
-    if gitignore.is_file():
-        with gitignore.open() as gi_file:
-            lines = gi_file.readlines()
-    return PathSpec.from_lines("gitwildmatch", lines)
-
-
-def main():
-    """
-    Add license notice to every source file if not present or just check
-    """
-    # Create option parser
-    parser = ArgumentParser(
-        description=" Add license notice to every source file if not present."
-    )
-    parser.add_argument(
-        "--check", action="store_true", dest="check", default=False, help=CHECK_HELP
-    )
-    args = parser.parse_args()
-
-    gitignore = get_gitignore(Path("."))
-
-    python_files = [
-        path
-        for path in Path(".").glob("**/*.py")
-        if not str(path).startswith(".")
-        if not gitignore.match_file(path)
-    ]
-
-    missing_notice_files = []
-    for pyfile in python_files:
-        code = pyfile.read_text()
-        if not code.startswith(NOTICE):
-            missing_notice_files.append(pyfile)
-
-    if args.check:
-        if missing_notice_files:
-            print("License notice is missing in some source files! 💔")
-            for pyfile in missing_notice_files:
-                print(f"  {pyfile}")
-            sys.exit(1)
-        else:
-            print("All source files have the license notice! 🎉")
-            sys.exit(0)
-    else:
-        print("Successfully added license notice to:")
-        for pyfile in missing_notice_files:
-            code = pyfile.read_text()
-            pyfile.write_text("\n".join([NOTICE, code]))
-            print(f"  {pyfile}")
-        sys.exit(0)
-
-
-if __name__ == "__main__":
-    main()



View it on GitLab: https://salsa.debian.org/debian-gis-team/pooch/-/commit/d68d4dfa7349929e2b8bf90e39d1a43505a76bef

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/debian-gis-team/pooch/-/commit/d68d4dfa7349929e2b8bf90e39d1a43505a76bef
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20240609/e4b06d39/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list