Skip to content

Commit

Permalink
Feature/28 gh actions (#29)
Browse files Browse the repository at this point in the history
* #28 update backend

* #28 update backend

---------

Co-authored-by: Tim Van Campenhout <[email protected]>
  • Loading branch information
vancamti and Tim Van Campenhout authored Oct 21, 2024
1 parent d29c67d commit fad37b2
Show file tree
Hide file tree
Showing 15 changed files with 601 additions and 427 deletions.
3 changes: 3 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
feature: ['feature/*', 'feat/*']
fix: ['bugfix/*', 'fix/*']
test: test/*
38 changes: 38 additions & 0 deletions .github/workflows/housenum_parser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: housenumparser backend tests
on:
push:
paths:
- housenumparser/**
- tests/**
- housenumparser.yaml
- pyproject.toml
- requirements*.txt
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Install python requirements
env:
HATCH_BUILD_NO_HOOKS: true
working-directory: ./
run: |
pip --version
pip install pip-tools
pip-sync requirements-dev.txt
pip install -e .
- name: Python tests
run: pytest tests --exitfirst --capture=no -vvv --full-trace
22 changes: 22 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Labeler
on:
pull_request:
types: [opened]
branches:
- "develop"
- "epic"

permissions:
contents: read

jobs:
pr-labeler:
permissions:
contents: read # for TimonVS/pr-labeler-action to read config file
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
runs-on: ubuntu-latest
steps:
- uses: TimonVS/pr-labeler-action@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/pr-labeler.yml
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
types: [python]
- id: trailing-whitespace
types: [python]
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
types: [python]
args: [--preview]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [
'flake8-import-order==0.18.2'
]
types: [python]
args: [--max-line-length=90]
exclude: .venv|./venv|__pycache__

19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

23 changes: 10 additions & 13 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,25 @@

# -- Project information -----------------------------------------------------

project = 'housenum-be-r-parser'
copyright = '2019 Onroerend Erfgoed' # noqa: A001 shadowed builtin
author = 'Onroerend Erfgoed'
project = "housenum-be-r-parser"
copyright = "2019 Onroerend Erfgoed" # noqa: A001 shadowed builtin
author = "Onroerend Erfgoed"

# The full version, including alpha/beta/rc tags
release = '0.1.0'
release = "0.1.0"


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

# 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.intersphinx'
]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx"]

nitpicky = True

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

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -52,7 +49,7 @@
# a list of builtin themes.
#

html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"
# the oe theme doesn't look good for API documentation imo.
# import oe_sphinx_theme
# html_theme_path = [oe_sphinx_theme.get_theme_dir()]
Expand All @@ -63,12 +60,12 @@
html_static_path = []

# -- intersphinx
intersphinx_mapping = {'py': ('https://docs.python.org/3.6', None)}
intersphinx_mapping = {"py": ("https://docs.python.org/3.6", None)}

# -- autodoc
autoclass_content = 'both' # This adds __init__ documentation.
autoclass_content = "both" # This adds __init__ documentation.

# -- rtd theme
html_theme_options = {
'navigation_depth': 6,
"navigation_depth": 6,
}
Loading

0 comments on commit fad37b2

Please sign in to comment.