454 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
419fcc3d29 Merge pull request '2022.6.5 - CLI Erweiterung' (#68) from 2022.6.5 into 2022.6
Reviewed-on: #68
Closes #54
2022-05-22 18:34:44 +02:00
24ab6a51c1 Refactored executable arguments 2022-05-22 18:33:07 +02:00
dec4a45d98 Added logic to add CLI commands from external packages 2022-05-22 18:32:34 +02:00
d11c56db03 Merge pull request 'cpl@2022.6.3 - Verbesserung der Parameter' (#67) from 2022.6.3 into 2022.6
Reviewed-on: #67
2022-05-22 17:38:21 +02:00
fc23315cc7 Build version 2022.6.3 2022-05-22 17:35:38 +02:00
1f503fe20d Build new version 2022-05-20 10:37:43 +02:00
4564f7ac0e Improved output & imports 2022-05-20 10:35:47 +02:00
7b823e1141 Added validator generation 2022-05-20 10:34:09 +02:00
dac3d9c6bb Added validators (closes #59) 2022-05-20 10:27:55 +02:00
ccca904cb8 Smaller output fixes 2022-05-20 09:17:51 +02:00
c66a81c0ec Dev build & migrated custom scripts 2022-05-20 09:12:28 +02:00
fb810e2943 Dev build & migrated custom scripts & add logic to prevent next executable 2022-05-20 09:10:29 +02:00
5cc663dedc Migrated generate command 2022-05-20 08:50:50 +02:00
593372699b BUild dev version 2022-05-20 08:44:32 +02:00
1899cb5b86 Added scripts to workspace 2022-05-19 20:49:48 +02:00
0a285f2d28 Improved help command 2022-05-19 20:23:21 +02:00
94c82e6701 Improved help command 2022-05-19 20:21:46 +02:00
0d37c86061 Removed console output 2022-05-19 20:05:22 +02:00
6c8e9ccd89 Migrated StartService to new argument parsing 2022-05-19 20:04:29 +02:00
e7cf545502 Migrated NewService to new argument parsing 2022-05-19 19:52:36 +02:00
44182eec86 Fixed value handling for variable arguments 2022-05-19 19:41:02 +02:00
0f5b1b7586 Improved argument handling 2022-05-19 19:37:32 +02:00
4fe073580a Migrated first commands to new argument parser 2022-05-19 18:12:47 +02:00
2fed654c16 Improved argument handling 2022-05-19 18:09:25 +02:00
8ebd4864d3 Improved & added commands 2022-05-19 08:25:32 +02:00
a495532a4d Removed console debug outputs 2022-05-18 22:29:44 +02:00
d87ce72f07 Improved argument parsing 2022-05-18 22:26:11 +02:00
50201346e2 Added functions to define console arguments 2022-05-18 18:21:05 +02:00
773b154371 Improved service collection 2022-05-18 18:20:25 +02:00
5b59d1d384 Merge pull request '2022.6.4' (#58) from 2022.6.4 into 2022.6
Reviewed-on: #58
2022-04-30 18:33:54 +02:00
dcd8583183 Build packages 2022-04-30 17:44:15 +02:00
97e52b39c0 Added logic to handle StartupExtension classes 2022-04-30 17:43:34 +02:00
581013b61a Merge pull request '2022.6.1' (#57) from 2022.6.1 into 2022.6
Reviewed-on: #57
2022-04-30 17:16:49 +02:00
fd68d25a1d Updated to python3.10 2022-04-30 17:15:26 +02:00
588f93f7b1 Updated packages 2022-04-30 16:41:52 +02:00
96f402dcdd Updated packages 2022-04-30 16:33:30 +02:00
c1b7fca8d5 Moved from pyfiglet to art 2022-01-19 22:06:59 +01:00
2e4e7ccc57 Fixed minor issues with console & updated packages 2022-01-19 15:06:26 +01:00
ada3d133df Changed exit() to sys.exit() 2022-01-19 12:44:23 +01:00
61e7b9d684 Fixed cpl new command 2022-01-15 23:28:22 +01:00
24172c658c Fixed cpl new command 2022-01-15 22:16:17 +01:00
62ac976b99 Fixed where query typing 2022-01-15 11:11:14 +01:00
1f445a99b2 Fixed typing in count function of cpl_query 2022-01-08 18:09:03 +01:00
025286052b Fixed typing in service collection abc 2022-01-08 17:58:22 +01:00
32a856f8e8 Published new version 2021-12-07 16:07:21 +01:00
21f50f3b24 Fixed table_abc 2021-12-07 16:06:20 +01:00
ce77d41246 Build new docs 2021-12-02 08:20:38 +01:00
dec137220c Improved TableABC 2021-11-30 17:48:08 +01:00
01c7e155c3 Fixed typo 2021-11-30 15:24:01 +01:00
dcbcb67ce8 Fixed db connection 2021-11-30 15:01:28 +01:00
d57fd10718 Fixed add_db_context function 2021-11-30 14:14:34 +01:00
2b91db5d81 Removed unsued parameter 2021-11-30 14:05:52 +01:00
dffa3de1ec Merge pull request '2021.11' (#50) from 2021.11 into master
Reviewed-on: #50
2021-11-30 12:03:03 +01:00
403837901b Added logic to simulate uninstall command 2021-11-30 11:55:11 +01:00
0de725c907 Added logic to simulate install command 2021-11-30 11:51:45 +01:00
e811e08c52 Changed version of cli 2021-11-30 11:22:02 +01:00
6518ae7516 Changed version of query 2021-11-30 11:21:19 +01:00
95b5f99f1f Changed core version 2021-11-30 11:20:15 +01:00
de22e79b71 Removed console from db connection 2021-11-30 11:15:41 +01:00
127c67e566 Improved imports 2021-11-30 11:14:40 +01:00
3523dbd5c5 Improved typing 2021-11-30 11:12:13 +01:00
b526a07e19 Added demo for SQL Support 2021-11-30 11:10:36 +01:00
d9f10edbb7 [WIP] Added native mysql support 2021-11-29 20:55:43 +01:00
7616cd4c69 Changed version 2021-11-29 17:49:10 +01:00
afe75f6848 Fixed custom scripts 2021-11-29 17:47:44 +01:00
c0e2db8281 Build new CLI version 2021-11-29 09:30:46 +01:00
3727af11c4 Minor bugfixes with custom scripts 2021-11-29 09:30:10 +01:00
450295cfcf Build new version 2021-11-29 09:22:33 +01:00
457bce8aa9 Minor bugfixes 2021-11-29 09:21:55 +01:00
0f81497ea3 Changed version 2021-11-24 17:48:39 +01:00
fa7ee800e1 Fixed cpl start reading full path 2021-11-24 17:48:19 +01:00
56b7452e55 Changed version 2021-11-23 19:02:15 +01:00
9d73566453 Fixed custom command handling 2021-11-23 19:01:00 +01:00
28ba0c174a Changed version 2021-11-22 20:54:07 +01:00
5d0444bcc0 Fixed type problems with ordered List 2021-11-22 20:52:10 +01:00
40876005d5 Changed vs code settings 2021-11-22 20:49:39 +01:00
ac6d941822 Improved gitignore 2021-11-19 09:16:11 +01:00
113b365a47 Removed outdating line 2021-11-15 01:16:37 +01:00
2f785536e1 Improved path handling for new projects 2021-11-15 01:03:50 +01:00
9ab4013b4b Fixed async handling for new command 2021-11-15 00:20:39 +01:00
b3b04f03ce Merge pull request '2021.10.2' (#48) from 2021.10.2 into master
Reviewed-on: #48
Closed #47
2021-11-14 12:56:41 +01:00
57040f85f0 Changed versions 2021-11-14 12:53:09 +01:00
589ef4fd4c Added logic to generate new projects with async 2021-11-14 12:32:11 +01:00
4b829cc484 Added logic to handle async applicationBase 2021-11-14 12:16:50 +01:00
98e343a108 Added logic to handle scoped services 2021-11-14 11:56:42 +01:00
7749d5a789 Moved tests to src & added add scoped logic 2021-11-14 10:04:32 +01:00
c3b48bfa41 Changed version 2021-11-14 09:55:27 +01:00
470e7ab2f4 Changed versions to new scheme 2021-11-14 09:52:07 +01:00
4ceea36926 Changed version 2021-11-02 18:42:13 +01:00
b3f8174663 Added cpl_query to docs 2021-11-02 18:41:30 +01:00
58dccea28b Improved docs 2021-11-02 17:45:45 +01:00
ca086e01d7 Improved docs 2021-11-02 17:30:10 +01:00
c5b1a95661 Moved implementations to extensions 2021-11-02 17:28:36 +01:00
d7881774a8 Improved docs by adding cpl_query.exceptions 2021-11-02 17:23:42 +01:00
6eec92243e Improved docs 2021-11-01 21:17:56 +01:00
124b236182 Improved docs 2021-11-01 20:43:25 +01:00
2dc96cdf3d Improved workspace 2021-11-01 18:49:22 +01:00
6f7923debc Moved tests 2021-11-01 18:47:23 +01:00
90d148b4a5 Added launch settings 2021-11-01 18:42:12 +01:00
73e2c5ec10 Added vs code 2021-11-01 18:24:41 +01:00
f31522dcd9 Changed version 2021-10-27 14:25:33 +02:00
a83607fd81 Fixed subclass support for Iterable 2021-10-27 14:24:43 +02:00
707df3f27d Fixed command handling 2021-10-26 23:23:56 +02:00
0f43e57831 Removed console.write_line 2021-10-26 13:09:44 +02:00
c08ab33060 Changed deps 2021-10-26 13:06:14 +02:00
ee2abd98b3 Changed version 2021-10-26 13:00:27 +02:00
e39661a42a Fixed command handling 2021-10-26 13:00:16 +02:00
9518d19580 Fixed invalid lines in startup template 2021-10-08 08:22:36 +02:00
adf95faaf8 Improved typo 2021-10-08 08:16:46 +02:00
2f92e9909d Improved env 2021-10-04 10:21:50 +02:00
b18f2c4bcd Removed debug changes 2021-10-04 09:59:20 +02:00
784ba049ad Fixed new library problems 2021-10-04 09:56:33 +02:00
4d6d19d2e5 Fixed new command problems 2021-10-04 09:56:08 +02:00
6fa47f19af Merge pull request '2021.10' (#41) from 2021.10 into master
Reviewed-on: #41
2021-10-04 09:32:41 +02:00
fb2872422e Added upload script 2021-10-04 09:30:27 +02:00
8460c0fa33 Published 2021.10 2021-10-04 09:23:08 +02:00
18f95341f4 Merge pull request '2021.10.6' (#39) from 2021.10.6 into 2021.10 | closed #38
Reviewed-on: #39
2021-10-03 11:26:48 +02:00
a8011267d9 Improved version command 2021-10-03 11:23:17 +02:00
f8ebb4f1d7 Improved imports in test app 2021-10-03 11:02:08 +02:00
3903f85368 Added logic to handle extensions before running the app 2021-10-02 10:57:54 +02:00
05a9bdbf4a Improved docstrings 2021-08-07 11:29:00 +02:00
2809a9cd82 Improved imports 2021-08-07 11:24:17 +02:00
1c6794dc40 Renamed cpl to cpl_core & added config and services as arguments to startup 2021-08-07 11:21:30 +02:00
cac80657df Renamed cpl to cpl_core 2021-08-05 14:21:42 +02:00
11241d8f99 Renamed project 2021-08-05 14:17:38 +02:00
308e5c9b0c Merge pull request '2021.10.4' (#37) from 2021.10.4 into 2021.10
Reviewed-on: #37
Closed #32
2021-08-05 14:04:45 +02:00
c12ff4f9e3 Added logic to migrate attributes from workspace and project settings 2021-08-05 14:02:00 +02:00
091c89df2c Changed version of CLI 2021-08-05 13:37:40 +02:00
63a67be0ee Improved new command 2021-08-05 13:27:08 +02:00
c68224b31a Improved deps of cpl_query 2021-08-02 14:48:46 +02:00
9f219757c3 Merge pull request '2021.10.3' (#35) from 2021.10.3 into 2021.10
Reviewed-on: #35
2021-08-02 14:36:45 +02:00
e09a4402b3 Published sh_cpl-query to version 2021.10.0rc1 2021-08-02 14:36:00 +02:00
6867eb0e65 Improved scripts 2021-08-02 14:14:50 +02:00
ffaa5c4a2b Refactoring 2021-08-02 14:09:42 +02:00
b9499108d8 Build cpl_query 2021-08-02 14:03:51 +02:00
37175b7227 Added queries sum, skip & take 2021-07-27 13:57:42 +02:00
2b5831c5fe Improved numbered queries 2021-07-27 13:00:06 +02:00
62c8b9c68d Added reverse query 2021-07-27 12:54:49 +02:00
a080119c44 Improved unittests 2021-07-27 12:48:22 +02:00
a26c6f1bd9 Improved avg, max and min queries type handling 2021-07-27 12:42:33 +02:00
daac14e099 Improved avg query 2021-07-27 12:35:14 +02:00
d4b5c32a21 Added min and max queries 2021-07-27 11:57:42 +02:00
c115afd736 Moved last queries 2021-07-27 11:47:13 +02:00
e7863a92e0 Added last query 2021-07-27 11:43:45 +02:00
82a9e3a23a Improved index out of range exception 2021-07-27 11:40:24 +02:00
a3a0a150a8 Added element at query 2021-07-27 11:29:52 +02:00
6951a19670 Renamed files 2021-07-27 11:22:29 +02:00
669133d491 Added distinct query 2021-07-27 11:20:35 +02:00
c60598b3f6 Added count query 2021-07-27 11:01:43 +02:00
45733b30ef Improved error handling 2021-07-27 10:59:24 +02:00
f8bd86692e Added contains query 2021-07-27 10:55:23 +02:00
5e5d86cf94 Added better exceptions 2021-07-27 09:41:51 +02:00
e0b7728719 Added avg query 2021-07-27 09:26:30 +02:00
0f85d4b9bc Refactoring & added all query 2021-07-27 09:15:19 +02:00
a3fff9c7d7 Build package 2021-07-26 15:55:08 +02:00
8dcf3a6768 Refactoring 2021-07-26 15:52:27 +02:00
94949394de Improved list to handle typing 2021-07-26 15:48:42 +02:00
b7be439381 Changed func type from str to Callable 2021-07-26 15:32:28 +02:00
0cae3428b9 Added order by functions 2021-07-26 15:21:57 +02:00
cc7755bafc Improved cli project builders 2021-07-25 19:18:06 +02:00
4e78b9c12b Added different queries & unittests 2021-07-25 19:15:02 +02:00
5c80cf2222 Added CPL Query 2021-07-25 12:24:58 +02:00
d02548e1a8 Merge pull request '2021.10.2' (#33) from 2021.10.2 into 2021.10
Reviewed-on: #33
2021-07-25 12:05:12 +02:00
51efe973e8 Improved logic to handle pre and post scripts 2021-07-25 12:00:12 +02:00
0bb272d89b Added logic to handle pre and post scripts 2021-07-25 11:42:46 +02:00
59f6843ea9 Changed version 2021-07-24 17:25:06 +02:00
be6838f97b Added logic to handle custom scripts from workspaces 2021-07-24 17:24:01 +02:00
d5b2d3605b CPL Release 2021.4.0.post2 2021-05-23 12:41:59 +02:00
7a48917fb4 CLI Release 2021.4.0.post3 2021-05-22 15:10:50 +02:00
59832742b6 CLI Release 2021.4.0.post2 2021-05-22 12:55:17 +02:00
f9f04901c0 Bugfixes 2021-05-22 12:53:04 +02:00
593ffbb068 Updated cli project file 2021-05-19 09:03:31 +02:00
3d35f2ac63 Merge pull request '2021.4.post1' (#31) from 2021.4.post1 into master
Reviewed-on: #31
2021-05-19 09:00:39 +02:00
5bfba581cb Release 2021.4.0.post1 2021-05-19 08:35:02 +02:00
8fb570468c More bugfixes & added generated test projects 2021-05-19 08:28:59 +02:00
128fda60b0 Release 2021.4.1.rc2 2021-05-19 08:19:21 +02:00
ab539c15dd Fixed source creation bug 2021-05-19 08:03:04 +02:00
b931ba6e17 Fixed source creation bug 2021-05-19 08:01:02 +02:00
f611aa73db Publish 2021.4.post1.rc1 2021-05-17 19:43:09 +02:00
69f697e36f Merge pull request '2021.4.4' (#30) from 2021.4.4 into 2021.4.post1
Reviewed-on: #30
2021-05-17 18:34:58 +02:00
654fb69295 Added cli docs 2021-05-17 18:32:09 +02:00
850d44a105 Added docs to cpl.utils 2021-05-17 18:07:08 +02:00
8d4597705d Build docs 2021-05-17 17:55:20 +02:00
fa5655414a Added docs for cpl.mailing 2021-05-17 17:54:57 +02:00
6fc4cebbfe Added docs for cpl.logging 2021-05-17 17:45:22 +02:00
89f3c5833f Added docs for cpl.time 2021-05-17 17:30:26 +02:00
adf9a33e83 Added docs for cpl.environment 2021-05-17 17:28:52 +02:00
4adf6bc834 Added docs for cpl.dependency_injection 2021-05-17 17:22:41 +02:00
9026f021ed Improved docs for cpl.database 2021-05-17 17:13:36 +02:00
e562c31033 Added docs for cpl.database 2021-05-17 17:05:43 +02:00
7b90b5af57 Added docs for cpl.console 2021-05-16 17:42:09 +02:00
cda1fabd4f Added docs for cpl.configuration 2021-05-16 16:57:59 +02:00
4209055d62 Improved documentation for cpl.application 2021-04-14 22:20:18 +02:00
ed1a4eb88c Added cpl_cli docs & moved cpl_cli/templates -> cpl_cli/_templates 2021-04-14 10:58:47 +02:00
478f1ad0ff Added first sphinx generated doc 2021-04-14 10:45:39 +02:00
80eb1da0e1 Merge pull request '2021.4.7' (#29) from 2021.4.7 into 2021.4.post1
Reviewed-on: #29
2021-04-13 15:47:24 +02:00
ae39d43ea9 Added useful deployment scripts & closed #22 2021-04-13 15:43:05 +02:00
602c48bc06 Bugfixes for help command handling 2021-04-13 15:27:19 +02:00
d34d501520 Bugfixes for help command 2021-04-12 20:22:28 +02:00
8f3ee53915 Fixed typos 2021-04-12 20:05:55 +02:00
7eca382cb3 Added help messages to cli commands 2021-04-12 20:02:45 +02:00
f8f5d46491 Added help message to generate command 2021-04-12 19:44:29 +02:00
696c62292b Added logic to cli to use --help option for help command 2021-04-12 19:43:55 +02:00
d94b25d9d8 Improved configuration console argument handling 2021-04-12 19:43:30 +02:00
93829027af Added help message to all cli commands 2021-04-11 16:36:59 +02:00
cce4b6b191 Merge pull request '2021.4.6' (#25) from 2021.4.6 into 2021.4.post1
Reviewed-on: #25
2021-04-11 15:54:37 +02:00
0876f06282 Improved cpl-project related files & closed #20 2021-04-11 15:50:13 +02:00
c970412a66 Fixed relative path handling in add command 2021-04-11 15:42:34 +02:00
6af9328e14 Added cli command add 2021-04-11 15:36:04 +02:00
5987b71c80 Improved configuration to allow multiple arguments 2021-04-11 15:09:11 +02:00
79fdc0c60b Improved configuration to allow multiple arguments 2021-04-11 15:00:54 +02:00
cfb6a84799 Fixed console argument handling 2021-04-11 14:44:46 +02:00
faa7e701fd Fixed workspace loading error for update command 2021-04-11 14:21:59 +02:00
d5b8286f68 Fixed workspace loading error for update command 2021-04-11 13:23:02 +02:00
a3d5737eaf Fixed workspace loading error for update command 2021-04-11 13:20:32 +02:00
314bb1b722 Fixed workspace loading error for update command 2021-04-11 13:15:19 +02:00
1c353bbcdf Improved cli workspace handling 2021-04-11 13:00:26 +02:00
036b9dcc2d Added more functions to string 2021-04-11 13:00:05 +02:00
0fec5719bc Added remove to help command 2021-04-11 12:34:02 +02:00
3572081e43 Added remove command 2021-04-11 12:33:05 +02:00
8cf7f494b3 Improved configuration 2021-04-11 12:18:36 +02:00
b1165e169a Improved console argument value handling in configuration 2021-04-11 11:42:48 +02:00
284ebe1b11 Added logic to cpl cli to change cwd only when wanted 2021-04-11 11:12:39 +02:00
d51659db3e Improved cli build and publish to use project references 2021-04-11 11:01:57 +02:00
3aa3a874c9 Improved default cwd in ApplicationEnvironment 2021-04-11 10:04:55 +02:00
113d3199b1 Improved main.py templates for new command to handle local imports 2021-04-10 12:04:47 +02:00
5712a9ad67 Improved file creation new command 2021-04-10 11:50:35 +02:00
1f8d420749 Improved workspace handling in new command 2021-04-10 11:46:36 +02:00
9065ef901c Improved new command to handle existing projects better 2021-04-10 11:24:39 +02:00
b2c5d304f8 Improved path and name handling in new command 2021-04-10 11:14:37 +02:00
70ae7dd9e6 Fixed workspace creation error 2021-04-10 11:06:58 +02:00
94b122d677 Removed unused import 2021-04-10 11:05:31 +02:00
f6fc5d09e7 Improved path and name handling in new command 2021-04-10 11:01:56 +02:00
2b5c75cc67 Improved workspace handling to new command for console type 2021-04-09 22:41:04 +02:00
167f813bcf Removed dev outputs 2021-04-09 22:26:55 +02:00
7b9765e5b1 Improved readme 2021-04-09 22:16:43 +02:00
7ad01d4bdd Improved new command to use workspace when found 2021-04-09 22:09:55 +02:00
d19c47e571 Added cpl-env to gitignore 2021-04-09 20:52:50 +02:00
4bfc647b91 Improved live dev server to use venv 2021-04-09 20:42:15 +02:00
98117ed7ad Moved templates/[..]/src to templates/[..]/source to prevent 'src' exclusion 2021-04-09 20:26:31 +02:00
cc9b25356c Improved workspace and venv handling for uninstall and install command 2021-04-09 20:07:38 +02:00
a95d6e7f8a Improved configuration to handle absolute paths in add_json_file 2021-04-08 21:40:50 +02:00
fe5c41ac09 Added workspace handling to update command 2021-04-08 21:18:29 +02:00
b672174960 Added workspace handling to uninstall command 2021-04-08 21:14:38 +02:00
a8691ced5b Added workspace handling to install command 2021-04-08 21:12:00 +02:00
fc53f90ecd Added workspace handling for new command 2021-04-08 20:58:55 +02:00
0f836b5c7d Published after file move 2021-04-08 20:28:34 +02:00
34ed7123d1 Improved workspace handling in publish and build command 2021-04-08 20:28:19 +02:00
5f668e17c9 Improved workspace handling in start command 2021-04-08 19:30:00 +02:00
806888bf49 Removed content_root_path 2021-04-08 17:50:54 +02:00
e8756a09ca Improved general test project file 2021-04-08 16:46:46 +02:00
e38988be1b Changed project files of general test project 2021-04-07 22:11:22 +02:00
4009c93353 Added workspace handling to live dev server 2021-04-07 22:00:56 +02:00
3ba5c10fad Publish CLI 2021.4 2021-04-07 19:19:20 +02:00
2552f1d43c Added workspace handling to publish command 2021-04-07 19:18:55 +02:00
5be2e83798 Improved configuration 2021-04-07 18:57:00 +02:00
d4919e027c Removed console output 2021-04-07 18:37:57 +02:00
7ef238b64d Added workspace handling to build command 2021-04-07 18:36:08 +02:00
703d20f43f Improved version handling 2021-04-07 18:35:14 +02:00
d9bd7911ef Improved start command to use workspace 2021-04-07 18:19:55 +02:00
6a5c832288 Added new file structure 2021-04-07 18:19:34 +02:00
dc849c4f71 Improved application environment 2021-04-07 18:06:07 +02:00
76a6ba11fb Publish 2021.4.post1 for local dev 2021-04-07 17:01:39 +02:00
305a19730f Merge pull request 'Fixed #21 - Added logic to automatically add 'src' to path in generate command' (#24) from 2021.4.5 into 2021.4.post1
Reviewed-on: #24
2021-04-07 16:59:24 +02:00
de15e81703 Fixed #21 - Added logic to automatically add 'src' to path in generate command 2021-04-07 16:55:44 +02:00
b91544a0da Edited LICENSE 2021-04-01 11:09:50 +02:00
caca34168e Merge pull request '2021.4' (#19) from 2021.4 into master
Reviewed-on: sh-edraft.de/sh_common_py_lib#19
2021-04-01 10:13:32 +02:00
18b8ac589d Publish 2021.4.0 2021-04-01 10:04:13 +02:00
d85e628784 Improved readme 2021-03-31 15:51:14 +02:00
1e150cf10c Improved readme 2021-03-31 15:49:52 +02:00
9b0f0b7559 Improved readme 2021-03-31 15:49:00 +02:00
cc118b5030 Merge pull request '2021.04.03 - Readme' (#18) from 2021.04.03 into 2021.4
Reviewed-on: sh-edraft.de/sh_common_py_lib#18
2021-03-31 15:42:40 +02:00
3e7ff78861 Merge branch '2021.4' into 2021.04.03 2021-03-31 15:40:18 +02:00
448d538d21 Updated reame 2021-03-31 15:38:26 +02:00
d368161eb3 Publish 2021.4.0rc7 2021-03-31 12:11:55 +02:00
eef8488ca2 Bugfixes for new lib 2021-03-31 12:11:19 +02:00
b22d04b145 Publish 2021.4.0rc6 2021-03-31 12:03:15 +02:00
6579e54c2b Improved windows support 2021-03-31 12:02:51 +02:00
88c0153ca2 Improved windows support for publisher 2021-03-31 11:55:46 +02:00
f28c6ab309 Removed prints 2021-03-31 11:51:20 +02:00
976041f812 Publish 2021.4.0rc5 2021-03-31 11:48:26 +02:00
7693dd462f Bugfixes for publisher windows support 2021-03-31 11:47:47 +02:00
df5e61cf98 Bugfixes for publisher windows support 2021-03-31 11:47:28 +02:00
df87d08be3 Bugfix for live server windows support 2021-03-31 11:41:16 +02:00
33cb35e26f Publish 2021.4.0rc4.post1 2021-03-31 11:25:07 +02:00
18b2cd8f2f Publish 2021.4.0rc4 2021-03-31 11:01:08 +02:00
7ab2a881e8 Bugfixes 2021-03-31 10:47:14 +02:00
960de880ee Bugfixes 2021-03-31 10:44:54 +02:00
c0d8904782 Bugfixes for the command new 2021-03-31 10:19:54 +02:00
b6d508526a Bugfixes for the command new 2021-03-31 09:46:41 +02:00
31307485f0 Bugfixes in new command template 2021-03-31 09:13:04 +02:00
612c3583f1 Removed ununsed files 2021-03-30 21:02:36 +02:00
6cdd3376f1 Publish 2021.4.0rc3 2021-03-30 21:01:10 +02:00
b947789779 Bugfixes 2021-03-30 20:59:09 +02:00
0da83935fc Bugfixes 2021-03-30 12:44:31 +02:00
3428c70b69 Bugfixes 2021-03-30 11:54:44 +02:00
3d511ff727 Bugfixes 2021-03-30 11:53:07 +02:00
cf2f293290 Publish 2021.4.0rc2 2021-03-30 11:03:16 +02:00
c39601a35d Improved publisher 2021-03-30 11:02:58 +02:00
5f36e0a43e Improved publisher 2021-03-30 10:43:39 +02:00
31fe1c5cd7 Improved service collection 2021-03-30 10:29:50 +02:00
0cdecd893a Improved database context 2021-03-30 10:06:07 +02:00
260fe06be8 Improved new command 2021-03-30 09:54:04 +02:00
8ddfd35a82 Improved generate command 2021-03-30 09:47:47 +02:00
099bae3d7c Removed usage of ServiceABC 2021-03-30 09:27:45 +02:00
9758e1fae2 Improved update command 2021-03-29 16:16:27 +02:00
211143d6ab Package update 2021-03-29 16:06:54 +02:00
70b49a098a Publish 2021.4.0rc1 2021-03-29 15:59:05 +02:00
e2544f90fe Merge pull request '2021.4.2' (#12) from 2021.4.2 into 2021.4
Reviewed-on: sh-edraft.de/sh_common_py_lib#12
2021-03-29 15:48:58 +02:00
c223524d1b Removed direct import 2021-03-29 15:47:41 +02:00
1789e2671a Publish 2021.4.2 2021-03-29 15:26:45 +02:00
d0812bcf5c Added database table test 2021-03-29 14:29:17 +02:00
4d5368e5fc Bugfixes & improved database context handling 2021-03-29 14:18:58 +02:00
f3be927440 Removed service abc 2021-03-29 13:29:26 +02:00
d0e3e1792f Added db context handling 2021-03-29 13:25:25 +02:00
31793fb290 Added db context handling 2021-03-29 13:25:15 +02:00
41ddc86961 Bugfixes 2021-03-29 12:16:12 +02:00
30ef74dd18 Added generated simple di test app 2021-03-29 11:48:25 +02:00
bc69476bb2 Improved new project templates & publish 2021.4.2.dev1 2021-03-29 11:47:49 +02:00
05b9fd801b Bugfixes 2021-03-29 09:21:58 +02:00
7af7f866c1 Removed application runtime | Code refactoring p.2 2021-03-29 08:56:18 +02:00
069e44bee6 Code refactoring p.1 2021-03-27 08:41:33 +01:00
3c0dd00a99 Bugfixes 2021-03-26 13:16:40 +01:00
afb91c8f1f Improved service provider 2021-03-23 21:42:08 +01:00
ca51f88d2b Improved service provider 2021-03-23 21:39:29 +01:00
a683b70c5f [WIP] Improved service collection 2021-03-23 20:23:30 +01:00
c650e87443 [WIP] Added first changes for the DI 2021-03-23 20:21:24 +01:00
36dfedf918 Bugfixes cpl cli output 2021-03-23 17:31:24 +01:00
252f2b55fe Bugfixes in templates 2021-03-23 17:29:13 +01:00
99091a2540 Publish for 2021.4.2 2021-03-21 20:22:04 +01:00
c3fdb7a049 Changed version 2021-03-21 20:05:51 +01:00
669 changed files with 47992 additions and 3372 deletions

9
.gitignore vendored
View File

@@ -106,10 +106,14 @@ celerybeat.pid
.venv
env/
venv/
venv_*/
ENV/
env.bak/
venv.bak/
# Custom Environments
cpl-env/
# Spyder project settings
.spyderproject
.spyproject
@@ -129,5 +133,8 @@ dmypy.json
.pyre/
# IDE
.vscode/
.idea/
PythonImportHelper-v2-Completion.json
# cpl unittest stuff
unittests/test_*_playground

307
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,307 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Aktuelle Datei",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "CPL: main test",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/cpl_core/src/tests/custom/general/src/general",
"program": "main.py",
"console": "integratedTerminal",
"args": [
"--customer=sh-edraft.de"
],
"env": {
"CPL_NAME": "CPL_Dev_Test",
"PYTHON_ENVIRONMENT": "development"
}
},
{
"name": "CPL: console test",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/src/tests/custom/console",
"program": "main.py",
"console": "integratedTerminal",
},
{
"name": "CPL: database test",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/src/tests/custom/database/src",
"program": "main.py",
"console": "integratedTerminal",
"env": {
"PYTHON_ENVIRONMENT": "development",
"PYTHONPATH": "${workspaceFolder}/src/:$PYTHONPATH"
}
},
{
"name": "CLI",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": []
},
{
"name": "CLI: add",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/src/tests/custom/general",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"add",
"testing",
"general",
]
},
{
"name": "CLI: remove",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/src/tests/custom/general",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"remove",
"testing",
]
},
{
"name": "CLI: build",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"build"
]
},
{
"name": "CLI: generate abc",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"generate",
"a",
"testName"
]
},
{
"name": "CLI: generate class",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"generate",
"c",
"src/hfs/fsnfiu/fiush/fisbf/testName"
]
},
{
"name": "CLI: generate enum",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"generate",
"e",
"testName"
]
},
{
"name": "CLI: generate service",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"generate",
"s",
"testName"
]
},
{
"name": "CLI: generate settings",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"generate",
"st",
"testName"
]
},
{
"name": "CLI: generate thread",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"generate",
"t",
"testName"
]
},
{
"name": "CLI: hello-world",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"hello-world",
]
},
{
"name": "CLI: help",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"help",
]
},
{
"name": "CLI: install discord.py",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/src/tests/custom/general",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"install",
"discord.py",
],
"env": {
"GISMO_ENVIRONMENT": "development",
"PYTHONPATH": "${workspaceFolder}/src/:$PYTHONPATH"
}
},
{
"name": "CLI: install local",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/src/tests/custom/general",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"install",
]
},
{
"name": "CLI: new console",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"new",
"console",
"HelloWorld"
]
},
{
"name": "CLI: new library",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"new",
"library",
"HelloWorldLib"
]
},
{
"name": "CLI: publish",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"publish",
]
},
{
"name": "CLI: start",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"start",
],
"env": {
"PYTHONPATH": "${workspaceFolder}/src/:${workspaceFolder}/src/cpl_cli/"
}
},
{
"name": "CLI: uninstall discord.py",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/src/tests/custom/general",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"uninstall",
"discord.py",
]
},
{
"name": "CLI: start",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/src/tests/custom/general",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"update",
]
},
{
"name": "CLI: version",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/cpl_cli/main.py",
"console": "integratedTerminal",
"args": [
"version",
]
},
]
}

