Skip to content

Commit

Permalink
small update of headers
Browse files Browse the repository at this point in the history
  • Loading branch information
lzehl committed Jul 13, 2023
1 parent 6f83410 commit ed7df3d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
SchemaDocBuilder(schema, schema_loader.schemas_sources, relative_path_by_schema).build()

# Step 5 - building toctrees (please note that the implementation requires the schemas to be built already)
create_toc_tree_page(schema_version, ["specifications"])
create_toc_tree_page(schema_version, ["schema_specifications"])

# Step 6 - checkout version branch in relative "upload" directory (provided by GitHub pipeline), copy files and push
if schema_version not in versions:
Expand Down Expand Up @@ -68,7 +68,7 @@
InstancesDocBuilder(instance_version, instances_libraries.instances_libraries).build()

# Step 5 - building toctrees (please note that the implementation requires the schemas to be built already)
create_toc_tree_page(instance_version, ["instances"])
create_toc_tree_page(instance_version, ["instances_libraries"])

# Step 6 - checkout version branch in relative "upload" directory (provided by GitHub pipeline), copy files and push
if instance_version not in versions:
Expand Down
12 changes: 6 additions & 6 deletions pipeline/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ def __init__(self, instances_version:str, instances_libraries:Dict):
self.instances_libraries = instances_libraries

def _target_file_without_extension(self, target_basename:str) -> str:
return os.path.join("target", self.version, "docs", "instances", f"{target_basename}_library")
return os.path.join("target", self.version, "docs", "instances_libraries", f"{target_basename}")

def _build_terminology(self, target_file:str, name:str, data_to_display:Dict):
with open(f"{target_file}.rst", "w") as output_file:
doc = RstCloth(output_file, line_width=100000)
doc.heading(f"{name} library", char="#", overline=True)
doc.heading(f"{name}", char="#", overline=True)
doc.newline()
for term_name, term_data in sorted(data_to_display.items()):
doc.heading(term_data["name"], char="-")
Expand All @@ -123,7 +123,7 @@ def _build_terminology(self, target_file:str, name:str, data_to_display:Dict):
def _build_content_types(self, target_file:str, data_to_display:Dict):
with open(f"{target_file}.rst", "w") as output_file:
doc = RstCloth(output_file, line_width=100000)
doc.heading("ContentTypes library", char="#", overline=True)
doc.heading("ContentTypes", char="#", overline=True)
doc.newline()
for ct_name, ct_data in sorted(data_to_display.items()):
doc.heading(ct_data["name"], char="-")
Expand All @@ -132,7 +132,7 @@ def _build_content_types(self, target_file:str, data_to_display:Dict):
def _build_licenses(self, target_file:str, data_to_display:Dict):
with open(f"{target_file}.rst", "w") as output_file:
doc = RstCloth(output_file, line_width=100000)
doc.heading("Licenses library", char="#", overline=True)
doc.heading("Licenses", char="#", overline=True)
doc.newline()
for license_name, license_data in sorted(data_to_display.items()):
doc.heading(license_data["fullName"], char="-")
Expand All @@ -141,13 +141,13 @@ def _build_licenses(self, target_file:str, data_to_display:Dict):
def _build_brain_atlas(self, target_file:str, name:str, data_to_display:Dict):
with open(f"{target_file}.rst", "w") as output_file:
doc = RstCloth(output_file, line_width=100000)
doc.heading(f"{name} library", char="#", overline=True)
doc.heading(f"{name}", char="#", overline=True)
doc.newline()

def _build_common_coordinate_space(self, target_file:str, name:str, data_to_display:Dict):
with open(f"{target_file}.rst", "w") as output_file:
doc = RstCloth(output_file, line_width=100000)
doc.heading(f"{name} library", char="#", overline=True)
doc.heading(f"{name}", char="#", overline=True)
doc.newline()

def build(self):
Expand Down
4 changes: 2 additions & 2 deletions pipeline/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, schema_file_path:str, root_path:str, relative_path_by_schema:
self._schema_payload = json.load(schema_f)

def _target_file_without_extension(self) -> str:
return os.path.join(self.version, "docs", "specifications", "/".join(self.relative_path_without_extension))
return os.path.join(self.version, "docs", "schema_specifications", "/".join(self.relative_path_without_extension))

def build(self):
target_file = os.path.join("target", f"{self._target_file_without_extension()}.rst")
Expand Down Expand Up @@ -132,7 +132,7 @@ def _define_target_objects(self, object_list) -> str:
for object in object_list:
object_name = object.split('/')[-1]
if object_name in self.relative_path_by_schema:
object_html_path = f"{self.readthedocs_url}{self.version}/specifications/{self.relative_path_by_schema[object_name]}.html"
object_html_path = f"{self.readthedocs_url}{self.version}/schema_specifications/{self.relative_path_by_schema[object_name]}.html"
object_name_list.append(f"`{object_name} <{object_html_path}>`_")
else:
object_name_list.append(f"{object_name} \[TYPE_ERROR\]")
Expand Down

0 comments on commit ed7df3d

Please sign in to comment.