From 5087645069f42d6430905a25ab1a6283263fe11d Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Tue, 7 Apr 2026 12:28:38 +0200 Subject: [PATCH] Add python project documentation generator class --- docs/CHANGELOG.md | 3 ++- src/jcloud_docsgen/core.py | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 src/jcloud_docsgen/core.py diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 761548a..48a4ee7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,4 +6,5 @@ - Add class for existing directories - Add function to format a list human-readable -- Add function to assert that an object is an instance of a specific type \ No newline at end of file +- Add function to assert that an object is an instance of a specific type +- Add python project documentation generator class \ No newline at end of file diff --git a/src/jcloud_docsgen/core.py b/src/jcloud_docsgen/core.py new file mode 100644 index 0000000..9e57ff8 --- /dev/null +++ b/src/jcloud_docsgen/core.py @@ -0,0 +1,36 @@ +# Copyright 2026 jCloud Services GbR + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from .utils import ExistingDirectory, assert_that_is_instance + +__all__ = [ + 'PythonDocumentationGenerator' +] + +class PythonDocumentationGenerator: + ''' + The class for the documentation generator. + + :param project_directory: The directory of the project. + :type project_directory: ExistingDirectory + :param docs_directory: The directory for the generated documentation. + :type docs_directory: ExistingDirectory + ''' + + def __init__(self, project_directory: ExistingDirectory, docs_directory: ExistingDirectory) -> None: + assert_that_is_instance(project_directory, ExistingDirectory) + assert_that_is_instance(docs_directory, ExistingDirectory) + + self.project_directory = project_directory + self.docs_directory = docs_directory \ No newline at end of file