Skip to content

Commit b6be670

Browse files
committed
Small updates (#22)
* Applied source layout * Added lint configuration * Fixed IDEA pylint configuration * Adjusted path * Adjusted path for pytest * Upgraded dependencies
1 parent 8bae94a commit b6be670

File tree

4 files changed

+68
-65
lines changed

4 files changed

+68
-65
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: Build
99
env:
1010
MAJOR: 0
1111
MINOR: 0
12-
PYTHON_VERSION: 3.11.0
12+
PYTHON_VERSION: 3.10.1
1313

1414
#
1515
# Establish when the workflow is run
@@ -44,7 +44,7 @@ jobs:
4444
- name: Calculate Build Context
4545
run: |
4646
MRMAT_VERSION="${MAJOR}.${MINOR}.${GITHUB_RUN_NUMBER}"
47-
if [ "$GITHUB_EVENT_NAME" == 'pull_request_target' -a "$GITHUB_BASE_REF" == 'main' ]; then
47+
if [ "$GITHUB_EVENT_NAME" == 'pull_request_target' && GITHUB_BASE_REF == 'main']; then
4848
MRMAT_IS_RELEASE=true
4949
echo "::warning ::Building release ${MRMAT_VERSION}"
5050
echo "MRMAT_IS_RELEASE=true" >> $GITHUB_ENV
@@ -69,10 +69,12 @@ jobs:
6969

7070
- name: Build
7171
run: |
72+
export PYTHONUSERBASE=${HOME}/.local
73+
pip install --user wheel
7274
pip install --user -r requirements.txt
73-
pylint ${GITHUB_WORKSPACE}/src/python/mrmat_python_api_flask
74-
PYTHONPATH=${GITHUB_WORKSPACE}/src/python python -m pytest
75-
python -m build --wheel -n
75+
${PYTHONUSERBASE}/bin/pylint ${GITHUB_WORKSPACE}/src/python/mrmat_python_api_flask
76+
PYTHONPATH=${GITHUB_WORKSPACE}/src/python python -m pytest --cov=mrmat_python_api_flask
77+
PYTHONPATH=${GITHUB_WORKSPACE} python -m build --wheel -n
7678
7779
- name: Upload test results
7880
uses: actions/upload-artifact@v2

mrmat_python_api_flask/apis/healthz/model.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

requirements.txt

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,24 @@
55

66
# Build/Test requirements
77

8-
setuptools>=42.0.0
9-
build>=0.9.0 # MIT
10-
wheel>=0.36.0 # MIT
11-
pylint~=2.15.5 # MIT
12-
pytest~=7.2.0 # GPL-2.0-or-later
13-
pytest-cov~=4.0.0 # MIT
14-
pyjwt~=2.6.0 # MIT
15-
python-keycloak~=2.6.0 # MIT
8+
build~=0.8.0 # MIT
9+
wheel~=0.37.1 # MIT
10+
pylint~=2.14.5 # GPL-2.0-or-later
11+
pytest~=7.1.2 # MIT
12+
pytest-cov~=3.0.0 # MIT
13+
pyjwt~=2.4.0 # MIT
14+
python-keycloak~=2.1.1 # MIT
1615

1716
# Runtime requirements
1817

19-
rich~=12.6.0 # MIT
20-
Flask~=2.2.2 # BSD 3-Clause
21-
Flask-SQLAlchemy~=3.0.2 # BSD 3-Clause
22-
Flask-Migrate~=4.0.0 # MIT
23-
flask-smorest~=0.40.0 # MIT
18+
rich~=12.5.1 # MIT
19+
Flask~=2.1.3 # BSD 3-Clause
20+
Flask-SQLAlchemy~=2.5.1 # BSD 3-Clause
21+
Flask-Migrate~=3.1.0 # MIT
22+
flask-smorest~=0.38.1 # MIT
2423
Flask-Marshmallow~=0.14.0 # MIT
25-
marshmallow-sqlalchemy~=0.28.1 # MIT
26-
psycopg2-binary~=2.9.5 # LGPL with exceptions
24+
marshmallow-sqlalchemy~=0.27.0 # MIT
25+
psycopg2-binary~=2.9.3 # LGPL with exceptions
2726
Flask-OIDC~=1.4.0 # MIT
28-
29-
# Do we need these?
30-
#requests_oauthlib~=1.3.1 # ISC
27+
requests_oauthlib~=1.3.1 # ISC
3128
itsdangerous<=2.0.1 # BSD 3-Clause Must affix so JSONWebSignatureSerializer is known

setup.cfg

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[metadata]
2+
name = mrmat-python-api-flask
3+
version = attr: ci.version
4+
author = Mathieu Imfeld
5+
author_email = [email protected]
6+
maintainer = Mathieu Imfeld
7+
maintainer_email = [email protected]
8+
long_description = file: README.md
9+
license = MIT
10+
url = https://github.com/MrMatOrg/mrmat-python-api-flask
11+
classifiers =
12+
Development Status :: 3 - Alpha
13+
License :: OSI Approved :: MIT
14+
Programming Language :: Python :: 3.9
15+
16+
[options]
17+
package_dir =
18+
=src/python
19+
packages = find:
20+
include_package_data = True
21+
install_requires =
22+
rich~=11.2.0
23+
Flask~=2.0.3
24+
Flask-SQLAlchemy~=2.5.1
25+
Flask-Migrate~=3.1.0
26+
flask-smorest~=0.37.0
27+
Flask-Marshmallow~=0.14.0
28+
marshmallow-sqlalchemy~=0.27.0
29+
psycopg2-binary~=2.9.3
30+
Flask-OIDC~=1.4.0
31+
requests_oauthlib~=1.3.1
32+
itsdangerous<=2.0.1
33+
34+
[options.entry_points]
35+
console_scripts =
36+
mrmat-python-api-flask = mrmat_python_api_flask.cui:main
37+
mrmat-python-api-flask-client = mrmat_python_api_flask.client:main
38+
39+
[options.packages.find]
40+
where=src/python
41+
exclude =
42+
ci
43+
44+
[options.package_data]
45+
mrmat_python_api_flask.migrations =
46+
*

0 commit comments

Comments
 (0)