Skip to content

Commit

Permalink
fix some paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodlz committed Oct 7, 2024
1 parent 7403dc9 commit e56e873
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions launcher/commands/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def patch_api_doc_template():
template_env = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./"))

# Load the template file
template = template_env.get_template("doc/openapi.html.template")
template = template_env.get_template("skyportal/doc/openapi.html.template")

# Render the template with the OpenAPI spec
output = template.render(openapi_spec=json.dumps(openapi_spec, indent=2))
Expand Down Expand Up @@ -89,29 +89,12 @@ def doc(yes: bool = False, upload: bool = False):
"servers": [{"url": "https://fritz.science"}],
},
)
with open("skyportal/openapi.json", "w") as f:
with open("openapi.json", "w") as f:
json.dump(spec.to_dict(), f)

patch_api_doc_template()

subprocess.run(
[
"npx",
"[email protected]",
"bundle",
"openapi.json",
"--title",
"Fritz API docs",
"--cdn",
"--options.theme.logo.gutter",
"2rem",
"-o",
"../doc/_build/html/api.html",
],
check=True,
cwd="skyportal",
)
os.remove("skyportal/openapi.json")
os.remove("openapi.json")

if upload:
subprocess.run(
Expand Down

0 comments on commit e56e873

Please sign in to comment.