Skip to content

Commit 0b6c168

Browse files
authored
Merge pull request #13 from Kanahiro/fix/poetry
chore: migrate to poetry
2 parents 257ece9 + 57301ca commit 0b6c168

File tree

7 files changed

+312
-49
lines changed

7 files changed

+312
-49
lines changed

.github/workflows/publish.yml

+41-23
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,45 @@
1-
name: Upload Python Package
1+
name: Release
22

33
on:
4-
release:
5-
types: [created]
6-
workflow_dispatch:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
77

88
jobs:
9-
deploy:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: '3.x'
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install setuptools twine
21-
- name: Build and publish
22-
env:
23-
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
24-
TWINE_PASSWORD: ${{ secrets.PYPI_PSWD }}
25-
run: |
26-
python setup.py sdist
27-
twine upload dist/*
9+
release-build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.x'
18+
19+
- name: build release distributions
20+
run: |
21+
pip install build
22+
python -m build
23+
24+
- name: upload windows dists
25+
uses: actions/upload-artifact@v3
26+
with:
27+
name: release-dists
28+
path: dist/
29+
30+
pypi-publish:
31+
runs-on: ubuntu-latest
32+
needs:
33+
- release-build
34+
permissions:
35+
id-token: write
36+
37+
steps:
38+
- name: Retrieve release distributions
39+
uses: actions/download-artifact@v3
40+
with:
41+
name: release-dists
42+
path: dist/
43+
44+
- name: Publish release distributions to PyPI
45+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
__pycache__/
2-
.DS_Store
2+
.DS_Store
3+
.venv

poetry.lock

+245
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[tool.poetry]
2+
name = "tileget"
3+
version = "0.3.0"
4+
description = "Tile download utility - easily download xyz-tile data"
5+
authors = ["Kanahiro <[email protected]>"]
6+
license = "MIT"
7+
readme = "README.md"
8+
9+
[tool.poetry.dependencies]
10+
python = "^3.10"
11+
shapely = "^2.0.3"
12+
tiletanic = "^1.1.0"
13+
pyproj = "^3.6.1"
14+
15+
[tool.poetry.group.dev.dependencies]
16+
ruff = "^0.3.0"
17+
18+
[build-system]
19+
requires = ["poetry-core"]
20+
build-backend = "poetry.core.masonry.api"
21+
22+
[tool.poetry.scripts]
23+
tileget = "tileget.__main__:main"

requirements.txt

-3
This file was deleted.

setup.py

-22
This file was deleted.

tileget/__main__.py

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def download(tile):
120120
.replace(r"{y}", str(tile[1]))
121121
.replace(r"{z}", str(tile[2]))
122122
)
123+
print("downloading: " + url)
123124

124125
data = None
125126
while True:

0 commit comments

Comments
 (0)