autodocgenerator 0.8.9.7__tar.gz → 0.8.9.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/PKG-INFO +1 -1
  2. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/auto_runner/config_reader.py +2 -2
  3. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/factory/modules/general_modules.py +12 -2
  4. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/postprocessor/custom_intro.py +31 -1
  5. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/pyproject.toml +1 -1
  6. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/README.md +0 -0
  7. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/__init__.py +0 -0
  8. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/auto_runner/run_file.py +0 -0
  9. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/config/config.py +0 -0
  10. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/engine/__init__.py +0 -0
  11. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/engine/config/config.py +0 -0
  12. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/engine/exceptions.py +0 -0
  13. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/engine/models/gpt_model.py +0 -0
  14. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/engine/models/model.py +0 -0
  15. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/factory/__init__.py +0 -0
  16. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/factory/base_factory.py +0 -0
  17. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/factory/modules/intro.py +0 -0
  18. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/manage.py +0 -0
  19. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/postprocessor/sorting.py +0 -0
  20. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/preprocessor/code_mix.py +0 -0
  21. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/preprocessor/compressor.py +0 -0
  22. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/preprocessor/settings.py +0 -0
  23. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/preprocessor/spliter.py +0 -0
  24. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/ui/__init__.py +0 -0
  25. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/ui/logging.py +0 -0
  26. {autodocgenerator-0.8.9.7 → autodocgenerator-0.8.9.9}/autodocgenerator/ui/progress_base.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: autodocgenerator
3
- Version: 0.8.9.7
3
+ Version: 0.8.9.9
4
4
  Summary: This Project helps you to create docs for your projects
5
5
  License: MIT
6
6
  Author: dima-on
@@ -1,5 +1,5 @@
1
1
  import yaml
2
- from autodocgenerator.factory.modules.general_modules import CustomModule
2
+ from autodocgenerator.factory.modules.general_modules import CustomModule, CustomModuleWithOutContext
3
3
  from ..config.config import Config, ProjectConfigSettings
4
4
 
5
5
 
@@ -29,6 +29,6 @@ def read_config(file_data: str) -> tuple[Config, list[CustomModule]]:
29
29
 
30
30
  custom_discriptions = data.get("custom_descriptions", [])
31
31
 
32
- custom_modules = [CustomModule(custom_discription) for custom_discription in custom_discriptions]
32
+ custom_modules = [CustomModuleWithOutContext(custom_discription[1:]) if custom_discription[0] == "%" else CustomModule(custom_discription) for custom_discription in custom_discriptions]
33
33
 
34
34
  return config, custom_modules
@@ -1,6 +1,6 @@
1
1
  from ..base_factory import BaseModule
2
2
  from ...engine.models.model import Model
3
- from ...postprocessor.custom_intro import generete_custom_discription
3
+ from ...postprocessor.custom_intro import generete_custom_discription, generete_custom_discription_without
4
4
  from ...preprocessor.spliter import split_data
5
5
 
6
6
  class CustomModule(BaseModule):
@@ -10,5 +10,15 @@ class CustomModule(BaseModule):
10
10
  self.discription = discription
11
11
 
12
12
  def generate(self, info: dict, model: Model):
13
- result = generete_custom_discription(split_data(info.get("code_mix"), max_symbols=7000), model, self.discription, info.get("language"))
13
+ result = generete_custom_discription(split_data(info.get("code_mix"), max_symbols=5000), model, self.discription, info.get("language"))
14
+ return result
15
+
16
+ class CustomModuleWithOutContext(BaseModule):
17
+
18
+ def __init__(self, discription: str):
19
+ super().__init__()
20
+ self.discription = discription
21
+
22
+ def generate(self, info: dict, model: Model):
23
+ result = generete_custom_discription_without(model, self.discription, info.get("language"))
14
24
  return result
@@ -99,4 +99,34 @@ def generete_custom_discription(splited_data: str, model: Model, custom_descript
99
99
  if (result.find("!noinfo") == -1 and result.find("No information found") == -1) or result.find("!noinfo") > 30:
100
100
  break
101
101
  result = ""
102
- return result
102
+ return result
103
+
104
+ def generete_custom_discription_without(model: Model, custom_description: str, language: str = "en") -> str:
105
+ prompt = [
106
+ {
107
+ "role": "system",
108
+ "content": f"For the following task use language {language}"
109
+ },
110
+ {
111
+ "role": "system",
112
+ "content": f"Act as a precise Technical Analyst. You will be provided with specific code or documentation. Your task is to describe and rewrite the following text"
113
+ },
114
+ {
115
+ "role": "system",
116
+ "content": """Every response must start with exactly one <a name="CONTENT_DESCRIPTION"></a> tag. The CONTENT_DESCRIPTION must be a short, hyphenated summary of the actual information you are providing (e.g., "user-authentication-logic" instead of "auth.yml"). STRICT RULES:
117
+
118
+ NO filenames or paths (e.g., forbidden: "autodocconfig.yml", "src/config").
119
+ NO file extensions (e.g., forbidden: ".yml", ".md").
120
+ NO generic terms (e.g., forbidden: "config", "settings", "run", "docs").
121
+ NO protocols (http/https).
122
+ This tag must appear ONLY ONCE at the very beginning. Never repeat it or use other links"""
123
+ },
124
+ {
125
+ "role": "user",
126
+ "content": f"### Task to discribe: {custom_description}"
127
+ }
128
+ ]
129
+
130
+ result = model.get_answer_without_history(prompt=prompt)
131
+ return result
132
+
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "autodocgenerator"
3
- version = "0.8.9.7"
3
+ version = "0.8.9.9"
4
4
  description = "This Project helps you to create docs for your projects"
5
5
  authors = [
6
6
  {name = "dima-on", email = "sinica911@gmail.com"}