Skip to content

Commit

Permalink
Merge pull request #13 from Kanahiro/fix/poetry
Browse files Browse the repository at this point in the history
chore: migrate to poetry
  • Loading branch information
Kanahiro authored Mar 4, 2024
2 parents 257ece9 + 57301ca commit 0b6c168
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 49 deletions.
64 changes: 41 additions & 23 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,45 @@
name: Upload Python Package
name: Release

on:
release:
types: [created]
workflow_dispatch:
release:
types: [created]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PSWD }}
run: |
python setup.py sdist
twine upload dist/*
release-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: build release distributions
run: |
pip install build
python -m build
- name: upload windows dists
uses: actions/upload-artifact@v3
with:
name: release-dists
path: dist/

pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
id-token: write

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v3
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
__pycache__/
.DS_Store
.DS_Store
.venv
245 changes: 245 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.poetry]
name = "tileget"
version = "0.3.0"
description = "Tile download utility - easily download xyz-tile data"
authors = ["Kanahiro <[email protected]>"]
license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
shapely = "^2.0.3"
tiletanic = "^1.1.0"
pyproj = "^3.6.1"

[tool.poetry.group.dev.dependencies]
ruff = "^0.3.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
tileget = "tileget.__main__:main"
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

22 changes: 0 additions & 22 deletions setup.py

This file was deleted.

1 change: 1 addition & 0 deletions tileget/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def download(tile):
.replace(r"{y}", str(tile[1]))
.replace(r"{z}", str(tile[2]))
)
print("downloading: " + url)

data = None
while True:
Expand Down

0 comments on commit 0b6c168

Please sign in to comment.