kristinemlarson / gnssrefl

GNSS Interferometric Reflectometry Software (GNSS-IR)
GNU General Public License v3.0
151 stars 75 forks source link

leap second file should be included in the docker build #189

Closed kristinemlarson closed 1 year ago

kristinemlarson commented 1 year ago

tim, please see the new code for leap seconds at the end of gps.py. it currently downloads a file from my personal website. that is not an appropriate place for it to be.

  1. this file should be added to the docker build.
  2. it should also be loaded from the package for the git clone and pypi people - and I will leave it to you to figure out how to do that because it has always been a discussion.

    i am currently looking for it in the input directory. It could be our standard users in the docker only have REFL_CODE/Files, and if that is the case, then please go ahead and move where we look for the file to that directory. I don't care - it just sounds more like an input - but if we only want a Files directory to exist, then by all means, put it there and change the code.

kristinemlarson commented 1 year ago

I moved the leap second file to REFL_CODE/Files in version 1.7.1 I woudl still like to stored somewhere it can be retrieved by pypi install people. I have not recently done a git clone -

timdittmann commented 1 year ago

Some options: 1) ship this leapsecond file in the repo in gnssrefl/gnssrefl (or gnssrefl/gnssrefl/data) like the .pkl file and keep your current code the same except point pypi users to the github repo to download it instead of you hosting it. The docker can copy it into REFL_CODE/Files in the build like it does the .pkl. In general, I think keeping this method relatively consistent in the code with the other files (station_pos and .pkl) will help simplify maintenance?

2) I was curious so made a feature branch that adds in the leap seconds using the ASTROPY suggested implementation. I could make a PR, or at least consider using the leapsecond file that astropy uses from IERS so we don't have to maintain/host this file that only some users require?

Do you like either (or a combination) of these?

kristinemlarson commented 1 year ago

option 1 sounds like the way to go for now. so many details - i have a hard time keeping track.

long term, i am totally ok with using astropy - but i don't have the time to do it.

k.

On Wed, Sep 13, 2023 at 5:37 PM Tim Dittmann @.***> wrote:

Some options:

1.

ship this leapsecond file in the repo in gnssrefl/gnssrefl (or gnssrefl/gnssrefl/data) like the .pkl file https://github.com/kristinemlarson/gnssrefl/blob/e8089b6f62185b4283d879c88a23cd93e2b207dd/gnssrefl/gpt_1wA.pickle and keep your current code the same except point pypi users to the github repo https://github.com/kristinemlarson/gnssrefl/blob/e8089b6f62185b4283d879c88a23cd93e2b207dd/gnssrefl/gps.py#L6459 to download it instead of you hosting it. The docker can copy it into REFL_CODE/Files in the build like it does the https://github.com/kristinemlarson/gnssrefl/blob/e8089b6f62185b4283d879c88a23cd93e2b207dd/Dockerfile#L46 .pkl. In general, I think keeping this method relatively consistent in the code with the other files (station_pos and .pkl) will help simplify maintenance? 2.

I was curious so made a feature branch https://github.com/timdittmann/gnssrefl/blob/67ce43b4b6a1d83e62c33d56a4f34176a0367741/gnssrefl/nmea2snr.py#L145 that adds in the leap seconds using the ASTROPY suggested implementation https://docs.astropy.org/en/stable/time/index.html#writing-a-custom-format. I could make a PR, or at least consider using the leapsecond file https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat that astropy uses from IERS https://hpiers.obspm.fr/ so we don't have to maintain/host this file that only some users require?

Do you like either (or a combination) of these?

— Reply to this email directly, view it on GitHub https://github.com/kristinemlarson/gnssrefl/issues/189#issuecomment-1717873385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSDAPGMVVONSQWNFHJJQZLX2HHLRANCNFSM6AAAAAA4WHX45U . You are receiving this because you authored the thread.Message ID: @.***>

-- Kristine M. Larson Professor Emerita, University of Bonn @.*** https://www.kristinelarson.net http://www.kristinelarson.net https://gnss-reflections.org https://github.com/kristinemlarson

Are you waiting for your code to be perfect?