-
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.
Merge pull request #307 from OnroerendErfgoed/feature/306_ghactions_b…
…ackend_upgrade Feature/306 ghactions backend upgrade
- Loading branch information
Showing
23 changed files
with
753 additions
and
340 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,17 @@ | ||
[flake8] | ||
application_import_names = pyoes, tests | ||
exclude = | ||
.venv, | ||
venv, | ||
__pycache__, | ||
npm-packages, | ||
node_modules, | ||
static, | ||
docs, | ||
alembic, | ||
dist, | ||
import-order-style = pycharm | ||
max-line-length = 90 | ||
extend-select = B950 | ||
ignore = W503, E203, E402, E266, E203, E501, E701 | ||
per-file-ignores = |
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 @@ | ||
feature: ['feature/*', 'feat/*'] | ||
fix: ['bugfix/*', 'fix/*'] | ||
test: test/* |
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,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 |
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,49 @@ | ||
name: pyoes | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
PYTHON_VERSION: "3.11" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Install dependencies | ||
env: | ||
HATCH_BUILD_NO_HOOKS: true | ||
run: | | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
pip install pip-tools | ||
pip-sync requirements-ci.txt | ||
pip install -e . | ||
- name: Run checks and tests | ||
working-directory: ./ | ||
run: | | ||
./check_versions.sh | ||
source venv/bin/activate | ||
py.test --cov pyoes --cov-report term-missing | ||
- name: Upload coverage to Coveralls | ||
working-directory: ./ | ||
run: | | ||
source venv/bin/activate | ||
coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |
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 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.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.3.0 | ||
hooks: | ||
- id: black | ||
types: [python] | ||
args: [--preview] | ||
exclude: docs, tests | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-import-order==0.18.2 | ||
- flake8-bugbear==24.2.6 | ||
types: [python] | ||
exclude: docs |
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
pyoes: Pyramid OE style | ||
======================= | ||
|
||
.. image:: https://travis-ci.org/OnroerendErfgoed/pyoes.png | ||
:target: https://travis-ci.org/OnroerendErfgoed/pyoes | ||
.. image:: https://coveralls.io/repos/OnroerendErfgoed/pyoes/badge.png?branch=master | ||
:target: https://coveralls.io/r/OnroerendErfgoed/pyoes | ||
|
||
.. image:: https://readthedocs.org/projects/pyoes/badge/?version=latest | ||
:target: https://readthedocs.org/projects/pyoes/?badge=latest | ||
:alt: Documentation Status | ||
.. image:: https://badge.fury.io/py/pyoes.png | ||
:target: http://badge.fury.io/py/pyoes | ||
|
||
Pyoes helps to share layout between different websites and applications of | ||
Onroerend Erfgoed (Flanders Heritage). | ||
|
||
More information about this library can be found in the docs `folder`. These can | ||
be build using `Sphinx <http://sphinx-doc.org>`_. | ||
|
||
.. code-block:: bash | ||
|
||
# activate your virtual env | ||
$ pip install -r requirements-dev.txt | ||
$ cd docs | ||
$ make html | ||
# You can also build a pdf, provided you have the correct latex toolchain installed. | ||
$ make latexpdf |
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
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
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 |
---|---|---|
@@ -1,18 +1,21 @@ | ||
from pyramid.scaffolds import PyramidTemplate | ||
|
||
|
||
class PyoesTemplate(PyramidTemplate): | ||
_template_dir = 'pyoes_scaffold' | ||
summary = 'Een scaffold om een pyramid project uit te breiden met OE stijl\ | ||
bestanden op basis van sass en compass.' | ||
_template_dir = "pyoes_scaffold" | ||
summary = "Een scaffold om een pyramid project uit te breiden met OE stijl\ | ||
bestanden op basis van sass en compass." | ||
|
||
|
||
class PyoesAdminTemplate(PyramidTemplate): | ||
_template_dir = 'pyoes_admin_scaffold' | ||
summary = 'Een scaffold om een de admin interface van een pyramid project uit te breiden met OE stijl\ | ||
bestanden op basis van sass en compass.' | ||
_template_dir = "pyoes_admin_scaffold" | ||
summary = "Een scaffold om een de admin interface van een\ | ||
pyramid project uit te breiden met OE stijl\ | ||
bestanden op basis van sass en compass." | ||
|
||
|
||
class PyoesProcesTemplate(PyramidTemplate): | ||
_template_dir = 'pyoes_proces_scaffold' | ||
summary = 'Een scaffold om een de proces interface van een pyramid project uit te breiden met OE stijl\ | ||
bestanden op basis van sass en compass.' | ||
_template_dir = "pyoes_proces_scaffold" | ||
summary = "Een scaffold om een de proces interface van een pyramid\ | ||
project uit te breiden met OE stijl\ | ||
bestanden op basis van sass en compass." |
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 |
---|---|---|
@@ -1 +1 @@ | ||
#package | ||
# package |
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 |
---|---|---|
@@ -1,33 +1,30 @@ | ||
from pyramid.view import ( | ||
view_config | ||
) | ||
|
||
import os | ||
|
||
from pyramid.response import ( | ||
FileResponse | ||
) | ||
from pyramid.response import FileResponse | ||
from pyramid.view import view_config | ||
|
||
|
||
class StaticView(object): | ||
''' | ||
""" | ||
Views voor aan de root gebonden static files. | ||
''' | ||
""" | ||
|
||
def __init__(self, request): | ||
self.request = request | ||
self.here = os.path.dirname(__file__) | ||
|
||
@view_config(name='favicon.ico') | ||
@view_config(name="favicon.ico") | ||
def faviconico(self): | ||
''' | ||
""" | ||
View om een statische favicon.ico te kunnen serveren | ||
''' | ||
icon = os.path.join(self.here, 'static', 'favicon.ico') | ||
""" | ||
icon = os.path.join(self.here, "static", "favicon.ico") | ||
return FileResponse(icon, request=self.request) | ||
|
||
@view_config(name='robots.txt') | ||
@view_config(name="robots.txt") | ||
def robotstxt(self): | ||
''' | ||
""" | ||
View om een statische robots.txt te kunnen serveren | ||
''' | ||
icon = os.path.join(self.here, 'static', 'robots.txt') | ||
""" | ||
icon = os.path.join(self.here, "static", "robots.txt") | ||
return FileResponse(icon, request=self.request) |
Oops, something went wrong.