Skip to content

Commit 1f2b050

Browse files
committed
Releasing version 0.1.0
1 parent 0009d44 commit 1f2b050

File tree

4 files changed

+131
-3
lines changed

4 files changed

+131
-3
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ python
4646
## Release process
4747

4848
```
49+
# Run the tests
50+
pytest
51+
4952
# Update the setup.py
5053
dephell convert
5154
black setup.py
@@ -70,4 +73,6 @@ git push origin \
7073
refs/tags/"v$VERSION" \
7174
refs/heads/"v$VERSION" \
7275
master
76+
77+
poetry publish --build
7378
```

README.rst

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
2+
NASA SRTM altitude data parsing in Python
3+
=========================================
4+
5+
Provides an API onto SRTM ``.hgt`` or ``.hgt.zip`` files.
6+
7+
Requires Python 3.8, **may** work with Python 3.6 & 3.7.
8+
9+
Installation
10+
------------
11+
12+
.. code-block::
13+
14+
pip install python-srtm
15+
16+
export SRTM1_DIR=/path/to/srtm1/
17+
export SRTM3_DIR=/path/to/srtm3/
18+
19+
Use
20+
---
21+
22+
You can access either SRTM1 or SRTM3 data. SRTM 1, for example:
23+
24+
.. code-block:: python
25+
26+
# SRTM1
27+
python
28+
29+
>>> from srtm import Srtm1HeightMapCollection
30+
>>> srtm1_data = Srtm1HeightMapCollection()
31+
>>> srtm1_data.get_altitude(latitude=40.123, longitude=-7.456)
32+
615
33+
>>> Srtm1HeightMapCollection().get_elevation_profile(40.123, -7.456, 40.129, -7.460)
34+
[615, 620, 618, 620, 616, 603, 593, 582, 575, 579, 580, 589, 589, 581, 565, 553, 545, 541, 534, 533, 529, 520, 514]
35+
36+
Or SRTM3:
37+
38+
.. code-block:: python
39+
40+
# SRTM3
41+
python
42+
43+
>>> from srtm import Srtm3HeightMapCollection
44+
>>> srtm3_data = Srtm3HeightMapCollection()
45+
>>> srtm3_data.get_altitude(latitude=40.123, longitude=-7.456)
46+
608
47+
>>> Srtm3HeightMapCollection().get_elevation_profile(40.123, -7.456, 40.129, -7.460)
48+
[626, 616, 585, 593, 577, 548, 528, 514]
49+
50+
Release process
51+
---------------
52+
53+
.. code-block::
54+
55+
# Run the tests
56+
pytest
57+
58+
# Update the setup.py
59+
dephell convert
60+
black setup.py
61+
62+
# Ensure poetry.lock is up to date
63+
poetry lock
64+
65+
export VERSION="VERSION HERE"
66+
67+
# Version bump
68+
poetry version $VERSION
69+
70+
71+
# Commit
72+
git add .
73+
git commit -m "Releasing version $VERSION"
74+
75+
# Tagging and branching
76+
git tag "v$VERSION"
77+
git branch "v$VERSION"
78+
git push origin \
79+
refs/tags/"v$VERSION" \
80+
refs/heads/"v$VERSION" \
81+
master
82+
83+
poetry publish --build

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ pytest = "^5.4.1"
1616
dephell = "^0.8.2"
1717
black = "^19.10b0"
1818

19+
[tool.dephell.main]
20+
from = {format = "poetry", path = "pyproject.toml"}
21+
to = {format = "setuppy", path = "setup.py"}
1922
[build-system]
2023
requires = ["poetry>=0.12"]
2124
build-backend = "poetry.masonry.api"
2225

23-
[tool.dephell.main]
24-
from = {format = "poetry", path = "pyproject.toml"}
25-
to = {format = "setuppy", path = "setup.py"}

setup.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# DO NOT EDIT THIS FILE!
4+
# This file has been autogenerated by dephell <3
5+
# https://github.com/dephell/dephell
6+
7+
try:
8+
from setuptools import setup
9+
except ImportError:
10+
from distutils.core import setup
11+
12+
13+
import os.path
14+
15+
readme = ""
16+
here = os.path.abspath(os.path.dirname(__file__))
17+
readme_path = os.path.join(here, "README.rst")
18+
if os.path.exists(readme_path):
19+
with open(readme_path, "rb") as stream:
20+
readme = stream.read().decode("utf8")
21+
22+
23+
setup(
24+
long_description=readme,
25+
name="python-srtm",
26+
version="0.1.0",
27+
python_requires="==3.*,>=3.8.0",
28+
project_urls={"repository": "https://github.com/adamcharnock/python-srtm"},
29+
author="Adam Charnock",
30+
author_email="[email protected]",
31+
license="MIT",
32+
keywords="nasa geospatial altitude elevation-profile",
33+
packages=["srtm"],
34+
package_dir={"": "."},
35+
package_data={},
36+
install_requires=[],
37+
extras_require={
38+
"dev": ["black==19.*,>=19.10.0", "dephell==0.*,>=0.8.2", "pytest==5.*,>=5.4.1"]
39+
},
40+
)

0 commit comments

Comments
 (0)