Contributing#
If you would like to contribute to ebtelplusplus, either by fixing a bug or adding a feature, you will need to download and build the package locally.
If you are new to contributing to open source, we recommend reading the SunPy newcomer’s guide.
The section on setting up a development environment will be particularly helpful.
While these instructions are particular to SunPy, they are applicable to any open-source project, particularly for Python.
First, create a fork of the ebtelplusplus repository. If you’re not sure what this is or how to create a fork, see the aforementioned development guide. Next, clone your fork,
git clone https://github.com/<your-user-name>/ebtelPlusPlus.git
Because ebtelplusplus implements the actual simulation code in C++ and thus is not a pure Python package, installation of this package requires first compiling the C++ code and building the needed binaries.
To do this, you will first need to have the Boost package installed (at least v1.53).
There are various ways to install this package, including:
Source |
OS |
Command |
|---|---|---|
any |
|
|
APT |
Linux (Debian-based) |
|
YUM |
Linux (RHEL) |
|
macOS |
|
|
macOS |
|
|
Windows |
|
The reason that Boost is required is that ebtelplusplus uses the Boost.Numeric.Odeint package to solve the EBTEL equations.
Once you have successfully installed Boost, you can install ebtelplusplus,
cd ebteplusplus
pip install -e .[dev]
This will compile the C++ code (using pybind11 and
scikit-build-core) and install the ebtelplusplus
package, including all of the dependencies for testing and developing the package.
To verify that you have a working installation, you can run the test suite,
pytest ebtelplusplus
You are now ready to start contributing to or modifying ebtelplusplus.
Note that if you are modifying any of the simulation code, that is contained in ebtelplusplus/extern and is implemented in C++.
After each change, you will need to recompile using the above installation command.
For more information about proposing new changes back to the main repository, see this section of the SunPy newcomer’s guide.