Ouranosinc / xscen

A climate change scenario-building analysis framework.
https://xscen.readthedocs.io/
Apache License 2.0
17 stars 2 forks source link

Watch the catalog file #207

Open aulemahal opened 1 year ago

aulemahal commented 1 year ago

Addressing a Problem?

The current catalog tools will load the whole CSV into memory and sometimes update it. If another process edits the CSV, this is not captured, leading to potentially corrupted catalogs, or simply lost lines.

Potential Solution

Could we make the ProjectCatalog self-aware with something like watchdog ? The object would automatically update if the CSV changes. Conversely, it should automatically update the CSV each time the DataFrame is updated.

Additional context

(We are converging towards a real database here, Christian was right all this time. Damn scientists acting like programmers.)

Contribution