Skip to content

Commit 5faaf47

Browse files
author
Patrick Vogel
committed
WIP
1 parent 1be863b commit 5faaf47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+57
-54
lines changed

.github/workflows/python-publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
- name: Build and publish
23+
env:
24+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
run: |
27+
python setup.py sdist bdist_wheel
28+
twine upload dist/*

.github/workflows/pythonapp.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ jobs:
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
pip install -r requirements.txt
22+
pip install -r requirements-dev.txt
2323
- name: Lint with flake8
2424
run: |
2525
pip install flake8
26-
# stop the build if there are Python syntax errors or undefined names
2726
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
28-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
29-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
27+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
3028
- name: Test with unittest
3129
run: |
32-
python setup.py test
30+
coverage run setup.py test
31+
coverage

.travis.yml

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

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
# ... and install more
55
pre-commit
66
requests
7+
codecov

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ def get_description():
2222
setuptools.setup(
2323
name="Flask-MonitoringDashboard",
2424
version=constants['version'],
25+
use_scm_version=True,
26+
setup_requires=['setuptools_scm'],
2527
packages=setuptools.find_packages(),
2628
include_package_data=True,
2729
platforms='Any',
2830
zip_safe=False,
29-
test_suite='flask_monitoringdashboard.test.get_test_suite',
31+
test_suite='tests.get_test_suite',
3032
url='https://github.com/flask-dashboard/Flask-MonitoringDashboard',
3133
author=constants['author'],
3234
author_email=constants['email'],

flask_monitoringdashboard/test/__init__.py renamed to tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ def get_test_suite():
1414
Finds all files that are located in a file named 'test_*.py', where * can be anything
1515
"""
1616
test_loader = unittest.TestLoader()
17-
test_suite = test_loader.discover('flask_monitoringdashboard.test', pattern='test_*.py')
17+
test_suite = test_loader.discover('tests', pattern='test_*.py')
1818
return test_suite

flask_monitoringdashboard/test/core/profiler/test_profiler.py renamed to tests/core/profiler/test_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
start_outlier_thread,
1010
)
1111
from flask_monitoringdashboard.database import Endpoint
12-
from flask_monitoringdashboard.test.utils import (
12+
from tests.utils import (
1313
NAME,
1414
set_test_environment,
1515
clear_db,

flask_monitoringdashboard/test/core/profiler/test_stacktrace_profiler.py renamed to tests/core/profiler/test_stacktrace_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from flask_monitoringdashboard.core.profiler import StacktraceProfiler
55
from flask_monitoringdashboard.database import Endpoint
6-
from flask_monitoringdashboard.test.utils import (
6+
from tests.utils import (
77
NAME,
88
set_test_environment,
99
clear_db,

flask_monitoringdashboard/test/core/test_auth.py renamed to tests/core/test_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from flask_monitoringdashboard.test.utils import get_test_app
3+
from tests.utils import get_test_app
44

55

66
class TestAuth(unittest.TestCase):

flask_monitoringdashboard/test/core/test_measurement.py renamed to tests/core/test_measurement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import unittest
22

33
from flask_monitoringdashboard.database import Endpoint
4-
from flask_monitoringdashboard.test.utils import (
4+
from tests.utils import (
55
set_test_environment,
66
clear_db,
77
add_fake_data,

flask_monitoringdashboard/test/core/test_rules.py renamed to tests/core/test_rules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import unittest
22

33
from flask_monitoringdashboard.core.rules import get_rules
4-
from flask_monitoringdashboard.test.utils import (
4+
from tests.utils import (
55
set_test_environment,
66
clear_db,
77
add_fake_data,
File renamed without changes.

flask_monitoringdashboard/test/db/test_count.py renamed to tests/db/test_count.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
count_outliers,
1515
count_profiled_requests,
1616
)
17-
from flask_monitoringdashboard.test.utils import (
17+
from tests.utils import (
1818
set_test_environment,
1919
clear_db,
2020
add_fake_data,

flask_monitoringdashboard/test/db/test_count_group.py renamed to tests/db/test_count_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
count_requests_group,
66
count_requests_per_day,
77
)
8-
from flask_monitoringdashboard.test.utils import (
8+
from tests.utils import (
99
set_test_environment,
1010
clear_db,
1111
add_fake_data,

flask_monitoringdashboard/test/db/test_data_grouped.py renamed to tests/db/test_data_grouped.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
get_endpoint_data_grouped,
66
get_version_data_grouped,
77
)
8-
from flask_monitoringdashboard.test.utils import (
8+
from tests.utils import (
99
set_test_environment,
1010
clear_db,
1111
add_fake_data,

flask_monitoringdashboard/test/db/test_endpoint.py renamed to tests/db/test_endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from flask_monitoringdashboard.core.timezone import to_utc_datetime
1010
from flask_monitoringdashboard.database import session_scope
11-
from flask_monitoringdashboard.test.utils import (
11+
from tests.utils import (
1212
set_test_environment,
1313
clear_db,
1414
add_fake_data,

flask_monitoringdashboard/test/db/test_outlier.py renamed to tests/db/test_outlier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from flask_monitoringdashboard.database import session_scope
1010
from flask_monitoringdashboard.database.outlier import add_outlier
11-
from flask_monitoringdashboard.test.utils import (
11+
from tests.utils import (
1212
set_test_environment,
1313
clear_db,
1414
add_fake_data,

flask_monitoringdashboard/test/db/test_requests.py renamed to tests/db/test_requests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from flask_monitoringdashboard.database.count import count_requests
1212
from flask_monitoringdashboard.database.endpoint import get_avg_duration
1313
from flask_monitoringdashboard.database.endpoint import get_endpoint_by_name
14-
from flask_monitoringdashboard.test.utils import (
14+
from tests.utils import (
1515
set_test_environment,
1616
clear_db,
1717
add_fake_data,

flask_monitoringdashboard/test/db/test_stackline.py renamed to tests/db/test_stackline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
)
88

99
from flask_monitoringdashboard.database import session_scope, StackLine
10-
from flask_monitoringdashboard.test.utils import (
10+
from tests.utils import (
1111
set_test_environment,
1212
clear_db,
1313
add_fake_data,

flask_monitoringdashboard/test/test_factory.py renamed to tests/test_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from flask_monitoringdashboard.test.utils import get_test_app
3+
from tests.utils import get_test_app
44

55

66
class TestFactory(unittest.TestCase):
File renamed without changes.

flask_monitoringdashboard/test/views/test_auth.py renamed to tests/views/test_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from flask_monitoringdashboard.test.utils import (
3+
from tests.utils import (
44
set_test_environment,
55
clear_db,
66
add_fake_data,

flask_monitoringdashboard/test/views/test_dashboard.py renamed to tests/views/test_dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from flask_monitoringdashboard.test.utils import (
3+
from tests.utils import (
44
set_test_environment,
55
clear_db,
66
add_fake_data,

flask_monitoringdashboard/test/views/test_details.py renamed to tests/views/test_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from flask_monitoringdashboard.test.utils import (
3+
from tests.utils import (
44
set_test_environment,
55
clear_db,
66
add_fake_data,

flask_monitoringdashboard/test/views/test_export_data.py renamed to tests/views/test_export_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from flask_monitoringdashboard.test.utils import (
3+
from tests.utils import (
44
set_test_environment,
55
clear_db,
66
add_fake_data,

flask_monitoringdashboard/test/views/test_setup.py renamed to tests/views/test_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from flask_monitoringdashboard.test.utils import (
3+
from tests.utils import (
44
set_test_environment,
55
clear_db,
66
add_fake_data,

flask_monitoringdashboard/test/views/test_status_code_tracking.py renamed to tests/views/test_status_code_tracking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from flask_monitoringdashboard.core.cache import EndpointInfo
66
from flask_monitoringdashboard.database import session_scope, Request
77

8-
from flask_monitoringdashboard.test.utils import (
8+
from tests.utils import (
99
set_test_environment,
1010
clear_db
1111
)

flask_monitoringdashboard/test/views/testmonitor/test_testmonitor.py renamed to tests/views/testmonitor/test_testmonitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from flask_monitoringdashboard.test.utils import (
3+
from tests.utils import (
44
set_test_environment,
55
clear_db,
66
add_fake_data,

0 commit comments

Comments
 (0)