From cadf03ffebcb42febf7259a59852135dd99b7997 Mon Sep 17 00:00:00 2001 From: Nils Hoffmann <3309580+nilshoffmann@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:23:03 +0100 Subject: [PATCH] Refactored package organization --- .../library_spectra_validation}/.gitignore | 0 .../library_spectra_validation}/README.md | 0 streamlit_app/library_spectra_validation/__init__.py | 0 .../library_spectra_validation}/__version__.py | 0 .../library_spectra_validation}/edit_metadata.py | 0 .../library_spectra_validation}/filters.py | 0 .../library_spectra_validation}/library_handler.py | 4 ++-- .../library_spectra_validation}/setup.py | 0 .../tests/examples/Broken_records.txt | 0 .../tests/examples/test_case_correct.mgf | 0 .../tests/examples/test_case_wrong.mgf | 0 .../library_spectra_validation}/tests/test_library_handler.py | 0 .../library_spectra_validation}/validation_pipeline.py | 0 streamlit_app/pages/1_File_Import.py | 2 +- 14 files changed, 3 insertions(+), 3 deletions(-) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/.gitignore (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/README.md (100%) create mode 100644 streamlit_app/library_spectra_validation/__init__.py rename {library_spectra_validation => streamlit_app/library_spectra_validation}/__version__.py (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/edit_metadata.py (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/filters.py (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/library_handler.py (97%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/setup.py (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/tests/examples/Broken_records.txt (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/tests/examples/test_case_correct.mgf (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/tests/examples/test_case_wrong.mgf (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/tests/test_library_handler.py (100%) rename {library_spectra_validation => streamlit_app/library_spectra_validation}/validation_pipeline.py (100%) diff --git a/library_spectra_validation/.gitignore b/streamlit_app/library_spectra_validation/.gitignore similarity index 100% rename from library_spectra_validation/.gitignore rename to streamlit_app/library_spectra_validation/.gitignore diff --git a/library_spectra_validation/README.md b/streamlit_app/library_spectra_validation/README.md similarity index 100% rename from library_spectra_validation/README.md rename to streamlit_app/library_spectra_validation/README.md diff --git a/streamlit_app/library_spectra_validation/__init__.py b/streamlit_app/library_spectra_validation/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/library_spectra_validation/__version__.py b/streamlit_app/library_spectra_validation/__version__.py similarity index 100% rename from library_spectra_validation/__version__.py rename to streamlit_app/library_spectra_validation/__version__.py diff --git a/library_spectra_validation/edit_metadata.py b/streamlit_app/library_spectra_validation/edit_metadata.py similarity index 100% rename from library_spectra_validation/edit_metadata.py rename to streamlit_app/library_spectra_validation/edit_metadata.py diff --git a/library_spectra_validation/filters.py b/streamlit_app/library_spectra_validation/filters.py similarity index 100% rename from library_spectra_validation/filters.py rename to streamlit_app/library_spectra_validation/filters.py diff --git a/library_spectra_validation/library_handler.py b/streamlit_app/library_spectra_validation/library_handler.py similarity index 97% rename from library_spectra_validation/library_handler.py rename to streamlit_app/library_spectra_validation/library_handler.py index 315a8f4..0559c32 100644 --- a/library_spectra_validation/library_handler.py +++ b/streamlit_app/library_spectra_validation/library_handler.py @@ -1,7 +1,7 @@ from matchms.importing import load_spectra from matchms.filtering.SpectrumProcessor import SpectrumProcessor -from filters import PRIMARY_FILTERS -from validation_pipeline import Modification, SpectrumRepairer, SpectrumValidator +from library_spectra_validation.filters import PRIMARY_FILTERS +from library_spectra_validation.validation_pipeline import Modification, SpectrumRepairer, SpectrumValidator class LibraryHandler: """Stores the 3 different types of spectra. Correct, repaired, wrong. diff --git a/library_spectra_validation/setup.py b/streamlit_app/library_spectra_validation/setup.py similarity index 100% rename from library_spectra_validation/setup.py rename to streamlit_app/library_spectra_validation/setup.py diff --git a/library_spectra_validation/tests/examples/Broken_records.txt b/streamlit_app/library_spectra_validation/tests/examples/Broken_records.txt similarity index 100% rename from library_spectra_validation/tests/examples/Broken_records.txt rename to streamlit_app/library_spectra_validation/tests/examples/Broken_records.txt diff --git a/library_spectra_validation/tests/examples/test_case_correct.mgf b/streamlit_app/library_spectra_validation/tests/examples/test_case_correct.mgf similarity index 100% rename from library_spectra_validation/tests/examples/test_case_correct.mgf rename to streamlit_app/library_spectra_validation/tests/examples/test_case_correct.mgf diff --git a/library_spectra_validation/tests/examples/test_case_wrong.mgf b/streamlit_app/library_spectra_validation/tests/examples/test_case_wrong.mgf similarity index 100% rename from library_spectra_validation/tests/examples/test_case_wrong.mgf rename to streamlit_app/library_spectra_validation/tests/examples/test_case_wrong.mgf diff --git a/library_spectra_validation/tests/test_library_handler.py b/streamlit_app/library_spectra_validation/tests/test_library_handler.py similarity index 100% rename from library_spectra_validation/tests/test_library_handler.py rename to streamlit_app/library_spectra_validation/tests/test_library_handler.py diff --git a/library_spectra_validation/validation_pipeline.py b/streamlit_app/library_spectra_validation/validation_pipeline.py similarity index 100% rename from library_spectra_validation/validation_pipeline.py rename to streamlit_app/library_spectra_validation/validation_pipeline.py diff --git a/streamlit_app/pages/1_File_Import.py b/streamlit_app/pages/1_File_Import.py index 9ebaa40..9c8a49c 100644 --- a/streamlit_app/pages/1_File_Import.py +++ b/streamlit_app/pages/1_File_Import.py @@ -1,10 +1,10 @@ +from library_spectra_validation.library_handler import LibraryHandler import os import streamlit as st import pandas as pd from matchms.importing import load_from_mgf from tempfile import NamedTemporaryFile -from library_spectra_validation.library_handler import LibraryHandler st.set_page_config(