MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
deploy Namespace Reference

Functions

argparse.Namespace parse_args ()
None remove_path (Path path)
None copy_children (Path source_dir, Path target_dir)
None deploy_root (Path build_dir, Path site_dir)
None deploy_subdir (Path build_dir, Path site_dir, str name)
list[object] natural_key (str name)
None update_versions (Path site_dir)
subprocess.CompletedProcess[str] git (Path site_dir, *str args, bool check=True)
None commit_and_push (Path site_dir, str what)
None deploy (Path build_dir, Path site_dir, str git_ref, str ref_name, str|None subdir)
int main ()

Variables

 VERSION_RE = re.compile(r'v[0-9][A-Za-z0-9.+-]*')
dict FOREIGN_DIRS = {'playground'}

Detailed Description

Deploy generated documentation into the website repository.

Function Documentation

◆ commit_and_push()

None commit_and_push ( Path site_dir,
str what )
Commit site changes and push with a small rebase retry loop.

Definition at line 107 of file deploy.py.

References git().

Referenced by deploy().

◆ copy_children()

None copy_children ( Path source_dir,
Path target_dir )
Copy all children from source_dir into target_dir.

Definition at line 41 of file deploy.py.

Referenced by deploy_root(), and deploy_subdir().

◆ deploy()

None deploy ( Path build_dir,
Path site_dir,
str git_ref,
str ref_name,
str | None subdir )
Deploy docs to the correct location based on the ref.

Definition at line 128 of file deploy.py.

References commit_and_push(), deploy_root(), deploy_subdir(), and update_versions().

◆ deploy_root()

None deploy_root ( Path build_dir,
Path site_dir )
Deploy docs to the site root while preserving versioned subdirectories.

Definition at line 51 of file deploy.py.

References copy_children(), and remove_path().

Referenced by deploy().

◆ deploy_subdir()

None deploy_subdir ( Path build_dir,
Path site_dir,
str name )
Deploy to a subdirectory of the site, replacing whatever is there.

Definition at line 63 of file deploy.py.

References copy_children(), and remove_path().

Referenced by deploy().

◆ git()

subprocess.CompletedProcess[str] git ( Path site_dir,
*str args,
bool check = True )
Run a git command in the site repository.

Definition at line 96 of file deploy.py.

Referenced by commit_and_push().

◆ main()

int main ( )
Program entry point.

Definition at line 156 of file deploy.py.

References main(), and parse_args().

Referenced by main().

◆ natural_key()

list[object] natural_key ( str name)
Split version names into comparable text and numeric chunks.

Definition at line 72 of file deploy.py.

Referenced by update_versions().

◆ parse_args()

argparse.Namespace parse_args ( )
Parse command line arguments.

Definition at line 20 of file deploy.py.

Referenced by main().

◆ remove_path()

None remove_path ( Path path)
Remove a file or directory.

Definition at line 33 of file deploy.py.

Referenced by deploy_root(), and deploy_subdir().

◆ update_versions()

None update_versions ( Path site_dir)
Update versions.json in the root docs and each versioned snapshot.

Definition at line 77 of file deploy.py.

References natural_key().

Referenced by deploy().

Variable Documentation

◆ FOREIGN_DIRS

dict deploy.FOREIGN_DIRS = {'playground'}

Definition at line 17 of file deploy.py.

◆ VERSION_RE

deploy.VERSION_RE = re.compile(r'v[0-9][A-Za-z0-9.+-]*')

Definition at line 14 of file deploy.py.