File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,6 +367,7 @@ def setup(app):
367367)
368368schemas_base_dir = Path (__file__ ).parents [1 ] / "tmp/bo4e_json_schemas"
369369changes_base_dir = Path (__file__ ).parents [1 ] / "tmp/changes"
370+ current_json_schemas_dir = Path (__file__ ).parents [1 ] / "json_schemas"
370371
371372
372373async def download_missing_schemas (versions : Iterable [Version ], gh_token : str | None = None ) -> list [Schemas ]:
@@ -382,7 +383,9 @@ async def download_missing_schemas(versions: Iterable[Version], gh_token: str |
382383 return schemas_list
383384
384385
385- schemas = asyncio .run (download_missing_schemas (last_versions , gh_token ))
386+ current_json_schemas = read_schemas (current_json_schemas_dir )
387+ update_references_all_schemas (current_json_schemas )
388+ schemas = [current_json_schemas , * asyncio .run (download_missing_schemas (last_versions , gh_token ))]
386389changes = [diff_schemas (schemas_1 , schemas_2 ) for schemas_1 , schemas_2 in pairwise (reversed (schemas ))]
387390for changes_obj in changes :
388391 write_changes (changes_obj , changes_base_dir / f"{ changes_obj .old_version } _to_{ changes_obj .new_version } .json" )
You can’t perform that action at this time.
0 commit comments