Skip to content

Commit

Permalink
chore: erase traces of substratools
Browse files Browse the repository at this point in the history
Signed-off-by: ThibaultFy <thibault.fouqueray@gmail.com>
  • Loading branch information
ThibaultFy committed Oct 3, 2024
1 parent 6f7576b commit 4bb440c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ body:
attributes:
label: Installed Substra versions
description: >
Which version of `substrafl`/ `substra` / `substra-tools` are you using?
Which version of `substrafl`/ `substra` are you using?
You can check if they are compatible in the [compatibility table](https://docs.substra.org/en/stable/additional/release.html#compatibility-table).
placeholder: >
pip freeze | grep substra
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,8 @@ jobs:
uses: actions/checkout@v4
with:
path: substra
- name: Cloning substratools
uses: actions/checkout@v4
with:
repository: Substra/substra-tools
path: substratools
ref: main
- name: Install substra and substratools
- name: Install substra
run: |
pip install --no-cache-dir -e substratools
pip install --no-cache-dir -e 'substra[dev]'
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion substra/sdk/backends/local/compute/spawner/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def spawn(


def write_command_args_file(args_file: pathlib.Path, command_args: typing.List[str]) -> None:
"""Write the substra-tools command line arguments to a file.
"""Write the tools command line arguments to a file.
The format uses one line per argument. See
https://docs.python.org/3/library/argparse.html#fromfile-prefix-chars
Expand Down
2 changes: 1 addition & 1 deletion substra/sdk/backends/local/compute/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, id: str, value: str, multiple: bool):


class Filenames(str, Enum):
OPENER = "opener.py" # The name must end in .py for substra-tools module loading
OPENER = "opener.py" # The name must end in .py for substra.tools module loading


def _mkdir(path, delete_if_exists=False):
Expand Down
14 changes: 7 additions & 7 deletions tests/data_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

DEFAULT_DATA_SAMPLE_FILENAME = "data.csv"

DEFAULT_SUBSTRATOOLS_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}-slim"
DEFAULT_BASE_IMAGE_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}-slim"

DEFAULT_SUBSTRATOOLS_DOCKER_IMAGE = f"python:{DEFAULT_SUBSTRATOOLS_VERSION}"
DEFAULT_BASE_DOCKER_IMAGE = f"python:{DEFAULT_BASE_IMAGE_VERSION}"

DEFAULT_OPENER_SCRIPT = f"""
import csv
Expand Down Expand Up @@ -242,26 +242,26 @@ def _save_predictions(y_pred, path):
}

DEFAULT_FUNCTION_DOCKERFILE = f"""
FROM {DEFAULT_SUBSTRATOOLS_DOCKER_IMAGE}
FROM {DEFAULT_BASE_DOCKER_IMAGE}
COPY function.py .
RUN apt-get update && apt-get install -y git
RUN python3 -m pip install git+https://github.com/Substra/substra-tools.git@main
RUN python3 -m pip install git+https://github.com/Substra/substra.git@main
ENTRYPOINT ["python3", "function.py", "--function-name", "{{function_name}}"]
"""

BAD_ENTRYPOINT_DOCKERFILE = f"""
FROM {DEFAULT_SUBSTRATOOLS_DOCKER_IMAGE}
FROM {DEFAULT_BASE_DOCKER_IMAGE}
COPY function.py .
ENTRYPOINT ["python3", "function.txt"]
"""

NO_ENTRYPOINT_DOCKERFILE = f"""
FROM {DEFAULT_SUBSTRATOOLS_DOCKER_IMAGE}
FROM {DEFAULT_BASE_DOCKER_IMAGE}
COPY function.py .
"""

NO_FUNCTION_NAME_DOCKERFILE = f"""
FROM {DEFAULT_SUBSTRATOOLS_DOCKER_IMAGE}
FROM {DEFAULT_BASE_DOCKER_IMAGE}
COPY function.py .
ENTRYPOINT ["python3", "function.txt", "train"]
"""
Expand Down

0 comments on commit 4bb440c

Please sign in to comment.