Contributing to ERAD#
We welcome contributions from the community! Please follow these steps to get started.
Developer Mode Installation#
To install ERAD in development mode, clone the repository and install the dependencies using pip in a new environment:
git clone https://github.com/NREL-Distribution-Suites/erad.git
cd erad
pip install -e[dev,doc] .
This will install ERAD in editable mode, allowing you to make changes to the source code and have them reflected immediately.
Running Tests Locally#
To run the test suite locally, use the following command from the root of the repository:
pytest tests/
This will execute all tests in the tests/ directory and report the results. Make sure you have installed all development dependencies before running the tests.
Building Documentation Locally#
To build the documentation locally, ensure you have installed the required dependencies:
pip install -e[doc] .
Then, from the root of the repository, run:
jupyter-book build docs/
The generated HTML documentation will be available in docs/_build/html/. Open index.html in your browser to view the documentation.
Opening Issues and Feature Requests#
- Use the Issues tab on GitHub to report bugs or request features. 
- Include as much detail as possible (steps to reproduce, expected vs actual behavior, version info). 
- For feature requests, describe the motivation and potential use cases. 
Submitting Pull Requests#
- Fork the repository and create a new branch: - git checkout -b feature/my-new-feature 
- Follow the existing coding style and linting rules: - Linting and styling are enforced using pre-commit hooks, configured in the repository’s - .pre-commit-config.yamlfile.- To set up pre-commit, run: - pip install pre-commit pre-commit install pre-commit run --all-files 
- Commit your changes with clear, descriptive messages. 
- Push your branch and open a pull request on GitHub. 
- Run the test suite locally before submitting your pull request: - pytest tests/- Ensure all tests pass to maintain code quality. 
- For any new feature addition, ensure complete test coverage. Add or update tests to cover all new functionality and edge cases before submitting your pull request. 
- Ensure that documentation is updated to reflect any changes, new features, or modifications. Update relevant docstrings, markdown files, and user guides as needed. 
- Participate in the review process — address feedback promptly. 