23
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,23 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#93e6fc",
"activityBar.activeBorder": "#fa45d4",
"activityBar.background": "#93e6fc",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#fa45d4",
"activityBarBadge.foreground": "#15202b",
"sash.hoverBorder": "#93e6fc",
"statusBar.background": "#61dafb",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#2fcefa",
"statusBarItem.remoteBackground": "#61dafb",
"statusBarItem.remoteForeground": "#15202b",
"titleBar.activeBackground": "#61dafb",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#61dafb99",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.color": "#61dafb",
"python.pythonPath": "cpl-env/bin/python3.9",
}

View File

@@ -1,4 +1,4 @@
MIT License Copyright (c) <year> <copyright holders>
MIT License Copyright (c) 2020 - 2022 sh-edraft.de
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

153
README.md
View File

@@ -1,2 +1,153 @@
# sh_common_py_lib
<h1 align="center">CPL - Common python library</h1>
<!-- Summary -->
<p align="center">
<!-- <img src="" alt="cpl-logo" width="120px" height="120px"/> -->
<br>
<i>
CPL is a development platform for python server applications
<br>using Python.</i>
<br>
</p>
## Table of Contents
<!-- TABLE OF CONTENTS -->
<ol>
<li><a href="#Features">Features</a></li>
<li>
<a href="#getting-started">Getting Started</a>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
</ul>
</li>
<li><a href="#roadmap">Roadmap</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#contact">Contact</a></li>
</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
[Get started with CPL][quickstart].
### Prerequisites
- Install [python] which includes [Pip installs packages][pip]
### Installation
Install the CPL package
```sh
pip install sh_cpl --extra-index-url https://pip.sh-edraft.de
```
Install the CPL CLI
```sh
pip install sh_cpl-cli --extra-index-url https://pip.sh-edraft.de
```
Create workspace:
```sh
cpl new <console|library> <PROJECT NAME>
```
Run the application:
```sh
cd <PROJECT NAME>
cpl start
```
<!-- ROADMAP -->
## Roadmap
See the [open issues](https://git.sh-edraft.de/sh-edraft.de/sh_common_py_lib/issues) for a list of proposed features (and known issues).
<!-- CONTRIBUTING -->
## Contributing
### Contributing Guidelines
Read through our [contributing guidelines][contributing] to learn about our submission process, coding rules and more.
### Want to Help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for [contributing][contributing].
<!-- LICENSE -->
## License
Distributed under the MIT License. See [LICENSE] for more information.
<!-- CONTACT -->
## Contact
Sven Heidemann - sven.heidemann@sh-edraft.de
Project link: [https://git.sh-edraft.de/sh-edraft.de/sh_common_py_lib](https://git.sh-edraft.de/sh-edraft.de/sh_common_py_lib)
<!-- External LINKS -->
[pip_url]: https://pip.sh-edraft.de
[python]: https://www.python.org/
[pip]: https://pypi.org/project/pip/
<!-- Internal LINKS -->
[project]: https://git.sh-edraft.de/sh-edraft.de/sh_common_py_lib
[quickstart]: https://git.sh-edraft.de/sh-edraft.de/sh_common_py_lib/wiki/quickstart
[contributing]: https://git.sh-edraft.de/sh-edraft.de/sh_common_py_lib/wiki/contributing
[license]: LICENSE

95
cpl-workspace.json Normal file
View File

@@ -0,0 +1,95 @@
{
"WorkspaceSettings": {
"DefaultProject": "cpl-cli",
"Projects": {
"cpl-core": "src/cpl_core/cpl-core.json",
"cpl-cli": "src/cpl_cli/cpl-cli.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": {
"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;",
"db": "cpl docs-build",
"docs-open": "xdg-open $PWD/docs/build/html/index.html &",
"do": "cpl docs-open",
"test": "cpl run unittests",
"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;",
"pa": "cpl build-all $ARGS",
"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-query": "echo 'Publish cpl_query'; cd ./src/cpl_query; cpl publish; cd ../../;",
"upload-prod-cli": "echo 'PROD Upload cpl-cli'; cpl upl-prod-cli;",
"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/*",
"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/*",
"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/*",
"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/*",
"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/*",
"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/*",
"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/*",
"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/*",
"pre-deploy-prod": "cpl sv $ARGS; cpl spu --environment=production;",
"deploy-prod": "cpl deploy-prod-cli; cpl deploy-prod-core; cpl deploy-prod-query;",
"dp": "cpl deploy-prod $ARGS",
"deploy-prod-cli": "cpl publish-cli; cpl upload-prod-cli",
"deploy-prod-core": "cpl publish-core; cpl upload-prod-core",
"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;",
"de": "cpl deploy-exp $ARGS",
"deploy-exp-cli": "cpl publish-cli; cpl upload-exp-cli",
"deploy-exp-core": "cpl publish-core; cpl upload-exp-core",
"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;",
"dd": "cpl deploy-dev $ARGS",
"deploy-dev-cli": "cpl publish-cli; cpl upload-dev-cli",
"deploy-dev-core": "cpl publish-core; cpl upload-dev-core",
"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"
}
}
}

20
docs/Makefile Normal file
View File

@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

BIN
docs/build/doctrees/cli.add.doctree vendored Normal file

Binary file not shown.

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

Binary file not shown.

BIN
docs/build/doctrees/cli.generate.doctree vendored Normal file

Binary file not shown.

BIN
docs/build/doctrees/cli.help.doctree vendored Normal file

Binary file not shown.

BIN
docs/build/doctrees/cli.install.doctree vendored Normal file

Binary file not shown.

BIN
docs/build/doctrees/cli.new.doctree vendored Normal file

Binary file not shown.

BIN
docs/build/doctrees/cli.overview.doctree vendored Normal file

Binary file not shown.

BIN
docs/build/doctrees/cli.publish.doctree vendored Normal file

Binary file not shown.

BIN
docs/build/doctrees/cli.remove.doctree vendored Normal file

Binary file not shown.

BIN
docs/build/doctrees/cli.start.doctree vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
docs/build/doctrees/cli.update.doctree vendored Normal file

Binary file not shown.

BIN
docs/build/doctrees/cli.version.doctree vendored Normal file

Binary file not shown.

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

Binary file not shown.

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

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/cpl_core.doctree vendored Normal file

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/cpl_query.doctree vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
docs/build/doctrees/environment.pickle vendored Normal file

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

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.

4
docs/build/html/.buildinfo vendored Normal file
View File

@@ -0,0 +1,4 @@
# 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.
config: 9ea51a00cf3559575c97b7efd7a002e5
tags: 645f666f9bcd5a90fca523b33c5a78b7

BIN
docs/build/html/_images/ide-emulate.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
docs/build/html/_images/ide-src.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
docs/build/html/_images/ide.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

31
docs/build/html/_sources/cli.add.md.txt vendored Normal file
View File

@@ -0,0 +1,31 @@
# cpl add
## Contents
- [Description](#description)
- [Arguments](#arguments)
Removes a project from workspace.
cpl **add** *&lt;source-project&gt;* *&lt;target-project&gt;* <br>
cpl **a** *&lt;source-project&gt;* *&lt;target-project&gt;* <br>
cpl **A** *&lt;source-project&gt;* *&lt;target-project&gt;*
## Description
Adds a project reference to given project.
If you call the command in a CPL workspace, you can use the project names. Otherwise the paths of the projects must be specified.
## Arguments
| Argument | Description | Value type |
|------------------------|:----------------------------------------------------------:|:----------:|
| ```<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``` |
## Flags
| Argument | Description |
|------------------|:------------------------------------------:|
| ```--simulate``` | Specifies whether the command is simulated |

View File

@@ -0,0 +1,26 @@
# cpl build
## Contents
- [Description](#description)
<!-- - [Arguments](#arguments) -->
Copies an python app into an output directory named build/ at the given output path. Must be executed within a CPL workspace or project directory
cpl **build** <br>
cpl **b** <br>
cpl **B**
## Description
The command can be used to build a project of type "console" or "library".
The build command copies all included source files to the output directory. You can run the source files in the output directory directly.
The command is used to prepare the source files for the publish command or to copy them to an target for execution.
<!-- ## Arguments
| Argument | Description | Value type |
| ------------- |:-------------:|:----------------:|
| ```<project>``` | The name of the project to build. Can be an console or a library. | ```str``` -->

View File

@@ -0,0 +1,38 @@
# cpl generate
## Contents
- [Description](#description)
- [Arguments](#arguments)
- [Schematics](#schematics)
Generate a file based on schematic.
cpl **generate** *&lt;schematic&gt;* *&lt;name&gt;* <br>
cpl **g** *&lt;schematic&gt;* *&lt;name&gt;* <br>
cpl **G** *&lt;schematic&gt;* *&lt;name&gt;*
## Description
Generates files based on a schematic.
## Arguments
| Argument | Description | Value type |
| ----------------- |:---------------------------------:|:-------------:|
| ```<schematic>``` | The schematic to generate. | ```str``` |
| ```<name>``` | The name of the generated file. | ```str``` |
## Schematics
| Schematic | Description | Arguments |
|-----------------|:-------------------------------------:|:------------:|
| ```abc``` | Abstract base class | ```<name>``` |
| ```class``` | Class | ```<name>``` |
| ```enum``` | Enum class | ```<name>``` |
| ```pipe``` | Pipe class | ```<name>``` |
| ```service``` | Service class | ```<name>``` |
| ```settings``` | [Configmodel](cpl_core.configuration) | ```<name>``` |
| ```test``` | Test class | ```<name>``` |
| ```thread``` | Thread class | ```<name>``` |
| ```validator``` | Validator class | ```<name>``` |

View File

@@ -0,0 +1,22 @@
# cpl help
<!-- ## Contents
- [Description](#description) -->
<!-- - [Arguments](#arguments) -->
Lists available command and their short descriptions.
cpl **help** *&lt;command&gt;* <br>
cpl **h** *&lt;command&gt;* <br>
cpl **H** *&lt;command&gt;*
## Description
Lists available command and their short descriptions.
## Arguments
| Argument | Description | Value type |
| ----------------- |:-----------------------------:|:-------------:|
| ```<command>``` | Shows a help message for this command in the console. | ```str``` |

View File

@@ -0,0 +1,31 @@
# cpl install
## Contents
- [Description](#description)
- [Arguments](#arguments)
Installs given package via pip
cpl **install** *&lt;package&gt;* <br>
cpl **i** *&lt;package&gt;* <br>
cpl **I** *&lt;package&gt;*
## Description
Install given package to project via pip.
Without given package it will install the depedencies of the CPL project your in.
## Arguments
| Argument | Description | Value type |
|-----------------|:----------------------:|:----------:|
| ```<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 |

42
docs/build/html/_sources/cli.new.md.txt vendored Normal file
View File

@@ -0,0 +1,42 @@
# cpl new
## Contents
- [Description](#description)
- [Arguments](#arguments)
- [Project types](#project-types)
Generates a workspace and initial project or add a project to workspace.
cpl **new** *&lt;type&gt;* *&lt;name&gt;*<br>
cpl **n** *&lt;type&gt;* *&lt;name&gt;* <br>
cpl **N** *&lt;type&gt;* *&lt;name&gt;*
## Description
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.
| Argument | Description | Value type |
|--------------|:----------------------------------------------------:|:----------:|
| ```<type>``` | The type of the project, see [types](#project-types) | ```str``` |
| ```<name>``` | The name of the project | ```str``` |
## Project types
| Project type | Description |
|---------------|:----------------------------:|
| ```console``` | A simple console application |
| ```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

@@ -0,0 +1,53 @@
# CLI Overview and Command Reference
## Table of Contents
1. [Install CPL](setup#install-the-package)
2. [Install CPL CLI](setup#install-the-cli)
3. [Basic workflow](#basic-workflow)
4. [CLI command-language syntax](#cli-command-language-syntax)
5. [Command overview](#command-overview)
## Basic workflow
To create, build, and serve a new, basic CPL project on a development server, go to the parent directory of your new workspace use the following commands:
```sh
cpl new console my-first-project
cd my-first-project
cpl start
```
In the terminal you will the output of the app.
## CLI command-language syntax
```cpl``` commandNameOrAlias requiredArg ```[optionalsArgs]```
- Most commands, and some options, have aliases. Aliases are shown in the syntax statement for each command.
- Arguments are not prefixed.
### Relative paths
Options that specify files can be given as absolute paths, or as paths relative to the current working directory, which is generally either the workspace or project root.
### Schematics
The cpl generate command takes as an argument the artifact to be generated. In addition to any general options, each artifact defines its own options in a schematic. Schematic options are supplied to the command in the same format as immediate command options.
## Command overview
| Command | Alias | Description |
| ----------------------------- |:-------------:|:----------------:|
| [add](cli.add) | a or a | Adds a project reference to given project.
| [build](cli.build) | b or B | Prepares files for publish into an output directory named dist/ at the given output path. Must be executed from within a workspace directory.
| [generate](cli.generate) | g or G | Generate a new file.
| [help](cli.help) | h or H | Lists available command and their short descriptions.
| [install](cli.install) | i or I | With argument installs packages to project, without argument installs project dependencies.
| [new](cli.new) | n or N | Creates new CPL project.
| [publish](cli.publish) | p or P | Prepares files for publish into an output directory named dist/ at the given output path and executes ```setup.py```. Must be executed from within a library workspace directory.
| [remove](cli.remove) | r or R | Removes a project from workspace.
| [start](cli.start) | s or S | Starts CPL project, restarting on file changes.
| [uninstall](cli.uninstall) | ui or UI | Uninstalls packages from project.
| [update](cli.update) | u or U | Update CPL and project dependencies.
| [version](cli.version) | v or V | Outputs CPL CLI version.

View File

@@ -0,0 +1,27 @@
# cpl publish
## Contents
- [Description](#description)
<!-- - [Arguments](#arguments) -->
Prepares files for publish into an output directory named dist/ at the given output path and executes ```setup.py```.
cpl **publish** <br>
cpl **p** <br>
cpl **P**
## Description
The command can be used to publish a project of type "console" or "library".
The publish command builds the source files and then creates an ```setup.py``` with data from ```cpl_core.json```.
The command executes the ```setup.py``` and removes all source files with the ```setup.py``` from the 'publish/' directory.
Generated files of ```setup.py``` are in the 'publish/setup/' directory.
<!-- ## Arguments
| Argument | Description | Value type |
| ------------- |:-------------:|:----------------:|
| ```<project>``` | The name of the project to build. Can be an console or a library. | ```str``` -->

View File

@@ -0,0 +1,30 @@
# cpl remove
## Contents
- [Description](#description)
- [Arguments](#arguments)
Removes a project from workspace.
cpl **remove** *&lt;project&gt;* <br>
cpl **r** *&lt;project&gt;* <br>
cpl **R** *&lt;project&gt;*
## Description
Removes a project reference and the files from workspace.
If you call the command in a CPL workspace, you can use the project names. Otherwise the paths of the projects must be specified.
## Arguments
| Argument | Description | Value type |
|-----------------|:---------------------------------:|:----------:|
| ```<project>``` | The name of the project to delete | ```str``` |
## Flags
| Argument | Description |
|------------------|:----------------------------------------------------:|
| ```--simulate``` | Specifies whether the command is simulated |

View File

@@ -0,0 +1,7 @@
# cpl start
Starts your application, restarting on file changes.
cpl **start** <br>
cpl **s** <br>
cpl **S**

View File

@@ -0,0 +1,30 @@
# cpl uninstall
## Contents
- [Description](#description)
- [Arguments](#arguments)
Uninstalls given package via pip
cpl **uninstall** *&lt;package&gt;* <br>
cpl **ui** *&lt;package&gt;* <br>
cpl **UI** *&lt;package&gt;*
## Description
Uninstall given package from project via pip.
## Arguments
| Argument | Description | Value type |
|-----------------|:------------------------:|:----------:|
| ```<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

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

View File

@@ -0,0 +1,7 @@
# cpl version
Lists the version of CPL, CPL CLI and all installed packages from pip.
cpl **version** <br>
cpl **v** <br>
cpl **V**

View File

@@ -0,0 +1,111 @@
# Contributing to CPL
We would love for you to contribute to CPL and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:
- [Issuses and Bugs](#found-a-bug)
- [Feature Request](#feature-request)
- [Submission Guidelines](#submission-guidelines)
- [Coding Rules](#coding-rules)
- [License](#license)
## Found a Bug?
If you find a bug in the source code, you can help us by [submitting an issue](#submitting-an-issue) to our [Gitea Repository][gitea-repo]. Even better, you can [submit a Pull Request](#submitting-a-pull-request) with a fix.
## Feature Request
You can request a new feature by submitting an issue to our [Gitea Repository][gitea-repo]. If you would like to implement a new feature, please consider the size of the change in order to determine the right steps to proceed:
For a Major Feature, first open an issue and outline your proposal so that it can be discussed. This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
Note: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature.
Small Features can be crafted and directly submitted as a [Pull Request](#submit-pr).
## Submission Guidelines
### Submitting an Issue
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we require that you provide a minimal reproduction. Having a minimal reproducible scenario gives us a wealth of important information without going back and forth to you with additional questions.
A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.
We require a minimal reproduction to save maintainers' time and ultimately be able to fix more bugs. Often, developers find coding problems themselves while preparing a minimal reproduction. We understand that sometimes it might be hard to extract essential bits of code from a larger codebase but we really need to isolate the problem before we can fix it.
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you, we are going to close an issue that doesn't have enough info to be reproduced.
### Submitting a Pull Request
Before you submit your Pull Request (PR) consider the following guidelines:
1. Search the [repository][gitea-repo] for an open or closed PR that relates to your submission. You don't want to duplicate existing efforts.
2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design upfront helps to ensure that we're ready to accept your work.
3. Fork the sh-edraft.de/sh_cpl repo.
4. In your forked repository, make your changes in a new git branch:
```sh
git checkout -b my-fix-branch master
```
5. Create your patch, including appropriate test cases.
<!-- 6. Follow our [Coding Rules](coding-rules). -->
6. Commit your changes.
```sh
git commit --all
```
Note: the optional commit ```-a``` command line option will automatically "add" and "rm" edited files.
7. Push your branch to the [repository][gitea-repo]:
```sh
git push origin my-fix-branch
```
8. In Gitea, send a pull request to sh_cpl:master
### Reviewing a Pull Request
The sh-edraft.de team reserves the right not to accept pull requests from community members who haven't been good citizens of the community. Such behavior includes not following the CPL [coding rules](#coding-rules) and applies within or outside of CPL managed channels.
#### Addressing review feedback
If we ask for changes via code reviews then:
1. Make the required updates to the code.
2. Create a fixup commit and push to your repository (this will update your Pull Request):
```sh
git commit --all --fixup HEAD
git push
```
That's it! Thank you for your contribution!
## Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working:
- All features or bug fixes must be tested by one or more unit-tests.
- All public API methods must be documented.
- We follow [PEP 8 -- Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/).
## License
By contributing, you agree that your contributions will be licensed under its MIT License.
See [LICENSE](https://git.sh-edraft.de/sh-edraft.de/sh_cpl/src/branch/master/LICENSE)
<!-- LINKS -->
[gitea-repo]: https://git.sh-edraft.de/sh-edraft.de/sh_cpl/
[coding-rules]: /

View File

@@ -0,0 +1,19 @@
CLI Reference
=============
.. toctree::
:maxdepth: 4
cli.overview
cli.add
cli.build
cli.generate
cli.help
cli.install
cli.new
cli.publish
cli.remove
cli.start
cli.uninstall
cli.update
cli.version

View File

@@ -0,0 +1,34 @@
cpl_core.application
=======================
cpl_core.application.application\_abc
---------------------------------------
.. automodule:: cpl_core.application.application_abc
:members:
:undoc-members:
:show-inheritance:
cpl_core.application.application\_builder
-------------------------------------------
.. automodule:: cpl_core.application.application_builder
:members:
:undoc-members:
:show-inheritance:
cpl_core.application.application\_builder\_abc
------------------------------------------------
.. automodule:: cpl_core.application.application_builder_abc
:members:
:undoc-members:
:show-inheritance:
cpl_core.application.startup\_abc
-----------------------------------
.. automodule:: cpl_core.application.startup_abc
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,42 @@
cpl_core.configuration
=========================
cpl_core.configuration.configuration
--------------------------------------
.. automodule:: cpl_core.configuration.configuration
:members:
:undoc-members:
:show-inheritance:
cpl_core.configuration.configuration\_abc
-------------------------------------------
.. automodule:: cpl_core.configuration.configuration_abc
:members:
:undoc-members:
:show-inheritance:
cpl_core.configuration.configuration\_model\_abc
--------------------------------------------------
.. automodule:: cpl_core.configuration.configuration_model_abc
:members:
:undoc-members:
:show-inheritance:
cpl_core.configuration.configuration\_variable\_name\_enum
------------------------------------------------------------
.. automodule:: cpl_core.configuration.configuration_variable_name_enum
:members:
:undoc-members:
:show-inheritance:
cpl_core.configuration.console\_argument
------------------------------------------
.. automodule:: cpl_core.configuration.console_argument
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,42 @@
cpl_core.console
===================
cpl_core.console.background\_color\_enum
------------------------------------------
.. automodule:: cpl_core.console.background_color_enum
:members:
:undoc-members:
:show-inheritance:
cpl_core.console.console
--------------------------
.. automodule:: cpl_core.console.console
:members:
:undoc-members:
:show-inheritance:
cpl_core.console.console\_call
--------------------------------
.. automodule:: cpl_core.console.console_call
:members:
:undoc-members:
:show-inheritance:
cpl_core.console.foreground\_color\_enum
------------------------------------------
.. automodule:: cpl_core.console.foreground_color_enum
:members:
:undoc-members:
:show-inheritance:
cpl_core.console.spinner\_thread
----------------------------------
.. automodule:: cpl_core.console.spinner_thread
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,18 @@
cpl_core.database.connection
===============================
cpl_core.database.connection.database\_connection
---------------------------------------------------
.. automodule:: cpl_core.database.connection.database_connection
:members:
:undoc-members:
:show-inheritance:
cpl_core.database.connection.database\_connection\_abc
--------------------------------------------------------
.. automodule:: cpl_core.database.connection.database_connection_abc
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,18 @@
cpl_core.database.context
============================
cpl_core.database.context.database\_context
---------------------------------------------
.. automodule:: cpl_core.database.context.database_context
:members:
:undoc-members:
:show-inheritance:
cpl_core.database.context.database\_context\_abc
--------------------------------------------------
.. automodule:: cpl_core.database.context.database_context_abc
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,35 @@
cpl_core.database
====================
.. toctree::
:maxdepth: 4
cpl_core.database.connection
cpl_core.database.context
Submodules
----------
cpl_core.database.database\_model
-----------------------------------
.. automodule:: cpl_core.database.database_model
:members:
:undoc-members:
:show-inheritance:
cpl_core.database.database\_settings
--------------------------------------
.. automodule:: cpl_core.database.database_settings
:members:
:undoc-members:
:show-inheritance:
cpl_core.database.database\_settings\_name\_enum
--------------------------------------------------
.. automodule:: cpl_core.database.database_settings_name_enum
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,50 @@
cpl_core.dependency\_injection
=================================
cpl_core.dependency\_injection.service\_collection
----------------------------------------------------
.. automodule:: cpl_core.dependency_injection.service_collection
:members:
:undoc-members:
:show-inheritance:
cpl_core.dependency\_injection.service\_collection\_abc
---------------------------------------------------------
.. automodule:: cpl_core.dependency_injection.service_collection_abc
:members:
:undoc-members:
:show-inheritance:
cpl_core.dependency\_injection.service\_descriptor
----------------------------------------------------
.. automodule:: cpl_core.dependency_injection.service_descriptor
:members:
:undoc-members:
:show-inheritance:
cpl_core.dependency\_injection.service\_lifetime\_enum
--------------------------------------------------------
.. automodule:: cpl_core.dependency_injection.service_lifetime_enum
:members:
:undoc-members:
:show-inheritance:
cpl_core.dependency\_injection.service\_provider
--------------------------------------------------
.. automodule:: cpl_core.dependency_injection.service_provider
:members:
:undoc-members:
:show-inheritance:
cpl_core.dependency\_injection.service\_provider\_abc
-------------------------------------------------------
.. automodule:: cpl_core.dependency_injection.service_provider_abc
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,26 @@
cpl_core.environment
=======================
cpl_core.environment.application\_environment
-----------------------------------------------
.. automodule:: cpl_core.environment.application_environment
:members:
:undoc-members:
:show-inheritance:
cpl_core.environment.application\_environment\_abc
----------------------------------------------------
.. automodule:: cpl_core.environment.application_environment_abc
:members:
:undoc-members:
:show-inheritance:
cpl_core.environment.environment\_name\_enum
----------------------------------------------
.. automodule:: cpl_core.environment.environment_name_enum
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,42 @@
cpl_core.logging
===================
cpl_core.logging.logger\_abc
------------------------------
.. automodule:: cpl_core.logging.logger_abc
:members:
:undoc-members:
:show-inheritance:
cpl_core.logging.logger\_service
----------------------------------
.. automodule:: cpl_core.logging.logger_service
:members:
:undoc-members:
:show-inheritance:
cpl_core.logging.logging\_level\_enum
---------------------------------------
.. automodule:: cpl_core.logging.logging_level_enum
:members:
:undoc-members:
:show-inheritance:
cpl_core.logging.logging\_settings
------------------------------------
.. automodule:: cpl_core.logging.logging_settings
:members:
:undoc-members:
:show-inheritance:
cpl_core.logging.logging\_settings\_name\_enum
------------------------------------------------
.. automodule:: cpl_core.logging.logging_settings_name_enum
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,42 @@
cpl_core.mailing
===================
cpl_core.mailing.email
------------------------
.. automodule:: cpl_core.mailing.email
:members:
:undoc-members:
:show-inheritance:
cpl_core.mailing.email\_client\_abc
-------------------------------------
.. automodule:: cpl_core.mailing.email_client_abc
:members:
:undoc-members:
:show-inheritance:
cpl_core.mailing.email\_client\_service
-----------------------------------------
.. automodule:: cpl_core.mailing.email_client_service
:members:
:undoc-members:
:show-inheritance:
cpl_core.mailing.email\_client\_settings
------------------------------------------
.. automodule:: cpl_core.mailing.email_client_settings
:members:
:undoc-members:
:show-inheritance:
cpl_core.mailing.email\_client\_settings\_name\_enum
------------------------------------------------------
.. automodule:: cpl_core.mailing.email_client_settings_name_enum
:members:
:undoc-members:
:show-inheritance:

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

@@ -0,0 +1,17 @@
API Reference
===========
.. toctree::
:maxdepth: 4
cpl_core.application
cpl_core.configuration
cpl_core.console
cpl_core.database
cpl_core.dependency_injection
cpl_core.environment
cpl_core.logging
cpl_core.mailing
cpl_core.pipes
cpl_core.time
cpl_core.utils

View File

@@ -0,0 +1,18 @@
cpl_core.time
================
cpl_core.time.time\_format\_settings
--------------------------------------
.. automodule:: cpl_core.time.time_format_settings
:members:
:undoc-members:
:show-inheritance:
cpl_core.time.time\_format\_settings\_names\_enum
---------------------------------------------------
.. automodule:: cpl_core.time.time_format_settings_names_enum
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,26 @@
cpl_core.utils
=================
cpl_core.utils.credential\_manager
------------------------------------
.. automodule:: cpl_core.utils.credential_manager
:members:
:undoc-members:
:show-inheritance:
cpl_core.utils.pip
--------------------
.. automodule:: cpl_core.utils.pip
:members:
:undoc-members:
:show-inheritance:
cpl_core.utils.string
-----------------------
.. automodule:: cpl_core.utils.string
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,10 @@
cpl_query.exceptions
=================================
cpl_query.exceptions
----------------------------------------------------
.. automodule:: cpl_query.exceptions
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,42 @@
cpl_query.extension
=================================
cpl_query.extension.iterable_abc
----------------------------------------------------
.. automodule:: cpl_query.extension.iterable_abc
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.iterable
----------------------------------------------------
.. automodule:: cpl_query.extension.iterable
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.list
----------------------------------------------------
.. automodule:: cpl_query.extension.list
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.ordered_iterable_abc
----------------------------------------------------
.. automodule:: cpl_query.extension.ordered_iterable_abc
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.ordered_iterable
----------------------------------------------------
.. automodule:: cpl_query.extension.ordered_iterable
:members:
:undoc-members:
:show-inheritance:

View File

@@ -0,0 +1,8 @@
Query Reference
===========
.. toctree::
:maxdepth: 4
cpl_query.extension
cpl_query.exceptions

View File

@@ -0,0 +1,10 @@
Getting started
===============
.. toctree::
:maxdepth: 4
quickstart
setup
tutorials

25
docs/build/html/_sources/index.rst.txt vendored Normal file
View File

@@ -0,0 +1,25 @@
.. Common Python Library documentation master file, created by
sphinx-quickstart on Wed Apr 14 10:25:36 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Introduction to the CPL Docs
============================
The Common Python Library (CPL) is a package for python and a development platform meant to help you create simple and efficient server and desktop applications.
This CPL docs help you learn, understand and use the package. From your first application to complex apps for enterprises.
Manuals
---------
These pages go into great detail about everything the Library can do.
.. toctree::
:maxdepth: 1
introduction
getting_started
cpl_cli
cpl_core
cpl_query

View File

@@ -0,0 +1,60 @@
# Introduction to the CPL Docs
The Common Python Library (CPL) is a package for python and a development platform meant to help you create simple and efficient server and desktop applications.
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
- [Getting started](quickstart)
- [Setup](setup)
- [API Reference](cpl_core)
- [CLI Reference](cli.overview)
- [Query Reference](cpl_query)

View File

@@ -0,0 +1,10 @@
cpl
===
.. toctree::
:maxdepth: 4
getting_started
cpl_cli
cpl_core
cpl_query

View File

@@ -0,0 +1,210 @@
# Getting started with CPL
Welcome to CPL!
This tutorial introduces you to the essentials of the CPL package by walking through building an console based app.
## Table of Contents
1. [Prerequisites](#prerequisites)
2. [Create the project](#create-the-project)
3. [Create a menu](#create-a-menu)
4. [What's next](#whats-next)
## Prerequisites
To get most out of this tutorial you should already have a basic understanding of the following.
- [Python][python]
Also you need to have the following installed.
- [Python][python]
- [Pip][pip-url]
- [CPL](setup)
- [CPL-CLI](setup)
## Create the project
To create the sample project to the following:
1. Open a terminal
2. Run
```sh
cpl new console sample-project
```
3. We don't want to use Application base or Dependency injection:
```sh
Do you want to use application base? (y/n) n
Do you want to use service providing? (y/n) n
```
The ouput should look like this:
```sh
Creating sample-project/LICENSE done
Creating sample-project/README.md done
Creating sample-project/src/tests/__init__.py done
Creating sample-project/appsettings.json done
Creating sample-project/src/sample-project/__init__.py done
Creating sample-project/src/sample-projectmain.py done
```
4. Open the project with an IDE like VS Code or PyCharm
![IDE](images/ide.png)
5. Set the 'src' directory as source folder
![IDE set src folder](images/ide-src.png)
6. Run the application
You should see an output like:
```sh
Hello World
```
7. In PyCharm you have to enable ```Emulate terminal in output console```!
![IDE emulate console](images/ide-emulate.png)
## Create a menu
1. Open the 'sample-project/main.py'
2. Change 'Hello World' to 'Password generator:' in line 5
3. Add ```Console.select``` as follows:
```py
from cpl_core.console import Console
def main():
Console.write_line('Password generator:')
options = [
'Only lower case',
'Only upper case',
'Lower and upper case'
'Exit'
]
option = Console.select('>', 'Select option: ', options)
if __name__ == '__main__':
main()
```
4. Get Id of the selected option:
```py
index = options.index(option)
```
5. Create the generate function as follows:
```py
def generate_password(letters: str, length: int) -> str:
return ''.join(random.choice(letters) for i in range(length))
```
Add imports:
```py
import random
import string
```
6. Get length of the password:
```py
length = int(Console.read('Length: '))
```
7. Validate the selected option:
```py
index = options.index(option)
letters = ''
if index == 0:
letters = string.ascii_lowercase
elif index == 1:
letters = string.ascii_uppercase
elif index == 2:
letters = string.ascii_letters
elif index == len(options) - 1:
exit()
```
8. Print the generated password:
```py
Console.write_line('Password: ', generate_password(letters, length))
```
9. The full 'sample-project/main.py':
```py
import random
import string
from cpl_core.console import Console
def generate_password(letters: str, length: int) -> str:
return ''.join(random.choice(letters) for i in range(length))
def main():
Console.write_line('Password generator:')
options = [
'Only lower case',
'Only upper case',
'Lower and upper case',
'Exit'
]
option = Console.select('>', 'Select option: ', options)
length = int(Console.read('Length: '))
index = options.index(option)
letters = ''
if index == 0:
letters = string.ascii_lowercase
elif index == 1:
letters = string.ascii_uppercase
elif index == 2:
letters = string.ascii_letters
elif index == len(options) - 1:
exit()
Console.write_line('Password: ', generate_password(letters, length))
if __name__ == '__main__':
main()
```
## What's next
In this section, you've created an application that uses user input to generate a password.
To continue exploring CPL and developing applications:
- [Application base](cpl_core.application)
- [Dependency injection](cpl_core.dependency_injection)
- [Console](cpl_core.console)
<!-- LINKS -->
[pip-url]: https://pip.sh-edraft.de
[python]: https://www.python.org/
[pip]: https://pypi.org/project/pip/

113
docs/build/html/_sources/setup.md.txt vendored Normal file
View File

@@ -0,0 +1,113 @@
# Setting up the local environment and workspace
## Table of Contents
1. [Prerequisites](#prerequisites)
2. [Install the package](#install-the-package)
3. [Install the CLI](#install-the-cli)
3. [Install the query](#install-the-query)
4. [Create a initial application](#create-initial-console-app)
5. [Create a initial library](#create-initial-library)
6. [Start the application](#start-the-app)
7. [What's next](#whats-next)
## Prerequisites
To get most out of this tutorial you should already have a basic understanding of the following.
- [Python][python]
Also you need to have the following installed.
- [Python][python]
- [Pip][pip-url]
## Install the package
To install the package, open a terminal window and run the following command:
```sh
pip install sh_cpl-core --extra-index-url https://pip.sh-edraft.de
```
## Install the CLI
You use the CPL CLI to create projects, generate application and library code. You also use the CLI to build and publish your python packages.
To install the CLI, open a terminal window and run the following command:
```sh
pip install sh_cpl-cli --extra-index-url https://pip.sh-edraft.de
```
## Install the query
To install the package, open a terminal window and run the following command:
```sh
pip install sh_cpl-query --extra-index-url https://pip.sh-edraft.de
```
## Create initial console app
You develop apps and packages in the context of an CPL project which is defined in an cpl_core.json.
1. Run the CLI command ```cpl new console``` and provide the name my-app, as shown here:
```sh
cpl new console my-app
```
2. The cpl new command prompts you for information about features to include in the initial app. Decline the defaults by enter 'n' and press the Enter key.
The CLI create a new workspace and a simple 'Hello World' app, ready to run.
## Create initial library
You develop apps and packages in the context of an CPL project which is defined in an cpl_core.json.
1. Run the CLI command ```cpl new library``` and provide the name my-lib, as shown here:
```sh
cpl new library my-lib
```
2. The cpl new command prompts you for information about features to include in the initial library. Decline the defaults by enter 'n' and press the Enter key.
The CLI create a new workspace and a simple 'Hello World' library with CLI, ready to run.
## Start the app
The CLI includes a live development server, so that you can run your app locally.
1. Open a terminal window
2. To navigate to your project workspace, run the following command:
```sh
cd /path/to/project/name
```
3. To run the app run:
```sh
cpl start
```
The ```cpl start``` command launches the server, watches your source files, and restarts the app as you make chnages to thoses source files.
If your installation and setup was successful, you should see a output similar to the following:
```sh
Hello World
```
## What's next
- To learn more about the CPL CLI, see the [CLI Overview](cli.overview)
- Fore more informations about the Pyhton files generated by ```cpl new```, see [New Command](cli.new)
<!-- LINKS -->
[pip-url]: https://pip.sh-edraft.de
[python]: https://www.python.org/
[pip]: https://pypi.org/project/pip/

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

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