Skip to content

station_metadata_to_geojson issues #21

@rbanick

Description

@rbanick

Finding the metadata JSON to fully populate the stations JSON and GeoJSON is not possible:

  1. When the method is called and the S3 store is active it will only look for metadata.json on S3 (not locally) when populating stations.json and stations.geojson. This is due to how S3.read is written
  2. The _get_old_metadata child function was hard coded to pass stations.json as the file basename to self.metadata_handler.latest_metadata, meaning the desired metadata.json can’t be found
  3. When using latest_metadata on a Local store it doesn’t appear to populate the last_local_output_directory kwarg to Local.latest_metadata. This results in self.metadata_by_filesystem being passed only the “metadata.json” string without a directory, triggering a TypeError: expected str, bytes or os.PathLike object, not NoneType

As a final minor note, the name is a bit confusing since it also creates a JSON

Note that this is a blocking issue for a downstream ETL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions