Compare commits

..

No commits in common. "master" and "2022.10.0.rc1" have entirely different histories.

894 changed files with 25353 additions and 27540 deletions

View File

@ -1,4 +1,4 @@
MIT License Copyright (c) 2020 - 2023 sh-edraft.de
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

View File

@ -87,17 +87,17 @@
Install the CPL package
```sh
pip install cpl-core --extra-index-url https://pip.sh-edraft.de
pip install sh_cpl --extra-index-url https://pip.sh-edraft.de
```
Install the CPL CLI
```sh
pip install cpl-cli --extra-index-url https://pip.sh-edraft.de
pip install sh_cpl-cli --extra-index-url https://pip.sh-edraft.de
```
Create workspace:
```sh
cpl new <console|library|unittest> <PROJECT NAME>
cpl new <console|library> <PROJECT NAME>
```
Run the application:
@ -110,7 +110,7 @@ cpl start
<!-- ROADMAP -->
## Roadmap
See the [open issues](https://git.sh-edraft.de/sh-edraft.de/sh_cpl/issues) for a list of proposed features (and known issues).
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).
@ -139,7 +139,7 @@ Distributed under the MIT License. See [LICENSE] for more information.
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_cpl)
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
@ -147,7 +147,7 @@ Project link: [https://git.sh-edraft.de/sh-edraft.de/sh_common_py_lib](https://g
[pip]: https://pypi.org/project/pip/
<!-- Internal LINKS -->
[project]: https://git.sh-edraft.de/sh-edraft.de/sh_cpl
[quickstart]: https://git.sh-edraft.de/sh-edraft.de/sh_cpl/wiki/quickstart
[contributing]: https://git.sh-edraft.de/sh-edraft.de/sh_cpl/wiki/contributing
[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

View File

@ -1,6 +1,6 @@
{
"WorkspaceSettings": {
"DefaultProject": "cpl-core",
"DefaultProject": "cpl-cli",
"Projects": {
"cpl-cli": "src/cpl_cli/cpl-cli.json",
"cpl-core": "src/cpl_core/cpl-core.json",
@ -19,19 +19,13 @@
"Scripts": {
"hello-world": "echo 'Hello World'",
"format": "echo 'Formatting:'; black ./",
"sv": "cpl set-version",
"set-version": "cpl run set-version --dev $ARGS; echo '';",
"set-version": "cpl run set-version $ARGS; echo '';",
"spu": "cpl set-pip-urls",
"set-pip-urls": "cpl run set-pip-urls --dev $ARGS; echo '';",
"set-pip-urls": "cpl run set-pip-urls $ARGS; echo '';",
"docs-build": "cpl format; echo 'Build Documentation'; cpl db-core; cpl db-discord; cpl db-query; cpl db-translation; cd docs/; make clean; make html;",
"db-core": "cd docs/; sphinx-apidoc -o source/ ../src/cpl_core; cd ../",
"db-discord": "cd docs/; sphinx-apidoc -o source/ ../src/cpl_discord; cd ../",
"db-query": "cd docs/; sphinx-apidoc -o source/ ../src/cpl_query; cd ../",
"db-translation": "cd docs/; sphinx-apidoc -o source/ ../src/cpl_translation; cd ../",
"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 &",
@ -52,7 +46,7 @@
"pre-publish-all": "cpl sv $ARGS; cpl spu $ARGS;",
"publish-all": "cpl publish-cli; cpl publish-core; cpl publish-discord; cpl publish-query; cpl publish-translation;",
"pa": "cpl publish-all $ARGS",
"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-discord": "echo 'Publish cpl-discord'; cd ./src/cpl_discord; cpl publish; cd ../../;",
@ -137,15 +131,7 @@
"di-cli": "pip install cpl-cli --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de",
"di-discord": "pip install cpl-discord --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",
"di-translation": "pip install cpl-translation --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de",
"prod-install": "cpl pi-core; cpl pi-cli; cpl pi-query; cpl pi-translation;",
"pi": "cpl prod-install",
"pi-core": "pip install cpl-core --pre --upgrade --extra-index-url https://pip.sh-edraft.de",
"pi-cli": "pip install cpl-cli --pre --upgrade --extra-index-url https://pip.sh-edraft.de",
"pi-discord": "pip install cpl-discord --pre --upgrade --extra-index-url https://pip.sh-edraft.de",
"pi-query": "pip install cpl-query --pre --upgrade --extra-index-url https://pip.sh-edraft.de",
"pi-translation": "pip install cpl-translation --pre --upgrade --extra-index-url https://pip.sh-edraft.de"
"di-translation": "pip install cpl-translation --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de"
}
}
}

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

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

View File

@ -29,4 +29,4 @@ If you call the command in a CPL workspace, you can use the project names. Other
| Argument | Description |
|------------------|:------------------------------------------:|
| ```--simulate``` | Specifies whether the command is simulated |
| ```--simulate``` | Specifies whether the command is simulated |

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

@ -16,15 +16,12 @@ cpl **N** *&lt;type&gt;* *&lt;name&gt;*
Generates a workspace and initial project or add a project to workspace.
You can define custom project types by creating templates in a ```.cpl``` folder.
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``` |
| ```--base``` | First element of path will be used as base-path not 'src'. For example: 'cpl g c test/Test' will be created at ```src/test/``` with --base it would be ```test/``` | ```str``` |
| Argument | Description | Value type |
|--------------|:----------------------------------------------------:|:----------:|
| ```<type>``` | The type of the project, see [types](#project-types) | ```str``` |
| ```<name>``` | The name of the project | ```str``` |
## Project types

View File

@ -39,15 +39,15 @@ The cpl generate command takes as an argument the artifact to be generated. In
| Command | Alias | Description |
| ----------------------------- |:-------------:|:----------------:|
| [add](cpl_cli.add) | a or a | Adds a project reference to given project.
| [build](cpl_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](cpl_cli.generate) | g or G | Generate a new file.
| [help](cpl_cli.help) | h or H | Lists available command and their short descriptions.
| [install](cpl_cli.install) | i or I | With argument installs packages to project, without argument installs project dependencies.
| [new](cpl_cli.new) | n or N | Creates new CPL project.
| [publish](cpl_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](cpl_cli.remove) | r or R | Removes a project from workspace.
| [start](cpl_cli.start) | s or S | Starts CPL project, restarting on file changes.
| [uninstall](cpl_cli.uninstall) | ui or UI | Uninstalls packages from project.
| [update](cpl_cli.update) | u or U | Update CPL and project dependencies.
| [version](cpl_cli.version) | v or V | Outputs CPL CLI version.
| [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,7 @@
# cpl start
Starts your application, restarting on file changes.
cpl **start** <br>
cpl **s** <br>
cpl **S**

View File

@ -44,7 +44,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
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/cpl repo.
3. Fork the sh-edraft.de/sh_cpl repo.
4. In your forked repository, make your changes in a new git branch:
@ -70,7 +70,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
git push origin my-fix-branch
```
8. In Gitea, send a pull request to cpl:master
8. In Gitea, send a pull request to sh_cpl:master
### Reviewing a Pull Request
@ -104,7 +104,7 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
## 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/cpl/src/branch/master/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/

View File

@ -1,43 +0,0 @@
# 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.
You can define custom schematics by creating templates in a ```.cpl``` folder.
## Arguments
| Argument | Description | Value type |
|-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------:|
| ```<schematic>``` | The schematic to generate. | ```str``` |
| ```<name>``` | The name of the generated file. | ```str``` |
| ```--base``` | First element of path will be used as base-path not 'src'. For example: 'cpl g c test/Test' will be created at ```src/test/``` with --base it would be ```test/``` | ```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>``` |
| ```command``` | Discord bot command class | ```<name>``` |
| ```event``` | Discord bot event class | ```<name>``` |

View File

@ -1,20 +1,19 @@
CLI reference
CLI Reference
=============
.. toctree::
:maxdepth: 4
cpl_cli.overview
cpl_cli.add
cpl_cli.build
cpl_cli.generate
cpl_cli.help
cpl_cli.install
cpl_cli.new
cpl_cli.publish
cpl_cli.remove
cpl_cli.run
cpl_cli.start
cpl_cli.uninstall
cpl_cli.update
cpl_cli.version
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

@ -1,12 +0,0 @@
# cpl run
Starts your application once.
cpl **run** <br>
cpl **r** <br>
cpl **R**
| Argument | Description | Value type |
|-----------------|:----------------------------------------------------------------------------------------------------:|:----------:|
| ```<project>``` | Optional parameter to specify which project to start, if not set default project will be started. | ```str``` |
| ```--dev``` | To run the project from source and not from dist after build. | ```str``` |

View File

@ -1,11 +0,0 @@
# cpl start
Starts your application, restarting on file changes.
cpl **start** <br>
cpl **s** <br>
cpl **S**
| Argument | Description | Value type |
|-----------------|:----------------------------------------------------------------------------------------------------:|:----------:|
| ```--dev``` | To run the project from source and not from dist after build. | ```str``` |

View File

@ -1,61 +1,34 @@
cpl\_core.application package
=============================
cpl_core.application
=======================
Submodules
----------
cpl\_core.application.application\_abc module
---------------------------------------------
cpl_core.application.application\_abc
---------------------------------------
.. automodule:: cpl_core.application.application_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.application.application\_builder module
-------------------------------------------------
cpl_core.application.application\_builder
-------------------------------------------
.. automodule:: cpl_core.application.application_builder
:members:
:undoc-members:
:show-inheritance:
cpl\_core.application.application\_builder\_abc module
------------------------------------------------------
cpl_core.application.application\_builder\_abc
------------------------------------------------
.. automodule:: cpl_core.application.application_builder_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.application.application\_extension\_abc module
--------------------------------------------------------
.. automodule:: cpl_core.application.application_extension_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.application.startup\_abc module
-----------------------------------------
cpl_core.application.startup\_abc
-----------------------------------
.. automodule:: cpl_core.application.startup_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.application.startup\_extension\_abc module
----------------------------------------------------
.. automodule:: cpl_core.application.startup_extension_abc
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: cpl_core.application
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,109 +1,42 @@
cpl\_core.configuration package
===============================
cpl_core.configuration
=========================
Submodules
----------
cpl\_core.configuration.argument\_abc module
--------------------------------------------
.. automodule:: cpl_core.configuration.argument_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.argument\_builder module
------------------------------------------------
.. automodule:: cpl_core.configuration.argument_builder
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.argument\_executable\_abc module
--------------------------------------------------------
.. automodule:: cpl_core.configuration.argument_executable_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.argument\_type\_enum module
---------------------------------------------------
.. automodule:: cpl_core.configuration.argument_type_enum
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.configuration module
--------------------------------------------
cpl_core.configuration.configuration
--------------------------------------
.. automodule:: cpl_core.configuration.configuration
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.configuration\_abc module
-------------------------------------------------
cpl_core.configuration.configuration\_abc
-------------------------------------------
.. automodule:: cpl_core.configuration.configuration_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.configuration\_model\_abc module
--------------------------------------------------------
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 module
------------------------------------------------------------------
cpl_core.configuration.configuration\_variable\_name\_enum
------------------------------------------------------------
.. automodule:: cpl_core.configuration.configuration_variable_name_enum
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.executable\_argument module
---------------------------------------------------
cpl_core.configuration.console\_argument
------------------------------------------
.. automodule:: cpl_core.configuration.executable_argument
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.flag\_argument module
---------------------------------------------
.. automodule:: cpl_core.configuration.flag_argument
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.validator\_abc module
---------------------------------------------
.. automodule:: cpl_core.configuration.validator_abc
:members:
:undoc-members:
:show-inheritance:
cpl\_core.configuration.variable\_argument module
-------------------------------------------------
.. automodule:: cpl_core.configuration.variable_argument
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: cpl_core.configuration
.. automodule:: cpl_core.configuration.console_argument
:members:
:undoc-members:
:show-inheritance:

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