From 34052fa2c7da1adbca47cc061eec118cc72b6659 Mon Sep 17 00:00:00 2001
From: Alexander Schlemmer <a.schlemmer@indiscale.com>
Date: Fri, 8 Nov 2024 11:26:44 +0100
Subject: [PATCH] MAINT(structure-elements): moved structure elements to a
 subpackage

---
 CHANGELOG.md                                  |  1 +
 .../structure_elements/__init__.py            | 23 +++++++++++++++++++
 .../structure_elements.py                     |  0
 unittests/utils.py                            |  2 +-
 4 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 src/caoscrawler/structure_elements/__init__.py
 rename src/caoscrawler/{ => structure_elements}/structure_elements.py (100%)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 923e9419..eeff1ff5 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 00000000..4b925a56
--- /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 a9649dea..fee80e44 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))
-- 
GitLab