-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from oemof/release/v0.0.4
Release v0.0.4
- Loading branch information
Showing
150 changed files
with
12,646 additions
and
3,480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Description | ||
|
||
Please include a summary of the change and which issue is fixed. | ||
|
||
Fixes # (issue) | ||
|
||
## Type of change | ||
|
||
Please tick or delete options that are not relevant. | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
|
||
# Checklist: | ||
|
||
Please tick or delete options that are not relevant. | ||
|
||
- [ ] New and adjusted code is formatted using the `pre-commit` hooks | ||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] I have made corresponding changes to the documentation | ||
- [ ] I have added tests that prove my fix is effective or that my feature works | ||
- [ ] New and existing unit tests pass locally with my changes | ||
- [ ] If new packages are needed, I added them the [setup.py](https://github.com/oemof/oemof-tabular/blob/dev/setup.py#L67-L80) | ||
- [ ] I have added new features/fixes to the [CHANGELOG](https://github.com/oemof/oemof-tabular/tree/dev/CHANGELOG.rst) | ||
- [ ] I have added my name to [AUTHORS]((https://github.com/oemof/oemof-tabular/tree/dev/AUTHORS.rst) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,3 +66,6 @@ docs/_build | |
|
||
# Mypy Cache | ||
.mypy_cache/ | ||
|
||
docs/facade_attributes | ||
docs/facades.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
exclude: 'docs|node_modules|migrations|.git|.tox' | ||
default_stages: [commit] | ||
fail_fast: true | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
files: (^|/)a/.+\.(py|html|sh|css|js)$ | ||
|
||
- repo: local | ||
hooks: | ||
- id: flake8 | ||
name: flake8 | ||
entry: flake8 | ||
language: python | ||
types: [python] | ||
args: ["src", "tests"] | ||
|
||
- repo: local | ||
hooks: | ||
- id: isort | ||
name: isort | ||
entry: isort | ||
language: python | ||
types: [python] | ||
args: ["--verbose", "src", "tests"] | ||
|
||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
entry: black | ||
language: python | ||
types: [python] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ Authors | |
* Francesco Witte | ||
* Sarah Berendes | ||
* Marie-Claire Gering | ||
* Julian Endres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import dataclasses | ||
import os | ||
|
||
import pandas as pd | ||
|
||
from oemof.tabular.facades import TYPEMAP | ||
|
||
|
||
def get_facade_attrs(TYPEMAP): | ||
facade_attrs = {} | ||
for key, facade in TYPEMAP.items(): | ||
if dataclasses.is_dataclass(facade): | ||
cls_name = facade.__name__ | ||
fields = dataclasses.fields(facade) | ||
df = pd.DataFrame.from_dict( | ||
{ | ||
"name": [field.name for field in fields], | ||
"type": [field.type.__name__ if hasattr(field.type, "__name__") else field.type for field in fields ], | ||
"default": [None if isinstance(field.default, dataclasses._MISSING_TYPE) else field.default for field in fields], | ||
}, | ||
) | ||
df = df.set_index("name") | ||
|
||
facade_attrs[cls_name] = df | ||
|
||
return facade_attrs | ||
|
||
|
||
def write_table_rst(csv_directory, destination): | ||
csv_files = sorted([file for file in os.listdir(csv_directory) if file.endswith(".csv")]) | ||
txt = "" | ||
txt += \ | ||
""" | ||
========================== | ||
Facade attributes overview | ||
========================== | ||
""" | ||
for csv_file in csv_files: | ||
txt += \ | ||
f""" | ||
:py:class:`~oemof.tabular.facades.{os.path.splitext(csv_file)[0]}` | ||
.. csv-table:: | ||
:delim: , | ||
:header-rows: 1 | ||
:file: facade_attributes/{csv_file} | ||
""" | ||
with open(destination, "w") as file: | ||
file.write(txt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Contents | |
readme | ||
installation | ||
usage | ||
facades | ||
reference/index | ||
tutorials/index | ||
contributing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,75 @@ | ||
============= | ||
API Reference | ||
============= | ||
|
||
.. toctree:: | ||
:glob: | ||
oemof.tabular.datapackage package | ||
================================= | ||
|
||
.. automodule:: oemof.tabular.datapackage | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Submodules | ||
---------- | ||
|
||
oemof.tabular.datapackage.aggregation module | ||
-------------------------------------------- | ||
|
||
.. automodule:: oemof.tabular.datapackage.aggregation | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.tabular.datapackage.building module | ||
----------------------------------------- | ||
|
||
.. automodule:: oemof.tabular.datapackage.building | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.tabular.datapackage.processing module | ||
------------------------------------------- | ||
|
||
.. automodule:: oemof.tabular.datapackage.processing | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.tabular.datapackage.reading module | ||
---------------------------------------- | ||
|
||
.. automodule:: oemof.tabular.datapackage.reading | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.tabular.tools package | ||
=========================== | ||
|
||
.. automodule:: oemof.tabular.tools | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Submodules | ||
---------- | ||
|
||
oemof.tabular.tools.geometry module | ||
----------------------------------- | ||
|
||
.. automodule:: oemof.tabular.tools.geometry | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
|
||
oemof.tabular.facades module | ||
============================= | ||
|
||
oemof.tabular* | ||
.. automodule:: oemof.tabular.facades | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.