Skip to content

Commit

Permalink
Merge pull request #5 from ROVI-org/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
c-randall authored Sep 16, 2024
2 parents 1f2d5c2 + 735fb7a commit 8abe035
Show file tree
Hide file tree
Showing 19 changed files with 146 additions and 344 deletions.
12 changes: 3 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
value: Thanks for taking the time to fill out this bug report!

- type: input
id: version
Expand Down Expand Up @@ -40,11 +39,7 @@ body:
attributes:
label: Steps to Reproduce
description: |
Provide clear steps to reproduce the bug. Ideally, include a code block
that demonstrates the issue. Aim for a minimal, easy-to-understand example
by simplifying or removing unnecessary parts of your code. Only include
code leading up to where the error occurs—for instance, if the error is
thrown on line 30, do not include any lines after that.
Provide clear steps to reproduce the bug. Ideally, include a code block that demonstrates the issue. Aim for a minimal, easy-to-understand example by simplifying or removing unnecessary parts of your code. Only include code leading up to where the error occurs—for instance, if the error is thrown on line 30, do not include any lines after that.
validations:
required: true

Expand All @@ -53,6 +48,5 @@ body:
attributes:
label: Relevant log output
description: |
Copy and paste any relevant log output. Your log will automatically be
formatted into code, so there is no need for backticks.
Copy and paste any relevant log output. Your log will automatically be formatted into code, so there is no need for backticks.
render: shell
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Documentation
description: File a bug report
title: "[docs]: "
labels: ["documentation"]

body:
- type: markdown
attributes:
value: Thanks for taking the time to fill out this report!

- type: radio
id: problem-type
attributes:
label: Problem/request type
description: What are you trying to get fixed or added?
options:
- label: typo
- label: example request
- label: broken link
- label: other
validations:
required: true

