From 57ac08a8e3eb393e0c4e020f7fa55a22a6a4d123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Wed, 21 Apr 2021 13:20:14 +0200 Subject: [PATCH 1/6] Update status page, newdata instead of daq --- smart_fact_crawler/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smart_fact_crawler/__init__.py b/smart_fact_crawler/__init__.py index a281740..c0cfe84 100644 --- a/smart_fact_crawler/__init__.py +++ b/smart_fact_crawler/__init__.py @@ -245,7 +245,7 @@ def status(url=None, timeout=None, fallback=False): storage_newdaq = Quantity(s2f(value), unit) value, unit = get(table, 32, 1, default='nan nan').split(' ')[:2] - storage_daq = Quantity(s2f(value), unit) + storage_newdata = Quantity(s2f(value), unit) return to_namedtuple('StatusPage', { 'timestamp': sft2dt(get(table, 0, 0)), @@ -280,7 +280,7 @@ def status(url=None, timeout=None, fallback=False): 'chat_server': get(table, 29, 1), 'skype_client': get(table, 30, 1), 'free_space_newdaq': storage_newdaq, - 'free_space_daq': storage_daq, + 'free_space_newdata': storage_newdata, 'smartfact_runtime': get(table, 33, 1), }) From d3a2a5c3ca21ad9ef49d5b6af43a0489255c1030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Wed, 21 Apr 2021 13:20:37 +0200 Subject: [PATCH 2/6] Bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e01ce2f..8cf6bbe 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='smart_fact_crawler', - version='0.6.4', + version='0.6.5', description='acquire data published on the smartfact web page', url='https://github.com/fact-project/smart_fact_crawler.git', author='Dominik Neise, Sebastian Mueller, Maximilian Nöthe', From c98be7dae6bbfe75290c9dd25286e0272d0a2021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Wed, 21 Apr 2021 13:28:24 +0200 Subject: [PATCH 3/6] Use extras for test deps, add pyproject.toml --- pyproject.toml | 3 +++ setup.py | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..121a39f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools >= 40.6.0", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 8cf6bbe..ccf17ec 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,11 @@ from setuptools import setup +extras_require = { + "tests": ['pytest>=3.0', 'freezegun'], +} +extras_require['all'] = extras_require['tests'] + + setup( name='smart_fact_crawler', @@ -21,7 +27,6 @@ install_requires=[ 'requests', ], - tests_require=['pytest>=3.0', 'freezegun'], - setup_requires=['pytest-runner'], + extras_require=extras_require, zip_safe=True, ) From cad1e93ac454670d758bf4ef46629d9fc1483cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Wed, 21 Apr 2021 13:34:21 +0200 Subject: [PATCH 4/6] Adapt travis config --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 180baad..fb2384a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ python: - '3.5' install: - pip install -r requirements.txt - - pip install . + - pip install '.[all]' - pip install pyflakes script: - pyflakes smart_fact_crawler - - python setup.py test + - pytest From 0a6f1eaa4f787ad7dfec6e9036a8080acd6fc422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Wed, 21 Apr 2021 13:36:21 +0200 Subject: [PATCH 5/6] Test on 3.7 and 3.8 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fb2384a..7883115 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: python python: - - '3.5' + - '3.7' + - '3.8' install: - pip install -r requirements.txt - pip install '.[all]' From 3afd5e1cfd2a966ae19de3917d5e7eb18ec75716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20N=C3=B6the?= Date: Wed, 21 Apr 2021 13:49:48 +0200 Subject: [PATCH 6/6] Make sure to include all resources in wheels and sdists --- MANIFEST.in | 1 + setup.py | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..8efdcbd --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +graft smart_fact_crawler/resources diff --git a/setup.py b/setup.py index ccf17ec..8d68ec8 100644 --- a/setup.py +++ b/setup.py @@ -18,15 +18,13 @@ packages=[ 'smart_fact_crawler', ], - package_data={ - 'smart_fact_crawler': [ - 'resources/20160703_233149/*.data', - 'resources/20160703_233149_broken_fsc/fsc.data', - ] - }, install_requires=[ 'requests', ], + include_package_data=True, + package_data={ + 'smart_fact_crawler': ['resources/*'], + }, extras_require=extras_require, - zip_safe=True, + zip_safe=False, )