123 Commits

Author SHA1 Message Date
6d75bc433e Merge pull request '2022.6' (#88) from 2022.6 into master
Reviewed-on: #88
2022-06-29 17:50:06 +02:00
8bb7fbd1c4 Merge remote-tracking branch 'origin/2022.6' into 2022.6 2022-06-29 17:47:04 +02:00
ad03e655e9 Build Release 2022.6.0 2022-06-29 17:46:59 +02:00
61d3974a47 Build Release 2022.6.0 2022-06-29 17:46:01 +02:00
3d852c87e2 Improved docs 2022-06-29 17:44:10 +02:00
0e46528f32 Merge pull request '2022.6.8 - Dokumentation' (#87) from 2022.6.8 into 2022.6
Reviewed-on: #87
Closes #56
2022-06-29 17:42:33 +02:00
bb8fa1f6a8 Improved readme 2022-06-29 17:40:05 +02:00
9fdaa810c0 Build 2022.6.0rc2 2022-06-27 21:48:15 +02:00
4083ac0c14 Build docs and added tutorial files 2022-06-27 21:42:34 +02:00
b9e0b7ccd0 Build 2022.6.0.rc1 2022-06-27 20:55:44 +02:00
4b9e428abb Updated tools 2022-06-27 20:52:27 +02:00
63ad13e09a Improved version handling of set-version 2022-06-27 20:46:01 +02:00
cc06a308a1 Merge pull request '2022.6.10 - Dev dependencies' (#86) from 2022.6.10 into 2022.6
Reviewed-on: #86
Closes #71
2022-06-27 20:18:24 +02:00
e9fdd20181 Updated unittests 2022-06-27 20:16:37 +02:00
8692686cb5 Added dev-deps support to new command 2022-06-27 20:07:52 +02:00
db29ad36fe Added dev-deps support to cpl install without package 2022-06-27 20:05:34 +02:00
0710b25317 Added dev-dependencies to uninstall command 2022-06-27 20:04:19 +02:00
cbd2964f42 Added dev-dependencies to install command 2022-06-27 20:02:01 +02:00
f51118f13c Merge pull request '2022.6.2 - Venv support' (#85) from 2022.6.2 into 2022.6
Reviewed-on: #85
Closes #51
2022-06-27 11:52:17 +02:00
323e363b42 Improved venv support to all related commands 2022-06-27 11:50:22 +02:00
e8a4fe6142 Added venv support to install command 2022-06-27 10:52:26 +02:00
587d9b359c Merge pull request '2022.6.17 - Unittests' (#84) from 2022.6.17 into 2022.6
Reviewed-on: #84
2022-06-27 10:03:54 +02:00
c2632253ac Added tests for update command 2022-06-27 09:10:21 +02:00
45be77dd10 Added tests for version command 2022-06-26 19:51:18 +02:00
78ffbcc33d Readded all test cases 2022-06-26 01:07:10 +02:00
d83d1a244e Fixed for start command [WIP] output is needed 2022-06-26 01:05:45 +02:00
fa002a50ac Fixed for start command 2022-06-26 00:41:25 +02:00
32507afae9 Added tests for start command 2022-06-26 00:39:16 +02:00
6de3bbdaf4 Added tests for run command 2022-06-26 00:15:05 +02:00
6e50d0cb22 Added tests for publish command 2022-06-23 23:47:29 +02:00
9e978f3ece Fixed tests for un/install commands 2022-06-23 23:39:41 +02:00
32478926c8 Added tests for build command 2022-06-23 21:49:44 +02:00
2925788d01 Added tests for uninstall command 2022-06-21 09:24:56 +02:00
c0789cf4f7 Added tests for install command 2022-06-21 08:56:26 +02:00
89d591ce0a Added project reference handling in cpl remove 2022-06-04 00:36:31 +02:00
77c560b40c Improved cpl remove test 2022-06-03 23:46:03 +02:00
dad4913bcd Added cpl remove test 2022-06-03 23:44:26 +02:00
9b56650d4b Added cpl add test 2022-06-03 23:35:07 +02:00
9fca2018e5 Build dev10 2022-05-27 18:57:12 +02:00
e5dd890931 Improved unittest for cpl new & Fixed subdirectory handling with cpl new 2022-05-27 18:57:00 +02:00
beadbf8e91 Improved set-version to ignore skipped deps 2022-05-27 18:26:32 +02:00
ff5f9b833d Improved unittest for cpl new 2022-05-27 18:07:12 +02:00
162f06001a Build dev8 & improved cpl new unittests 2022-05-26 23:27:32 +02:00
348fad24c7 Build dev8 & improved set-version change handling 2022-05-26 23:27:20 +02:00
f9748cdb76 Improved gitignore 2022-05-26 23:03:18 +02:00
56380763a9 Improved unittests 2022-05-26 23:01:50 +02:00
3a1630b687 Added force option to set-version 2022-05-26 23:01:23 +02:00
a593f34cde Build dev7 2022-05-26 23:00:55 +02:00
49cce5fa1a Extended cpl new options 2022-05-26 22:52:03 +02:00
df7bd06629 Fixed additional argument & flag bug 2022-05-26 22:51:29 +02:00
e0da77fd4b Added new test condition for cpl new 2022-05-26 22:24:19 +02:00
833dd83008 Improved unittests & added tests for cpl new 2022-05-26 22:21:16 +02:00
ce0ad4013f [WIP] Improved unittest 2022-05-26 21:42:43 +02:00
698f80adfe Build dev6 2022-05-26 21:42:28 +02:00
d0b0f4bfcb Fixed set-version 2022-05-26 21:41:42 +02:00
d23ea86ccf Added logic to answer questions of new command dialog by flag arguments 2022-05-26 21:18:57 +02:00
15d938b172 Fixed handing of unregistered console arguments 2022-05-26 21:01:41 +02:00
6c1d7a3b29 Removed prints from CLITestSuite 2022-05-26 16:29:07 +02:00
c28f551682 Added skip message to set-version 2022-05-26 16:26:55 +02:00
def92c78c8 Added logic to change version only for projects with changes 2022-05-26 16:25:15 +02:00
ddff9dec11 Fixed install command 2022-05-26 16:08:37 +02:00
9e0e85d646 Fixed install command 2022-05-26 16:06:56 +02:00
b05ca7e980 Set dev version 2022-05-26 16:03:14 +02:00
8f8a9f7dd7 Moved query unittests 2022-05-26 15:53:23 +02:00
df32978a31 Moved unittests 2022-05-26 15:49:52 +02:00
79b51cf8c5 Build dev4 & added unittest support to console 2022-05-26 15:41:47 +02:00
a72dd0dc2e Improved tests 2022-05-26 15:29:49 +02:00
d937c4c0e6 Added tests for generate command 2022-05-26 14:47:36 +02:00
46cceb0910 Registered CLI test cases 2022-05-26 13:59:46 +02:00
e74e39c189 Added CLI command test cases 2022-05-26 13:49:31 +02:00
c2706c7737 Added unittest projects 2022-05-26 13:37:15 +02:00
d0e66d24bd Added logic to generate test cases 2022-05-26 13:17:58 +02:00
c1a1849ad2 Added logic to create new unittest project 2022-05-26 13:12:35 +02:00
0675105731 Merge pull request '2022.6.16 - Build-Tools' (#83) from 2022.6.16 into 2022.6
Reviewed-on: #83
Closes #82
2022-05-26 12:13:45 +02:00
7ee0b951a8 Rebuild & improved workspace scripts 2022-05-25 19:59:38 +02:00
d8168f024c Added logic to write PipPath & build dev2 2022-05-25 19:53:05 +02:00
2654dc7c69 Merge remote-tracking branch 'origin/2022.6.16' into 2022.6.16 2022-05-25 19:38:56 +02:00
4224960837 First dev build 2022-05-25 19:38:49 +02:00
907c3a8fff First dev build 2022-05-25 19:38:38 +02:00
28505479ba Added new project 2022-05-25 19:30:11 +02:00
84d3abce3f Merge pull request '2022.6.15 - set-version' (#81) from 2022.6.15 into 2022.6
Reviewed-on: #81
Closes #80
2022-05-25 19:10:35 +02:00
9050dffc53 Renamed projects && build dev6 2022-05-25 19:07:29 +02:00
e0f69c9bdf Fixed old naming of cpl_core 2022-05-25 18:56:08 +02:00
bbd0a60f98 Added functionality to set dependencies for all projects in workspace 2022-05-25 18:54:21 +02:00
e23f4187fe Added logic to add internal pipes in ServiceCollection 2022-05-25 18:42:47 +02:00
15f200df3a Added version pipe 2022-05-25 18:40:01 +02:00
a1a3ad6fb5 Build dev4 2022-05-25 17:09:31 +02:00
d6677d53a3 Added empty lines to generate output 2022-05-25 17:08:03 +02:00
07e43b50d1 Fixed generate pipe argument 2022-05-25 17:07:22 +02:00
ac83555b24 Added logic to handle cpl deps 2022-05-25 17:04:18 +02:00
1ab358059c Added more pre-build scripts 2022-05-25 16:57:21 +02:00
5bf83c0d77 Build dev2 2022-05-25 16:56:24 +02:00
03ac00c6e3 Bugfixes for set-version & CustomScriptService 2022-05-25 16:51:52 +02:00
0122d8fc78 Merge remote-tracking branch 'origin/2022.6.15' into 2022.6.15 2022-05-25 16:43:52 +02:00
a66ce96dbf Added set-version logic && Fixed CustomScriptService to handle arguments 2022-05-25 16:43:43 +02:00
6da8e30446 Added set-version logic && Fixed CustomScriptService to handle arguments 2022-05-25 16:43:28 +02:00
539ed13be4 Bugfixes for run service 2022-05-25 16:06:44 +02:00
036a553f64 Dev build 2022.6.15.dev1 2022-05-25 15:12:36 +02:00
976a14584b Dev build 2022.6.15.dev1 2022-05-25 15:12:30 +02:00
ed69f52927 Fixed generate service 2022-05-25 15:11:42 +02:00
98847495e6 Merge pull request '2022.6.14 - Pre & Post build scripts' (#79) from 2022.6.14 into 2022.6
Reviewed-on: #79
Closes #77
2022-05-25 14:15:24 +02:00
40f132da33 Added workspace scripts 2022-05-25 14:14:26 +02:00
5feb44595a Fixed cpl run command 2022-05-25 14:00:38 +02:00
48c6941f1a Added run command & tools/set-version project 2022-05-25 13:43:16 +02:00
a8756d493a Fixed error with RemoveService 2022-05-25 13:19:12 +02:00
9f4077a073 Improved configuration 2022-05-25 13:11:41 +02:00
3e7a3d75c5 Merge pull request 'cpl@2022.6.13 - cpl run command' (#78) from 2022.6.13 into 2022.6
Reviewed-on: #78
Closes #76
2022-05-25 08:42:41 +02:00
477d2d87d3 Added run command 2022-05-25 08:41:35 +02:00
7a65dbe39b Readded logic to handle pre and post scripts from workspace 2022-05-24 22:28:38 +02:00
f83755ac77 Removed console output & build new dev version 2022-05-24 20:20:42 +02:00
a590cfd066 Bugfixes for start service 2022-05-24 20:12:59 +02:00
f317035342 Bugfixes for test application & added validators to cli 2022-05-24 19:20:55 +02:00
8900bdd446 Removed invalid import && build for rc1 2022-05-24 18:20:31 +02:00
35ecf158a2 Fixed loading by base_type 2022-05-24 18:13:39 +02:00
353c1d30ec Merge pull request '2022.6.9 - Singleton initialisierung' (#75) from 2022.6.9 into 2022.6
Reviewed-on: #75
Closes #70
2022-05-24 17:52:13 +02:00
1c94fb5bd1 Added logic to load singletons when requested not when registered 2022-05-24 17:51:17 +02:00
cf305aeebb Merge pull request '2022.6.12 - Alle Umgebungsvariablen' (#74) from 2022.6.12 into 2022.6
Reviewed-on: #74
Closes #73
2022-05-24 17:39:20 +02:00
90e97433e0 Added logic to load all environment variables by prefix 2022-05-24 17:37:31 +02:00
125a85a0af Merge pull request '2022.6.7 - Pipes' (#69) from 2022.6.7 into 2022.6
Reviewed-on: #69
Closes #60
2022-05-22 20:28:46 +02:00
cfb8838c73 Added default pipes 2022-05-22 20:27:58 +02:00
824d491ebc Dev build projects 2022-05-22 18:49:31 +02:00
d694c408c0 Added CLI logic to generate pipes 2022-05-22 18:48:33 +02:00
d1bb266d49 Added Pipes 2022-05-22 18:43:10 +02:00
348 changed files with 9990 additions and 11445 deletions

3
.gitignore vendored
View File

@@ -135,3 +135,6 @@ dmypy.json
# IDE # IDE
.idea/ .idea/
PythonImportHelper-v2-Completion.json PythonImportHelper-v2-Completion.json
# cpl unittest stuff
unittests/test_*_playground

View File

@@ -13,6 +13,7 @@
## Table of Contents ## Table of Contents
<!-- TABLE OF CONTENTS --> <!-- TABLE OF CONTENTS -->
<ol> <ol>
<li><a href="#Features">Features</a></li>
<li> <li>
<a href="#getting-started">Getting Started</a> <a href="#getting-started">Getting Started</a>
<ul> <ul>
@@ -26,6 +27,52 @@
<li><a href="#contact">Contact</a></li> <li><a href="#contact">Contact</a></li>
</ol> </ol>
## Features
<!-- FEATURE OVERVIEW -->
- Expandle
- Application base
- Standardized application classes
- Application object builder
- Application extension classes
- Startup classes
- Startup extension classes
- Configuration
- Configure via object mapped JSON
- Console argument handling
- Console class for in and output
- Banner
- Spinner
- Options (menu)
- Table
- Write
- Write_at
- Write_line
- Write_line_at
- Dependency injection
- Service lifetimes: singleton, scoped and transient
- Providing of application environment
- Environment (development, staging, testing, production)
- Appname
- Customer
- Hostname
- Runtime directory
- Working directory
- Logging
- Standardized logger
- Log-level (FATAL, ERROR, WARN, INFO, DEBUG & TRACE)
- Mail handling
- Send mails
- Pipe classes
- Convert input
- Utils
- Credential manager
- Encryption via BASE64
- PIP wrapper class based on subprocess
- Run pip commands
- String converter to different variants
- to_lower_case
- to_camel_case
- ...
<!-- GETTING STARTED --> <!-- GETTING STARTED -->
## Getting Started ## Getting Started

View File

@@ -1,71 +1,95 @@
{ {
"WorkspaceSettings": { "WorkspaceSettings": {
"DefaultProject": "cpl_cli", "DefaultProject": "cpl-cli",
"Projects": { "Projects": {
"cpl_core": "src/cpl_core/cpl_core.json", "cpl-core": "src/cpl_core/cpl-core.json",
"cpl_cli": "src/cpl_cli/cpl_cli.json", "cpl-cli": "src/cpl_cli/cpl-cli.json",
"cpl_query": "src/cpl_query/cpl_query.json" "cpl-query": "src/cpl_query/cpl-query.json",
"set-version": "tools/set_version/set-version.json",
"set-pip-urls": "tools/set_pip_urls/set-pip-urls.json",
"unittests": "unittests/unittests/unittests.json",
"unittests_cli": "unittests/unittests_cli/unittests_cli.json",
"unittests_core": "unittests/unittests_core/unittests_core.json",
"unittests_query": "unittests/unittests_query/unittests_query.json",
"unittests_shared": "unittests/unittests_shared/unittests_shared.json"
}, },
"Scripts": { "Scripts": {
"hello-world": "echo 'Hello World'", "hello-world": "echo 'Hello World'",
"sv": "cpl set-version",
"set-version": "cpl run set-version $ARGS; echo '';",
"spu": "cpl set-pip-urls",
"set-pip-urls": "cpl run set-pip-urls $ARGS; echo '';",
"docs-build": "echo 'Build Documentation'; cd docs/; sphinx-apidoc -o source/ ../src/cpl_core; sphinx-apidoc -o source/ ../src/cpl_query; make clean; make html; rm source/cpl_query.tests.rst;", "docs-build": "echo 'Build Documentation'; cd docs/; sphinx-apidoc -o source/ ../src/cpl_core; sphinx-apidoc -o source/ ../src/cpl_query; make clean; make html; rm source/cpl_query.tests.rst;",
"db": "cpl build-docs", "db": "cpl docs-build",
"docs-open": "xdg-open $PWD/docs/build/html/index.html &", "docs-open": "xdg-open $PWD/docs/build/html/index.html &",
"do": "cpl docs-open", "do": "cpl docs-open",
"build-all": "cpl build-cli; cpl build-core; cpl build-query;", "test": "cpl run unittests",
"ba": "cpl build-all",
"build-cli": "echo 'Build cpl_cli'; cd ./src/cpl_cli; cpl build; cd ../../;",
"build-core": "echo 'Build cpl_core'; cd ./src/cpl_core; cpl build; cd ../../;",
"build-query": "echo 'Build cpl_query'; cd ./src/cpl_query; cpl build; cd ../../;",
"pre-build-all": "cpl sv $ARGS; cpl spu $ARGS;",
"build-all": "cpl build-cli; cpl build-core; cpl build-query; cpl build-set-pip-urls; cpl build-set-version",
"ba": "cpl build-all $ARGS",
"build-cli": "echo 'Build cpl-cli'; cd ./src/cpl_cli; cpl build; cd ../../;",
"build-core": "echo 'Build cpl-core'; cd ./src/cpl_core; cpl build; cd ../../;",
"build-query": "echo 'Build cpl-query'; cd ./src/cpl_query; cpl build; cd ../../;",
"build-set-pip-urls": "echo 'Build set-pip-urls'; cd ./tools/set_pip_urls; cpl build; cd ../../;",
"build-set-version": "echo 'Build set-version'; cd ./tools/set_version; cpl build; cd ../../;",
"pre-publish-all": "cpl sv $ARGS; cpl spu $ARGS;",
"publish-all": "cpl publish-cli; cpl publish-core; cpl publish-query;", "publish-all": "cpl publish-cli; cpl publish-core; cpl publish-query;",
"pa": "cpl build-all", "pa": "cpl build-all $ARGS",
"publish-cli": "echo 'Publish cpl_cli'; cd ./src/cpl_cli; cpl publish; cd ../../;", "publish-cli": "echo 'Publish cpl-cli'; cd ./src/cpl_cli; cpl publish; cd ../../;",
"publish-core": "echo 'Publish cpl_core'; cd ./src/cpl_core; cpl publish; cd ../../;", "publish-core": "echo 'Publish cpl-core'; cd ./src/cpl_core; cpl publish; cd ../../;",
"publish-query": "echo 'Publish cpl_query'; cd ./src/cpl_query; cpl publish; cd ../../;", "publish-query": "echo 'Publish cpl_query'; cd ./src/cpl_query; cpl publish; cd ../../;",
"upload-prod-cli": "echo 'PROD Upload cpl_cli'; cpl upl-prod-cli;", "upload-prod-cli": "echo 'PROD Upload cpl-cli'; cpl upl-prod-cli;",
"upload-prod-core": "echo 'PROD Upload cpl_core'; cpl upl-prod-core;",
"upload-prod-query": "echo 'PROD Upload cpl_query'; cpl upl-prod-query;",
"upload-exp-cli": "echo 'EXP Upload cpl_cli'; cpl upl-exp-cli;",
"upload-exp-core": "echo 'EXP Upload cpl_core'; cpl upl-exp-core;",
"upload-exp-query": "echo 'EXP Upload cpl_query'; cpl upl-exp-query;",
"upload-dev-cli": "echo 'DEV Upload cpl_cli'; cpl upl-dev-cli;",
"upload-dev-core": "echo 'DEV Upload cpl_core'; cpl upl-dev-core;",
"upload-dev-query": "echo 'DEV Upload cpl_query'; cpl upl-dev-query;",
"upl-prod-cli": "twine upload -r pip.sh-edraft.de dist/cpl-cli/publish/setup/*", "upl-prod-cli": "twine upload -r pip.sh-edraft.de dist/cpl-cli/publish/setup/*",
"upload-prod-core": "echo 'PROD Upload cpl-core'; cpl upl-prod-core;",
"upl-prod-core": "twine upload -r pip.sh-edraft.de dist/cpl-core/publish/setup/*", "upl-prod-core": "twine upload -r pip.sh-edraft.de dist/cpl-core/publish/setup/*",
"upload-prod-query": "echo 'PROD Upload cpl_query'; cpl upl-prod-query;",
"upl-prod-query": "twine upload -r pip.sh-edraft.de dist/cpl-query/publish/setup/*", "upl-prod-query": "twine upload -r pip.sh-edraft.de dist/cpl-query/publish/setup/*",
"upload-exp-cli": "echo 'EXP Upload cpl-cli'; cpl upl-exp-cli;",
"upl-exp-cli": "twine upload -r pip-exp.sh-edraft.de dist/cpl-cli/publish/setup/*", "upl-exp-cli": "twine upload -r pip-exp.sh-edraft.de dist/cpl-cli/publish/setup/*",
"upload-exp-core": "echo 'EXP Upload cpl-core'; cpl upl-exp-core;",
"upl-exp-core": "twine upload -r pip-exp.sh-edraft.de dist/cpl-core/publish/setup/*", "upl-exp-core": "twine upload -r pip-exp.sh-edraft.de dist/cpl-core/publish/setup/*",
"upload-exp-query": "echo 'EXP Upload cpl_query'; cpl upl-exp-query;",
"upl-exp-query": "twine upload -r pip-exp.sh-edraft.de dist/cpl-query/publish/setup/*", "upl-exp-query": "twine upload -r pip-exp.sh-edraft.de dist/cpl-query/publish/setup/*",
"upload-dev-cli": "echo 'DEV Upload cpl-cli'; cpl upl-dev-cli;",
"upl-dev-cli": "twine upload -r pip-dev.sh-edraft.de dist/cpl-cli/publish/setup/*", "upl-dev-cli": "twine upload -r pip-dev.sh-edraft.de dist/cpl-cli/publish/setup/*",
"upload-dev-core": "echo 'DEV Upload cpl-core'; cpl upl-dev-core;",
"upl-dev-core": "twine upload -r pip-dev.sh-edraft.de dist/cpl-core/publish/setup/*", "upl-dev-core": "twine upload -r pip-dev.sh-edraft.de dist/cpl-core/publish/setup/*",
"upload-dev-query": "echo 'DEV Upload cpl_query'; cpl upl-dev-query;",
"upl-dev-query": "twine upload -r pip-dev.sh-edraft.de dist/cpl-query/publish/setup/*", "upl-dev-query": "twine upload -r pip-dev.sh-edraft.de dist/cpl-query/publish/setup/*",
"pre-deploy-prod": "cpl sv $ARGS; cpl spu --environment=production;",
"deploy-prod": "cpl deploy-prod-cli; cpl deploy-prod-core; cpl deploy-prod-query;", "deploy-prod": "cpl deploy-prod-cli; cpl deploy-prod-core; cpl deploy-prod-query;",
"dp": "cpl deploy-prod", "dp": "cpl deploy-prod $ARGS",
"deploy-prod-cli": "cpl publish-cli; cpl upload-prod-cli", "deploy-prod-cli": "cpl publish-cli; cpl upload-prod-cli",
"deploy-prod-core": "cpl publish-core; cpl upload-prod-core", "deploy-prod-core": "cpl publish-core; cpl upload-prod-core",
"deploy-prod-query": "cpl publish-query; cpl upload-prod-query", "deploy-prod-query": "cpl publish-query; cpl upload-prod-query",
"pre-deploy-exp": "cpl sv $ARGS; cpl spu --environment=staging;",
"deploy-exp": "cpl deploy-exp-cli; cpl deploy-exp-core; cpl deploy-exp-query;", "deploy-exp": "cpl deploy-exp-cli; cpl deploy-exp-core; cpl deploy-exp-query;",
"de": "cpl deploy-exp", "de": "cpl deploy-exp $ARGS",
"deploy-exp-cli": "cpl publish-cli; cpl upload-exp-cli", "deploy-exp-cli": "cpl publish-cli; cpl upload-exp-cli",
"deploy-exp-core": "cpl publish-core; cpl upload-exp-core", "deploy-exp-core": "cpl publish-core; cpl upload-exp-core",
"deploy-exp-query": "cpl publish-query; cpl upload-exp-query", "deploy-exp-query": "cpl publish-query; cpl upload-exp-query",
"pre-deploy-dev": "cpl sv $ARGS; cpl spu --environment=development;",
"deploy-dev": "cpl deploy-dev-cli; cpl deploy-dev-core; cpl deploy-dev-query;", "deploy-dev": "cpl deploy-dev-cli; cpl deploy-dev-core; cpl deploy-dev-query;",
"dd": "cpl deploy-dev", "dd": "cpl deploy-dev $ARGS",
"deploy-dev-cli": "cpl publish-cli; cpl upload-dev-cli", "deploy-dev-cli": "cpl publish-cli; cpl upload-dev-cli",
"deploy-dev-core": "cpl publish-core; cpl upload-dev-core", "deploy-dev-core": "cpl publish-core; cpl upload-dev-core",
"deploy-dev-query": "cpl publish-query; cpl upload-dev-query" "deploy-dev-query": "cpl publish-query; cpl upload-dev-query",
"dev-install": "cpl di-core; cpl di-cli; cpl di-query;",
"di": "cpl dev-install",
"di-core": "pip install cpl-core --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de",
"di-cli": "pip install cpl-cli --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de",
"di-query": "pip install cpl-query --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de"
} }
} }
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
docs/build/doctrees/tutorials.doctree vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
# Sphinx build info version 1 # Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8170277cf12e5442e6180427108a8adf config: 9ea51a00cf3559575c97b7efd7a002e5
tags: 645f666f9bcd5a90fca523b33c5a78b7 tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@@ -19,7 +19,13 @@ If you call the command in a CPL workspace, you can use the project names. Other
## Arguments ## Arguments
| Argument | Description | Value type | | Argument | Description | Value type |
| ------------------------- |:---------------------------------------------------------------:|:----------------:| |------------------------|:----------------------------------------------------------:|:----------:|
| ```<source-project>``` | Name of the project to which the reference has to be added | ```str``` | ```<source-project>``` | Name of the project to which the reference has to be added | ```str``` |
| ```<target-project>``` | Name of the project to be referenced | ```str``` | ```<target-project>``` | Name of the project to be referenced | ```str``` |
## Flags
| Argument | Description |
|------------------|:------------------------------------------:|
| ```--simulate``` | Specifies whether the command is simulated |

View File

@@ -25,11 +25,14 @@ Generates files based on a schematic.
## Schematics ## Schematics
| Schematic | Description | Arguments | | Schematic | Description | Arguments |
| ----------------- |:-------------------:|:----------------:| |-----------------|:-------------------------------------:|:------------:|
| ```abc``` | Abstract base class | ```<name>``` | ```abc``` | Abstract base class | ```<name>``` |
| ```class``` | Class | ```<name>``` | ```class``` | Class | ```<name>``` |
| ```enum``` | Enum class | ```<name>``` | ```enum``` | Enum class | ```<name>``` |
| ```service``` | Service class | ```<name>``` | ```pipe``` | Pipe class | ```<name>``` |
| ```settings``` | [Configmodel](cpl_core.configuration) | ```<name>``` | ```service``` | Service class | ```<name>``` |
| ```thread``` | Thread class | ```<name>``` | ```settings``` | [Configmodel](cpl_core.configuration) | ```<name>``` |
| ```test``` | Test class | ```<name>``` |
| ```thread``` | Thread class | ```<name>``` |
| ```validator``` | Validator class | ```<name>``` |

View File

@@ -18,6 +18,14 @@ Without given package it will install the depedencies of the CPL project your in
## Arguments ## Arguments
| Argument | Description | Value type | | Argument | Description | Value type |
| ----------------- |:-----------------------------:|:-------------:| |-----------------|:----------------------:|:----------:|
| ```<package>``` | The package to install | ```str``` | | ```<package>``` | The package to install | ```str``` |
## Flags
| Argument | Description |
|------------------|:----------------------------------------------------:|
| ```--dev``` | Specifies whether the command is in development mode |
| ```--virtual``` | Specifies whether the command is virtual mode |
| ```--simulate``` | Specifies whether the command is simulated |

View File

@@ -18,14 +18,25 @@ Generates a workspace and initial project or add a project to workspace.
If the command is running in a CPL workspace, it will add the new project to the workspace. If the command is running in a CPL workspace, it will add the new project to the workspace.
| Argument | Description | Value type | | Argument | Description | Value type |
| ----------------- |:-----------------------------------------------------:|:-------------:| |--------------|:----------------------------------------------------:|:----------:|
| ```<type>``` | The type of the project, see [types](#project-types) | ```str``` | | ```<type>``` | The type of the project, see [types](#project-types) | ```str``` |
| ```<name>``` | The name of the project | ```str``` | | ```<name>``` | The name of the project | ```str``` |
## Project types ## Project types
| Project type | Description | | Project type | Description |
| ----------------- |:-----------------------------:| |---------------|:----------------------------:|
| ```console``` | A simple console application | | ```console``` | A simple console application |
| ```library``` | A package | | ```library``` | A package |
## Flags
| Argument | Description |
|---------------------------|:-------------------------------------------:|
| ```--async``` | Specifies whether async is used |
| ```--application-base``` | Specifies whether application base is used |
| ```--startup``` | Specifies whether startup is used |
| ```--service-providing``` | Specifies whether service-providing is used |
| ```--nothing``` | Specifies whether nothing is used |
| ```--venv``` | Specifies whether venv is used |

View File

@@ -19,6 +19,12 @@ If you call the command in a CPL workspace, you can use the project names. Other
## Arguments ## Arguments
| Argument | Description | Value type | | Argument | Description | Value type |
| ------------------------- |:-------------------------------------:|:----------------:| |-----------------|:---------------------------------:|:----------:|
| ```<project>``` | The name of the project to delete | ```str``` | ```<project>``` | The name of the project to delete | ```str``` |
## Flags
| Argument | Description |
|------------------|:----------------------------------------------------:|
| ```--simulate``` | Specifies whether the command is simulated |

View File

@@ -17,6 +17,14 @@ Uninstall given package from project via pip.
## Arguments ## Arguments
| Argument | Description | Value type | | Argument | Description | Value type |
| ----------------- |:-----------------------------:|:-------------:| |-----------------|:------------------------:|:----------:|
| ```<package>``` | The package to uninstall | ```str``` | | ```<package>``` | The package to uninstall | ```str``` |
## Flags
| Argument | Description |
|------------------|:----------------------------------------------------:|
| ```--dev``` | Specifies whether the command is in development mode |
| ```--virtual``` | Specifies whether the command is virtual mode |
| ```--simulate``` | Specifies whether the command is simulated |

View File

@@ -5,3 +5,9 @@ Updates the CPL and project dependencies.
cpl **update** <br> cpl **update** <br>
cpl **u** <br> cpl **u** <br>
cpl **U** cpl **U**
## Flags
| Argument | Description |
|------------------|:----------------------------------------------------:|
| ```--simulate``` | Specifies whether the command is simulated |

View File

@@ -0,0 +1,77 @@
cpl\_core.pipes
=======================
Submodules
----------
cpl\_core.pipes.bool\_pipe module
---------------------------------
.. automodule:: cpl_core.pipes.bool_pipe
:members:
:undoc-members:
:show-inheritance:
cpl\_core.pipes.first\_char\_to\_lower\_pipe module
---------------------------------------------------
.. automodule:: cpl_core.pipes.first_char_to_lower_pipe
:members:
:undoc-members:
:show-inheritance:
cpl\_core.pipes.first\_to\_upper\_pipe module
---------------------------------------------
.. automodule:: cpl_core.pipes.first_to_upper_pipe
:members:
:undoc-members:
:show-inheritance:
cpl\_core.pipes.ip\_address\_pipe module
----------------------------------------
.. automodule:: cpl_core.pipes.ip_address_pipe
:members:
:undoc-members:
:show-inheritance:
cpl\_core.pipes.pipe\_abc module
--------------------------------
.. automodule:: cpl_core.pipes.pipe_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.pipes.to\_camel\_case\_pipe module
--------------------------------------------
.. automodule:: cpl_core.pipes.to_camel_case_pipe
:members:
:undoc-members:
:show-inheritance:
cpl\_core.pipes.to\_snake\_case\_pipe module
--------------------------------------------
.. automodule:: cpl_core.pipes.to_snake_case_pipe
:members:
:undoc-members:
:show-inheritance:
cpl\_core.pipes.version\_pipe module
------------------------------------
.. automodule:: cpl_core.pipes.version_pipe
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: cpl_core.pipes
:members:
:undoc-members:
:show-inheritance:

View File

@@ -12,5 +12,6 @@ API Reference
cpl_core.environment cpl_core.environment
cpl_core.logging cpl_core.logging
cpl_core.mailing cpl_core.mailing
cpl_core.pipes
cpl_core.time cpl_core.time
cpl_core.utils cpl_core.utils

View File

@@ -1,45 +0,0 @@
cpl\_query.tests package
========================
Submodules
----------
cpl\_query.tests.iterable\_test module
--------------------------------------
.. automodule:: cpl_query.tests.iterable_test
:members:
:undoc-members:
:show-inheritance:
cpl\_query.tests.models module
------------------------------
.. automodule:: cpl_query.tests.models
:members:
:undoc-members:
:show-inheritance:
cpl\_query.tests.query\_test module
-----------------------------------
.. automodule:: cpl_query.tests.query_test
:members:
:undoc-members:
:show-inheritance:
cpl\_query.tests.tester module
------------------------------
.. automodule:: cpl_query.tests.tester
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: cpl_query.tests
:members:
:undoc-members:
:show-inheritance:

View File

@@ -6,4 +6,5 @@ Getting started
quickstart quickstart
setup setup
tutorials

View File

@@ -4,6 +4,53 @@ The Common Python Library (CPL) is a package for python and a development platfo
This CPL docs help you learn, understand and use the package. From your first application to complex apps for enterprises. This CPL docs help you learn, understand and use the package. From your first application to complex apps for enterprises.
## Feature overview
- Expandle
- Application base
- Standardized application classes
- Application object builder
- Application extension classes
- Startup classes
- Startup extension classes
- Configuration
- Configure via object mapped JSON
- Console argument handling
- Console class for in and output
- Banner
- Spinner
- Options (menu)
- Table
- Write
- Write_at
- Write_line
- Write_line_at
- Dependency injection
- Service lifetimes: singleton, scoped and transient
- Providing of application environment
- Environment (development, staging, testing, production)
- Appname
- Customer
- Hostname
- Runtime directory
- Working directory
- Logging
- Standardized logger
- Log-level (FATAL, ERROR, WARN, INFO, DEBUG & TRACE)
- Mail handling
- Send mails
- Pipe classes
- Convert input
- Utils
- Credential manager
- Encryption via BASE64
- PIP wrapper class based on subprocess
- Run pip commands
- String converter to different variants
- to_lower_case
- to_camel_case
- ...
## Explore ## Explore
- [Getting started](quickstart) - [Getting started](quickstart)

View File

@@ -0,0 +1,3 @@
# Using appsettings.json
## Comming soon

View File

@@ -0,0 +1,3 @@
# Handle console arguments
## Comming soon

View File

@@ -0,0 +1,3 @@
# Use cpl_core.console.Console
## Comming soon

View File

@@ -0,0 +1,3 @@
# Create startup class
## Comming soon

View File

@@ -0,0 +1,3 @@
# Extend application
## Comming soon

View File

@@ -0,0 +1,3 @@
# Extend startup
## Comming soon

View File

@@ -0,0 +1,3 @@
# Use builtin logger
## Comming soon

View File

@@ -0,0 +1,3 @@
# Send mails
## Comming soon

View File

@@ -0,0 +1,14 @@
Tutorials
=============
.. toctree::
:maxdepth: 4
tutorials.extend-application
tutorials.create-startup
tutorials.extend-startup
tutorials.appsettings
tutorials.console-arguments
tutorials.console
tutorials.logging
tutorials.mail

View File

@@ -0,0 +1,134 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}

View File

@@ -4,7 +4,7 @@
* *
* Sphinx stylesheet -- basic theme. * Sphinx stylesheet -- basic theme.
* *
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.
* *
*/ */
@@ -130,7 +130,7 @@ ul.search li a {
font-weight: bold; font-weight: bold;
} }
ul.search li div.context { ul.search li p.context {
color: #888; color: #888;
margin: 2px 0 0 30px; margin: 2px 0 0 30px;
text-align: left; text-align: left;
@@ -222,7 +222,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */ /* -- general body styles --------------------------------------------------- */
div.body { div.body {
min-width: 450px; min-width: 360px;
max-width: 800px; max-width: 800px;
} }
@@ -236,7 +236,6 @@ div.body p, div.body dd, div.body li, div.body blockquote {
a.headerlink { a.headerlink {
visibility: hidden; visibility: hidden;
} }
a.brackets:before, a.brackets:before,
span.brackets > a:before{ span.brackets > a:before{
content: "["; content: "[";
@@ -247,6 +246,7 @@ span.brackets > a:after {
content: "]"; content: "]";
} }
h1:hover > a.headerlink, h1:hover > a.headerlink,
h2:hover > a.headerlink, h2:hover > a.headerlink,
h3:hover > a.headerlink, h3:hover > a.headerlink,
@@ -277,25 +277,25 @@ p.rubric {
font-weight: bold; font-weight: bold;
} }
img.align-left, .figure.align-left, object.align-left { img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left; clear: left;
float: left; float: left;
margin-right: 1em; margin-right: 1em;
} }
img.align-right, .figure.align-right, object.align-right { img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right; clear: right;
float: right; float: right;
margin-left: 1em; margin-left: 1em;
} }
img.align-center, .figure.align-center, object.align-center { img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block; display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
img.align-default, .figure.align-default { img.align-default, figure.align-default, .figure.align-default {
display: block; display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@@ -319,7 +319,8 @@ img.align-default, .figure.align-default {
/* -- sidebars -------------------------------------------------------------- */ /* -- sidebars -------------------------------------------------------------- */
div.sidebar { div.sidebar,
aside.sidebar {
margin: 0 0 0.5em 1em; margin: 0 0 0.5em 1em;
border: 1px solid #ddb; border: 1px solid #ddb;
padding: 7px; padding: 7px;
@@ -333,13 +334,11 @@ div.sidebar {
p.sidebar-title { p.sidebar-title {
font-weight: bold; font-weight: bold;
} }
div.admonition, div.topic, blockquote { div.admonition, div.topic, blockquote {
clear: left; clear: left;
} }
/* -- topics ---------------------------------------------------------------- */ /* -- topics ---------------------------------------------------------------- */
div.topic { div.topic {
border: 1px solid #ccc; border: 1px solid #ccc;
padding: 7px; padding: 7px;
@@ -377,12 +376,14 @@ div.body p.centered {
/* -- content of sidebars/topics/admonitions -------------------------------- */ /* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child, div.sidebar > :last-child,
aside.sidebar > :last-child,
div.topic > :last-child, div.topic > :last-child,
div.admonition > :last-child { div.admonition > :last-child {
margin-bottom: 0; margin-bottom: 0;
} }
div.sidebar::after, div.sidebar::after,
aside.sidebar::after,
div.topic::after, div.topic::after,
div.admonition::after, div.admonition::after,
blockquote::after { blockquote::after {
@@ -425,10 +426,6 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa; border-bottom: 1px solid #aaa;
} }
table.footnote td, table.footnote th {
border: 0 !important;
}
th { th {
text-align: left; text-align: left;
padding-right: 5px; padding-right: 5px;
@@ -455,20 +452,22 @@ td > :last-child {
/* -- figures --------------------------------------------------------------- */ /* -- figures --------------------------------------------------------------- */
div.figure { div.figure, figure {
margin: 0.5em; margin: 0.5em;
padding: 0.5em; padding: 0.5em;
} }
div.figure p.caption { div.figure p.caption, figcaption {
padding: 0.3em; padding: 0.3em;
} }
div.figure p.caption span.caption-number { div.figure p.caption span.caption-number,
figcaption span.caption-number {
font-style: italic; font-style: italic;
} }
div.figure p.caption span.caption-text { div.figure p.caption span.caption-text,
figcaption span.caption-text {
} }
/* -- field list styles ----------------------------------------------------- */ /* -- field list styles ----------------------------------------------------- */
@@ -503,6 +502,63 @@ table.hlist td {
vertical-align: top; vertical-align: top;
} }
/* -- object description styles --------------------------------------------- */
.sig {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}
.sig-name, code.descname {
background-color: transparent;
font-weight: bold;
}
.sig-name {
font-size: 1.1em;
}
code.descname {
font-size: 1.2em;
}
.sig-prename, code.descclassname {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.sig-param.n {
font-style: italic;
}
/* C++ specific styling */
.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}
.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}
.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}
.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}
/* -- other body styles ----------------------------------------------------- */ /* -- other body styles ----------------------------------------------------- */
@@ -553,6 +609,7 @@ ul.simple p {
margin-bottom: 0; margin-bottom: 0;
} }
/* Docutils 0.17 and older (footnotes & citations) */
dl.footnote > dt, dl.footnote > dt,
dl.citation > dt { dl.citation > dt {
float: left; float: left;
@@ -570,6 +627,33 @@ dl.citation > dd:after {
clear: both; clear: both;
} }
/* Docutils 0.18+ (footnotes & citations) */
aside.footnote > span,
div.citation > span {
float: left;
}
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {
margin-bottom: 0em;
}
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
content: "";
clear: both;
}
/* Footnotes & citations ends */
dl.field-list { dl.field-list {
display: grid; display: grid;
grid-template-columns: fit-content(30%) auto; grid-template-columns: fit-content(30%) auto;
@@ -629,14 +713,6 @@ dl.glossary dt {
font-size: 1.1em; font-size: 1.1em;
} }
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified { .versionmodified {
font-style: italic; font-style: italic;
} }
@@ -677,8 +753,9 @@ dl.glossary dt {
.classifier:before { .classifier:before {
font-style: normal; font-style: normal;
margin: 0.5em; margin: 0 0.5em;
content: ":"; content: ":";
display: inline-block;
} }
abbr, acronym { abbr, acronym {
@@ -702,6 +779,7 @@ span.pre {
-ms-hyphens: none; -ms-hyphens: none;
-webkit-hyphens: none; -webkit-hyphens: none;
hyphens: none; hyphens: none;
white-space: nowrap;
} }
div[class*="highlight-"] { div[class*="highlight-"] {
@@ -765,8 +843,12 @@ div.code-block-caption code {
table.highlighttable td.linenos, table.highlighttable td.linenos,
span.linenos, span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none; user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
} }
div.code-block-caption span.caption-number { div.code-block-caption span.caption-number {
@@ -781,16 +863,6 @@ div.literal-block-wrapper {
margin: 1em 0; margin: 1em 0;
} }
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code { code.xref, a code {
background-color: transparent; background-color: transparent;
font-weight: bold; font-weight: bold;

File diff suppressed because one or more lines are too long

View File

@@ -2,320 +2,263 @@
* doctools.js * doctools.js
* ~~~~~~~~~~~ * ~~~~~~~~~~~
* *
* Sphinx JavaScript utilities for all documentation. * Base JavaScript utilities for all Sphinx HTML documentation.
* *
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details. * :license: BSD, see LICENSE for details.
* *
*/ */
"use strict";
/** const _ready = (callback) => {
* select a different prefix for underscore if (document.readyState !== "loading") {
*/ callback();
$u = _.noConflict(); } else {
document.addEventListener("DOMContentLoaded", callback);
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
} }
return decodeURIComponent(x.replace(/\+/g, ' '));
}; };
/** /**
* small helper function to urlencode strings * highlight a given string on a node by wrapping it in
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name. * span elements with the given class name.
*/ */
jQuery.fn.highlightText = function(text, className) { const _highlight = (node, addItems, text, className) => {
function highlight(node, addItems) { if (node.nodeType === Node.TEXT_NODE) {
if (node.nodeType === 3) { const val = node.nodeValue;
var val = node.nodeValue; const parent = node.parentNode;
var pos = val.toLowerCase().indexOf(text); const pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && if (
!jQuery(node.parentNode).hasClass(className) && pos >= 0 &&
!jQuery(node.parentNode).hasClass("nohighlight")) { !parent.classList.contains(className) &&
var span; !parent.classList.contains("nohighlight")
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); ) {
if (isInSVG) { let span;
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else { const closestNode = parent.closest("body, svg, foreignObject");
span = document.createElement("span"); const isInSVG = closestNode && closestNode.matches("svg");
span.className = className; if (isInSVG) {
} span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
span.appendChild(document.createTextNode(val.substr(pos, text.length))); } else {
node.parentNode.insertBefore(span, node.parentNode.insertBefore( span = document.createElement("span");
span.classList.add(className);
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)), document.createTextNode(val.substr(pos + text.length)),
node.nextSibling)); node.nextSibling
node.nodeValue = val.substr(0, pos); )
if (isInSVG) { );
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); node.nodeValue = val.substr(0, pos);
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x; if (isInSVG) {
rect.y.baseVal.value = bbox.y; const rect = document.createElementNS(
rect.width.baseVal.value = bbox.width; "http://www.w3.org/2000/svg",
rect.height.baseVal.value = bbox.height; "rect"
rect.setAttribute('class', className); );
addItems.push({ const bbox = parent.getBBox();
"parent": node.parentNode, rect.x.baseVal.value = bbox.x;
"target": rect}); rect.y.baseVal.value = bbox.y;
} rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute("class", className);
addItems.push({ parent: parent, target: rect });
} }
} }
else if (!jQuery(node).is("button, select, textarea")) { } else if (node.matches && !node.matches("button, select, textarea")) {
jQuery.each(node.childNodes, function() { node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
highlight(this, addItems);
});
}
} }
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
}; };
const _highlightText = (thisNode, text, className) => {
/* let addItems = [];
* backward compatibility for jQuery.browser _highlight(thisNode, addItems, text, className);
* This will be supported until firefox bug is fixed. addItems.forEach((obj) =>
*/ obj.parent.insertAdjacentElement("beforebegin", obj.target)
if (!jQuery.browser) { );
jQuery.uaMatch = function(ua) { };
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
/** /**
* Small JavaScript module for the documentation. * Small JavaScript module for the documentation.
*/ */
var Documentation = { const Documentation = {
init: () => {
init : function() { Documentation.highlightSearchWords();
this.fixFirefoxAnchorBug(); Documentation.initDomainIndexTable();
this.highlightSearchWords(); Documentation.initOnKeyListeners();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
}, },
/** /**
* i18n support * i18n support
*/ */
TRANSLATIONS : {}, TRANSLATIONS: {},
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
LOCALE : 'unknown', LOCALE: "unknown",
// gettext and ngettext don't access this so that the functions // gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext) // can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) { gettext: (string) => {
var translated = Documentation.TRANSLATIONS[string]; const translated = Documentation.TRANSLATIONS[string];
if (typeof translated === 'undefined') switch (typeof translated) {
return string; case "undefined":
return (typeof translated === 'string') ? translated : translated[0]; return string; // no translation
case "string":
return translated; // translation exists
default:
return translated[0]; // (singular, plural) translation tuple exists
}
}, },
ngettext : function(singular, plural, n) { ngettext: (singular, plural, n) => {
var translated = Documentation.TRANSLATIONS[singular]; const translated = Documentation.TRANSLATIONS[singular];
if (typeof translated === 'undefined') if (typeof translated !== "undefined")
return (n == 1) ? singular : plural; return translated[Documentation.PLURAL_EXPR(n)];
return translated[Documentation.PLURALEXPR(n)]; return n === 1 ? singular : plural;
}, },
addTranslations : function(catalog) { addTranslations: (catalog) => {
for (var key in catalog.messages) Object.assign(Documentation.TRANSLATIONS, catalog.messages);
this.TRANSLATIONS[key] = catalog.messages[key]; Documentation.PLURAL_EXPR = new Function(
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); "n",
this.LOCALE = catalog.locale; `return (${catalog.plural_expr})`
}, );
Documentation.LOCALE = catalog.locale;
/**
* add context elements like header anchor links
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
}, },
/** /**
* highlight the search words provided in the url in the text * highlight the search words provided in the url in the text
*/ */
highlightSearchWords : function() { highlightSearchWords: () => {
var params = $.getQueryParameters(); const highlight =
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; new URLSearchParams(window.location.search).get("highlight") || "";
if (terms.length) { const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
var body = $('div.body'); if (terms.length === 0) return; // nothing to do
if (!body.length) {
body = $('body');
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
/** // There should never be more than one element matching "div.body"
* init the domain index toggle buttons const divBody = document.querySelectorAll("div.body");
*/ const body = divBody.length ? divBody[0] : document.querySelector("body");
initIndexTable : function() { window.setTimeout(() => {
var togglers = $('img.toggler').click(function() { terms.forEach((term) => _highlightText(body, term, "highlighted"));
var src = $(this).attr('src'); }, 10);
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle(); const searchBox = document.getElementById("searchbox");
if (src.substr(-9) === 'minus.png') if (searchBox === null) return;
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); searchBox.appendChild(
else document
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); .createRange()
}).css('display', ''); .createContextualFragment(
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { '<p class="highlight-link">' +
togglers.click(); '<a href="javascript:Documentation.hideSearchWords()">' +
} Documentation.gettext("Hide Search Matches") +
"</a></p>"
)
);
}, },
/** /**
* helper function to hide the search marks again * helper function to hide the search marks again
*/ */
hideSearchWords : function() { hideSearchWords: () => {
$('#searchbox .highlight-link').fadeOut(300); document
$('span.highlighted').removeClass('highlighted'); .querySelectorAll("#searchbox .highlight-link")
.forEach((el) => el.remove());
document
.querySelectorAll("span.highlighted")
.forEach((el) => el.classList.remove("highlighted"));
const url = new URL(window.location);
url.searchParams.delete("highlight");
window.history.replaceState({}, "", url);
}, },
/** /**
* make the url absolute * helper function to focus on search bar
*/ */
makeURL : function(relativeURL) { focusSearchBar: () => {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; document.querySelectorAll("input[name=q]")[0]?.focus();
}, },
/** /**
* get the current relative url * Initialise the domain index toggle buttons
*/ */
getCurrentURL : function() { initDomainIndexTable: () => {
var path = document.location.pathname; const toggler = (el) => {
var parts = path.split(/\//); const idNumber = el.id.substr(7);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
if (this === '..') if (el.src.substr(-9) === "minus.png") {
parts.pop(); el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
}); toggledRows.forEach((el) => (el.style.display = "none"));
var url = parts.join('/'); } else {
return path.substring(url.lastIndexOf('/') + 1, path.length - 1); el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
toggledRows.forEach((el) => (el.style.display = ""));
}
};
const togglerElements = document.querySelectorAll("img.toggler");
togglerElements.forEach((el) =>
el.addEventListener("click", (event) => toggler(event.currentTarget))
);
togglerElements.forEach((el) => (el.style.display = ""));
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
}, },
initOnKeyListeners: function() { initOnKeyListeners: () => {
$(document).keydown(function(event) { // only install a listener if it is really needed
var activeElementType = document.activeElement.tagName; if (
// don't navigate when in search box, textarea, dropdown or button !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey )
&& !event.shiftKey) { return;
switch (event.keyCode) {
case 37: // left const blacklistedElements = new Set([
var prevHref = $('link[rel="prev"]').prop('href'); "TEXTAREA",
if (prevHref) { "INPUT",
window.location.href = prevHref; "SELECT",
return false; "BUTTON",
]);
document.addEventListener("keydown", (event) => {
if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements
if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys
if (!event.shiftKey) {
switch (event.key) {
case "ArrowLeft":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const prevLink = document.querySelector('link[rel="prev"]');
if (prevLink && prevLink.href) {
window.location.href = prevLink.href;
event.preventDefault();
} }
case 39: // right break;
var nextHref = $('link[rel="next"]').prop('href'); case "ArrowRight":
if (nextHref) { if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
window.location.href = nextHref;
return false; const nextLink = document.querySelector('link[rel="next"]');
if (nextLink && nextLink.href) {
window.location.href = nextLink.href;
event.preventDefault();
} }
break;
case "Escape":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.hideSearchWords();
event.preventDefault();
} }
} }
// some keyboard layouts may need Shift to get /
switch (event.key) {
case "/":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.focusSearchBar();
event.preventDefault();
}
}); });
} },
}; };
// quick alias for translations // quick alias for translations
_ = Documentation.gettext; const _ = Documentation.gettext;
$(document).ready(function() { _ready(Documentation.init);
Documentation.init();
});

View File

@@ -1,12 +1,14 @@
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '', VERSION: '',
LANGUAGE: 'None', LANGUAGE: 'en',
COLLAPSE_INDEX: false, COLLAPSE_INDEX: false,
BUILDER: 'html', BUILDER: 'html',
FILE_SUFFIX: '.html', FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html', LINK_SUFFIX: '.html',
HAS_SOURCE: true, HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt', SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: false,
}; };

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More