From 05dd7ef0a7ca0a06a1e12823b80ce0bd47e26500 Mon Sep 17 00:00:00 2001 From: YooSunyoung Date: Fri, 5 Apr 2024 14:15:11 +0200 Subject: [PATCH 1/5] Add configuration parsing methods and tests, and update configuration template. --- tests/test_scicat_configuration.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_scicat_configuration.py b/tests/test_scicat_configuration.py index 193ac8e..85dbd5b 100644 --- a/tests/test_scicat_configuration.py +++ b/tests/test_scicat_configuration.py @@ -49,6 +49,7 @@ def test_build_scicat_config_default(main_arg_parser: argparse.ArgumentParser) - scicat_namespace = main_arg_parser.parse_args() scicat_config = build_scicat_config(scicat_namespace) + assert scicat_config.original_dict['options']['config_file'] == 'config.json' assert scicat_config.run_options.config_file == 'config.20240405.json' From 61b0cbe02d6e9f498eabd67f0860553d6be56a81 Mon Sep 17 00:00:00 2001 From: YooSunyoung Date: Fri, 5 Apr 2024 14:28:02 +0200 Subject: [PATCH 2/5] Fix broken test. --- tests/test_scicat_configuration.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_scicat_configuration.py b/tests/test_scicat_configuration.py index 85dbd5b..193ac8e 100644 --- a/tests/test_scicat_configuration.py +++ b/tests/test_scicat_configuration.py @@ -49,7 +49,6 @@ def test_build_scicat_config_default(main_arg_parser: argparse.ArgumentParser) - scicat_namespace = main_arg_parser.parse_args() scicat_config = build_scicat_config(scicat_namespace) - assert scicat_config.original_dict['options']['config_file'] == 'config.json' assert scicat_config.run_options.config_file == 'config.20240405.json' From 6492e7dd59be4f33209cc41badff827791288466 Mon Sep 17 00:00:00 2001 From: YooSunyoung Date: Fri, 5 Apr 2024 14:33:07 +0200 Subject: [PATCH 3/5] Add minimal test of the script. --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f56a06..4586104 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,3 +59,4 @@ jobs: with: name: CoverageReport path: coverage_html/ + - run: scicat_ingestor --help # Minimal test of the script From f9b14be822d394911c0a1cdf34636cda2dca4d47 Mon Sep 17 00:00:00 2001 From: YooSunyoung Date: Fri, 5 Apr 2024 14:35:33 +0200 Subject: [PATCH 4/5] Move script test to tox. --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4586104..5f56a06 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,4 +59,3 @@ jobs: with: name: CoverageReport path: coverage_html/ - - run: scicat_ingestor --help # Minimal test of the script From 02c4ec1e4fbd7b70e63828f9ad0cf893e10e43b9 Mon Sep 17 00:00:00 2001 From: YooSunyoung Date: Fri, 5 Apr 2024 15:34:41 +0200 Subject: [PATCH 5/5] Update dependencies for logging. --- .gitignore | 3 +++ pyproject.toml | 3 ++- requirements/base.in | 1 + requirements/base.txt | 10 +++++++++- requirements/dev.txt | 2 -- requirements/mypy.txt | 2 +- requirements/nightly.in | 1 + requirements/nightly.txt | 10 +++++++++- 8 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index d896434..4979302 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ __pycache__/ # User configuration config.*.json + +# Log files +*.log diff --git a/pyproject.toml b/pyproject.toml index acc4d5b..9977915 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,8 @@ requires-python = ">=3.12" dependencies = [ "kafka-python", "ess-streaming-data-types", - "requests" + "requests", + "rich" ] dynamic = ["version"] diff --git a/requirements/base.in b/requirements/base.in index deb99de..bc1b660 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -5,3 +5,4 @@ kafka-python ess-streaming-data-types requests +rich diff --git a/requirements/base.txt b/requirements/base.txt index bb8b643..c2ff2bb 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,4 +1,4 @@ -# SHA1:79d58844bb27d67652662e3a236fd9fa3ce93ffd +# SHA1:fa65536d18d20d383817bc534417d6c283696d35 # # This file is autogenerated by pip-compile-multi # To update, run: @@ -17,9 +17,17 @@ idna==3.6 # via requests kafka-python==2.0.2 # via -r base.in +markdown-it-py==3.0.0 + # via rich +mdurl==0.1.2 + # via markdown-it-py numpy==1.26.4 # via ess-streaming-data-types +pygments==2.17.2 + # via rich requests==2.31.0 # via -r base.in +rich==13.7.1 + # via -r base.in urllib3==2.2.1 # via requests diff --git a/requirements/dev.txt b/requirements/dev.txt index 8a465b6..ce99385 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -46,8 +46,6 @@ pydantic==2.6.4 # via copier pydantic-core==2.16.3 # via pydantic -pygments==2.17.2 - # via copier pyproject-hooks==1.0.0 # via # build diff --git a/requirements/mypy.txt b/requirements/mypy.txt index 066d33a..8d29307 100644 --- a/requirements/mypy.txt +++ b/requirements/mypy.txt @@ -10,5 +10,5 @@ mypy==1.9.0 # via -r mypy.in mypy-extensions==1.0.0 # via mypy -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via mypy diff --git a/requirements/nightly.in b/requirements/nightly.in index e866b69..4122a02 100644 --- a/requirements/nightly.in +++ b/requirements/nightly.in @@ -4,3 +4,4 @@ kafka-python ess-streaming-data-types requests +rich diff --git a/requirements/nightly.txt b/requirements/nightly.txt index 1588f58..32aae2b 100644 --- a/requirements/nightly.txt +++ b/requirements/nightly.txt @@ -1,4 +1,4 @@ -# SHA1:eaa2be497c4f6c6972ee27a328c6f7eac1bbf469 +# SHA1:d406a5108f5dcf73c54cbfc7b5a3bcdc3e2872fd # # This file is autogenerated by pip-compile-multi # To update, run: @@ -18,9 +18,17 @@ idna==3.6 # via requests kafka-python==2.0.2 # via -r nightly.in +markdown-it-py==3.0.0 + # via rich +mdurl==0.1.2 + # via markdown-it-py numpy==1.26.4 # via ess-streaming-data-types +pygments==2.17.2 + # via rich requests==2.31.0 # via -r nightly.in +rich==13.7.1 + # via -r nightly.in urllib3==2.2.1 # via requests