docs: say --offline cuts release asset downloads

This commit is contained in:
Abdessamad Derraz committed 2026-10-18 07:30:56 +02:00
1 parent d84f81874b
commit 1305516e87
3 files changed
+23 -2

No files matched your search

+3 -1
View File
@@ -2900,7 +2900,9 @@ def _main(held: contextlib.ExitStack) -> None:
parser.add_argument(
"--offline",
action="store_true",
help="Skip data directory freshness check, use cache only",
help="No network at all: data directories and release assets come "
"from the cache only, so a gitignored file never fetched is missing "
"(--no-refresh-data keeps the trees as cached and still fetches assets)",
)
parser.add_argument(
"--refresh-data",
+3 -1
View File
@@ -330,7 +330,9 @@ def main() -> None:
"--skip-docs", action="store_true", help="Skip README and site generation"
)
parser.add_argument(
"--offline", action="store_true", help="Skip data directory refresh"
"--offline", action="store_true",
help="No network: skips steps 2 to 2b2 and packs only the release "
"assets already in .cache/large/"
)
parser.add_argument(
"--output-dir", default="dist", help="Pack output directory (default: dist/)"
+17
View File
@@ -4327,5 +4327,22 @@ class EveryOptionIsDocumented(unittest.TestCase):
self.assertEqual(undocumented, [])
class OfflineHelpSaysWhatItCuts(unittest.TestCase):
"""--offline read "Skip data directory freshness check" while it also
stops release assets from downloading: on a fresh clone the gitignored
files were missing from the pack and nothing had announced it."""
def test_both_helps_name_the_release_assets(self):
for script in ("generate_pack.py", "pipeline.py"):
with self.subTest(script=script):
out = subprocess.run(
[sys.executable, f"scripts/{script}", "--help"],
capture_output=True, text=True, cwd=str(ROOT), check=True,
).stdout
block = out.split("--offline", 2)[-1].split("\n --", 1)[0]
self.assertIn("release", " ".join(block.split()))
if __name__ == "__main__":
unittest.main()