Contributing to the code#

We welcome contributions to both the codebase and the documentation. Below are a few guidelines to help you get started.

If you would like to modify or improve the code, please follow these principles:

  • Use your own branch for custom modifications that are specific to your case study or data. These include small changes that don’t need to be integrated across all models.

  • Update the main branch for general improvements such as bug fixes, performance enhancements, or new features that would benefit all users.

  • Make sure your changes are well documented and tested.

Guidelines for submitting pull requests#

If your contribution is significant (bug fix, improvement, new feature), you should:

  1. Create a new branch from main (for example: feature-my-update).

  2. Make your changes on that branch.

  3. Open a pull request (PR) to merge your branch into main.

A pull request is a safe and documented way to propose changes. It allows you and others to:

  • See exactly what was changed.

  • Review and test the code before merging.

  • Discuss the changes if needed.

Even if you are the only contributor, using pull requests helps keep a clean and transparent history, and makes it easier to undo changes if needed.

Pull requests should be used for important changes. For small edits, you can update the main branch directly, as long as it is up to date. Refer to previous sections for instructions on committing and pushing to main.

We recommend that pull requests:

  • Include a short description of what was changed and why.

  • Contain only one type of change (avoid mixing bug fixes with new features).

  • Be tested before being submitted.

Adding a new technology#

To add a new technology to the model, you must update several input files.

  1. Supply defaults

    • Add the technology to:

      • AvailabilityDefault

      • PageNDataInputDefault

      • PayCapExTrajectoriesDefault

    • These are all under supply.

    • Do this in the main branch, so everyone can use it, unless the technology is strictly specific to your own case.

  2. Zonal definition

    • Default technologies are defined by zone.

    • If you have no better information, define the same technology for all zones in the input files.

  3. Resources and attributes

    • Add the technology to the resources and take data files.

    • Define all required attributes (e.g., efficiency, fuel, lifetime, cost parameters).

  4. Post-processing and coding

    • Add the technology to:

      • PostProcessingStaticTechnologies.csv

      • Coders.csv

    • This ensures that figures are generated correctly and avoids exceptions during post-processing.