Skip to content

Commit

Permalink
Merge 06ec5e3 into 1d7b7e6
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelsJP committed Feb 4, 2021
2 parents 1d7b7e6 + 06ec5e3 commit 07c0624
Show file tree
Hide file tree
Showing 47 changed files with 1,304 additions and 1,096 deletions.
2 changes: 1 addition & 1 deletion .condarc
@@ -1,4 +1,4 @@
channels:
- michaelsjp

show_channel_urls: True
show_channel_urls: True
18 changes: 15 additions & 3 deletions .coveragerc
@@ -1,5 +1,17 @@
[run]
branch = True
concurrency = multiprocessing
omit =
*/venv/*
*/.venv/*
*/.env/*
*/.tox/*

[report]
omit =
*/python?.?/*
*/site-packages/nose/*
*__init__*
*/venv/*
*/.venv/*
*/.env/*
*/.tox/*
exclude_lines =
pragma: no cover
42 changes: 25 additions & 17 deletions .github/workflows/ci-tests.yml
@@ -1,36 +1,44 @@
name: tests

on:
on:
pull_request:
branches: '**'
push:
branches:
branches:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python_version: [
3.7,
3.8,
3.9,
pypy3
]
config:
- python-version: 3.6
tox: 36
- python-version: 3.7
tox: 37
- python-version: 3.8
tox: 38
- python-version: 3.9
tox: 39
poetry-version: [ 1.1.4 ]
os: [ ubuntu-20.04, ubuntu-18.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python_version }}
- name: Set up Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
python-version: ${{ matrix.config.python-version }}
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.1.0
with:
poetry-version: 1.1.2
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
- name: nosetests
run: |
nosetests --with-coverage --cover-erase --cover-package=openrouteservice -v
pip install tox coveralls
- name: Run Tox
run: tox -e py${{ matrix.config.tox }}
- name: coveralls
run: |
coveralls --service=github
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conda-package.yml
Expand Up @@ -16,4 +16,4 @@ jobs:
subDir: 'conda.recipe'
AnacondaToken: ${{ secrets.ANACONDA_TOKEN }}
platforms: 'all'
override: true
override: true
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Expand Up @@ -36,4 +36,4 @@ jobs:
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -16,3 +16,7 @@ test.py

cover/
conda/
*coverage.xml
/poetry.lock
/setup.py
/requirements.txt
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,51 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: |
(?x)(
^conda.recipe/meta.yaml
)
- id: check-json
- id: forbid-new-submodules
- id: mixed-line-ending
args: [ '--fix=lf' ]
description: Forces to replace line ending by the UNIX 'lf' character.
- id: pretty-format-json
args: [ '--no-sort-keys' ]
- id: no-commit-to-branch
args: [ --branch, master ]
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
args: # arguments to configure black
- --line-length=80
- repo: https://gitlab.com/pycqa/flake8
rev: "3.8.4"
hooks:
- id: flake8
exclude: |
(?x)(
^test/* |
^docs/*
)
args:
- "--max-line-length=120"
- "--ignore=P101,D202,D401"
additional_dependencies:
[
"flake8-bugbear==19.8.0",
"flake8-coding==1.3.2",
"flake8-comprehensions==3.0.1",
"flake8-debugger==3.2.1",
"flake8-deprecated==1.3",
"flake8-pep3101==1.2.1",
"flake8-polyfill==1.0.2",
"flake8-print==3.1.4",
"flake8-string-format==0.2.3",
"flake8-docstrings==1.5.0",
]
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1 +1 @@
include README.rst
include README.rst
2 changes: 1 addition & 1 deletion conda.recipe/bld.bat
@@ -1,3 +1,3 @@
cd %RECIPE_DIR%\..
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
if errorlevel 1 exit 1
2 changes: 1 addition & 1 deletion conda.recipe/build.sh
@@ -1,2 +1,2 @@
cd $RECIPE_DIR/..
$PYTHON setup.py install
$PYTHON setup.py install
2 changes: 1 addition & 1 deletion conda.recipe/meta.yaml
@@ -1,6 +1,6 @@
{% set name = "openrouteservice" %}
{% set version = "2.3.3" %}

# TODO update to be conform with poetry
package:
name: "{{ name|lower }}"
version: "{{ version }}"
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Expand Up @@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
77 changes: 43 additions & 34 deletions docs/source/conf.py
Expand Up @@ -20,7 +20,7 @@
import sys

# sys.path.insert(0, 'C:\\Users\\gisadmin\\Documents\\Dev\\Git\\Uni\\ORS\\infrastructure\\SDK\\openrouteservice-python-api\\openrouteservice')
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath("../.."))

# -- General configuration ------------------------------------------------

Expand All @@ -31,37 +31,33 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.coverage'
]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.todo", "sphinx.ext.coverage"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
templates_path = [".templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = u'openrouteservice-py'
copyright = u'2018, Nils Nolde'
author = u'Nils Nolde'
project = u"openrouteservice-py"
copyright = u"2018, Nils Nolde"
author = u"Nils Nolde"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'0.4'
version = u"0.4"
# The full version, including alpha/beta/rc tags.
release = u'0.4'
release = u"0.4"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -76,7 +72,7 @@
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
Expand All @@ -86,7 +82,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -97,43 +93,40 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['.static']
html_static_path = [".static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
'donate.html',
"**": [
"about.html",
"navigation.html",
"relations.html", # needs 'show_related': True theme option to display
"searchbox.html",
"donate.html",
]
}

# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'openrouteservice-pydoc'
htmlhelp_basename = "openrouteservice-pydoc"

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -143,17 +136,27 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'openrouteservice-py.tex', u'openrouteservice-py Documentation',
u'Nils Nolde', 'manual'),
(
master_doc,
"openrouteservice-py.tex",
u"openrouteservice-py Documentation",
u"Nils Nolde",
"manual",
),
]

# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'openrouteservice-py', u'openrouteservice-py Documentation',
[author], 1)
(
master_doc,
"openrouteservice-py",
u"openrouteservice-py Documentation",
[author],
1,
)
]

# -- Options for Texinfo output -------------------------------------------
Expand All @@ -162,7 +165,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'openrouteservice-py', u'openrouteservice-py Documentation',
author, 'openrouteservice-py', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"openrouteservice-py",
u"openrouteservice-py Documentation",
author,
"openrouteservice-py",
"One line description of project.",
"Miscellaneous",
),
]
4 changes: 2 additions & 2 deletions docs/source/index.rst
Expand Up @@ -17,6 +17,6 @@ Indices and tables

.. toctree::
:maxdepth: 4

readme_link
openrouteservice
openrouteservice
1 change: 0 additions & 1 deletion docs/source/modules.rst
Expand Up @@ -3,4 +3,3 @@ docs

.. toctree::
:maxdepth: 4

2 changes: 1 addition & 1 deletion docs/source/readme_link.rst
@@ -1 +1 @@
.. include:: ../../README.rst
.. include:: ../../README.rst
2 changes: 1 addition & 1 deletion environment.yml
Expand Up @@ -7,4 +7,4 @@ dependencies:
- python
- folium
- pip:
- openrouteservice
- openrouteservice

0 comments on commit 07c0624

Please sign in to comment.