Skip to content

Comments

Rewrite station tab run, no pandas, using api module#20

Open
petergarnaes wants to merge 7 commits intomasterfrom
no-pandas-station
Open

Rewrite station tab run, no pandas, using api module#20
petergarnaes wants to merge 7 commits intomasterfrom
no-pandas-station

Conversation

@petergarnaes
Copy link
Collaborator

This is the first part of removing the pandas dependency from this plugin

Also uses the api module for fetching stations

Minor boyscout rule things as well

This is the first part of removing the pandas dependency from this
plugin.

Also uses the api module for fetching stations.

Minor boyscout rule things as well.
@petergarnaes petergarnaes requested review from allanfrankwork and svend1079 and removed request for allanfrankwork and svend1079 October 7, 2022 12:13
@allanfrankwork
Copy link
Contributor

👍 I'm a bit too unfamiliar with code base to give proper review, but readability seems to have improved. Good to see new types.
Since you mention pandas, I would have expected that to be removed in the import somewhere?

@petergarnaes
Copy link
Collaborator Author

+1 I'm a bit too unfamiliar with code base to give proper review, but readability seems to have improved. Good to see new types. Since you mention pandas, I would have expected that to be removed in the import somewhere?

this change does not remove all references to pandas in the DMI_Open_Data_dialog.py file, so no removal (yet). This is just a partial migration.

QGIS does not integrate with the python datetime library, so when
creating attributes the input must be basic types: str, int, float.

It is possible to make a field a datetime field, but the attribute must
a string version of that field. Using ISO formatted datetime strings
works.
It is now possible to get stations having any of the given parameters
Some stations, like oceanObs stations does not have barometer height.
OceanObs does not have these attributes
The API for retrieving stations expected datetime objects, but strings
were passed. Datetime objects are no passed as expected.

Moved the format template string for ISO datetime using Zulu time to a
new util module. Other utility values/functions/etc. might move in there
as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants