ut-astria / orbdetpy

Orbit Determination with Python
https://ut-astria.github.io/orbdetpy
GNU General Public License v3.0
115 stars 38 forks source link

Allow configuring data file paths #20

Closed bhavi-jagatia closed 1 year ago

bhavi-jagatia commented 1 year ago

We are trying to run Orbdetpy in an environment that does not allow us to write data to the library file path. Would it be possible to make the data directories configurable via environment variables?

if (__name__ != "__main__"):
    _root_dir = path.dirname(path.abspath(path.realpath(__file__)))
    _libs_dir = path.join(_root_dir, "target")
    _jar_file = path.join(_libs_dir, "orbdetpy-server-{}.jar".format(__version__))
    _data_dir = path.join(_root_dir, "orekit-data")
Shiva-Iyer commented 1 year ago

Thank you for pointing this out. The develop branch now supports an ORBDETPY_DATA_DIR which can be used to override the default data location. It will be a while before I put out a new release i.e. merge to master.