Skip to content

Commit

Permalink
Merge pull request #17 from jgrguric96/main
Browse files Browse the repository at this point in the history
Initial improvement to the repository
  • Loading branch information
manuGil authored Aug 14, 2024
2 parents 93e3372 + 90bd11f commit 2438167
Show file tree
Hide file tree
Showing 175 changed files with 2,376 additions and 1,051 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: deploy-docs

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Sphinx build
run: |
sphinx-build docs _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__pycache__/
.DS_Store
venv/

_build/
Binary file removed Agents/__pycache__/prosumer_S_model.cpython-38.pyc
Binary file not shown.
Binary file removed Agents/__pycache__/prosumer_model.cpython-38.pyc
Binary file not shown.
Binary file removed Agents/__pycache__/prosumer_mosaik.cpython-38.pyc
Binary file not shown.
45 changes: 45 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: The Illuminator
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Aihui
family-names: Fu
email: [email protected]
affiliation: Delft University of Technology
- given-names: Raghav
family-names: Saini
- given-names: Remko
family-names: Koornneef
affiliation: Delft University of Technology
- family-names: Meer
name-particle: van der
given-names: Arjen
affiliation: Delft University of Technology
- given-names: Peter
family-names: Palensky
affiliation: Delft University of Technology
- given-names: Milos
family-names: Cvetkovic
affiliation: Delft University of Technology
email: [email protected]
identifiers:
- type: doi
value: 10.1109/PowerTech55446.2023.10202816
description: IEEE deposit of the encompassing paper
repository-code: 'https://github.com/Illuminator-team/Illuminator'
abstract: >-
The Illuminator is primarily a modular software platform
developed to run on a Raspberry Pi (RasPi) cluster
keywords:
- energy system integration
- energy transition
- education
license: LGPL-2.1
version: 2.0.0
date-released: '2024-01-11'
114 changes: 114 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Contributing guidelines

