From b7fc947e419639e973cda147894ac1f8ad75a4ed Mon Sep 17 00:00:00 2001 From: Bjarke Madsen <bjarke@nordu.net> Date: Tue, 21 Jan 2025 17:33:48 +0100 Subject: [PATCH] Remove unused entrypoints and update some docs --- .../legacy_publisher/survey_publisher_legacy.py | 9 +++++++++ .../legacy_publisher/survey_publisher_legacy_db.py | 5 +++-- .../legacy_publisher/survey_publisher_legacy_excel.py | 6 +++--- docs/source/commands.rst | 7 +++++-- setup.py | 2 -- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy.py b/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy.py index 696609c0..e2b7bb4b 100644 --- a/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy.py +++ b/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy.py @@ -1,3 +1,12 @@ +""" +survey_publisher_legacy +========================= + +This script is used to import data from the legacy datasources into the new survey system. +Legacy data is used to generate a new survey for each NREN, for each year that we have data for. +The generated surveys are based on the 2024 survey. + +""" import click from itertools import chain from collections import defaultdict diff --git a/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy_db.py b/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy_db.py index e8f7c5ff..4d12a84e 100644 --- a/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy_db.py +++ b/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy_db.py @@ -1,8 +1,9 @@ """ -survey_publisher_old_db_2022 +survey_publisher_legacy_db ============================ -This module loads the survey data from 2022 from the old survey database and returns the data. +This module loads the survey data from 2022 from the old survey database and returns the data +ready to be used to generate new-style surveys. """ from decimal import Decimal diff --git a/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy_excel.py b/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy_excel.py index a41fba86..145ca1fe 100644 --- a/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy_excel.py +++ b/compendium_v2/publishers/legacy_publisher/survey_publisher_legacy_excel.py @@ -1,10 +1,10 @@ """ -survey_publisher_v1 +survey_publisher_legacy_excel ========================= -This module loads the survey data from before 2022 from a legacy Excel files. +This module loads the survey data from before 2022 from a legacy Excel file. Missing info is filled in from the survey db for some questions. -Registered as click cli command when installing compendium-v2. +Returns the data ready to be used to generate new-style surveys. """ from __future__ import annotations diff --git a/docs/source/commands.rst b/docs/source/commands.rst index 1496cdb4..0a0eab28 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -6,10 +6,13 @@ Commands .. contents:: :local: -.. automodule:: compendium_v2.publishers.survey_publisher_legacy_excel +.. automodule:: compendium_v2.publishers.legacy_publisher.survey_publisher_legacy :members: -.. automodule:: compendium_v2.publishers.survey_publisher_old_db_2022 +.. automodule:: compendium_v2.publishers.legacy_publisher.survey_publisher_legacy_db + :members: + +.. automodule:: compendium_v2.publishers.legacy_publisher.survey_publisher_legacy_excel :members: .. automodule:: compendium_v2.conversion.conversion diff --git a/setup.py b/setup.py index 8a14ac19..896c3dec 100644 --- a/setup.py +++ b/setup.py @@ -30,8 +30,6 @@ setup( include_package_data=True, entry_points={ 'console_scripts': [ - 'excel-survey-publisher=compendium_v2.publishers.survey_publisher_legacy_excel:cli', - 'db-publisher-2022=compendium_v2.publishers.survey_publisher_old_db_2022:cli', 'conversion=compendium_v2.conversion.conversion:cli', 'dump_survey_model=compendium_v2.migrations.dump_survey_model:cli', 'legacy-survey-publisher=compendium_v2.publishers.legacy_publisher.survey_publisher_legacy:cli', -- GitLab