Procházet zdrojové kódy

Grundlage für Hilfeseiten mit mkdocstrings

gc-server3 před 4 měsíci
rodič
revize
a2a10bcc0b
16 změnil soubory, kde provedl 123 přidání a 12 odebrání
  1. 6 0
      __init__.py
  2. 1 0
      backup.py
  3. binární
      dist/gctools.exe
  4. 13 0
      docs/backup.md
  5. 6 0
      docs/c11.md
  6. 6 0
      docs/c7.md
  7. 6 0
      docs/db.md
  8. 10 0
      docs/index.md
  9. 6 0
      docs/misc.md
  10. 6 0
      docs/status.md
  11. 6 0
      docs/xls.md
  12. 2 8
      gctools.spec
  13. 8 0
      mkdocs.yml
  14. 3 0
      readme.md
  15. 3 0
      requirements.txt
  16. 41 4
      status_client/virtual_path.py

+ 6 - 0
__init__.py

@@ -0,0 +1,6 @@
+"""Do math with your own functions.
+
+Modules exported by this package:
+
+- `backup`: Provide several sample math calculations.
+"""

+ 1 - 0
backup.py

@@ -9,6 +9,7 @@ cfg = config.Config()
 
 @app.command()
 def gcstruct():
+    """Generate a structure for the given configuration file"""
     file_backup.gcstruct_backup(cfg.portal_dir)
 
 

binární
dist/gctools.exe


+ 13 - 0
docs/backup.md

@@ -0,0 +1,13 @@
+# gctools backup
+
+
+## ::: backup
+    options:
+      show_source: false
+
+import c7
+import c11
+import db
+import misc2
+import status
+import xls

+ 6 - 0
docs/c11.md

@@ -0,0 +1,6 @@
+# gctools c11
+
+
+## ::: c11
+    options:
+      show_source: false

+ 6 - 0
docs/c7.md

@@ -0,0 +1,6 @@
+# gctools c7
+
+
+## ::: c7
+    options:
+      show_source: false

+ 6 - 0
docs/db.md

@@ -0,0 +1,6 @@
+# gctools db
+
+
+## ::: db
+    options:
+      show_source: false

+ 10 - 0
docs/index.md

@@ -0,0 +1,10 @@
+# Einleitung
+
+```
+import c7
+import c11
+import db
+import misc2
+import status
+import xls
+```

+ 6 - 0
docs/misc.md

@@ -0,0 +1,6 @@
+# gctools misc
+
+
+## ::: misc
+    options:
+      show_source: false

+ 6 - 0
docs/status.md

@@ -0,0 +1,6 @@
+# gctools status
+
+
+## ::: status
+    options:
+      show_source: false

+ 6 - 0
docs/xls.md

@@ -0,0 +1,6 @@
+# gctools xls
+
+
+## ::: xls
+    options:
+      show_source: false

+ 2 - 8
gctools.spec

@@ -1,9 +1,6 @@
 # -*- mode: python ; coding: utf-8 -*-
 
 
-block_cipher = None
-
-
 a = Analysis(
     ['gctools.py'],
     pathex=['C:\\Projekte\\tools\\'],
@@ -14,18 +11,15 @@ a = Analysis(
     hooksconfig={},
     runtime_hooks=[],
     excludes=[],
-    win_no_prefer_redirects=False,
-    win_private_assemblies=False,
-    cipher=block_cipher,
     noarchive=False,
+    optimize=0,
 )
-pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
+pyz = PYZ(a.pure)
 
 exe = EXE(
     pyz,
     a.scripts,
     a.binaries,
-    a.zipfiles,
     a.datas,
     [],
     name='gctools',

+ 8 - 0
mkdocs.yml

@@ -0,0 +1,8 @@
+site_name: gctools.exe
+
+theme:
+  name: material
+
+plugins:
+- search
+- mkdocstrings

+ 3 - 0
readme.md

@@ -0,0 +1,3 @@
+# gctools.exe
+
+Hier könnte ihre Hilfeseite stehen.

+ 3 - 0
requirements.txt

@@ -4,6 +4,9 @@ flask>=2.2.0
 jinja2
 ldap3
 lxml
+mkdocs
+mkdocs-material
+mkdocstrings-python
 numpy
 openpyxl
 pandas

+ 41 - 4
status_client/virtual_path.py

@@ -1,10 +1,10 @@
-from pathlib import Path
 from dataclasses import dataclass
 from os import stat_result
+from pathlib import Path
 
 
 @dataclass
-class VirtualStats:
+class FakeStats:
     st_mode: int
     st_ino: int
     st_dev: int
@@ -18,13 +18,16 @@ class VirtualStats:
 
 
 @dataclass
-class VirtualPathEntry:
+class FakePathEntry:
     is_dir: bool
     is_file: bool
     stat: stat_result
 
 
-class VirtualPath(Path):
+class FakePath(Path):
+    def absolute(self):
+        pass
+
     def cwd(self):
         pass
 
@@ -43,15 +46,45 @@ class VirtualPath(Path):
     def iterdir(self):
         pass
 
+    def joinpath(self):
+        pass
+
     def lstat(self):
         return self.stat()
 
     def open(self):
         pass
 
+    def parent(self):
+        pass
+
+    def parents(self):
+        pass
+
+    def read_bytes(self):
+        pass
+
+    def read_text(self):
+        pass
+
+    def rglob(self):
+        pass
+
     def stat(self):
         pass
 
+    def root(self):
+        pass
+
+    def stem(self):
+        pass
+
+    def suffix(self):
+        pass
+
+    def suffixes(self):
+        pass
+
 
 # ['__bytes__', '__class__', '__class_getitem__', '__delattr__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__',
 # '__fspath__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__',
@@ -65,3 +98,7 @@ class VirtualPath(Path):
 # 'parts', 'read_bytes', 'read_text', 'readlink', 'relative_to', 'rename', 'replace', 'resolve', 'rglob', 'rmdir', 'root', 'samefile',
 # 'stat', 'stem', 'suffix', 'suffixes', 'symlink_to', 'touch', 'unlink', 'with_name', 'with_stem', 'with_suffix', 'write_bytes',
 # 'write_text']
+
+if __name__ == "__main__":
+    p = Path(".")
+    print(p)