- type: textarea
id: detailed-explanation
attributes:
label: Detailed explanation
description: |
On what page is the typo or link broken? Include the page url and refer to a specific section when possible. If you are requesting an example, what would you like to see demonstrated? For anything else, be concise, but provide enough detail to make sure the issue/request can be further investigated.
validations:
required: true
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ labels: ["feature"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this form!
value: Thanks for taking the time to fill out this form!

- type: textarea
id: description
Expand All @@ -20,8 +19,9 @@ body:
id: motivation
attributes:
label: Motivation
description: |
How does the feature improve the package? What is the expected outcome?
description: How does the feature improve the package? What is the expected outcome?
validations:
required: true

- type: textarea
id: additional-context
Expand Down
14 changes: 5 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please add a line in the relevant section of [CHANGELOG.md](https://github.com/ROVI-org/thevenin/blob/dev/CHANGELOG.md) to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Please add a line in the relevant section of [CHANGELOG.md](https://github.com/ROVI-org/thevenin/blob/main/CHANGELOG.md) to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

- [ ] New feature (non-breaking change which adds functionality)
- [ ] Optimization (back-end change that improves speed/readability/etc.)
- [ ] Bug fix (non-breaking change which fixes an issue)

# Key checklist:

- [ ] No style issues: `$ nox -s linter [-- format]` (the `format` option will try to fix errors)
- [ ] Docstrings/comments are free of misspellings: `$ nox -s codespell [-- write]` (the `write` option will try to fix errors)
- [ ] No style issues: `$ nox -s linter [-- format]`
- [ ] Code is free of misspellings: `$ nox -s codespell [-- write]`
- [ ] All tests pass: `$ nox -s tests`
- [ ] New badges have been generated: `$ nox -s badges`
- [ ] Badges are updated: `$ nox -s badges`

You can also run all of the above checks using `$ nox -s pre-commit` instead of running them individually.
The optional `-- format` and `-- write` arguments (see above) attempt to correct formatting issues prior to running the linter, and spelling mistakes prior to running the spellcheck, respectively. You can also run all of the above checks using `$ nox -s pre-commit` instead of running them individually.

## Further checks:

- [ ] Code is commented, particularly in hard-to-understand areas
- [ ] Tests are added that prove fix is effective or that feature works
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# thevenin Changelog

## Unreleased
## [Unreleased]()

### New Features

Expand Down
28 changes: 28 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2024, National Renewable Energy Laboratory

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./images/dark.svg"
style="width: 75%; min-width: 250px; max-width: 500px;"/>
<img alt="thevenin logo" src="./images/light.svg"
style="width: 75%; min-width: 250px; max-width: 500px;"/>
</picture>
<img alt='Logo' style='width: 75%; min-width: 250px; max-width: 500px;'
src='https://github.com/ROVI-org/thevenin/blob/main/images/dark.png?raw=true#gh-dark-mode-only'/>
<img alt='Logo' style='width: 75%; min-width: 250px; max-width: 500px;'
src='https://github.com/ROVI-org/thevenin/blob/main/images/light.png?raw=true#gh-light-mode-only'/>

<p><br></p>
<br>

[![CI][ci-b]][ci-l] &nbsp;
![tests][test-b] &nbsp;
Expand All @@ -15,18 +13,19 @@
[ci-b]: https://github.com/ROVI-org/thevenin/actions/workflows/ci.yaml/badge.svg
[ci-l]: https://github.com/ROVI-org/thevenin/actions/workflows/ci.yaml

[test-b]: ./images/tests.svg
[cov-b]: ./images/coverage.svg
[test-b]: https://raw.githubusercontent.com/ROVI-org/thevenin/1f2d5c206f2656163823352cbbf4459c4cb327ec/images/tests.svg
[cov-b]: https://raw.githubusercontent.com/ROVI-org/thevenin/1f2d5c206f2656163823352cbbf4459c4cb327ec/images/coverage.svg

[pep-b]: https://img.shields.io/badge/code%20style-pep8-orange.svg
[pep-l]: https://www.python.org/dev/peps/pep-0008

## Summary
This package is a wrapper for the well-known Thevenin equivalent circuit model. The model is comprised of a single series reistor followed by any number of parallel RC pairs. Figure 1 below illustrates a circuit with 2 RC paris; however, the model can be run with as few as zero, and as many as $N$.
This package is a wrapper for the well-known Thevenin equivalent circuit model. The model is comprised of a single series reistor followed by any number of parallel RC pairs. Figure 1 below illustrates a circuit with 2 RC pairs; however, the model can be run with as few as zero, and as many as $N$.

<p align="center">
<img alt="2RC Thevenin circuit." src="./images/thevenin_circuit.png"
style="width: 75%; min-width: 300px; max-width: 500px;"/></br>
<img alt="2RC Thevenin circuit." style="width: 75%; min-width: 250px; max-width: 500px;"
src="https://github.com/ROVI-org/thevenin/blob/main/images/example_circuit.png?raw=true"/>
</br>
Figure 1: 2RC Thevenin circuit.
</p>

Expand Down Expand Up @@ -65,7 +64,7 @@ We recommend using [Anaconda](https://anaconda.com) to install this package due

After cloning the repository, or downloading the files, use your terminal (MacOS/Linux) or Anaconda Prompt (Windows) to navigate into the folder with the `pyproject.toml` file. Once in the correct folder, execute the following commands:

```cmd
```command
conda create -n rovi python=3.12 scikits_odes_sundials -c conda-forge
conda activate rovi
pip install .
Expand All @@ -75,7 +74,7 @@ The first command will create a new Python environment named `rovi`. The environ

If you plan to make changes to the package, you may also want to consider installing in "editable" mode using the `-e` flag, and including the optional developer dependencies, using `[dev]`, as shown below. If you plan to push any changes back into this repository, you should see the [contributing](#contributing) section first.

```cmd
```command
pip install -e .[dev]
```

Expand All @@ -98,7 +97,9 @@ sol.plot('capacity_Ah', 'voltage_V')
* If you are new to Python, check out [Spyder IDE](https://www.spyder-ide.org/). Spyder is a powerful interactive development environment (IDE) that can make programming in Python more approachable to new users.

## Contributing
If you'd like to contribute to this package, please look through the existing [issues](). If the bug you've caught or the feature you'd like to add isn't already being worked on, please submit a new issue before getting started. You should also read through the [developer guidelines]().
If you'd like to contribute to this package, please look through the existing [issues](https://github.com/ROVI-org/thevenin/issues). If the bug you've caught or the feature you'd like to add isn't already being worked on, please submit a new issue before getting started. You should also read through the [developer guidelines](https://rovi-org.github.io/thevenin/development).

## Acknowledgements
This work was authored by the National Renewable Energy Laboratory (NREL), operated by Alliance for Sustainable Energy, LLC, for the U.S. Department of Energy (DOE). The views expressed in the repository do not necessarily represent the views of the DOE or the U.S. Government.
This work was authored by the National Renewable Energy Laboratory (NREL), operated by Alliance for Sustainable Energy, LLC, for the U.S. Department of Energy (DOE). The views expressed in the repository do not necessarily represent the views of the DOE or the U.S. Government.

The motivation and funding for this project came from the Rapid Operational Validation Initiative (ROVI) sponsored by the Office of Electricity. The focus of ROVI is "to greatly reduce time required for emerging energy storage technologies to go from lab to market by developing new tools that will accelerate the testing and validation process needed to ensure commercial success." If interested, you can read more about ROVI [here](https://www.energy.gov/oe/rapid-operational-validation-initiative-rovi).
Loading

0 comments on commit 8abe035

Please sign in to comment.