Skip to content

Commit

Permalink
Merge pull request #4 from jgrguric96/manuel/colab-guidelines
Browse files Browse the repository at this point in the history
Include contributing guidelines
  • Loading branch information
jgrguric96 authored Aug 14, 2024
2 parents 1f02f95 + 5c6ea48 commit 90bd11f
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 50 deletions.
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.
50 changes: 0 additions & 50 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]

Preamble

The licenses for most software are designed to take away your
Expand Down Expand Up @@ -456,49 +452,3 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Libraries

If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

The Illuminator, a Energy System Integration Development kit
Copyright (C) 2024 Illuminator Team

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random
Hacker.

<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice

That's all there is to it!
6 changes: 6 additions & 0 deletions WAIVER
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Technische Universiteit Delft hereby disclaims all copyright interest in the
program “Illuminator”, an easy-to-use Energy System Integration Development Kit
to demystify energy system operation, illustrate challenges that arise due to
the energy transition and test state-of-the-art energy management concepts,
written by the Author(s).
[Name Dean], Dean of Faculty Electrical Engineering, Mathematics and Computer Science
22 changes: 22 additions & 0 deletions configuration/interpreter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
"""
The Illuminator, a Energy System Integration Development kit
Copyright (C) 2024 Illuminator Team
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
For questions and support, please contact us at [email protected]
"""

import shutil

Expand Down
3 changes: 3 additions & 0 deletions docs/user/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ Model parameters, results presentation and real-time simulation are all set in t
```

## Running Simulations

> This was set up as a shortcut to collect data and do plotting
Run the `simulation creator_**.py` to create and run the simulation based on the provided case and scenario.
To see the results via the dashboard, you need Internet and sign up in [wandb software](https://wandb.ai/site).
The `simple_test.py` shows a simple case with the configuration inside of the file.
Expand Down

0 comments on commit 90bd11f

Please sign in to comment.