pwrforge 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pwrforge-0.0.3/CODE-OF-CONDUCT.md +51 -0
- pwrforge-0.0.3/LICENSE +20 -0
- pwrforge-0.0.3/PKG-INFO +208 -0
- pwrforge-0.0.3/README.md +132 -0
- pwrforge-0.0.3/pwrforge/__init__.py +10 -0
- pwrforge-0.0.3/pwrforge/certs/certGen.sh +519 -0
- pwrforge-0.0.3/pwrforge/certs/generateAllCertificates.sh +133 -0
- pwrforge-0.0.3/pwrforge/certs/openssl_device_intermediate_ca.cnf +127 -0
- pwrforge-0.0.3/pwrforge/certs/openssl_root_ca.cnf +127 -0
- pwrforge-0.0.3/pwrforge/cli.py +522 -0
- pwrforge-0.0.3/pwrforge/commands/__init__.py +0 -0
- pwrforge-0.0.3/pwrforge/commands/build.py +103 -0
- pwrforge-0.0.3/pwrforge/commands/check.py +611 -0
- pwrforge-0.0.3/pwrforge/commands/clean.py +57 -0
- pwrforge-0.0.3/pwrforge/commands/debug.py +104 -0
- pwrforge-0.0.3/pwrforge/commands/doc.py +98 -0
- pwrforge-0.0.3/pwrforge/commands/docker.py +148 -0
- pwrforge-0.0.3/pwrforge/commands/fix.py +41 -0
- pwrforge-0.0.3/pwrforge/commands/flash.py +238 -0
- pwrforge-0.0.3/pwrforge/commands/gen.py +132 -0
- pwrforge-0.0.3/pwrforge/commands/license_check.py +156 -0
- pwrforge-0.0.3/pwrforge/commands/monitor.py +180 -0
- pwrforge-0.0.3/pwrforge/commands/new.py +150 -0
- pwrforge-0.0.3/pwrforge/commands/publish.py +95 -0
- pwrforge-0.0.3/pwrforge/commands/run.py +57 -0
- pwrforge-0.0.3/pwrforge/commands/test.py +254 -0
- pwrforge-0.0.3/pwrforge/commands/update.py +158 -0
- pwrforge-0.0.3/pwrforge/commands/version.py +10 -0
- pwrforge-0.0.3/pwrforge/config.py +362 -0
- pwrforge-0.0.3/pwrforge/config_utils.py +95 -0
- pwrforge-0.0.3/pwrforge/file_generators/__init__.py +0 -0
- pwrforge-0.0.3/pwrforge/file_generators/base_gen.py +45 -0
- pwrforge-0.0.3/pwrforge/file_generators/cicd_gen.py +113 -0
- pwrforge-0.0.3/pwrforge/file_generators/clang_parser/__init__.py +0 -0
- pwrforge-0.0.3/pwrforge/file_generators/clang_parser/data_classes.py +82 -0
- pwrforge-0.0.3/pwrforge/file_generators/clang_parser/header_parser.py +28 -0
- pwrforge-0.0.3/pwrforge/file_generators/clang_parser/params_extractor.py +74 -0
- pwrforge-0.0.3/pwrforge/file_generators/cmake_gen.py +11 -0
- pwrforge-0.0.3/pwrforge/file_generators/conan_gen.py +67 -0
- pwrforge-0.0.3/pwrforge/file_generators/cpp_gen.py +117 -0
- pwrforge-0.0.3/pwrforge/file_generators/docker_gen.py +118 -0
- pwrforge-0.0.3/pwrforge/file_generators/env_gen.py +35 -0
- pwrforge-0.0.3/pwrforge/file_generators/mock_gen.py +48 -0
- pwrforge-0.0.3/pwrforge/file_generators/readme_gen.py +13 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/.gitlab-ci-custom.yml.j2 +2 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/.gitlab-ci.yml.j2 +181 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/CMakeLists.txt.j2 +66 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/README.md.j2 +243 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/conanfile.py.j2 +115 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/conanfiletest.j2 +44 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/profile_atsam.j2 +22 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/profile_esp32.j2 +21 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/profile_stm32.j2 +22 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/profile_x86.j2 +28 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/test_package/CMakeLists.txt.j2 +11 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/test_package/conanfile.py.j2 +30 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/test_package/devcontainer.json.j2 +35 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/test_package/example.cpp.j2 +7 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/toolchain/arm_gcc_toolchain.cmake.j2 +68 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/conan/toolchain/stm32_gcc_toolchain.cmake.j2 +12 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/cpp/cmake-src-atsam.j2 +74 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/cpp/cmake-src-esp32.j2 +4 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/cpp/cmake-src-multitarget.j2 +1 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/cpp/cmake-src-stm32.j2 +80 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/cpp/cmake-src-x86.j2 +23 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/cpp/lib.cpp.j2 +9 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/cpp/lib.h.j2 +14 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/cpp/main.cpp.j2 +46 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/Dockerfile-arm.j2 +22 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/Dockerfile-custom.j2 +2 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/Dockerfile-esp32.j2 +37 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/Dockerfile.j2 +96 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/atsam-gdb.script.j2 +6 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/atsam-openocd.cfg.j2 +6 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/devcontainer.json.j2 +35 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/docker-compose.yaml.j2 +26 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/env.txt.j2 +8 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/docker/stm32-openocd.cfg.j2 +4 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/mock/.clang-format +2 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/mock/CMakeLists.txt +22 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/mock/class_interface.h.j2 +25 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/mock/class_mock.cpp.j2 +26 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/mock/class_mock.h.j2 +24 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/pwrforge.toml.j2 +157 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/setup.sh.j2 +22 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/tests/CMakeLists-it.txt.j2 +1 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/tests/CMakeLists-mocks.txt.j2 +1 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/tests/CMakeLists-test.txt.j2 +40 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/tests/CMakeLists-ut.txt.j2 +1 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/tests/static_mock/CMakeLists.txt +14 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/tests/static_mock/static_mock.h +50 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/ut/.clang-format +2 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/ut/CMakeLists.txt.j2 +31 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/ut/ut.cpp.j2 +37 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/vscode/launch.json.j2 +20 -0
- pwrforge-0.0.3/pwrforge/file_generators/templates/vscode/tasks.json.j2 +40 -0
- pwrforge-0.0.3/pwrforge/file_generators/tests_gen.py +44 -0
- pwrforge-0.0.3/pwrforge/file_generators/toml_gen.py +16 -0
- pwrforge-0.0.3/pwrforge/file_generators/ut_gen.py +154 -0
- pwrforge-0.0.3/pwrforge/file_generators/vscode_gen.py +56 -0
- pwrforge-0.0.3/pwrforge/global_values.py +20 -0
- pwrforge-0.0.3/pwrforge/logger.py +56 -0
- pwrforge-0.0.3/pwrforge/target_helpers/__init__.py +0 -0
- pwrforge-0.0.3/pwrforge/target_helpers/atmel.xml +1340 -0
- pwrforge-0.0.3/pwrforge/target_helpers/atsam_helper.py +98 -0
- pwrforge-0.0.3/pwrforge/target_helpers/esp32_helper.py +104 -0
- pwrforge-0.0.3/pwrforge/target_helpers/stm32_helper.py +36 -0
- pwrforge-0.0.3/pwrforge/templates/.clang-format +102 -0
- pwrforge-0.0.3/pwrforge/templates/.clang-tidy +166 -0
- pwrforge-0.0.3/pwrforge/templates/.devcontainer/pwrforge-0.0.2-py3-none-any.whl +0 -0
- pwrforge-0.0.3/pwrforge/templates/.devcontainer/requirements.txt +118 -0
- pwrforge-0.0.3/pwrforge/templates/.gitignore +187 -0
- pwrforge-0.0.3/pwrforge/templates/LICENSE +20 -0
- pwrforge-0.0.3/pwrforge/utils/__init__.py +0 -0
- pwrforge-0.0.3/pwrforge/utils/clang_utils.py +19 -0
- pwrforge-0.0.3/pwrforge/utils/conan_utils.py +74 -0
- pwrforge-0.0.3/pwrforge/utils/docker_utils.py +83 -0
- pwrforge-0.0.3/pwrforge/utils/file_utils.py +82 -0
- pwrforge-0.0.3/pwrforge/utils/path_utils.py +18 -0
- pwrforge-0.0.3/pwrforge/utils/sys_utils.py +38 -0
- pwrforge-0.0.3/pyproject.toml +159 -0
- pwrforge-0.0.3/setup.cfg +22 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Contributor Code of Conduct
|
|
2
|
+
|
|
3
|
+
Our [pwr values](https://tft.pwr.edu.pl/) guide us in our day-to-day interactions and decision-making. Our open-source projects are no exception. Trust, respect, collaboration, and transparency are core values we believe should live and breathe within our projects. Our community welcomes participants from around the world with different experiences, unique perspectives, and great ideas to share.
|
|
4
|
+
|
|
5
|
+
## Our Pledge
|
|
6
|
+
|
|
7
|
+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
8
|
+
|
|
9
|
+
## Our Standards
|
|
10
|
+
|
|
11
|
+
Examples of behavior that contributes to creating a positive environment include:
|
|
12
|
+
|
|
13
|
+
- Using welcoming and inclusive language
|
|
14
|
+
- Being respectful of differing viewpoints and experiences
|
|
15
|
+
- Gracefully accepting constructive criticism
|
|
16
|
+
- Attempting collaboration before conflict
|
|
17
|
+
- Focusing on what is best for the community
|
|
18
|
+
- Showing empathy towards other community members
|
|
19
|
+
|
|
20
|
+
Examples of unacceptable behavior by participants include:
|
|
21
|
+
|
|
22
|
+
- Violence, threats of violence, or inciting others to commit self-harm
|
|
23
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
|
24
|
+
- Trolling, intentionally spreading misinformation, insulting/derogatory comments, and personal or political attacks
|
|
25
|
+
- Public or private harassment
|
|
26
|
+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
|
27
|
+
- Abuse of the reporting process to intentionally harass or exclude others
|
|
28
|
+
- Advocating for, or encouraging, any of the above behavior
|
|
29
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
30
|
+
|
|
31
|
+
## Our Responsibilities
|
|
32
|
+
|
|
33
|
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
34
|
+
|
|
35
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
|
36
|
+
|
|
37
|
+
## Scope
|
|
38
|
+
|
|
39
|
+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
|
40
|
+
|
|
41
|
+
## Enforcement
|
|
42
|
+
|
|
43
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting us anonymously through [this form](https://forms.office.com/e/5q4v58WY1c). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality about the reporter of an incident.
|
|
44
|
+
|
|
45
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
|
46
|
+
|
|
47
|
+
If you are unsure whether an incident is a violation, or whether the space where the incident took place is covered by our Code of Conduct, **we encourage you to still report it**. We would prefer to have a few extra reports where we decide to take no action than to leave an incident go unnoticed and unresolved that may result in an individual or group feeling like they can no longer participate in the community. Reports deemed as not a violation will also allow us to improve our Code of Conduct and the processes surrounding it. If you witness a dangerous situation or someone in distress, we encourage you to report it even if you are only an observer.
|
|
48
|
+
|
|
49
|
+
## Attribution
|
|
50
|
+
|
|
51
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), [version 1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
|
pwrforge-0.0.3/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2025 Wroclaw University of Science and Technology.
|
|
2
|
+
Copyright (c) 2022 Spyrosoft Solution S.A.
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
pwrforge-0.0.3/PKG-INFO
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pwrforge
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: C/C++ package and software development life cycle manager. Continuation of scargo project.
|
|
5
|
+
Keywords: firmware,package,embedded,cli
|
|
6
|
+
Author-email: Andrzej Aksenczuk <andrzej.aksenczuk@pwr.edu.pl>
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Natural Language :: English
|
|
12
|
+
Classifier: Operating System :: POSIX
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: clang==17.0.6
|
|
22
|
+
Requires-Dist: cmake==3.30.5
|
|
23
|
+
Requires-Dist: coloredlogs==15.0.1
|
|
24
|
+
Requires-Dist: conan==2.8.1
|
|
25
|
+
Requires-Dist: docker==7.1.0
|
|
26
|
+
Requires-Dist: esptool==4.7.0
|
|
27
|
+
Requires-Dist: gcovr==8.2
|
|
28
|
+
Requires-Dist: jinja2==3.1.4
|
|
29
|
+
Requires-Dist: libclang==18.1.1
|
|
30
|
+
Requires-Dist: lizard==1.17.10
|
|
31
|
+
Requires-Dist: pydantic==1.10.6
|
|
32
|
+
Requires-Dist: toml==0.10.2
|
|
33
|
+
Requires-Dist: tomlkit==0.13.2
|
|
34
|
+
Requires-Dist: typer==0.9.0
|
|
35
|
+
Requires-Dist: click==8.1.3
|
|
36
|
+
Requires-Dist: typing-extensions==4.6.0
|
|
37
|
+
Requires-Dist: paramiko==3.5.0
|
|
38
|
+
Requires-Dist: pyyaml==6.0.2
|
|
39
|
+
Requires-Dist: black==24.8.0 ; extra == "dev"
|
|
40
|
+
Requires-Dist: coverage~=7.6.1 ; extra == "dev"
|
|
41
|
+
Requires-Dist: flake8>=6.1.0 ; extra == "dev"
|
|
42
|
+
Requires-Dist: flit==3.8.0 ; extra == "dev"
|
|
43
|
+
Requires-Dist: isort==5.11.4 ; extra == "dev"
|
|
44
|
+
Requires-Dist: matplotlib==3.7.5 ; extra == "dev"
|
|
45
|
+
Requires-Dist: mypy==1.14.1 ; extra == "dev"
|
|
46
|
+
Requires-Dist: numpy>=1.26.0 ; extra == "dev"
|
|
47
|
+
Requires-Dist: pre-commit ; extra == "dev"
|
|
48
|
+
Requires-Dist: pyclean==3.0.0 ; extra == "dev"
|
|
49
|
+
Requires-Dist: pyelftools ; extra == "dev"
|
|
50
|
+
Requires-Dist: pyfakefs==5.3.2 ; extra == "dev"
|
|
51
|
+
Requires-Dist: pylint==3.2.7 ; extra == "dev"
|
|
52
|
+
Requires-Dist: pytest-cov==4.1.0 ; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-mock==3.12.0 ; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-subprocess==1.5.0 ; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest==7.4.3 ; extra == "dev"
|
|
56
|
+
Requires-Dist: pytest-lazy-fixture==0.6.3 ; extra == "dev"
|
|
57
|
+
Requires-Dist: pytest-xdist==3.5.0 ; extra == "dev"
|
|
58
|
+
Requires-Dist: pytest-order==1.2.0 ; extra == "dev"
|
|
59
|
+
Requires-Dist: types-clang==0.14.3 ; extra == "dev"
|
|
60
|
+
Requires-Dist: types-toml ; extra == "dev"
|
|
61
|
+
Requires-Dist: unittest-xml-reporting ; extra == "dev"
|
|
62
|
+
Requires-Dist: pyopenssl==23.2.0 ; extra == "dev"
|
|
63
|
+
Requires-Dist: types-pyOpenSSL==23.2.0 ; extra == "dev"
|
|
64
|
+
Requires-Dist: types-PyYAML==6.0.12.12 ; extra == "dev"
|
|
65
|
+
Requires-Dist: pip-tools==7.5.2 ; extra == "dev"
|
|
66
|
+
Requires-Dist: recommonmark ; extra == "doc"
|
|
67
|
+
Requires-Dist: sphinx-rtd-theme==1.1.1 ; extra == "doc"
|
|
68
|
+
Requires-Dist: Sphinx ; extra == "doc"
|
|
69
|
+
Requires-Dist: sphinxcontrib-plantuml==0.30 ; extra == "doc"
|
|
70
|
+
Project-URL: Documentation, https://pwr.github.io/pwrforge/index.html
|
|
71
|
+
Project-URL: Source, https://github.com/pwr/pwrforge
|
|
72
|
+
Project-URL: Tracker, https://github.com/pwr/pwrforge/issues
|
|
73
|
+
Provides-Extra: dev
|
|
74
|
+
Provides-Extra: doc
|
|
75
|
+
|
|
76
|
+
# pwrforge
|
|
77
|
+
pwrforge project was written by PWR team and is continuation of Spyrosoft Solutions S.A. scargo project. Find more information at [tft.pwr.edu.pl](https://tft.pwr.edu.pl/).
|
|
78
|
+
<p align="center">
|
|
79
|
+
<img src="docs/source/_static/pwr_logo_color.png" alt="pwr" width="200"/>
|
|
80
|
+
</p>
|
|
81
|
+
|
|
82
|
+
# Overview
|
|
83
|
+
This is the documentation for pwrforge - a Python-based C/C++ package and software development life cycle manager inspired by RUST cargo idea.
|
|
84
|
+
|
|
85
|
+
pwrforge can:
|
|
86
|
+
|
|
87
|
+
- Create a new project (binary or library) for embedded systems and x86
|
|
88
|
+
- Build the project
|
|
89
|
+
- Run static code analyzers
|
|
90
|
+
- Fix chosen problem automatically based on the checker analysis
|
|
91
|
+
- Run unit tests
|
|
92
|
+
- Generate documentation from the source code
|
|
93
|
+
- Work with the predefined docker environment depending on the chosen architecture
|
|
94
|
+
- Generate mocks and test skeletetons
|
|
95
|
+
|
|
96
|
+
# Installation
|
|
97
|
+
## Installing pwrforge on Ubuntu 24.04+ (PEP 668-compliant systems)
|
|
98
|
+
|
|
99
|
+
Ubuntu 24.04 and newer follow PEP 668, which restricts the use of pip in the system Python environment to prevent accidental damage to system-managed packages.
|
|
100
|
+
|
|
101
|
+
To safely install pwrforge, use a virtual environment:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
python3.12 -m venv .venv
|
|
105
|
+
source .venv/bin/activate
|
|
106
|
+
pip install --upgrade pip
|
|
107
|
+
pip install pwrforge
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This ensures isolated and conflict-free usage of pwrforge without requiring elevated privileges or --break-system-packages.
|
|
111
|
+
|
|
112
|
+
## Install on ubuntu <=22.04, windows or macos
|
|
113
|
+
pwrforge is available on [pypi](https://pypi.org/project/pwrforge/), so you can install it with pip:
|
|
114
|
+
|
|
115
|
+
```pip install pwrforge```
|
|
116
|
+
|
|
117
|
+
If system does not find 'pwrforge' command after installing, add the installation directory to your env paths. On Ubuntu you can find installation directory by running:
|
|
118
|
+
|
|
119
|
+
```$ pip show "pwrforge"```
|
|
120
|
+
|
|
121
|
+
Then add to PATH e.g.:
|
|
122
|
+
|
|
123
|
+
```$ export PATH=~/.local/bin:${PATH}```
|
|
124
|
+
|
|
125
|
+
# Working with pwrforge
|
|
126
|
+

|
|
127
|
+
|
|
128
|
+
# Project dependencies
|
|
129
|
+
## Working with docker (recommended)
|
|
130
|
+
- docker with docker-compose - https://docs.docker.com/engine/install/ubuntu/
|
|
131
|
+
- pip
|
|
132
|
+
- python3 - `sudo apt install python3.12-venv python3.12-distutils -y`
|
|
133
|
+
|
|
134
|
+
# Work environment
|
|
135
|
+
You can always change work environment between docker or native after project is created.
|
|
136
|
+
Just edit the pwrforge.toml file ([project] -> build-env = "docker" or build-env = "native").
|
|
137
|
+
For it may be needed dependencies manually which are included in `.devcontainer/Dockerfile`
|
|
138
|
+
|
|
139
|
+
Its recommended to work in virtual environment (venv) or conda environment e.g.:
|
|
140
|
+
- pip install virtualenv
|
|
141
|
+
- virtualenv -p /usr/bin/python3.12 venv
|
|
142
|
+
- source venv/bin/activate
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## Working in docker
|
|
146
|
+
1) If you create a new project, run `docker compose run pwrforge-dev` to run project development image depending on chosen architecture. All dependencies should be already there.
|
|
147
|
+
Run pwrforge commands as you would do natively.
|
|
148
|
+
|
|
149
|
+
2) If you create a project with --docker flag (`pwrforge new <my_proj> --docker ...`) or with any docker flag, by default each pwrforge command will be triggered in docker.
|
|
150
|
+
|
|
151
|
+
## Working natively
|
|
152
|
+
1) Create a project with --no-docker flag (`pwrforge new <my_proj> --no-docker ...`).
|
|
153
|
+
|
|
154
|
+
## Create the requirements for docker env
|
|
155
|
+
From version 2.3.2 the pwrforge is install in docker but overload by docker compose volume data, to get present version from your native env.
|
|
156
|
+
During deployment the requirements file is created using following command
|
|
157
|
+
|
|
158
|
+
- `pip-compile --all-extras --output-file=ci/requirements.txt pyproject.toml`
|
|
159
|
+
- `pip-compile --output-file=pwrforge/file_generators/templates/docker/requirements.txt.j2 pyproject.toml`
|
|
160
|
+
|
|
161
|
+
to have all newest dependencies. This solutions allow as to have pwrforge install in docker for ci/cd and be able to use newest features without official releases.
|
|
162
|
+
|
|
163
|
+
## Testing custom pwrforge generated project locally
|
|
164
|
+
You can make changes in pwrforge and install it locally using ```pip install .``` command when you are in the main project folder.
|
|
165
|
+
To test the custom pwrforge version and have this custom pwrforge available also inside the docker (crucial for testing), in created project update docker-compose.yaml:
|
|
166
|
+
|
|
167
|
+
volumes:
|
|
168
|
+
|
|
169
|
+
- ..:/workspace
|
|
170
|
+
- /dev:/dev
|
|
171
|
+
- ~/.local/lib/python3.12/site-packages/pwrforge:/usr/local/lib/python3.12/dist-packages/pwrforge
|
|
172
|
+
|
|
173
|
+
Where ```~/.local/lib/python3.12/site-packages/pwrforge``` is a path to pwrforge on your local machine. It the following path is not working, find installation dir using ```pip show pwrforge```.
|
|
174
|
+
|
|
175
|
+
To keep this setup between ```pwrforge update``` commands, in pwrforge.toml file update also ```update-exclude``` as in following example:
|
|
176
|
+
|
|
177
|
+
update-exclude = [".devcontainer/docker-compose.yaml"]
|
|
178
|
+
|
|
179
|
+
pip install --upgrade build
|
|
180
|
+
python -m build --wheel
|
|
181
|
+
|
|
182
|
+
# Known Issues
|
|
183
|
+
|
|
184
|
+
## MacOs with ARM processors
|
|
185
|
+
- On macOS devices with ARM processors (such as M1 and M3), USB device passthrough to Docker containers is not supported. While most development tasks can be performed within the Docker container, actions that involve direct interaction with USB devices, such as flashing firmware or monitoring hardware, must be executed natively on the host system.
|
|
186
|
+
|
|
187
|
+
## Windows
|
|
188
|
+
|
|
189
|
+
- On Windows devices, USB device passthrough is not supported in Docker containers when using Docker Desktop. To work around this limitation, you can use WSL2 (Windows Subsystem for Linux) or run a virtual machine with a Linux distribution like Ubuntu 22.04 to enable USB device access.
|
|
190
|
+
|
|
191
|
+
# Potential issues
|
|
192
|
+
|
|
193
|
+
pip install -e ".[dev]"
|
|
194
|
+
|
|
195
|
+
## Docker permissions on Ubuntu
|
|
196
|
+
|
|
197
|
+
When using the `docker-compose` command, you may encounter permission errors due to insufficient permissions for accessing the Docker daemon socket. To resolve this issue, ensure that your user has the necessary permissions by adding your user to the `docker` group or granting appropriate access rights to the Docker daemon socket.
|
|
198
|
+
To add your user to the `docker` group, run the following command:
|
|
199
|
+
- `newgroup docker`
|
|
200
|
+
- `sudo usermod -aG docker $USER`
|
|
201
|
+
- `sudo systemctl restart docker`
|
|
202
|
+
|
|
203
|
+
# Contributing
|
|
204
|
+
|
|
205
|
+
See contributing guide on https://pwr.github.io/pwrforge/contributing.html
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
pwrforge-0.0.3/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# pwrforge
|
|
2
|
+
pwrforge project was written by PWR team and is continuation of Spyrosoft Solutions S.A. scargo project. Find more information at [tft.pwr.edu.pl](https://tft.pwr.edu.pl/).
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/source/_static/pwr_logo_color.png" alt="pwr" width="200"/>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
# Overview
|
|
8
|
+
This is the documentation for pwrforge - a Python-based C/C++ package and software development life cycle manager inspired by RUST cargo idea.
|
|
9
|
+
|
|
10
|
+
pwrforge can:
|
|
11
|
+
|
|
12
|
+
- Create a new project (binary or library) for embedded systems and x86
|
|
13
|
+
- Build the project
|
|
14
|
+
- Run static code analyzers
|
|
15
|
+
- Fix chosen problem automatically based on the checker analysis
|
|
16
|
+
- Run unit tests
|
|
17
|
+
- Generate documentation from the source code
|
|
18
|
+
- Work with the predefined docker environment depending on the chosen architecture
|
|
19
|
+
- Generate mocks and test skeletetons
|
|
20
|
+
|
|
21
|
+
# Installation
|
|
22
|
+
## Installing pwrforge on Ubuntu 24.04+ (PEP 668-compliant systems)
|
|
23
|
+
|
|
24
|
+
Ubuntu 24.04 and newer follow PEP 668, which restricts the use of pip in the system Python environment to prevent accidental damage to system-managed packages.
|
|
25
|
+
|
|
26
|
+
To safely install pwrforge, use a virtual environment:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
python3.12 -m venv .venv
|
|
30
|
+
source .venv/bin/activate
|
|
31
|
+
pip install --upgrade pip
|
|
32
|
+
pip install pwrforge
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This ensures isolated and conflict-free usage of pwrforge without requiring elevated privileges or --break-system-packages.
|
|
36
|
+
|
|
37
|
+
## Install on ubuntu <=22.04, windows or macos
|
|
38
|
+
pwrforge is available on [pypi](https://pypi.org/project/pwrforge/), so you can install it with pip:
|
|
39
|
+
|
|
40
|
+
```pip install pwrforge```
|
|
41
|
+
|
|
42
|
+
If system does not find 'pwrforge' command after installing, add the installation directory to your env paths. On Ubuntu you can find installation directory by running:
|
|
43
|
+
|
|
44
|
+
```$ pip show "pwrforge"```
|
|
45
|
+
|
|
46
|
+
Then add to PATH e.g.:
|
|
47
|
+
|
|
48
|
+
```$ export PATH=~/.local/bin:${PATH}```
|
|
49
|
+
|
|
50
|
+
# Working with pwrforge
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
# Project dependencies
|
|
54
|
+
## Working with docker (recommended)
|
|
55
|
+
- docker with docker-compose - https://docs.docker.com/engine/install/ubuntu/
|
|
56
|
+
- pip
|
|
57
|
+
- python3 - `sudo apt install python3.12-venv python3.12-distutils -y`
|
|
58
|
+
|
|
59
|
+
# Work environment
|
|
60
|
+
You can always change work environment between docker or native after project is created.
|
|
61
|
+
Just edit the pwrforge.toml file ([project] -> build-env = "docker" or build-env = "native").
|
|
62
|
+
For it may be needed dependencies manually which are included in `.devcontainer/Dockerfile`
|
|
63
|
+
|
|
64
|
+
Its recommended to work in virtual environment (venv) or conda environment e.g.:
|
|
65
|
+
- pip install virtualenv
|
|
66
|
+
- virtualenv -p /usr/bin/python3.12 venv
|
|
67
|
+
- source venv/bin/activate
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## Working in docker
|
|
71
|
+
1) If you create a new project, run `docker compose run pwrforge-dev` to run project development image depending on chosen architecture. All dependencies should be already there.
|
|
72
|
+
Run pwrforge commands as you would do natively.
|
|
73
|
+
|
|
74
|
+
2) If you create a project with --docker flag (`pwrforge new <my_proj> --docker ...`) or with any docker flag, by default each pwrforge command will be triggered in docker.
|
|
75
|
+
|
|
76
|
+
## Working natively
|
|
77
|
+
1) Create a project with --no-docker flag (`pwrforge new <my_proj> --no-docker ...`).
|
|
78
|
+
|
|
79
|
+
## Create the requirements for docker env
|
|
80
|
+
From version 2.3.2 the pwrforge is install in docker but overload by docker compose volume data, to get present version from your native env.
|
|
81
|
+
During deployment the requirements file is created using following command
|
|
82
|
+
|
|
83
|
+
- `pip-compile --all-extras --output-file=ci/requirements.txt pyproject.toml`
|
|
84
|
+
- `pip-compile --output-file=pwrforge/file_generators/templates/docker/requirements.txt.j2 pyproject.toml`
|
|
85
|
+
|
|
86
|
+
to have all newest dependencies. This solutions allow as to have pwrforge install in docker for ci/cd and be able to use newest features without official releases.
|
|
87
|
+
|
|
88
|
+
## Testing custom pwrforge generated project locally
|
|
89
|
+
You can make changes in pwrforge and install it locally using ```pip install .``` command when you are in the main project folder.
|
|
90
|
+
To test the custom pwrforge version and have this custom pwrforge available also inside the docker (crucial for testing), in created project update docker-compose.yaml:
|
|
91
|
+
|
|
92
|
+
volumes:
|
|
93
|
+
|
|
94
|
+
- ..:/workspace
|
|
95
|
+
- /dev:/dev
|
|
96
|
+
- ~/.local/lib/python3.12/site-packages/pwrforge:/usr/local/lib/python3.12/dist-packages/pwrforge
|
|
97
|
+
|
|
98
|
+
Where ```~/.local/lib/python3.12/site-packages/pwrforge``` is a path to pwrforge on your local machine. It the following path is not working, find installation dir using ```pip show pwrforge```.
|
|
99
|
+
|
|
100
|
+
To keep this setup between ```pwrforge update``` commands, in pwrforge.toml file update also ```update-exclude``` as in following example:
|
|
101
|
+
|
|
102
|
+
update-exclude = [".devcontainer/docker-compose.yaml"]
|
|
103
|
+
|
|
104
|
+
pip install --upgrade build
|
|
105
|
+
python -m build --wheel
|
|
106
|
+
|
|
107
|
+
# Known Issues
|
|
108
|
+
|
|
109
|
+
## MacOs with ARM processors
|
|
110
|
+
- On macOS devices with ARM processors (such as M1 and M3), USB device passthrough to Docker containers is not supported. While most development tasks can be performed within the Docker container, actions that involve direct interaction with USB devices, such as flashing firmware or monitoring hardware, must be executed natively on the host system.
|
|
111
|
+
|
|
112
|
+
## Windows
|
|
113
|
+
|
|
114
|
+
- On Windows devices, USB device passthrough is not supported in Docker containers when using Docker Desktop. To work around this limitation, you can use WSL2 (Windows Subsystem for Linux) or run a virtual machine with a Linux distribution like Ubuntu 22.04 to enable USB device access.
|
|
115
|
+
|
|
116
|
+
# Potential issues
|
|
117
|
+
|
|
118
|
+
pip install -e ".[dev]"
|
|
119
|
+
|
|
120
|
+
## Docker permissions on Ubuntu
|
|
121
|
+
|
|
122
|
+
When using the `docker-compose` command, you may encounter permission errors due to insufficient permissions for accessing the Docker daemon socket. To resolve this issue, ensure that your user has the necessary permissions by adding your user to the `docker` group or granting appropriate access rights to the Docker daemon socket.
|
|
123
|
+
To add your user to the `docker` group, run the following command:
|
|
124
|
+
- `newgroup docker`
|
|
125
|
+
- `sudo usermod -aG docker $USER`
|
|
126
|
+
- `sudo systemctl restart docker`
|
|
127
|
+
|
|
128
|
+
# Contributing
|
|
129
|
+
|
|
130
|
+
See contributing guide on https://pwr.github.io/pwrforge/contributing.html
|
|
131
|
+
|
|
132
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# pwrforge/__init__.py
|
|
2
|
+
from importlib.metadata import PackageNotFoundError
|
|
3
|
+
from importlib.metadata import version as pkg_version
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
_installed_version = pkg_version("pwrforge")
|
|
7
|
+
except PackageNotFoundError:
|
|
8
|
+
_installed_version = "0.0.0"
|
|
9
|
+
|
|
10
|
+
__version__ = _installed_version or "0.0.0"
|