Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

222 integration of ngsi ld endpoints #247

Closed
wants to merge 120 commits into from
Closed
Show file tree
Hide file tree
Changes from 119 commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
038a719
Add authorization field to fiware-header
Malte96 Nov 2, 2023
106bea7
Update README.md
SBlechmann Nov 15, 2023
a9040e6
Update README.md
SBlechmann Nov 15, 2023
2bb0582
Update README.md
SBlechmann Nov 15, 2023
c80c8b3
Fix wrong msg in iota.py
FWuellhorst Dec 1, 2023
11ba7c8
chore: update changelog
djs0109 Dec 4, 2023
57ecec4
chore: update packages version
djs0109 Dec 4, 2023
f500ce4
chore: temporarily remove dependency of semantics module
djs0109 Dec 4, 2023
08aeb92
chore: update setuptools version
djs0109 Dec 4, 2023
3f2abd6
chore: update setup.py
djs0109 Dec 4, 2023
07d5e68
chore: update autor information
djs0109 Dec 4, 2023
7495f81
chore: update autor information
djs0109 Dec 4, 2023
110bfb6
chore: update version for the compatibility with py37
djs0109 Dec 4, 2023
c9cf27e
chore: test with old requirements.txt
djs0109 Dec 5, 2023
0295e6e
chore: change back to updated requirements
djs0109 Dec 5, 2023
f70fa13
chore: remove numpy in dependency
djs0109 Dec 5, 2023
fa02241
Baerer Token example
Malte96 Dec 5, 2023
693bd32
chore: adjust tutorials for authentication
djs0109 Dec 7, 2023
ce6b8b7
Merge branch 'master' into tud-add_authorization_header
djs0109 Dec 7, 2023
2f9f5d4
chore: add changelog
djs0109 Dec 7, 2023
5becdce
Merge pull request #208 from Malte96/tud-add_authorization_header
djs0109 Dec 7, 2023
81a3618
chore: add optional module "semantics"
djs0109 Dec 8, 2023
d4f096a
chore: add docs for semantics installation
djs0109 Dec 26, 2023
59a2133
fix: updated regex to pattern
tstorek Dec 28, 2023
d2c2e90
Merge pull request #217 from RWTH-EBC/216-Release-v0-3-0
djs0109 Dec 28, 2023
acaa9ec
Merge branch 'master' into update-readme-references
djs0109 Jan 2, 2024
c05d5bd
Merge pull request #224 from RWTH-EBC/223-FiwareHeaderSecure-incompat…
djs0109 Jan 2, 2024
7336e2b
Merge branch 'master' into fix_wrong_error_msg
djs0109 Jan 2, 2024
b5ef5d7
Merge branch 'master' into update-readme-references
djs0109 Jan 2, 2024
8b2e6e2
Update author link
djs0109 Jan 2, 2024
2ce8ed6
Merge pull request #210 from RWTH-EBC/update-readme-references
djs0109 Jan 4, 2024
4b74ad9
chore: update changelog
djs0109 Jan 4, 2024
8943b12
Merge pull request #214 from RWTH-EBC/fix_wrong_error_msg
djs0109 Jan 4, 2024
26f0468
Update pandas version
FelixStege Jan 9, 2024
e62bb34
chore: Update pandas version depending on python version
FelixStege Jan 9, 2024
8b21edf
chore: Update CHANGELOG
djs0109 Jan 15, 2024
a263c55
Merge pull request #231 from RWTH-EBC/230-Increase-pandas-version
FelixStege Jan 15, 2024
f6dea60
Merge branch 'master' into 220-ngsi-ld-testcases-for-ld-data-models
djs0109 Jan 23, 2024
67e2ae1
feat: subscription model based on spec 1.3.1
djs0109 Jan 23, 2024
e17f42c
Updates on the datamodels in order to integrate the variuos additiona…
matzeteupel Jan 23, 2024
4804137
chore: use Field for optional properties
djs0109 Jan 23, 2024
9504abb
chore: create general structure to test ngsi-ld models
djs0109 Jan 23, 2024
6de64e7
Merge branch '220-ngsi-ld-testcases-for-ld-data-models' into 221-ngsi…
djs0109 Jan 23, 2024
33efa5e
Added tests for endpoints of entity and batch operations for ngsi-ld …
LaraRoth Jan 24, 2024
338fca4
feat: add tests for ld entity
djs0109 Jan 24, 2024
422662d
chore: deactivate several invalid functions
djs0109 Jan 30, 2024
7e67ce1
fix: regex changed to pattern
djs0109 Jan 30, 2024
5461ef2
feat: add test for get attributes
djs0109 Jan 30, 2024
0acbc08
Pydantic V2 Migration
matzeteupel Jan 30, 2024
b47c2eb
Pydantic V2 Migration (2)
matzeteupel Jan 30, 2024
6c2b3f5
Use Relocated FiwareRegex
matzeteupel Jan 30, 2024
6ea7946
Test subscription entites.
LaraRoth Feb 2, 2024
181553f
Test subscription entites.
LaraRoth Feb 2, 2024
b78c256
feat: implement delete property
djs0109 Feb 6, 2024
fe22a29
test: test delete properties
djs0109 Feb 6, 2024
48a7c67
test: remove unused test
djs0109 Feb 6, 2024
df11e9f
chore: mark next todos
djs0109 Feb 6, 2024
0a3ec8f
Merge branch '221-ngsi-ld-migrate-V2-datamodels-in-ld' into 220-ngsi-…
djs0109 Feb 7, 2024
d886a65
fix: make ld-model pydantic eligible
djs0109 Feb 7, 2024
785bbbf
Merge pull request #241 from RWTH-EBC/220-ngsi-ld-testcases-for-ld-da…
djs0109 Feb 7, 2024
b16c1b2
chore
matzeteupel Feb 7, 2024
9511285
First version of cb client implementation.
JRadebold Feb 9, 2024
6ba25dc
chore:
MatthiasTeupel Feb 14, 2024
c18f7ff
feat: test LD Endpoint model
djs0109 Feb 20, 2024
20210a7
Merge remote-tracking branch 'origin/222-ngsi-ld-integration-of-ngsi-…
djs0109 Feb 20, 2024
1a2e576
chore:
matzeteupel Feb 21, 2024
d535be4
Test description for batch operations for ngsi ld and implementation …
Feb 22, 2024
2d2ba25
chore:
MatthiasTeupel Feb 22, 2024
dea62df
Adjustments test entities.
Feb 23, 2024
0110e70
Merge branch '222-Integration-of-NGSI-LD-endpoints' into 212-testcase…
Feb 23, 2024
c78897d
Merge remote-tracking branch 'origin/221-ngsi-ld-migrate-V2-datamodel…
Feb 27, 2024
37c873d
chore:
matzeteupel Feb 27, 2024
e33748e
chore:
matzeteupel Mar 4, 2024
acbeef4
get tests run (with tons of warnings and fails, though)
iripiri Mar 13, 2024
393213d
Unittests for entity batch operations.
Mar 13, 2024
a688c17
Added test for batch operation upsert.
Mar 15, 2024
db6adb5
[WIP] fix existing NGSI-LD tests
iripiri Mar 15, 2024
40adf5f
[WIP] fix exitsting NGSI-LD implementation and tests
iripiri Mar 19, 2024
99466a5
chore:
matzeteupel Mar 20, 2024
bf62a7f
feat: add validation function for LD properties
djs0109 Mar 20, 2024
16855dc
chore: change default value of by_alias in model_dump
djs0109 Mar 20, 2024
b2238dd
Implementation of enpoint tests for entity batch operations.
Mar 20, 2024
e097eaa
chore: implement tests for LD subscription
djs0109 Mar 20, 2024
1bc7672
merged branch 212-[..]
iripiri Mar 20, 2024
937becd
Added test for entity attribute.
Mar 25, 2024
2298ca4
Testcase for endpoint, patch attribute of entity.
Mar 26, 2024
d431529
[WIP] get NGSI-LD tests to run
iripiri Mar 26, 2024
e008291
Progress in patch entity attribute and patch entity attribute id.
Mar 27, 2024
9c26d2c
Test for ngsi-ld endpoint functions for entity attributes.
Apr 3, 2024
84831c4
fix:
matzeteupel Apr 3, 2024
6b8ed54
Merge branch '221-ngsi-ld-migrate-V2-datamodels-in-ld' of https://git…
matzeteupel Apr 3, 2024
ab831e8
chore:
matzeteupel Apr 4, 2024
baab79d
run NGSI-LD batch tests, revise implementation
iripiri Apr 9, 2024
2856e36
Merge remote-tracking branch 'origin/212-testcase-for-every-endpoint-…
iripiri Apr 9, 2024
60aa486
fixed small error after merge
iripiri Apr 9, 2024
5dec4b1
chore: add todo for clean test
djs0109 Apr 9, 2024
5bc0e97
feat: add validator for temporal query
djs0109 Apr 9, 2024
8e59226
feat: test for temporal query
djs0109 Apr 9, 2024
5e297f8
Test for NGSI-LD endpoint subscription (get all subscriptions).
Apr 10, 2024
f8a72ca
Progress enpoint test for subscription (delete subscription).
Apr 10, 2024
a53e39f
added teardown, updated get/post/delete tests and corresponding imple…
iripiri Apr 11, 2024
9e3d268
Merge branch '221-ngsi-ld-migrate-V2-datamodels-in-ld' of https://git…
matzeteupel Apr 11, 2024
287aa19
Use Relocated FiwareRegex
matzeteupel Apr 12, 2024
8e2e9d9
chore:
matzeteupel Apr 17, 2024
cb1e017
chore:
matzeteupel Apr 18, 2024
7b2ed27
add/patch attributes
iripiri Apr 18, 2024
6219fde
chore: add test cases for subscription model
djs0109 Apr 24, 2024
48b23f6
chore:
matzeteupel Apr 25, 2024
a572e72
Merge branch '221-ngsi-ld-migrate-V2-datamodels-in-ld' of https://git…
matzeteupel Apr 25, 2024
2fd8dfc
run all entity tests
iripiri Apr 26, 2024
658d6f7
manual merge with branch 221
iripiri Apr 26, 2024
ec8e0ef
fixes after datamodel changes
iripiri May 15, 2024
3f98b13
Merge remote-tracking branch 'origin/212-testcase-for-every-endpoint-…
iripiri May 15, 2024
b628a0a
chore: remove unused package in cb_test for v2
djs0109 Jun 12, 2024
002c1f6
feat: add LD_CB_URL as new environment variables in tests
djs0109 Jun 12, 2024
b233bce
chore: adjust type hint
djs0109 Jun 12, 2024
42dbb8d
update cb implementation for subscriptions
iripiri Jun 13, 2024
db2d4c9
Merge branch '222-Integration-of-NGSI-LD-endpoints' of https://github…
iripiri Jun 13, 2024
c4dcfe7
fixes to entity tests and implementation after review
iripiri Jun 24, 2024
34a7223
chore: use environment variables from settings
djs0109 Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#### v0.3.1
- add tutorial for protected endpoint with bearer authentication ([#208](https://github.com/RWTH-EBC/FiLiP/issues/208))
- update pandas version to `~=2.1.4` for `python>=3.9` ([#231](https://github.com/RWTH-EBC/FiLiP/pull/231))
- fix: wrong msg in iotac post device ([#214](https://github.com/RWTH-EBC/FiLiP/pull/214))

#### v0.3.0
- fixed inconsistency of `entity_type` as required argument ([#188](https://github.com/RWTH-EBC/FiLiP/issues/188))
- BREAKING CHANGE: Migration of pydantic v1 to v2 ([#199](https://github.com/RWTH-EBC/FiLiP/issues/199))
- fix: bug in typePattern validation @richardmarston ([#180](https://github.com/RWTH-EBC/FiLiP/pull/180))
- add: add messages to all KeyErrors @FWuellhorst ([#192](https://github.com/RWTH-EBC/FiLiP/pull/192))
- add: optional module `semantics` in setup tool @djs0109
- fix: get() method of Units dose not work properly by @djs0109 ([#193](https://github.com/RWTH-EBC/FiLiP/pull/193))
- BREAKING CHANGE: Migration of pydantic v1 to v2 @djs0109 ([#199](https://github.com/RWTH-EBC/FiLiP/issues/199))

#### v0.2.5
- fixed service group edition not working ([#170](https://github.com/RWTH-EBC/FiLiP/issues/170))
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ If you want to benefit from the latest changes, use the following command
pip install -U git+git://github.com/RWTH-EBC/filip
```

#### Install semantics module (optional)

If you want to use the optional [semantics module](filip/semantics), use the following command (This will install the libraries that only required for the semantics module):
````
pip install -U filip[semantics]
````

### Introduction to FIWARE

The following section introduces FIWARE. If you are already familiar with
Expand Down Expand Up @@ -212,34 +219,38 @@ how you can contribute to this project.

## Authors

* [Thomas Storek](https://www.ebc.eonerc.rwth-aachen.de/cms/E-ON-ERC-EBC/Das-Institut/Mitarbeiter/Team2/~lhda/Thomas-Storek/?lidx=1) (corresponding)
* [Thomas Storek](https://github.com/tstorek)
* [Junsong Du](https://www.ebc.eonerc.rwth-aachen.de/cms/E-ON-ERC-EBC/Das-Institut/Mitarbeiter/Digitale-Energie-Quartiere/~trcib/Du-Junsong/lidx/1/) (corresponding)
* [Saira Bano](https://www.ebc.eonerc.rwth-aachen.de/cms/E-ON-ERC-EBC/Das-Institut/Mitarbeiter/Systemadministration/~ohhca/Bano-Saira/)
* [Daniel Nikolay](https://www.ebc.eonerc.rwth-aachen.de/cms/E-ON-ERC-EBC/Das-Institut/Mitarbeiter/Systemadministration/~qcqxq/Nikolay-Daniel/)
* [Sebastian Blechmann](https://www.ebc.eonerc.rwth-aachen.de/cms/E-ON-ERC-EBC/Das-Institut/Mitarbeiter/Team2/~carjd/Blechmann-Sebastian/)

## Alumni

* Jeff Reding
* Felix Rehmann
* Daniel Nikolay

## References

We presented or applied the library in the following publications:

- S. Blechmann, I. Sowa, M. H. Schraven, R. Streblow, D. Müller & A. Monti. Open source platform application for smart building and smart grid controls. Automation in Construction 145 (2023), 104622. ISSN: 0926-5805. https://doi.org/10.1016/j.autcon.2022.104622

- Haghgoo, M., Dognini, A., Storek, T., Plamanescu, R, Rahe, U.,
Gheorghe, S, Albu, M., Monti, A., Müller, D. (2021) A cloud-based service-oriented architecture to unlock smart energy services
https://www.doi.org/10.1186/s42162-021-00143-x
https://www.doi.org/10.1186/s42162-021-00143-x

- Baranski, M., Storek, T. P. B., Kümpel, A., Blechmann, S., Streblow, R.,
Müller, D. et al.,
(2020). National 5G Energy Hub : Application of the Open-Source Cloud Platform
FIWARE for Future Energy Management Systems.
https://doi.org/10.18154/RWTH-2020-07876
https://doi.org/10.18154/RWTH-2020-07876

- T. Storek, J. Lohmöller, A. Kümpel, M. Baranski & D. Müller (2019).
Application of the open-source cloud platform FIWARE for future building
energy management systems.
Journal of Physics:
Conference Series, 1343, 12063. https://doi.org/10.1088/1742-6596/1343/1/012063
Conference Series, 1343, 12063. https://doi.org/10.1088/1742-6596/1343/1/012063

## License

Expand All @@ -249,7 +260,7 @@ This project is licensed under the BSD License - see the [LICENSE](LICENSE) file

<a href="https://www.ebc.eonerc.rwth-aachen.de/"> <img alt="EBC" src="https://www.ebc.eonerc.rwth-aachen.de/global/show_picture.asp?id=aaaaaaaaaakevlz" height="100"> </a>

2021-2022, RWTH Aachen University, E.ON Energy Research Center, Institute for Energy
2021-2024, RWTH Aachen University, E.ON Energy Research Center, Institute for Energy
Efficient Buildings and Indoor Climate

[Institute for Energy Efficient Buildings and Indoor Climate (EBC)](https://www.ebc.eonerc.rwth-aachen.de)
Expand Down
31 changes: 31 additions & 0 deletions examples/basics/e02_baerer_token.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""
# Examples for initializing a contextbroker client with authorization via bearer
token.
- The authorization key is provided via the FiwareHeaderSecure class.
- The parameters should be provided via environment variables or a .env file.
"""

from filip.models.base import FiwareHeaderSecure
from filip.clients.ngsi_v2 import ContextBrokerClient

# ## Parameters
# Host address of Context Broker
CB_URL = "https://localhost:1026"
# FIWARE-Service
fiware_service = 'filip'
# FIWARE-Servicepath
fiware_service_path = '/example'
# FIWARE-Bearer token
# TODO it has to be replaced with the token of your protected endpoint
fiware_baerer_token = 'BAERER_TOKEN'

if __name__ == '__main__':
fiware_header = FiwareHeaderSecure(service=fiware_service,
service_path=fiware_service_path,
authorization=f"""Bearer {
fiware_baerer_token}""")
cb_client = ContextBrokerClient(url=CB_URL,
fiware_header=fiware_header)
# query entities from protected orion endpoint
entity_list = cb_client.get_entity_list()
print(entity_list)
2 changes: 1 addition & 1 deletion filip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from filip.config import settings
from filip.clients.ngsi_v2 import HttpClient

__version__ = '0.2.4'
__version__ = '0.3.0'
Loading