Skip to content

Commit 396cffd

Browse files
Merge pull request #1 from pvstorageoptimization/dev
Dev
2 parents b56680c + f10f9c1 commit 396cffd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+588
-1346
lines changed

.github/workflows/coverage.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: coverage
2+
3+
on: [push, pull_request]
4+
jobs:
5+
run:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- name: Set up Python 3.10
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.10'
17+
- name: Install dependencies
18+
run: |
19+
pip install -r requirements.txt
20+
pip install coverage
21+
- name: Run tests and collect coverage
22+
run: coverage run -m unittest
23+
- name: Upload coverage to Codecov
24+
uses: codecov/codecov-action@v4-beta
25+
with:
26+
flags: smart-tests
27+
verbose: true
28+
env:
29+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
test:
99
runs-on: ${{ matrix.os }}
1010
strategy:
11+
fail-fast: false # don't cancel other matrix jobs when one fails
1112
matrix:
1213
os: [ubuntu-latest, windows-latest]
1314
python-version: ['3.10', '3.11']

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/docs/conf.py
2+
/docs/_templates/
3+
/docs/_static/
4+
/docs/_build/
5+
/.mypy_cache/
6+
/optibess_algorithm.egg-info/
7+
/.tox/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 El-mor Renewable Energies Dev Team
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ Optibess Algorithm - optimizing PV system combined with storage
55
It uses data from *pvgis* and algorithms from the *pvlib* and *Nevergrad* python libraries, and is the backend part of
66
the *Optibess* site.
77

8+
.. image:: https://github.com/pvstorageoptimization/Optibess_algorithm/workflows/Tests/badge.svg
9+
:target: https://github.com/pvstorageoptimization/Optibess_algorithm/actions?query=workflow%3ATests
10+
11+
.. image:: https://codecov.io/gh/pvstorageoptimization/Optibess_algorithm/graph/badge.svg?token=L3VLK1Y1SM
12+
:target: https://codecov.io/gh/pvstorageoptimization/Optibess_algorithm
13+
14+
|Documentation Status|
15+
16+
.. |Documentation Status| image:: https://readthedocs.org/projects//badge/?version=latest
17+
:target: http://.readthedocs.io/?badge=latest
18+
19+
|PyPI download total|
20+
21+
.. |PyPI download total| image:: https://img.shields.io/pypi/dt/.svg
22+
:target: https://pypi.python.org/pypi/
23+
824
Quick start
925
------------
1026
**Optibess Algorithm** can be installed with:
@@ -34,11 +50,11 @@ You can run an optimization on an example system with:
3450
documentation
3551
=============
3652

37-
Check out our documentation<ADD link>. There are example of how to use the different modules for simulation and
53+
Check out our `documentation <ADD link>`_. There are example of how to use the different modules for simulation and
3854
optimization
3955

4056
License
4157
=======
4258

43-
ADD LINK
59+
Optibess Algorithm is licensed under the `MIT license <LICENSE>`_
4460

codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore:
2+
- "*/**/tests"

docs/financial_example.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from Optibess_algorithm.output_calculator import OutputCalculator
2-
from Optibess_algorithm.constants import *
3-
from Optibess_algorithm.producers import PvProducer
4-
from Optibess_algorithm.power_storage import LithiumPowerStorage
5-
from Optibess_algorithm.financial_calculator import FinancialCalculator
1+
from optibess_algorithm.output_calculator import OutputCalculator
2+
from optibess_algorithm.constants import *
3+
from optibess_algorithm.producers import PvProducer
4+
from optibess_algorithm.power_storage import LithiumPowerStorage
5+
from optibess_algorithm.financial_calculator import FinancialCalculator
66

77
import time
88

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ You can also install the :code:`main` branch instead of the latest release with:
1111

1212
.. code-block:: bash
1313
14-
pip install git+https://github.com/pvstorageoptimization/Optibess_algorithm@main
14+
pip install git+https://github.com/pvstorageoptimization/Optibess_algorithm@master
1515
1616
Alternatively, you can clone the repository and run :code:`pip install -e .` from inside the repository folder.

docs/modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Optibess_algorithm
44
.. toctree::
55
:maxdepth: 4
66

7-
Optibess_algorithm
7+
optibess_algorithm
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
1-
Optibess\_algorithm package
1+
optibess\_algorithm package
22
===========================
33

4-
Optibess\_algorithm.constants module
4+
optibess\_algorithm.constants module
55
------------------------------------
66

7-
.. automodule:: Optibess_algorithm.constants
7+
.. automodule:: optibess_algorithm.constants
88
:members:
99
:undoc-members:
1010
:show-inheritance:
1111

12-
Optibess\_algorithm.financial\_calculator module
12+
optibess\_algorithm.financial\_calculator module
1313
------------------------------------------------
1414

15-
.. automodule:: Optibess_algorithm.financial_calculator
15+
.. automodule:: optibess_algorithm.financial_calculator
1616
:members:
1717
:undoc-members:
1818
:show-inheritance:
1919

20-
Optibess\_algorithm.output\_calculator module
20+
optibess\_algorithm.output\_calculator module
2121
---------------------------------------------
2222

23-
.. automodule:: Optibess_algorithm.output_calculator
23+
.. automodule:: optibess_algorithm.output_calculator
2424
:members:
2525
:undoc-members:
2626
:show-inheritance:
2727

28-
Optibess\_algorithm.power\_storage module
28+
optibess\_algorithm.power\_storage module
2929
-----------------------------------------
3030

31-
.. automodule:: Optibess_algorithm.power_storage
31+
.. automodule:: optibess_algorithm.power_storage
3232
:members:
3333
:undoc-members:
3434
:show-inheritance:
3535

36-
Optibess\_algorithm.power\_system\_optimizer module
36+
optibess\_algorithm.power\_system\_optimizer module
3737
---------------------------------------------------
3838

39-
.. automodule:: Optibess_algorithm.power_system_optimizer
39+
.. automodule:: optibess_algorithm.power_system_optimizer
4040
:members:
4141
:undoc-members:
4242
:show-inheritance:
4343

44-
Optibess\_algorithm.producers module
44+
optibess\_algorithm.producers module
4545
------------------------------------
4646

47-
.. automodule:: Optibess_algorithm.producers
47+
.. automodule:: optibess_algorithm.producers
4848
:members:
4949
:undoc-members:
5050
:show-inheritance:
5151

52-
Optibess\_algorithm.pv\_output\_calculator module
52+
optibess\_algorithm.pv\_output\_calculator module
5353
-------------------------------------------------
5454

55-
.. automodule:: Optibess_algorithm.pv_output_calculator
55+
.. automodule:: optibess_algorithm.pv_output_calculator
5656
:members:
5757
:undoc-members:
5858
:show-inheritance:
5959

60-
Optibess\_algorithm.utils module
60+
optibess\_algorithm.utils module
6161
--------------------------------
6262

63-
.. automodule:: Optibess_algorithm.utils
63+
.. automodule:: optibess_algorithm.utils
6464
:members:
6565
:undoc-members:
6666
:show-inheritance:
6767

6868
Module contents
6969
---------------
7070

71-
.. automodule:: Optibess_algorithm
71+
.. automodule:: optibess_algorithm
7272
:members:
7373
:undoc-members:
7474
:show-inheritance:

0 commit comments

Comments
 (0)