Skip to content

Commit b8b5ba4

Browse files
committed
Replaced cli_ui/halo with rich and removed flake8
1 parent d6241cd commit b8b5ba4

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

.flake8

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

.github/workflows/build.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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' ]; 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
@@ -65,19 +65,12 @@ jobs:
6565
path: ~/.local
6666
key: ${{ runner.os }}
6767

68-
- name: Install dependencies
68+
- name: Build
6969
run: |
70-
python -m pip install --upgrade pip
71-
pip install --user wheel
7270
pip install --user -r requirements.txt
73-
pip install --user -r test-requirements.txt
74-
75-
- name: Test
76-
run: |
77-
flake8 --statistics
78-
pylint mrmat_python_api_flask
79-
python ./setup.py install
80-
python -m pytest
71+
pylint ${GITHUB_WORKSPACE}/mrmat_python_api_flask
72+
PYTHONPATH=${GITHUB_WORKSPACE} python -m pytest --cov=mrmat_python_api_flask
73+
PYTHONPATH=${GITHUB_WORKSPACE} python -m build --wheel -n
8174
8275
- name: Upload test results
8376
uses: actions/upload-artifact@v2
@@ -90,7 +83,7 @@ jobs:
9083
9184
- name: Conditional Release
9285
uses: marvinpinto/action-automatic-releases@latest
93-
if: github.event.pull_request.merged == true
86+
if: (github.event.pull_request.merged == true && github.base_ref == 'main')
9487
with:
9588
repo_token: "${{ secrets.GITHUB_TOKEN }}"
9689
automatic_release_tag: "${{ env.MRMAT_VERSION }}"
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,22 @@
33
# quickly install both build- and test-requirements from within your development environment. DO MAKE
44
# SURE to update setup.cfg whenever you make changes here.
55

6+
# Runtime requirements
7+
8+
rich~=10.14.0 # MIT
69
flask~=2.0.2 # BSD 3-Clause
710
Flask-SQLAlchemy~=2.5.1 # BSD 3-Clause
811
Flask-Migrate~=3.1.0 # MIT
912
Flask-Marshmallow~=0.14.0 # MIT
1013
marshmallow-sqlalchemy~=0.26.0 # MIT
11-
1214
psycopg2~=2.9.1 # LGPL with exceptions
13-
1415
Flask-OIDC~=1.4.0 # MIT
1516
requests_oauthlib~=1.3.0 # ISC
1617

17-
cli-ui~=0.15.2 # BSD 3-Clause
18-
halo~=0.0.31 # MIT
18+
# Build/Test requirements
1919

2020
build~=0.7.0 # MIT
2121
pylint~=2.11.1 # GPL-2.0-or-later
22-
flake8~=4.0.1 # MIT
2322
pytest~=6.2.5 # MIT
2423
pytest-cov~=3.0.0 # MIT
2524
pyjwt==2.3.0 # MIT

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ install_requires =
2424
psycopg2-binary
2525
Flask-OIDC~=1.4.0
2626
requests_oauthlib~=1.3.0
27-
cli_ui~=0.15.2
28-
halo~=0.0.31
27+
rich~=10.14.0
2928

3029
[options.entry_points]
3130
console_scripts =

0 commit comments

Comments
 (0)