bird-house / flyingpigeon

WPS processes for climate model data, indices and extreme events
http://flyingpigeon.readthedocs.io/en/latest/
Apache License 2.0
19 stars 15 forks source link

Replace utils by eggshell defined functions #252

Closed huard closed 5 years ago

huard commented 6 years ago

See branch https://github.com/bird-house/flyingpigeon/tree/eggshell_dep

huard commented 6 years ago

@cehbrecht @nilshempelmann Moving utilities from FP to eggshell brings a lot of changes and I've hit some issues. Since our test coverage is not so extensive, I'm expecting some breakage. One issue that has come up is the config file, which uses _PATH that is set relative to the file. If we import config from another package, a lot of things break. I haven't spent a lot of time on this, but maybe a config class with properties would solve the issue.

tomLandry commented 6 years ago

We advanced quite a bit on environment and config management in the last spring. Can't recall everything, but maybe updating doc on how it is done in PAVICS could help refactor FP and Eggshell.

nilshempelmann commented 6 years ago

Extensivation of tests is a good start 

tomLandry commented 6 years ago

What's this long string of code in @nilshempelmann reply? The GitHub page itself?

nilshempelmann commented 6 years ago

Cleaned up now. Was replying from a mobile phone email

tomLandry commented 6 years ago

That's a bug in GitHub if you ask me. This code should never have make it to the thread input.

huard commented 6 years ago

Just added a Path class to eggshell. https://github.com/bird-house/eggshell/blob/3929811bde32a249615356331b3f5b9ecf0aaa97/eggshell/config.py#L7

The idea is that you would do

from eggshell.config import Paths
import flyingpigeon

paths = Paths(flyingpigeon)
path.data
'/home/david/src/flyingpigeon/flyingpigeon/data'

So you may use the Paths class in any bird.

nilshempelmann commented 6 years ago

@huard: have a look on fp_dev branch in eggshell. What do you think about the structure?

huard commented 6 years ago

I don't see that branch...

nilshempelmann commented 6 years ago

@huard Sorry! Its pushed now. https://github.com/bird-house/eggshell/tree/fp_dev

huard commented 6 years ago

Looks good ! I suggest you go ahead and merge.

nilshempelmann commented 5 years ago

DONE