Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fractal-web-reference.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.13.0
v1.13.1
27 changes: 12 additions & 15 deletions tasks_data_retrieval/install_instructions.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
INSTALL_INSTRUCTIONS_TITLE_1 = "## How to add this task to a Fractal instance\n"
INSTALL_INSTRUCTIONS_TITLE_2 = "## How to install this task in a Python environment\n"
INSTALL_INSTRUCTIONS_TITLE_1 = "**How to add this task to a Fractal instance:**\n"
INSTALL_INSTRUCTIONS_TITLE_2 = "**How to install this task in a Python environment:**\n"


def _get_default_template_pypi() -> str:
lines = [
INSTALL_INSTRUCTIONS_TITLE_1,
"Trigger a _PyPI_ task collection with package `__PROJECT_NAME__` and package version `__VERSION__`.",
"Trigger a PyPI task collection with package `__PROJECT_NAME__` and package version `__VERSION__`",
"",
INSTALL_INSTRUCTIONS_TITLE_2,
"```",
'pip install "__PROJECT_NAME__==__VERSION__"',
"Run `pip install \"__PROJECT_NAME__==__VERSION__\"`",
"```",
]
template = "\n".join(lines) + "\n"
Expand All @@ -19,12 +18,10 @@ def _get_default_template_pypi() -> str:
def _get_default_template_pypi_with_extra(extra: str) -> str:
lines = [
INSTALL_INSTRUCTIONS_TITLE_1,
f"Trigger a _PyPI_ task collection for package `__PROJECT_NAME__`, package version `__VERSION__` and package extras {extra}.",
f"Trigger a PyPI task collection for package `__PROJECT_NAME__`, package version `__VERSION__` and package extras `{extra}`",
"",
INSTALL_INSTRUCTIONS_TITLE_2,
"```",
f'pip install "__PROJECT_NAME__[{extra}]==__VERSION__"',
"```",
f"Run `pip install \"__PROJECT_NAME__[{extra}]==__VERSION__\"`",
]
template = "\n".join(lines) + "\n"
return template
Expand All @@ -33,12 +30,12 @@ def _get_default_template_pypi_with_extra(extra: str) -> str:
def _get_default_template_wheel_url() -> str:
lines = [
INSTALL_INSTRUCTIONS_TITLE_1,
"1. Download the wheel file from [this link](__WHEEL_URL__),",
"2. Trigger a _local_ task collection by uploading the wheel file.",
"1. Download the wheel file from [this link](__WHEEL_URL__)",
"2. Trigger a local task collection by uploading the wheel file",
"",
INSTALL_INSTRUCTIONS_TITLE_2,
"1. Download the wheel file from [this link](__WHEEL_URL__)",
"2. `pip install __WHEEL_NAME__`",
"2. Run `pip install __WHEEL_NAME__`",
]
template = "\n".join(lines) + "\n"
return template
Expand All @@ -47,12 +44,12 @@ def _get_default_template_wheel_url() -> str:
def _get_default_template_wheel_url_with_extra(extra: str) -> str:
lines = [
INSTALL_INSTRUCTIONS_TITLE_1,
"1. Download the wheel file from [this link](__WHEEL_URL__),",
f"2. Trigger a _local_ task collection by uploading the wheel file, with package extras {extra}.",
"1. Download the wheel file from [this link](__WHEEL_URL__)",
f"2. Trigger a local task collection by uploading the wheel file, with package extras `{extra}`",
"",
INSTALL_INSTRUCTIONS_TITLE_2,
"1. Download the wheel file from [this link](__WHEEL_URL__)",
f"2. `pip install \"__WHEEL_NAME__[{extra}]\"`",
f"2. Run `pip install \"__WHEEL_NAME__[{extra}]\"`",
]
template = "\n".join(lines) + "\n"
return template
Expand Down