diff --git a/makefile b/makefile index e5ba07c..892ce4b 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,4 @@ -SRC_PATH = src/personal_mnemonic_medium -APPLICATION_PATH = application +SRC_PATH = personal_mnemonic_medium deploy: ./docker_cmd.sh @@ -21,7 +20,6 @@ lint: ## Format code --extend-select F841 type-check: ## Type-check code - pyright $(APPLICATION_PATH) pyright $(SRC_PATH) validate: ## Run all checks diff --git a/src/personal_mnemonic_medium/__init__.py b/personal_mnemonic_medium/__init__.py similarity index 100% rename from src/personal_mnemonic_medium/__init__.py rename to personal_mnemonic_medium/__init__.py diff --git a/src/personal_mnemonic_medium/card_pipeline.py b/personal_mnemonic_medium/card_pipeline.py similarity index 100% rename from src/personal_mnemonic_medium/card_pipeline.py rename to personal_mnemonic_medium/card_pipeline.py diff --git a/application/cli.py b/personal_mnemonic_medium/cli.py similarity index 100% rename from application/cli.py rename to personal_mnemonic_medium/cli.py diff --git a/src/personal_mnemonic_medium/docs_example.py b/personal_mnemonic_medium/docs_example.py similarity index 100% rename from src/personal_mnemonic_medium/docs_example.py rename to personal_mnemonic_medium/docs_example.py diff --git a/src/personal_mnemonic_medium/exporters/__init__.py b/personal_mnemonic_medium/exporters/__init__.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/__init__.py rename to personal_mnemonic_medium/exporters/__init__.py diff --git a/src/personal_mnemonic_medium/exporters/anki/__init__.py b/personal_mnemonic_medium/exporters/anki/__init__.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/anki/__init__.py rename to personal_mnemonic_medium/exporters/anki/__init__.py diff --git a/src/personal_mnemonic_medium/exporters/anki/anki_css.py b/personal_mnemonic_medium/exporters/anki/anki_css.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/anki/anki_css.py rename to personal_mnemonic_medium/exporters/anki/anki_css.py diff --git a/src/personal_mnemonic_medium/exporters/anki/card_types/base.py b/personal_mnemonic_medium/exporters/anki/card_types/base.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/anki/card_types/base.py rename to personal_mnemonic_medium/exporters/anki/card_types/base.py diff --git a/src/personal_mnemonic_medium/exporters/anki/card_types/cloze.py b/personal_mnemonic_medium/exporters/anki/card_types/cloze.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/anki/card_types/cloze.py rename to personal_mnemonic_medium/exporters/anki/card_types/cloze.py diff --git a/src/personal_mnemonic_medium/exporters/anki/card_types/qa.py b/personal_mnemonic_medium/exporters/anki/card_types/qa.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/anki/card_types/qa.py rename to personal_mnemonic_medium/exporters/anki/card_types/qa.py diff --git a/src/personal_mnemonic_medium/exporters/anki/globals.py b/personal_mnemonic_medium/exporters/anki/globals.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/anki/globals.py rename to personal_mnemonic_medium/exporters/anki/globals.py diff --git a/src/personal_mnemonic_medium/exporters/anki/package_generator.py b/personal_mnemonic_medium/exporters/anki/package_generator.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/anki/package_generator.py rename to personal_mnemonic_medium/exporters/anki/package_generator.py diff --git a/src/personal_mnemonic_medium/exporters/anki/sync.py b/personal_mnemonic_medium/exporters/anki/sync.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/anki/sync.py rename to personal_mnemonic_medium/exporters/anki/sync.py diff --git a/src/personal_mnemonic_medium/exporters/base.py b/personal_mnemonic_medium/exporters/base.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/base.py rename to personal_mnemonic_medium/exporters/base.py diff --git a/src/personal_mnemonic_medium/exporters/markdown_to_html/html_compiler.py b/personal_mnemonic_medium/exporters/markdown_to_html/html_compiler.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/markdown_to_html/html_compiler.py rename to personal_mnemonic_medium/exporters/markdown_to_html/html_compiler.py diff --git a/src/personal_mnemonic_medium/exporters/url_generators/1writer_url.py b/personal_mnemonic_medium/exporters/url_generators/1writer_url.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/url_generators/1writer_url.py rename to personal_mnemonic_medium/exporters/url_generators/1writer_url.py diff --git a/src/personal_mnemonic_medium/exporters/url_generators/obsidian_url.py b/personal_mnemonic_medium/exporters/url_generators/obsidian_url.py similarity index 100% rename from src/personal_mnemonic_medium/exporters/url_generators/obsidian_url.py rename to personal_mnemonic_medium/exporters/url_generators/obsidian_url.py diff --git a/application/main.py b/personal_mnemonic_medium/main.py similarity index 99% rename from application/main.py rename to personal_mnemonic_medium/main.py index 86edade..574b91e 100644 --- a/application/main.py +++ b/personal_mnemonic_medium/main.py @@ -5,6 +5,8 @@ import sentry_sdk import typer +from wasabi import Printer + from personal_mnemonic_medium.card_pipeline import CardPipeline from personal_mnemonic_medium.exporters.anki.card_types.base import ( AnkiCard, @@ -22,7 +24,6 @@ from personal_mnemonic_medium.prompt_extractors.qa_extractor import ( QAPromptExtractor, ) -from wasabi import Printer msg = Printer(timestamp=True) diff --git a/src/personal_mnemonic_medium/note_factories/__init__.py b/personal_mnemonic_medium/note_factories/__init__.py similarity index 100% rename from src/personal_mnemonic_medium/note_factories/__init__.py rename to personal_mnemonic_medium/note_factories/__init__.py diff --git a/src/personal_mnemonic_medium/note_factories/base.py b/personal_mnemonic_medium/note_factories/base.py similarity index 100% rename from src/personal_mnemonic_medium/note_factories/base.py rename to personal_mnemonic_medium/note_factories/base.py diff --git a/src/personal_mnemonic_medium/note_factories/markdown.py b/personal_mnemonic_medium/note_factories/markdown.py similarity index 100% rename from src/personal_mnemonic_medium/note_factories/markdown.py rename to personal_mnemonic_medium/note_factories/markdown.py diff --git a/src/personal_mnemonic_medium/note_factories/note.py b/personal_mnemonic_medium/note_factories/note.py similarity index 100% rename from src/personal_mnemonic_medium/note_factories/note.py rename to personal_mnemonic_medium/note_factories/note.py diff --git a/src/personal_mnemonic_medium/prompt_extractors/base.py b/personal_mnemonic_medium/prompt_extractors/base.py similarity index 100% rename from src/personal_mnemonic_medium/prompt_extractors/base.py rename to personal_mnemonic_medium/prompt_extractors/base.py diff --git a/src/personal_mnemonic_medium/prompt_extractors/cloze_extractor.py b/personal_mnemonic_medium/prompt_extractors/cloze_extractor.py similarity index 100% rename from src/personal_mnemonic_medium/prompt_extractors/cloze_extractor.py rename to personal_mnemonic_medium/prompt_extractors/cloze_extractor.py diff --git a/src/personal_mnemonic_medium/prompt_extractors/prompt.py b/personal_mnemonic_medium/prompt_extractors/prompt.py similarity index 100% rename from src/personal_mnemonic_medium/prompt_extractors/prompt.py rename to personal_mnemonic_medium/prompt_extractors/prompt.py diff --git a/src/personal_mnemonic_medium/prompt_extractors/qa_extractor.py b/personal_mnemonic_medium/prompt_extractors/qa_extractor.py similarity index 100% rename from src/personal_mnemonic_medium/prompt_extractors/qa_extractor.py rename to personal_mnemonic_medium/prompt_extractors/qa_extractor.py diff --git a/tests/__init.py b/personal_mnemonic_medium/tests/__init.py similarity index 100% rename from tests/__init.py rename to personal_mnemonic_medium/tests/__init.py diff --git a/tests/exporters/anki/test_card_converter.py b/personal_mnemonic_medium/tests/exporters/anki/test_card_converter.py similarity index 98% rename from tests/exporters/anki/test_card_converter.py rename to personal_mnemonic_medium/tests/exporters/anki/test_card_converter.py index ea4b100..a81a987 100644 --- a/tests/exporters/anki/test_card_converter.py +++ b/personal_mnemonic_medium/tests/exporters/anki/test_card_converter.py @@ -101,7 +101,7 @@ def test_qa_uuid_generation(): ).run(input_path=file_path) notes = [c.to_genanki_note() for c in cards] - field_guids = {note.guid for note in notes} + field_guids: set[str] = {note.guid for note in notes} # type: ignore reference_guids = {9315717920, 3912828915, 6300568814} generated_guids = {card.card_uuid for card in cards} diff --git a/tests/exporters/anki/test_package_generator.py b/personal_mnemonic_medium/tests/exporters/anki/test_package_generator.py similarity index 100% rename from tests/exporters/anki/test_package_generator.py rename to personal_mnemonic_medium/tests/exporters/anki/test_package_generator.py diff --git a/tests/integration_test.sh b/personal_mnemonic_medium/tests/integration_test.sh similarity index 100% rename from tests/integration_test.sh rename to personal_mnemonic_medium/tests/integration_test.sh diff --git a/tests/note_factories/test_markdown_extractor.py b/personal_mnemonic_medium/tests/note_factories/test_markdown_extractor.py similarity index 100% rename from tests/note_factories/test_markdown_extractor.py rename to personal_mnemonic_medium/tests/note_factories/test_markdown_extractor.py diff --git a/tests/prompt_extractors/test_cloze_extractor.py b/personal_mnemonic_medium/tests/prompt_extractors/test_cloze_extractor.py similarity index 100% rename from tests/prompt_extractors/test_cloze_extractor.py rename to personal_mnemonic_medium/tests/prompt_extractors/test_cloze_extractor.py diff --git a/tests/prompt_extractors/test_qa_prompt_extractor.py b/personal_mnemonic_medium/tests/prompt_extractors/test_qa_prompt_extractor.py similarity index 100% rename from tests/prompt_extractors/test_qa_prompt_extractor.py rename to personal_mnemonic_medium/tests/prompt_extractors/test_qa_prompt_extractor.py diff --git a/tests/test.md b/personal_mnemonic_medium/tests/test.md similarity index 100% rename from tests/test.md rename to personal_mnemonic_medium/tests/test.md diff --git "a/tests/test_md_files/Bens\303\245r.md" "b/personal_mnemonic_medium/tests/test_md_files/Bens\303\245r.md" similarity index 100% rename from "tests/test_md_files/Bens\303\245r.md" rename to "personal_mnemonic_medium/tests/test_md_files/Bens\303\245r.md" diff --git a/tests/test_md_files/test_card_guid.md b/personal_mnemonic_medium/tests/test_md_files/test_card_guid.md similarity index 100% rename from tests/test_md_files/test_card_guid.md rename to personal_mnemonic_medium/tests/test_md_files/test_card_guid.md diff --git a/tests/test_md_files/test_header_removal.md b/personal_mnemonic_medium/tests/test_md_files/test_header_removal.md similarity index 100% rename from tests/test_md_files/test_header_removal.md rename to personal_mnemonic_medium/tests/test_md_files/test_header_removal.md diff --git a/tests/test_md_files/test_newlines_in_lists.md b/personal_mnemonic_medium/tests/test_md_files/test_newlines_in_lists.md similarity index 100% rename from tests/test_md_files/test_newlines_in_lists.md rename to personal_mnemonic_medium/tests/test_md_files/test_newlines_in_lists.md diff --git a/src/personal_mnemonic_medium/utils/hasher.py b/personal_mnemonic_medium/utils/hasher.py similarity index 100% rename from src/personal_mnemonic_medium/utils/hasher.py rename to personal_mnemonic_medium/utils/hasher.py