diff --git a/CHANGELOG.md b/CHANGELOG.md index 923e941960d5725674240a8196e63e01a0241c1d..eeff1ff52a10922fb8d1bf7e99ec6ff57d21b4b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 the global `debug` option by default and set to log level `INFO` in case of `debug=False`. The previous behavior can be restored by calling `crawler_main` with `sss_max_log_level=logging.DEBUG`. +- Moved structure_elements to a subpackage. ### Deprecated ### diff --git a/src/caoscrawler/structure_elements/__init__.py b/src/caoscrawler/structure_elements/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4b925a567f87febdac7b5547111a468eb0a3253c --- /dev/null +++ b/src/caoscrawler/structure_elements/__init__.py @@ -0,0 +1,23 @@ +# encoding: utf-8 +# +# This file is a part of the LinkAhead Project. +# +# Copyright (C) 2024 Indiscale GmbH <info@indiscale.com> +# Copyright (C) 2024 Daniel Hornung <d.hornung@indiscale.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +"""Submdule containing all default and optional converters.""" + +from .structure_elements import * diff --git a/src/caoscrawler/structure_elements.py b/src/caoscrawler/structure_elements/structure_elements.py similarity index 100% rename from src/caoscrawler/structure_elements.py rename to src/caoscrawler/structure_elements/structure_elements.py diff --git a/unittests/utils.py b/unittests/utils.py index a9649dea686c33dc33d0d7636d08aa51beb35412..fee80e44028667b9b3c8c8f8201b1a774c46afdf 100644 --- a/unittests/utils.py +++ b/unittests/utils.py @@ -36,5 +36,5 @@ def dircheckstr(prefix, *pathcomponents): ftype = "Directory" else: ftype = "File" - return (f"caoscrawler.structure_elements.{ftype}: " + os.path.basename( + return (f"caoscrawler.structure_elements.structure_elements.{ftype}: " + os.path.basename( os.path.join(*pathcomponents)) + ", " + os.path.join(prefix, *pathcomponents))