TIDES-transit / TIDES

Transit ITS Data Exchange Specification for historical transit operations data
https://tides-transit.github.io/TIDES
Apache License 2.0
25 stars 4 forks source link

🚀💻 – Reconsider how to repesent the list of schemas within TIDES suite #76

Open e-lo opened 1 year ago

e-lo commented 1 year ago

User Story

As a developer and user, I want to leverage standardized functionality for listing packages of files and the interplay between them so that it is:

Context

Solutions

Alternatives

Options so far:

  1. do nothing, keep tides.spec.json
  2. translate tides.spec.json to a profile (see example of how this was done for camera trap data)
  3. Remove tides.spec.json and autogenerate documentation from anything in the /spec folder
  4. ?? bueller ??

Additional Context

botanize commented 1 year ago

I'd like to add an option:

  1. remove tides.spec.json, it contains no information not already available in the table schemas, autogenerate table on architecture page from *.schema.json files.

e.g.,

spec_summary = []
for s in schema_files:
    schema = read_schema(s)
    spec_summary.append({"Name": schema.get('name').split(".")[0], "Type": schema.get('_table_type'), "Description": schema.get('description')})

spec_summary.sort(key=lambda schema: schema["Name"])

md = "## Files in Specification\nTIDES consists of a package of files as defined in the following table.\n\n"
md += "| Name | Type | Description |\n|-|-|-|\n"
for table_type in TABLE_TYPES:
    for schema in spec_summary:
        if schema["Type"] == table_type:
            md += "| {Name} | {Type} | {Description} |\n".format(**schema)
e-lo commented 1 year ago

I'd like to add an option: remove tides.spec.json, it contains no information not already available in the table schemas, autogenerate table on architecture page from *.schema.json files.

Added this one to consideration.

Thinking points 🤔

  1. Are any of the files conditionally required or forbidden if another is present? We'd want to maintain a way to represent this.
  2. Are there any other relationships, conditions, or checks that we need to represent "together" as opposed to being able to represent them within individual file schemas?