Skip to content

Commit

Permalink
added weather forecast and fmlc dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophGehbauer committed Apr 1, 2024
1 parent a0ae77c commit 40b620c
Show file tree
Hide file tree
Showing 11 changed files with 2,229 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
tmp

# Python compiled files #
#########################
*.pyc
Expand Down
585 changes: 585 additions & 0 deletions dev/Development - weatherForecast.ipynb

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions dev/how-to-update-pypi-package.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Prerequisistes:

Have twine (pip install twine)
Make an account for PyPi website
Be added to the project on PyPi

Steps to updating DOPER Package:

1. Change the version number in doper/__init__.py file.
For more on the setup.py file, check out this link: https://packaging.python.org/tutorials/packaging-projects#configuring-metadata)

2. In the bash shell, run "python setup.py sdist bdist_wheel" (this will create a build and dist folder which contains info on the packages that we will publish)

3. In the bash shell, run "tar tzf dist/DOPER-[VERSION NUMBER HERE].tar.gz" to check the contents of the package. If it looks normal, proceed. Just make sure nothing is egrgiously wrong.

4. In the bash shell, run "twine check dist/*" and make sure you pass the tests.

5. Finally, run 'twine upload dist/*', fill out your username and password when prompted, and we are done!
2 changes: 1 addition & 1 deletion doper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
from .computetariff import *
from .data.tariff import get_tariff

__version__ = "2.0.0"
__version__ = "2.1.0"
17 changes: 17 additions & 0 deletions doper/data/comDummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import time
from fmlc.baseclasses import eFMU

class communication_dummy(eFMU):
def __init__(self):
self.input = {'input-data': None, 'config': None, 'timeout': None}
self.output = {'output-data': None, 'duration': None}

def compute(self):
st = time.time()

self.output['output-data'] = {}
for k, v in self.input['config']:
self.output['output-data'][k] = v

self.output['duration'] = time.time() - st
return 'Done.'
Loading

0 comments on commit 40b620c

Please sign in to comment.