OpenEnergyPlatform / open-MaStR

A collaborative software to download the energy database Marktstammdatenregister (MaStR)
https://open-mastr.readthedocs.io/en/latest/
GNU Affero General Public License v3.0
88 stars 19 forks source link

How to specify the folder path for the SQLite file? #549

Closed tomfelder94 closed 4 months ago

tomfelder94 commented 4 months ago

Description of the issue

I would like to saved the generated SQLite file at a specific location (a shared SSD drive), not under $HOME/.open-MaStR/data/sqlite. Is there a way to provide an absolute path as an argument when initializing the Mastr object? Or do I have to manually copy it after each download?

nesnoj commented 4 months ago

Hey @tomfelder94! Yes, this feature was added in v0.14.0 (PR #402). You can change it by adjusting the env variable OUTPUT_PATH like

os.environ['OUTPUT_PATH'] = "/your/custom/output_path"

which is read by this function.

According to #402 this hint was part of the docs but somehow vanished.. :thinking: - do you know why @FlorianK13 ?

cf. #520

FlorianK13 commented 4 months ago

Hi @nesnoj I don't know why this is not in the docs. We definitely should add it somewhere because this question comes up regularly.

nesnoj commented 4 months ago

Hi @nesnoj I don't know why this is not in the docs. We definitely should add it somewhere because this question comes up regularly.

Ok, I'll take care..

nesnoj commented 4 months ago

Fixed in #550, docs will be updated in next release @tomfelder94