https://github.com/genietim/simple_setup_test_py_cpp
A public test of a setup for a C++/Python hybrid Python package with tests, codecov, CMake and libraries
https://github.com/genietim/simple_setup_test_py_cpp
Last synced: 9 months ago
JSON representation
A public test of a setup for a C++/Python hybrid Python package with tests, codecov, CMake and libraries
- Host: GitHub
- URL: https://github.com/genietim/simple_setup_test_py_cpp
- Owner: GenieTim
- License: gpl-3.0
- Created: 2023-02-14T13:44:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T13:52:49.000Z (over 1 year ago)
- Last Synced: 2025-04-08T07:42:04.952Z (about 1 year ago)
- Language: Python
- Size: 475 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# simple_setup_test_py_cpp
[](https://codecov.io/gh/GenieTim/simple_setup_test_py_cpp)
[](https://github.com/GenieTim/simple_setup_test_py_cpp/actions/workflows/run-tests.yml)
[](https://github.com/GenieTim/simple_setup_test_py_cpp/actions/workflows/publish-documentation-html.yml)[](https://badge.fury.io/py/simple_setup_test_py_cpp)
[](https://pypi.python.org/pypi/simple_setup_test_py_cpp/)
[](https://pypi.python.org/pypi/simple_setup_test_py_cpp/)
A sample setup of Pybind11 with Catch2 and Python tests.
In particular, it's used as a playground to test and experiment and fix,
such as
- getting coverage for separate header and non-header tests
The following belongs to the bootstrap, I would not recommend to actually install this package (it has more use if you use it as a template for your pybind11 package project).
## Installation
Use pip:
`pip install simple_setup_test_py_cpp`
## Usage
**NOTE**: currently, this release's API is _unstable_ and subject to change.
See the [documentation](https://genietim.github.io/simple_setup_test_py_cpp) for a current list of all available functions.
### Example
Example usage can be found in the [documentation](https://genietim.github.io/simple_setup_test_py_cpp), the [tests](https://github.com/GenieTim/simple_setup_test_py_cpp/tree/main/tests),
the [CLI application](https://github.com/GenieTim/simple_setup_test_py_cpp/tree/main//src/simple_setup_test_py/simple_setup_test_py.py) or in the following code snippet:
```python
from simple_setup_test_py_cpp import SampleClass
sample = SampleClass()
sample.set_value(12)
assert sample.get_value() == 12
```