Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 22:48
    GeoSander commented #769
  • 22:46
    GeoSander commented #769
  • 22:45
    GeoSander commented #769
  • 22:42
    GeoSander commented #769
  • 22:40
    GeoSander commented #769
  • 22:39
    GeoSander commented #769
  • 16:28
    cheginit opened #778
  • 16:28
    cheginit labeled #778
  • Sep 17 21:51
    jvanulde commented #769
  • Sep 17 21:17
    jvanulde commented #769
  • Sep 17 19:44
    jvanulde commented #769
  • Sep 17 19:37
    jvanulde commented #769
  • Sep 17 11:49
    GeoSander commented #769
  • Sep 17 11:49
    GeoSander commented #769
  • Sep 17 01:12
    tomkralidis commented #769
  • Sep 17 00:14
    webb-ben commented #687
  • Sep 16 22:47
    jvanulde commented #769
  • Sep 16 14:58
    GeoSander commented #769
  • Sep 15 19:16
    jvanulde commented #769
  • Sep 15 10:47
    GeoSander commented #769
Sander Schaminee
@GeoSander
You mean the language parameter from the __init__ of the provider class?
Tom Kralidis
@tomkralidis
yes, only pass language to the query or get functions?
Sander Schaminee
@GeoSander
As yet another parameter... Well, I noticed you already started using **kwargs in the EDR provider, so we could throw anything at it, I guess :)
paul van genuchten
@pvgenuchten
no, i'm in favour to have language, like format and schema as explicit parameters
but we could add it only to the relevant methods and not to all
Sander Schaminee
@GeoSander
Me too. And having the base class deal with the logic to find the best matching look language is more elegant and easier to use for plugin developers
But I do like @francbartoli 's idea actually to make a language-aware base class that deals with this stuff that provider classes can implement. All current providers won't have to implement that so they stay the way they are now (no extra parameters).
paul van genuchten
@pvgenuchten
does it mean you pass in the (web)request object and the base class extracts the relevant language from it?
Sander Schaminee
@GeoSander
That could be an idea yes
paul van genuchten
@pvgenuchten
but what if pygeoapi is used outside a web-request scope
for example to render something in a desktop application
(not sure if that is possible)
the desktop app would need to mimic a web request to feed to the provider?
1 reply
Sander Schaminee
@GeoSander
Me neither :)
paul van genuchten
@pvgenuchten
to me parsing request parameters is something which should be managed in a generic module, not in a provider...
Sander Schaminee
@GeoSander
It is handled in the l10n module actually (using the get_plugin_locale function), but because the provider stores that locale property now, the provider calls that function
paul van genuchten
@pvgenuchten
but it makes sense to have some base-parameters wrapped in an object, which is send with every provider-call
Francesco Bartoli
@francbartoli
Parameters from the request are parsed in the api.py not in the providers @pvgenuchten
paul van genuchten
@pvgenuchten
makes sense
Sander Schaminee
@GeoSander
]
\
"{
:]
paul van genuchten
@pvgenuchten
but then i miss the point here,
Sander Schaminee
@GeoSander
[;
Sorry, that was my kid...
paul van genuchten
@pvgenuchten
:-)
Sander Schaminee
@GeoSander
Typing while I was away
paul van genuchten
@pvgenuchten
so language, like format, would be parsed in api.py and then sent to the provider with relevant calls?
these base-parameters can be wrapped in an object, so we wouldn't need to extend each of the calls when we add an additional property (like schema)
Sander Schaminee
@GeoSander
We could also find the best match for the requested provider language in api.py(we already have the provider definition there too) and pass that as a Babel Locale to the provider (e.g. in the query call). That would keep the providers "clean" while still keeping it semi-intuitive.
Sander Schaminee
@GeoSander
Experimenting a bit now...
How would you guys suggest passing the language to the query (and get) function? Simply add a language=None parameter? This means I'll have to change all the signatures for each provider query function. Then we'll have a parameter in there that most providers won't need. Changing the signature to just have **kwargs would also be a possibility and more future-proof, but we'll have to document this properly (like @tomkralidis did for the new XarrayEDRProvider), else developers will be in the dark as to which items are available in the kwargs dict.
Any other suggestions?
Sander Schaminee
@GeoSander
I guess that the best solution to do this would be to append a **kwargs dict to all provider query method signatures. The creators of providers that need an explicit language parameter could always add that to their query method and it would still work for the other provider classes.
Sander Schaminee
@GeoSander
I have created the an alternative PR geopython/pygeoapi#664. Please let me know what you guys think :)
Tom Kralidis
@tomkralidis
Hi Sander: I can take a deeper dive into this following Wednesday.
Sander Schaminee
@GeoSander
Great, thanks!
Tom Kralidis
@tomkralidis
nice demo of pygeoapi and OAProc at today’s OGC EO Exploitation DWG meeting — nice work @totycro !
rtrm
@freenode_rtrm:matrix.org
[m]
hello
Tom Kralidis
@tomkralidis

hey all: reminder of the 3 pygeoapi sessions at this Wednesday’s OGC Developer Track: https://github.com/opengeospatial/developer-track#agenda

@pvgenuchten, @francbartoli and myself will be presenting on OATiles, OARec, and OAProc.

paul van genuchten
@pvgenuchten
tom the timing on github is ok? on ogcmeet.org agend it indicates:
image.png
Tom Kralidis
@tomkralidis
@pvgenuchten (cc @francbartoli) . All times are EDT per the agenda.
paul van genuchten
@pvgenuchten
so the records track is at 15:15 - 17:15 edt, because ogcmeet.org indicates it at 11:15 AM - 12:45 PM edt
Tom Kralidis
@tomkralidis

@pvgenuchten @francbartoli from Gobe:

The agenda on the GitHub repo is authoritative.

https://github.com/opengeospatial/developer-track/discussions/4#discussioncomment-515138

Tom Kralidis
@tomkralidis
@pvgenuchten @francbartoli I am sending out the slides tomorrow at 13h UTC FYI. Let me know if this is okay.
Francesco Bartoli
@francbartoli
+1
Looking at the deck right now. Since I’m block 1 I guess slides 2-6 is up to me @tomkralidis?
Francesco Bartoli
@francbartoli
or they are meant to be shared for each pygeoapi block?