Skip to content

Commit

Permalink
MNT: Move cartopy feature download script into the package
Browse files Browse the repository at this point in the history
Move it from the tools directory into the feature module and make
it an executable module by calling it __main__.py

It can be invoked with `python -m cartopy.feature.download` now.
  • Loading branch information
greglucas committed Oct 14, 2023
1 parent 53260b6 commit e02ee67
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
shell: bash
run: |
# Check that the downloader tool at least knows where to get the data from (but don't actually download it)
python tools/cartopy_feature_download.py gshhs physical --dry-run
python -m cartopy.feature.download gshhs physical --dry-run
CARTOPY_GIT_DIR=$PWD
pytest -ra -n 4 \
--color=yes \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
For detail on how to use this tool, execute it with the `-h` option:
python cartopy_feature_download.py -h
python -m cartopy.feature.download -h
"""

Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ ows = ["OWSLib>=0.20.0", "pillow>=6.1.0"]
plotting = ["pillow>=6.1.0", "scipy>=1.3.1"]
test = ["pytest>=5.1.2", "pytest-mpl>=0.11", "pytest-xdist", "pytest-cov", "coveralls"]

[project.scripts]
feature_download = "tools.cartopy_feature_download.py:__main__"

[project.urls]
documentation='https://scitools.org.uk/cartopy/docs/latest/'
homepage='https://github.com/SciTools/cartopy'
Expand Down

0 comments on commit e02ee67

Please sign in to comment.