mirror of
https://github.com/enzet/map-machine.git
synced 2025-07-15 07:35:49 +02:00
Fix GitHub Actions configuration; change setup.
This commit is contained in:
parent
ba26c1d4d7
commit
9dcd9f2e60
6 changed files with 29 additions and 18 deletions
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
|
@ -21,18 +21,18 @@ jobs:
|
|||
pip install black flake8 pytest
|
||||
pip install -r requirements.txt
|
||||
pip install .
|
||||
- name: Test with pytest
|
||||
- name: Check code style with Black
|
||||
run: |
|
||||
pytest -v
|
||||
black -l 80 --check roentgen tests
|
||||
- name: Lint with Flake8
|
||||
run: |
|
||||
flake8 --max-line-length=80 --ignore=E203,W503
|
||||
- name: Check code style with Black
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
black -l 80 --check roentgen test roentgen.py
|
||||
pytest -v
|
||||
- name: Test render
|
||||
run: |
|
||||
roentgen render -b 10.000,20.000,10.001,20.001 --cache test/data
|
||||
roentgen render -b 10.000,20.000,10.001,20.001 --cache tests/data
|
||||
- name: Test icon generation
|
||||
run: |
|
||||
roentgen icons
|
||||
|
@ -44,4 +44,4 @@ jobs:
|
|||
roentgen element --node amenity=bench,material=wood
|
||||
- name: Test tile generation
|
||||
run: |
|
||||
roentgen tile --coordinates 50.000,40.000 --cache test/data
|
||||
roentgen tile --coordinates 50.000,40.000 --cache tests/data
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,10 +1,11 @@
|
|||
# Generated files
|
||||
|
||||
out/
|
||||
dist/
|
||||
doc/*.html
|
||||
doc/*.svg
|
||||
doc/*.wiki
|
||||
missed_tags.yml
|
||||
out/
|
||||
|
||||
# Cache
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Checking code format with Black..."
|
||||
if ! black -l 80 --check tests roentgen roentgen.py; then
|
||||
black -l 80 --diff tests roentgen roentgen.py
|
||||
if ! black -l 80 --check tests roentgen; then
|
||||
black -l 80 --diff tests roentgen
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -10,8 +10,8 @@ else
|
|||
fi
|
||||
|
||||
echo "Checking code format with Black..."
|
||||
if ! black -l 80 --check tests roentgen roentgen.py; then
|
||||
black -l 80 --diff tests roentgen roentgen.py
|
||||
if ! black -l 80 --check tests roentgen; then
|
||||
black -l 80 --diff tests roentgen
|
||||
echo "FAIL"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -33,22 +33,22 @@ pytest -v || { echo "FAIL"; exit 1; }
|
|||
# Integration tests.
|
||||
|
||||
echo "Test render"
|
||||
python3 roentgen.py render -b 10.000,20.000,10.001,20.001 --cache tests/data \
|
||||
python3 roentgen render -b 10.000,20.000,10.001,20.001 --cache tests/data \
|
||||
|| { echo "FAIL"; exit 1; }
|
||||
grep "natural: tree" out/map.svg || { echo "FAIL"; exit 1; }
|
||||
|
||||
echo "Test icons"
|
||||
python3 roentgen.py icons || { echo "FAIL"; exit 1; }
|
||||
python3 roentgen icons || { echo "FAIL"; exit 1; }
|
||||
|
||||
echo "Test MapCSS generation"
|
||||
python3 roentgen.py mapcss || { echo "FAIL"; exit 1; }
|
||||
python3 roentgen mapcss || { echo "FAIL"; exit 1; }
|
||||
|
||||
echo "Test element generation"
|
||||
python3 roentgen.py element --node amenity=bench,material=wood \
|
||||
python3 roentgen element --node amenity=bench,material=wood \
|
||||
|| { echo "FAIL"; exit 1; }
|
||||
|
||||
echo "Test tile generation"
|
||||
python3 roentgen.py tile --coordinates 50.000,40.000 --cache tests/data \
|
||||
python3 roentgen tile --coordinates 50.000,40.000 --cache tests/data \
|
||||
|| { echo "FAIL"; exit 1; }
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -3,6 +3,5 @@ Röntgen entry point.
|
|||
"""
|
||||
from roentgen.main import main
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
13
setup.py
13
setup.py
|
@ -5,13 +5,24 @@ from setuptools import setup
|
|||
|
||||
setup(
|
||||
name="roentgen-map",
|
||||
version="0.1",
|
||||
version="0.1.0",
|
||||
packages=["roentgen"],
|
||||
url="https://github.com/enzet/Roentgen",
|
||||
project_urls={
|
||||
"Bug Tracker": "https://github.com/enzet/Roentgen/issues",
|
||||
},
|
||||
classifiers=[
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
],
|
||||
license="MIT",
|
||||
author="Sergey Vartanov",
|
||||
author_email="me@enzet.ru",
|
||||
description="Python renderer for OpenStreetMap with custom icon set",
|
||||
long_description="Röntgen is a Python OpenStreetMap renderer and tile "
|
||||
"generator with a custom set of CC-BY 4.0 icons aimed to display as many "
|
||||
"map features as possible.",
|
||||
entry_points={
|
||||
"console_scripts": ["roentgen=roentgen.main:main"],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue