-
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.
* #107 upgrade * #107 upgrade * # 107 review fix --------- Co-authored-by: Tim Van Campenhout <[email protected]>
- Loading branch information
Showing
25 changed files
with
884 additions
and
564 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,7 @@ | ||
[flake8] | ||
application_import_names = pyramid_urireferencer, tests | ||
exclude = .venv, | ||
__pycache__, | ||
import-order-style = pycharm | ||
max-line-length = 90 | ||
ignore = E402, E405, W503, F403, F405 |
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,42 @@ | ||
name: Urireferencer backend tests | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
pull_request: | ||
paths: | ||
- pyramid_urireferencer/** | ||
- .github/workflows/pyramid_urireferencer.yaml | ||
- scripts/** | ||
- pyproject.toml | ||
- requirements*.txt | ||
- tests/** | ||
|
||
push: | ||
branches: | ||
- main | ||
env: | ||
PYTHON_VERSION: '3.11' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_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 |
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,54 @@ | ||
0.7.0 (29-01-2019) | ||
================== | ||
|
||
- Better matching on Accept headers (\#18) | ||
- Nieuwe protected decorator toevoegen die de request niet uit de | ||
parent haalt maar rechtstreeks (\#50) | ||
|
||
0.6.0 (2017-06-08) | ||
================== | ||
|
||
- Add some extra logging. (\#13) | ||
- Add required function [get\_uri]{.title-ref} to the | ||
[AbstractReferencer]{.title-ref} to determine the uri of the current | ||
request (\#7 and \#8) | ||
|
||
0.5.0 (2016-09-28) | ||
================== | ||
|
||
- Add support for python 3.5 | ||
- Some minor doc fixes | ||
- Changed an edge case where [items]{.title-ref} or | ||
[applications]{.title-ref} response attributes could be | ||
[None]{.title-ref} so that they are now always empty lists. (\#6) | ||
- Updated error message and added JSON error message when a backend | ||
application can\'t be reached (\#9) and when a resource can\'t be | ||
deleted (\#10) | ||
|
||
0.4.0 (2015-07-10) | ||
================== | ||
|
||
- Added module [protected\_resources]{.title-ref} containing a | ||
[protected\_operation]{.title-ref} decorator function. | ||
|
||
0.3.0 (2015-06-25) | ||
================== | ||
|
||
- Added uri and request to references parameters | ||
- Included renderer in request config | ||
- Removed exception in get\_references view | ||
- Fixed ApplicationResponse title from json | ||
|
||
0.2.0 (2015-06-07) | ||
================== | ||
|
||
- Changed ApplicationResponse.url to service\_url. | ||
- Cleaned up some documentation. | ||
- Added an AbstractReferencer that has no implementation whatsoever. | ||
- Added Python Wheel support | ||
- Make sure that the uri parameter is properly urlencoded. | ||
|
||
0.1.0 (2015-05-21) | ||
================== | ||
|
||
- Initial version |
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
pyramid\_urireferencer | ||
====================== | ||
|
||
This plugin for pyramid helps in handling references to resources in | ||
other applications by allowing querying on references to certain URI\'s. | ||
|
||
[![image](https://travis-ci.org/OnroerendErfgoed/pyramid_urireferencer.png?branch=master)](https://travis-ci.org/OnroerendErfgoed/pyramid_urireferencer) | ||
|
||
[![image](https://coveralls.io/repos/OnroerendErfgoed/pyramid_urireferencer/badge.png?branch=master)](https://coveralls.io/r/OnroerendErfgoed/pyramid_urireferencer) | ||
|
||
[![image](https://badge.fury.io/py/pyramid_urireferencer.png)](http://badge.fury.io/py/pyramid_urireferencer) | ||
|
||
Please consult the documentatation for | ||
[UriRegistry](http://uriregistry.readthedocs.org/en/latest/) for more | ||
information on how to use this library. |
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,67 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
version = "0.8.0" | ||
name = "pyramid_urireferencer" | ||
dynamic = ["readme"] | ||
authors = [ | ||
{ name = "Flanders Heritage Agency", email = "[email protected]" }, | ||
] | ||
description = "A pyramid plugin to handle referencing external URIs." | ||
requires-python = ">=3.10,<3.13" | ||
keywords = ["web", "wsgi", "pyramid", "SKOS", "thesaurus", "vocabulary"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Programming Language :: Python", | ||
"Framework :: Pyramid", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
dependencies = [ | ||
"pyramid==2.0.2", | ||
"requests==2.32.3", | ||
"six==1.16.0" | ||
] | ||
|
||
[project.urls] | ||
History = "https://github.com/OnroerendErfgoed/pyramid_urireferencer/blob/master/CHANGES.md" | ||
Tracker = "https://github.com/OnroerendErfgoed/pyramid_urireferencer/issues" | ||
Source = "https://github.com/OnroerendErfgoed/pyramid_urireferencer" | ||
Documentation = "https://pyramid_urireferencer.readthedocs.io/en/latest/" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black==24.4.2", | ||
"coveralls==4.0.1", | ||
"flake8-import-order==0.18.2", | ||
"flake8==7.1.0", | ||
"httpretty==1.1.4", | ||
"mock==5.1.0", | ||
"pre-commit==3.7.1", | ||
"pytest-cov==5.0.0", | ||
"pytest==8.2.2", | ||
"uv==0.2.13", | ||
"webtest==3.0.0" | ||
] | ||
|
||
[project.entry-points."paste.app_factory"] | ||
main = "pyramid_urireferencer:main" | ||
|
||
## | ||
# Build tool specific | ||
## | ||
[tool.hatch.build.targets.wheel] | ||
# In the wheel we want to have pyramid_urireferencer in the root as python module. | ||
only-include = [ | ||
"/pyramid_urireferencer", | ||
] | ||
|
||
[tool.hatch.metadata] | ||
# This allows us to use github links as dependencies | ||
allow-direct-references = true | ||
|
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
Oops, something went wrong.