Skip to content
Snippets Groups Projects
  1. Mar 06, 2024
    • Erin (Josh) Rigler's avatar
      Merge branch 'fix-utcdatetime-encoder' into 'master' · dbaa6a08
      Erin (Josh) Rigler authored
      Fix custom json encoder in pydantic+fastapi
      
      See merge request !300
      dbaa6a08
    • Erin (Josh) Rigler's avatar
      Fix custom json encoder in pydantic+fastapi · 3ee389ea
      Erin (Josh) Rigler authored
      Pydantic v1's json module contain[s|ed] a dictionary called `ENCODERS_BY_TYPE`
      that was commonly used to overide default json encoders. Pydantic v2 is moving
      away from this to a "better" system. FastAPI attempted to stay compatible with
      both v1 and v2 by pulling ENCODERS_BY_TYPE into their own codebase, but this
      broke our custom type `UTCDateTime`, at least for anything using fastapi.
      
      We thought we fixed this with a recent MR, but it turns out all we did was
      fix the validator. We did not fix the encoder itself. So, validation steps
      would pass, but we continued to server malformed json for UTCDateTimes. This
      commit reverts to the earlier version of pydantic_utcdatetime.py, and adds a
      small kluge that modifies `ENCODERS_BY_TYPE` in both pydantic and fastapi.
      3ee389ea
  2. Mar 01, 2024
  3. Feb 28, 2024
  4. Feb 26, 2024
  5. Feb 20, 2024
  6. Feb 15, 2024
  7. Feb 14, 2024
  8. Feb 13, 2024
  9. Feb 12, 2024
  10. Feb 09, 2024
  11. Jan 19, 2024
    • Wilbur, Spencer Franklin's avatar
      Committing two new files, FDSNSNCL and FDSNFactory. The factory is modeled... · a67da355
      Wilbur, Spencer Franklin authored
      Committing two new files, FDSNSNCL and FDSNFactory. The factory is modeled after the MiniseedFactory with the additional functions that retrive azimuth and dip. The Factory also relies on the get_waveforms method of obspy instead of get_timeseries. The instrument response is also attached and then that response is altered using the remove_response method in Obspy. This returns the response in nT, but we may have to change this depending on whether there are variometers with a frequency response. The __init__.py file was also edited to incooporate the FDSNSNCL and FDSNFactory.
      a67da355
  12. Jan 16, 2024
  13. Jan 06, 2024
    • Erin (Josh) Rigler's avatar
      Instantiate EdgeFactory with a snclMapper · bfbfa915
      Erin (Josh) Rigler authored
      Allow EdgeFactory to change which mappings will be used from common channels
      (i.e., X, Y, Z, etc), to SEED SNCLs (station, network, channel, location)
      codes. For now we default to "legacy", for backward compatibility, but we
      can specify snclMapper="geomag" to use the modern SNCLs used by the USGS
      Geomagnetism Program.
      bfbfa915
Loading