-
Notifications
You must be signed in to change notification settings - Fork 14
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
237 update and refactor examples #278
Conversation
@WaltherTrgovac could you please update the examples readme file? Specifically:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the extensive initial updates!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now there is some problem with the reading of .env.filip
. It seems like the variables will only be correctly loaded when the .env.filip
is put under the path of the examples, i.e. examples/ngsi_v2/
or examples/basics/
@WaltherTrgovac could you have a look on that? If necessary you can modify the filip/config.py
, where the variables are loaded
Wasn't it always like that? I think in the config of filip it says that the env file should be in the working directory, so it's up to the user to take care of that. |
If I am understanding this correctly, the method |
Never mind, I have changed it now |
Then to avoid confusion between multiple env files, we should probably remove the copy under basics. Or do you see another use for it? |
Nice hint. No we don't need it any longer |
# Conflicts: # examples/ngsi_v2/e04_ngsi_v2_context_subscriptions_mqtt.py # examples/ngsi_v2/e08_ngsi_v2_iota_paho_mqtt.py # examples/ngsi_v2/e09_ngsi_v2_iota_filip_mqtt.py
Now only e6 cannot work, because the code regarding data model creation is not yet migrated to pydantic V2 |
Closes #237.
Current state of
examples\ngsiv2
that have been worked on:Before:
After:
Examples:
e01_ngsi_v2_context_basics.py
: working ✅ (last checked: 16.05.2024)e02_ngsi_v2_context_relationships.py
: working ✅ (last checked: 24.04.2024)e03_ngsi_v2_context_subscriptions_http.py
: working ✅ (last checked: 21.05.2024)e04_ngsi_v2_context_subscriptions_mqtt.py
: working ✅ (last checked: 21.05.2024)e05_ngsi_v2_context_registrations.py
: not completely workinge06_ngsi_v2_autogenerate_context_data_models.py
: not working ❌ (last checked: 30.04.2024)e07_ngsi_v2_iota_basics.py
: not completely working2024-04-30 17:03:55,412 filip.clients.ngsi_v2.cb.ContextBrokerClient ERROR: Could not delete attribute 'on' of entity'sensor2' Reason: {"error":"NotFound","description":"The requested entity has not been found. Check type and id"}
e08_ngsi_v2_iota_paho_mqtt.py
: working ✅ (last checked: 11.06.2024)e09_ngsi_v2_iota_filip_mqtt.py
: working: ✅ (last checked: 12.06.2024)e10_ngsi_vs_quantumleap.py
: working ✅ (last checked: 07.05.2024)clear_all()
method at the start is causing this message from the logger:filip.clients.ngsi_v2.quantumleap.QuantumLeapClient ERROR: Could not load entity data
Reason: { "description": "No records were found for such query.", "error": "Not Found" }
This does not cause any negative impacts further in the code, but the output is not very clean.e11_ngsi_v2_context_specific_models.py
: working ✅ (last checked: 08.05.2024)e12_ngsi_v2_use_case_models.py
: working ✅ (last checked: 18.06.2024)TODO: The directories of the examples and the numeration of the examples has to be adjusted. For example, we have two examples with the number 11 in the
ngsiv2
directory, and the examples in thebasics
directory also need adjustment. README.md then also needs to be adjusted accordingly.