|
| 1 | +# Developing |
| 2 | +We appreciate any contributions to the Score-P Python Bindings. |
| 3 | +However, there are a few policies we agreed on and which are relevant for contributions. |
| 4 | +These are detailed below. |
| 5 | + |
| 6 | +## Formatting / Codestyle |
| 7 | + |
| 8 | +Readable and consistent code makes it easy to understand your changes. |
| 9 | +Therefore the CI system has checks using `clang-format-9` and `flake8` in place. |
| 10 | +Please make sure that these test pass, when making a Pull Request. |
| 11 | +These tests will tell you the issues and often also how to fix them. |
| 12 | +Prior to opening a Pull Request you can use the provided `.flake8` and `.clang-format` files, to check your code locally and run `clang-format-9` or `autopep8` to fix most of them automatically. |
| 13 | + |
| 14 | +## Build system |
| 15 | + |
| 16 | +The official way to build and install this module is using `pip`. |
| 17 | +Please make sure that all changes, you introduce, work with `pip install .`. |
| 18 | + |
| 19 | +However, you might have noticed that there is a CMake-based build system in place as well. |
| 20 | +We do not support this build system, and it might be outdated or buggy. |
| 21 | +Although, we do not actively maintain the CMake build system, and will not help you fix issues related to it, Pull Requests against it might be accepted. |
| 22 | + |
| 23 | +You might find this build system helpful for development, especially if you are doing C/C++ things: |
| 24 | +* Include paths for C++ are correctly searched for and set up for use by IDEs or other tools. For example Visual Studio Code works out of the box, given the appropriate extensions (C++, Python, CMake) are installed. |
| 25 | +* A folder `site-packages` is created in the build folder where the C/C++ extension module and the scorep module are copied to on each build (e.g. `make`-call). Hence it is possible to add that folder to the PYTHONPATH environment variable, build the project and start debugging or execute the tests in test/test.py. |
| 26 | +* A `test` target exists which can be run to execute all tests. |
| 27 | + |
| 28 | +Please note, that changes to the Python source files are not reflected in the build folder unless a build is executed. |
| 29 | +Also, if you delete Python files, we recommended to clear and recreate the build folder. |
0 commit comments