Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
export PYTHONUSERBASE=${HOME}/.local
pip install --user wheel
pip install --user -r requirements.txt
${PYTHONUSERBASE}/bin/pylint ${GITHUB_WORKSPACE}/mrmat_python_api_flask
PYTHONPATH=${GITHUB_WORKSPACE} python -m pytest --cov=mrmat_python_api_flask
${PYTHONUSERBASE}/bin/pylint ${GITHUB_WORKSPACE}/src/python/mrmat_python_api_flask
PYTHONPATH=${GITHUB_WORKSPACE}/src/python python -m pytest --cov=mrmat_python_api_flask
PYTHONPATH=${GITHUB_WORKSPACE} python -m build --wheel -n

- name: Upload test results
Expand Down
2 changes: 1 addition & 1 deletion .idea/mrmat-python-api-flask.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/pylint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 0 additions & 30 deletions .idea/runConfigurations/docker__nostromo_.xml

This file was deleted.

24 changes: 24 additions & 0 deletions .idea/runConfigurations/lint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ You have the choice of running this
You can, of course, run this as a Flask app straight from the project directory:

```shell
$ export FLASK_APP=mrmat_python_api_flask
$ flask run
$ cd src/python
$ FLASK_APP=mrmat_python_api_flask flask run
* Serving Flask app 'mrmat_python_api_flask' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Expand Down
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@

# Build/Test requirements

build~=0.7.0 # MIT
build~=0.8.0 # MIT
wheel~=0.37.1 # MIT
pylint~=2.12.2 # GPL-2.0-or-later
pytest~=7.0.1 # MIT
pylint~=2.14.5 # GPL-2.0-or-later
pytest~=7.1.2 # MIT
pytest-cov~=3.0.0 # MIT
pyjwt~=2.3.0 # MIT
python-keycloak~=0.27.0 # MIT
pyjwt~=2.4.0 # MIT
python-keycloak~=2.1.1 # MIT

# Runtime requirements

rich~=11.2.0 # MIT
Flask~=2.0.3 # BSD 3-Clause
rich~=12.5.1 # MIT
Flask~=2.1.3 # BSD 3-Clause
Flask-SQLAlchemy~=2.5.1 # BSD 3-Clause
Flask-Migrate~=3.1.0 # MIT
flask-smorest~=0.37.0 # MIT
flask-smorest~=0.38.1 # MIT
Flask-Marshmallow~=0.14.0 # MIT
marshmallow-sqlalchemy~=0.27.0 # MIT
psycopg2-binary~=2.9.3 # LGPL with exceptions
Expand Down
8 changes: 8 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ classifiers =
Programming Language :: Python :: 3.9

[options]
package_dir =
=src/python
packages = find:
include_package_data = True
install_requires =
rich~=11.2.0
Flask~=2.0.3
Expand All @@ -34,5 +37,10 @@ console_scripts =
mrmat-python-api-flask-client = mrmat_python_api_flask.client:main

[options.packages.find]
where=src/python
exclude =
ci

[options.package_data]
mrmat_python_api_flask.migrations =
*
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ def format(self, record):
try:
__version__ = importlib.metadata.version('mrmat-python-api-flask')
except importlib.metadata.PackageNotFoundError:
# You have not actually installed the wheel yet. We may be within CI so pick that version or fall back
__version__ = os.environ.get('MRMAT_VERSION', '0.0.0.dev0')
# You have not yet installed this as a package, likely because you're hacking on it in some IDE
__version__ = '0.0.0.dev0'

#
# Initialise supporting services
# Initialize supporting services

db = SQLAlchemy()
ma = Marshmallow()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ def app(self):
'SECRET_KEY': secrets.token_hex(16)
})
with self._app.app_context():
upgrade(directory=os.path.join(os.path.dirname(__file__), '..', 'migrations'))
upgrade(directory=os.path.join(os.path.dirname(__file__),
'..',
'src',
'python',
'mrmat_python_api_flask',
'migrations'))
db.create_all()
yield self._app

Expand Down