Compare commits
11 commits
b3f4cffbca
...
8e58d45e10
Author | SHA1 | Date | |
---|---|---|---|
8e58d45e10 | |||
4a2fb8a3d4 | |||
0075b9f78d | |||
ca098993c9 | |||
096b659db9 | |||
44ceef10de | |||
72133580d0 | |||
b7e5adfa73 | |||
6347c0c5c3 | |||
1e14eaf12d | |||
1b6e120470 |
9 changed files with 1268 additions and 1250 deletions
|
@ -1,3 +0,0 @@
|
|||
[*.sh]
|
||||
indent_size = 4
|
||||
indent_style = space
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,2 @@
|
|||
__pycache__
|
||||
/dist
|
||||
/.venv
|
||||
|
|
|
@ -291,3 +291,4 @@ Handle project workflows in a unified way:
|
|||
* tex
|
||||
* translate to french
|
||||
* try to support nix
|
||||
* uv
|
||||
|
|
|
@ -44,8 +44,12 @@ def clone_project_branch() -> None:
|
|||
)
|
||||
|
||||
|
||||
def install_commands(path: str) -> None:
|
||||
"""Make commands callable in the operating system."""
|
||||
def install_commands(path: Path) -> None:
|
||||
"""Make commands callable in the operating system.
|
||||
|
||||
:param path: entry point that commands will call
|
||||
:type path: Path
|
||||
"""
|
||||
step("Install commands")
|
||||
user = Path("/usr/local/bin")
|
||||
for command in [
|
||||
|
@ -72,10 +76,12 @@ def install_python_packages() -> None:
|
|||
"pydoclint",
|
||||
"pylint",
|
||||
"pytest",
|
||||
"PyYAML",
|
||||
"ruff",
|
||||
"sphinx",
|
||||
"Sphinx",
|
||||
"sphinx-rtd-theme",
|
||||
"twine",
|
||||
"types-PyYAML",
|
||||
]
|
||||
for package in packages:
|
||||
log.info(package)
|
||||
|
@ -92,8 +98,12 @@ def list_environment_variables() -> None:
|
|||
log.info("%s", variable)
|
||||
|
||||
|
||||
def main(main_file: str) -> None:
|
||||
"""Entry point to initialize environment or run a specific command."""
|
||||
def main(main_file: Path) -> None:
|
||||
"""Entry point to initialize environment or run a specific command.
|
||||
|
||||
:param main_file: entry point file calling this function
|
||||
:type main_file: Path
|
||||
"""
|
||||
paths = environ["PATH"].split(pathsep)
|
||||
if env.SPCD_PYTHON_VENV_BINARIES not in paths:
|
||||
environ["PATH"] = pathsep.join([env.SPCD_PYTHON_VENV_BINARIES, *paths])
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import importlib
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
if __name__ == "__main__":
|
||||
env = importlib.import_module("env")
|
||||
|
@ -11,4 +12,4 @@ if __name__ == "__main__":
|
|||
sys.path.insert(0, env.SPCD_PYTHON_VENV_PACKAGES)
|
||||
from spcd import main
|
||||
|
||||
main(__file__)
|
||||
main(Path(__file__))
|
||||
|
|
|
@ -32,7 +32,13 @@ def spcd_check_project() -> None:
|
|||
def spcd_synchronize(
|
||||
target: str | None = None, source: str | None = None
|
||||
) -> None:
|
||||
"""Synchronize output towards a target."""
|
||||
"""Synchronize output towards a target.
|
||||
|
||||
:param target: where to deploy to
|
||||
:type target: str | None
|
||||
:param source: where to deploy from
|
||||
:type source: str | None
|
||||
"""
|
||||
if not target:
|
||||
user = "cd"
|
||||
host = env.SPCD_PROJECT_PATH
|
||||
|
|
|
@ -28,7 +28,11 @@ class Project:
|
|||
"""Current project."""
|
||||
|
||||
def __init__(self, projects: Projects) -> None:
|
||||
"""Set projects, branch, name, root & url."""
|
||||
"""Set projects, branch, name, root & url.
|
||||
|
||||
:param projects: parent class with environment
|
||||
:type projects: Projects
|
||||
"""
|
||||
self.projects = projects
|
||||
# branch
|
||||
for variable in BRANCH:
|
||||
|
|
Loading…
Reference in a new issue