Any kind of contribution to **The Illuminator** is welcome, from a simple comment or a question, to a full fledged [pull request](https://help.github.com/articles/about-pull-requests/).

A contribution can be associated with the following cases:

- You have a question.
- You think you may have found a bug, including unexpected behavior.
- You want to make changes to the code base to fix a bug, make improvements, add a new functionality, or to update the documentation.
- You want to improve the Illuminator's documentation

The sections below outlines the steps to make your contribution to the software for each of the aforementioned cases.

## A. You have a question

1. Use the search functionality [here](link-to-issues) to see if someone already filed the same issue.
1. If your issue search did not yield any relevant results, open a new issue.
1. Apply the "Question" label. Additionally, apply other labels when relevant.

## B. You think you may have found a bug

1. Use the search functionality [here](link-to-issues) to see if someone already filed the same issue.
1. If your issue search did not yield any relevant results, open a new issue and provide enough information to understand the cause and the context of the problem. Depending on the issue, you may also want to include:
- the [SHA hashcode](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas) of the commit that is causing your problem
- some identifying information (name and version number) for dependencies you're using
- information about the operating system

## C. You want to make changes to the code base


### Announce your plan

1. (**important**) Announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue on the Github repository.
2. (**important**) Wait until a consensus is reached about your idea being a good idea.


### Set up a local development environment to work on your changes

If you are a part of the Illuminator team and have write access to the Illuminator GitHub repository, skip to the next subsection [Develop your contribution](CONTRIBUTING.md#develop-your-contribution). If you are a first-time contributor, follow the below steps:

1. Go to the [Illuminator GitHub repository](url-repository) and click on 'Fork'. This will create a copy of the Illuminator repository in your GitHub account.

1. Clone the project to your local computer:

```bash
git clone https://github.com/your-username/Illuminator.git
```

1. Change the directory

```bash
cd Illuminator
```

1. Add the upstream repository

```bash
git remote add upstream https://github.com/<illuminator-path>.git
```

1. Now, `git remote -v` will show two remote repositories named:

* `upstream`, which refers to the Illumator repository
* `origin`, which refers to your personal fork

### Develop your contribution

> TODO: update this section after refactoring

1. Create a branch of the latest commit on the `main` branch to work on your feature.

```bash
git checkout -b my-feature
```

2. If you are contributing via a fork, make sure to pull in changes from the 'upstream' repository to stay up to date with the `main` branch while working on your feature branch. Follow the instructions [here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork) and [here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork).

3. Set up a development environment on your computer by installing the Illuminator in development mode with the following command: (Consider using a virtual environment for this purpose.)

```bash
# TODO: this part needs to be updated after refactoring
```

4. Set up your code editor to follow [PEP 8](https://peps.python.org/pep-0008/) (remove trailing white space, no tabs, etc.). Check code with [flake8](https://flake8.pycqa.org/en/latest/).

5. Make sure the existing tests pass by running `pytest` from the root of the repository.

6. Write tests for any new lines of code you add.

7. Include in-code documentation in form of comments and docstrings. Use the [numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard) documentation style.

8. Update the user/developer documentation if relevant. Undocumented contributions might not be merged.


### Submitting your contribution

1. Push your feature branch to (your fork of) the Illuminator GitHub repository.

1. Create a pull request, for an example, following the instructions [here](https://help.github.com/articles/creating-a-pull-request/).


## D. You want to improve the Illuminator's documentation

We use Sphinx and Markdown to write documentation for the Illuminator. The root of the documentation is the `docs/` directory.

1. [Announce your plan.](#announce-your-plan)
1. Follow the same steps to set up a development environment for [making changes to the code base](#set-up-a-local-development-environment-to-work-on-your-changes).
1. Install the dependencies in `docs/requirements.txt` using `pip install -r docs/requirments.txt` (Sphnix will also be installed).
1. Update the documentation using Markdown. If familiar with writing Markdown for MyST consult their [guides and documentation](https://myst-parser.readthedocs.io/en/latest/syntax/optional.html)
1. Make sure your contributions are built without errors. Go to the `docs` directory in the terminal with `cd docs/`. Then, build the documentation using `make html`.
1. [Submit your contribution](#submitting-your-contribution) for review.


In case you feel you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation; don't let this discourage you from making the pull request. We can help you! Just go ahead and submit the pull request. But keep in mind that you might be asked to append additional commits to your pull request.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 6 additions & 6 deletions Controllers/GPController/gpcontroller_mosaik.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import sys
sys.path.insert(1,'/home/illuminator/Desktop/Final_illuminator')

try:
import Models.Battery.battery_model as batterymodel
except ModuleNotFoundError:
import battery_model as batterymodel
else:
import Models.Battery.battery_model as batterymodel
# try:
# import Models.Battery.battery_model as batterymodel
# except ModuleNotFoundError:
# import battery_model as batterymodel
# else:
import Models.Battery.battery_model as batterymodel

META = {
'type': 'hybrid',
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
96 changes: 96 additions & 0 deletions DEPRECATED - environment_macosarm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Ecosystem
channels:
- conda-forge
- defaults
dependencies:
- ampl-mp=3.1.0=hbec66e7_1006
- bzip2=1.0.8=h93a5062_5
- ca-certificates=2024.3.11=hca03da5_0
- glpk=5.0=h6d7a090_0
- gmp=6.3.0=hebf3989_1
- icu=72.1=he12128b_0
- ipopt=3.14.12=h843a782_0
- libblas=3.9.0=21_osxarm64_openblas
- libcxx=16.0.6=h4653b0c_0
- libedit=3.1.20191231=hc8eb9b7_2
- libffi=3.4.2=h3422bc3_5
- libgfortran=5.0.0=13_2_0_hd922786_3
- libgfortran5=13.2.0=hf226fd6_3
- libhwloc=2.9.1=nocuda_h43721e5_6
- libiconv=1.17=h0d3ecfb_2
- liblapack=3.9.0=21_osxarm64_openblas
- libopenblas=0.3.26=openmp_h6c19121_0
- libsqlite=3.42.0=hb31c410_0
- libxml2=2.11.4=he3bdae6_0
- libxslt=1.1.37=h1728932_1
- libzlib=1.2.13=h53f4e23_5
- llvm-meta=5.0.0=0
- llvm-openmp=18.1.2=hcd81f8e_0
- metis=5.1.0=h13dd4ca_1007
- mumps-include=5.2.1=hce30654_14
- mumps-seq=5.2.1=h0066fe1_11
- ncurses=6.4.20240210=h078ce10_0
- openssl=3.1.1=h53f4e23_1
- pip=23.1.2=pyhd8ed1ab_0
- ply=3.11=py_1
- pyomo=6.6.1=py38he333c0f_0
- python=3.8.17=h3ba56d0_0_cpython
- python_abi=3.8=4_cp38
- readline=8.2=h92ec313_1
- scotch=6.0.9=h7537618_2
- setuptools=68.0.0=pyhd8ed1ab_0
- tbb=2021.9.0=hffc8910_0
- tk=8.6.12=he1e0b03_0
- unixodbc=2.3.12=h0e2417a_0
- wheel=0.40.0=pyhd8ed1ab_1
- xz=5.2.6=h57fd34a_0
- zlib=1.2.13=h53f4e23_5
- pip:
- appdirs==1.4.4
- arrow==1.3.0
- certifi==2024.2.2
- charset-normalizer==3.3.2
- click==8.1.7
- contourpy==1.1.1
- cycler==0.12.1
- docker-pycreds==0.4.0
- docopt==0.6.2
- fonttools==4.50.0
- gitdb==4.0.11
- gitpython==3.1.43
- idna==3.6
- importlib-resources==6.4.0
- kiwisolver==1.4.5
- loguru==0.7.2
- lxml==5.2.1
- matplotlib==3.7.5
- mosaik==3.2.0
- mosaik-api==3.0.3
- mosaik-api-v3==3.0.9
- mosaik-simpy-io==0.2.4
- networkx==3.1
- numpy==1.24.4
- packaging==24.0
- paho-mqtt==2.0.0
- pandas==2.0.3
- pillow==10.3.0
- protobuf==4.25.3
- psutil==5.9.8
- pyparsing==3.1.2
- python-dateutil==2.9.0.post0
- pytz==2024.1
- pyyaml==6.0.1
- requests==2.31.0
- sentry-sdk==1.44.1
- setproctitle==1.3.3
- simpy==3.0.13
- six==1.16.0
- smmap==5.0.1
- tqdm==4.66.2
- types-python-dateutil==2.9.0.20240316
- typing-extensions==4.10.0
- tzdata==2024.1
- urllib3==2.2.1
- wandb==0.16.6
- zipp==3.18.1
prefix: /opt/anaconda3/envs/Ecosystem
Loading

0 comments on commit 2438167

Please sign in to comment.