-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 89f9484
Showing
44 changed files
with
34,961 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[run] | ||
omit = | ||
geolink2oereb/tests/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* text whitespace=trailing-space,tab-in-indent,cr-at-eol,tabwidth=4,blank-at-eof eol=lf | ||
.gitmodules text whitespace=indent-with-non-tab | ||
Makefile text whitespace=indent-with-non-tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: CI/CD | ||
|
||
on: push | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test Python | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: | ||
- '3.10' | ||
- '3.11' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run checks for Python ${{ matrix.python-version }} | ||
env: | ||
CI: true | ||
run: | | ||
python -V | ||
pip install -r requirements.txt | ||
git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '` | ||
flake8 | ||
py.test -vv --cov-config .coveragerc --cov geolink2oereb tests | ||
- name: Send coverage | ||
run: | | ||
bash <(curl -s https://codecov.io/bash) | ||
deploy-dev: | ||
name: Deploy to PyPI Test | ||
needs: | ||
- test | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
- name: Build packages | ||
run: | | ||
pip install wheel -r requirements.txt | ||
sed -i "s/\(version='[0-9]*\.[0-9]*\.[0-9]*\)\('\)/\1.dev$(date +%Y%m%d%H%M%S)\2/g" setup.py | ||
sed -i "s/5 - Production\/Stable/4 - Beta/g" setup.py | ||
python setup.py clean check sdist bdist_wheel | ||
- name: Upload to PyPI Test | ||
uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
deploy-tag: | ||
name: Deploy to PyPI | ||
needs: | ||
- test | ||
if: ${{ startsWith(github.ref, 'refs/tags') }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
- name: Build packages | ||
run: | | ||
pip install wheel -r requirements.txt | ||
python setup.py clean check sdist bdist_wheel | ||
- name: Upload to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
build-doc: | ||
name: Build docs for each version | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- name: Build docs | ||
run: | | ||
python -V | ||
pip install -r requirements.txt | ||
sphinx-build -b html doc/source/ doc/build/html/ | ||
touch doc/build/html/.nojekyll | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs | ||
path: doc/build/html/ | ||
retention-days: 1 | ||
|
||
deploy-doc: | ||
name: Deploy docs to GitHub Pages | ||
needs: | ||
- build-doc | ||
if: ${{ startsWith(github.ref, 'refs/tags') }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: docs | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: doc/build/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This workflow checks out code, performs a Codacy security scan | ||
# and integrates the results with the | ||
# GitHub Advanced Security code scanning feature. For more information on | ||
# the Codacy security scan action usage and parameters, see | ||
# https://github.com/codacy/codacy-analysis-cli-action. | ||
# For more information on Codacy Analysis CLI in general, see | ||
# https://github.com/codacy/codacy-analysis-cli. | ||
|
||
name: Codacy Security Scan | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
codacy-security-scan: | ||
name: Codacy Security Scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository to the GitHub Actions runner | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis | ||
- name: Run Codacy Analysis CLI | ||
uses: codacy/[email protected] | ||
with: | ||
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository | ||
# You can also omit the token and run the tools that support default configurations | ||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
verbose: true | ||
output: results.sarif | ||
format: sarif | ||
# Adjust severity of non-security issues | ||
gh-code-scanning-compat: true | ||
# Force 0 exit code to allow SARIF file generation | ||
# This will handover control about PR rejection to the GitHub side | ||
max-allowed-issues: 2147483647 | ||
|
||
# Upload the SARIF file generated in the previous step | ||
- name: Upload SARIF results file | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/.idea/ | ||
/.venv/ | ||
/.coverage | ||
/.coverage.* | ||
/.cache/ | ||
/.tox/ | ||
/.pytest_cache/ | ||
/build/ | ||
/dist/ | ||
/doc/build/ | ||
/geolink2oereb.egg-info/ | ||
__pycache__ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
|
||
## 1.0.0 | ||
|
||
Supported GEO-Link API version: 20170214 (v1.0.0) | ||
|
||
- Initial version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
BSD 2-Clause License | ||
|
||
Copyright (c) 2023, RUDERT-GEOINFORMATIK | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include README.rst | ||
include CHANGELOG | ||
include setup.cfg | ||
recursive-exclude tests *.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.venv/venv.timestamp: | ||
python3 -m venv .venv | ||
.venv/bin/pip install wheel | ||
touch $@ | ||
|
||
|
||
.venv/requirements.timestamp: .venv/venv.timestamp setup.py requirements.txt | ||
.venv/bin/pip install --upgrade -r requirements.txt | ||
touch $@ | ||
|
||
|
||
.PHONY: git-attributes | ||
git-attributes: | ||
git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '` | ||
|
||
|
||
.PHONY: lint | ||
lint: .venv/requirements.timestamp | ||
.venv/bin/flake8 | ||
|
||
|
||
.PHONY: test | ||
test: .venv/requirements.timestamp | ||
.venv/bin/py.test -vv --cov=geolink2oereb --cov-report term-missing:skip-covered tests | ||
|
||
|
||
.PHONY: check | ||
check: git-attributes lint test | ||
|
||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf .venv | ||
|
||
|
||
.PHONY: build | ||
build: .venv/requirements.timestamp | ||
.venv/bin/python setup.py clean sdist bdist_wheel | ||
|
||
|
||
.PHONY: deploy | ||
deploy: .venv/requirements.timestamp | ||
.venv/bin/python setup.py clean sdist bdist_wheel upload | ||
|
||
|
||
.PHONY: doc | ||
doc: .venv/requirements.timestamp | ||
.venv/bin/sphinx-build -b html doc/source/ doc/build/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
OEREBlex geoLink Formatter | ||
========================== | ||
|
||
|license| |python version| |format| |status| |build status| |coverage report| |dependencies| |code quality| | ||
|
||
This is a small library, meant to be used in combination with OEREBlex. It is capable of parsing a received | ||
geoLink response (XML) and converting it to multiple formats, such as HTML, which can be styled for | ||
presentation. | ||
|
||
For detailed information, please refer to the online documentation: | ||
|
||
https://openoereb.github.io/geolink2oereb/ | ||
|
||
.. |license| image:: https://img.shields.io/pypi/l/geolink2oereb.svg | ||
:target: https://pypi.org/project/geolink2oereb/ | ||
.. |python version| image:: https://img.shields.io/pypi/pyversions/geolink2oereb.svg | ||
:target: https://pypi.org/project/geolink2oereb/ | ||
.. |format| image:: https://img.shields.io/pypi/format/geolink2oereb.svg | ||
:target: https://pypi.org/project/geolink2oereb/ | ||
.. |status| image:: https://img.shields.io/pypi/status/geolink2oereb.svg | ||
:target: https://pypi.org/project/geolink2oereb/ | ||
.. |build status| image:: https://travis-ci.org/openoereb/geolink2oereb.svg?branch=master | ||
:target: https://travis-ci.org/openoereb/geolink2oereb | ||
.. |coverage report| image:: https://codecov.io/gh/openoereb/geolink2oereb/branch/master/graph/badge.svg | ||
:target: https://codecov.io/gh/openoereb/geolink2oereb | ||
.. |dependencies| image:: https://img.shields.io/librariesio/github/openoereb/geolink2oereb.svg | ||
:target: https://libraries.io/github/openoereb/geolink2oereb | ||
.. |code quality| image:: https://api.codacy.com/project/badge/Grade/d2bb03f17bf3438cb295c0b5ea131ac8 | ||
:target: https://www.codacy.com/app/openoereb/geolink2oereb?utm_source=github.com&utm_medium=referral&utm_content=openoereb/geolink2oereb&utm_campaign=Badge_Grade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
comment: | ||
layout: "diff" | ||
behavior: default |
Oops, something went wrong.