Closed evalott100 closed 1 year ago
I've been working on generating the schema from TypeDicts for more robust typing, the generated schema are here, generated from these models
@coretl and I agree it makes more sense to sort out #240 before trying to implement this though.
There are a few mismatches in the generated schema and the current schema, mostly camel vs snake case and such (e.g dataframe vs Dataframe):
datum_page
datum_page_generated has no field [definitions][dataframe]
datum_page_generated has no field [properties][datum_kwargs][$ref]
datum_page_original: [title] = datum,
datum_page_generated: [title] = datum_page
event_descriptor
event_descriptor_generated has no field [definitions][data_key]
event_descriptor_generated has no field [definitions][data_type]
event_descriptor_generated has no field [definitions][object_hints]
event_descriptor_generated has no field [definitions][per_object_hint]
event_descriptor_generated has no field [definitions][configuration]
event_descriptor_original: [properties][data_keys][additionalProperties][$ref] = #/definitions/data_key,
event_descriptor_generated: [properties][data_keys][additionalProperties][$ref] = #/definitions/DataKey
event_descriptor_original: [properties][hints][$ref] = #/definitions/object_hints,
event_descriptor_generated: [properties][hints][$ref] = #/definitions/ObjectHints
event_descriptor_original: [properties][configuration][additionalProperties][$ref] = #/definitions/configuration,
event_descriptor_generated: [properties][configuration][additionalProperties][$ref] = #/definitions/Configuration
event_descriptor_generated has no field [patternProperties]
event
event_generated has no field [properties][filled][additionalProperties][type]
event_page
event_page_generated has no field [definitions][dataframe]
event_page_generated has no field [definitions][dataframe_for_filled]
event_page_generated has no field [properties][data][$ref]
event_page_generated has no field [properties][timestamps][$ref]
event_page_generated has no field [properties][filled][$ref]
resource
resource_generated has no field [properties][path_semantics][type]
resource_generated has no field [properties][path_semantics][enum]
run_start
run_start_generated has no field [definitions][data_type]
run_start_generated has no field [definitions][projection]
run_start_generated has no field [definitions][projections]
run_start_generated has no field [properties][sample][type]
run_start_original: [properties][projections][items][$ref] = #/definitions/projections,
run_start_generated: [properties][projections][items][$ref] = #/definitions/Projections
run_start_generated has no field [properties][hints][type]
run_start_generated has no field [properties][hints][properties]
run_start_generated has no field [properties][hints][patternProperties]
run_start_generated has no field [properties][hints][additionalProperties]
run_start_generated has no field [patternProperties]
run_stop
run_stop_generated has no field [definitions][data_type]
run_stop_generated has no field [properties][exit_status][type]
run_stop_generated has no field [properties][exit_status][enum]
run_stop_generated has no field [properties][num_events][properties]
run_stop_generated has no field [patternProperties]
stream_resource
stream_resource_generated has no field [properties][path_semantics][type]
stream_resource_generated has no field [properties][path_semantics][enum]
Added Type hints to event_model/init.py.
Description
Added type hints to the compose functions. Added type hints to almost all the other parts of the module too, save some places where types were a little more fussy.
Also added mypy to the continuous dev environment.
Motivation and Context
Closes #235
How Has This Been Tested?
Tested by seeing if unit tests remain unchanged. Tested types by just running mypy.