Skip to content

Commit

Permalink
be more sure about archive contents (QuantStack#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl authored Jul 6, 2021
1 parent 4c40027 commit daae2c0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
21 changes: 8 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
APP_PKG = ROOT / "packages/ipydrawio/package.json"
APP_DATA = json.loads(APP_PKG.read_text(encoding="utf-8"))
RTD = json.loads(os.environ.get("READTHEDOCS", "False").lower())
RTD_TASKS = [
"build",
"setup:pip:check",
"docs:typedoc:mystify",
"demo",
]

# metadata
author = APP_DATA["author"]
Expand Down Expand Up @@ -127,19 +133,8 @@ def clean_schema(app: Sphinx, error):

def before_rtd_build(app: Sphinx, error):
"""performs the full frontend build, and ensures the typedoc"""
for task in [
"build",
"setup:pip:check",
"docs:typedoc:mystify",
"demo",
]:
subprocess.check_call(
[
"doit",
task,
],
cwd=str(ROOT),
)
for task in RTD_TASKS:
subprocess.check_call(["doit", task], cwd=str(ROOT))


def setup(app):
Expand Down
10 changes: 8 additions & 2 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,16 @@ def task_demo():
return

demo_dest = []
demo_tasks = []
final_dest = []
for path in P.ALL_DEMO_CONTENTS:
name = f"stage:{path.name}"
dest = P.DEMO / path.name.replace(" ", "_")
demo_dest += [dest]
demo_tasks += [f"demo:{name}"]
final_dest += [P.DEMO_BUILD / f"files/{path.name}"]
yield dict(
name=f"stage:{path.name}",
name=name,
file_dep=[path],
targets=[dest],
actions=[(P._copy_one, [path, dest])],
Expand All @@ -696,8 +701,9 @@ def task_demo():

yield dict(
name="archive",
task_dep=demo_tasks,
file_dep=[*demo_dest, *lite_src_files],
targets=[P.DEMO_ARCHIVE, P.DEMO_HASHES],
targets=[P.DEMO_ARCHIVE, P.DEMO_HASHES, *final_dest, P.DEMO_CONTENTS_API],
actions=[P._build_lite],
)

Expand Down
1 change: 1 addition & 0 deletions scripts/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ def _norm_js_version(pkg):
DEMO_APPS = ["lab"]
DEMO_BUILD = BUILD / "demo"
DEMO_HASHES = DEMO_BUILD / "SHA256SUMS"
DEMO_CONTENTS_API = DEMO_BUILD / "api/contents/all.json"
DEMO_ARCHIVE = (
DEMO_BUILD / f"""ipydrawio-lite-{JS_PKG_DATA["ipydrawio"]["version"]}.tgz"""
)
Expand Down

0 comments on commit daae2c0

Please sign in to comment.