Skip to content

Commit

Permalink
chore: remove cli (#362)
Browse files Browse the repository at this point in the history
Signed-off-by: Guilhem Barthes <[email protected]>
  • Loading branch information
guilhem-barthes authored Jun 7, 2023
1 parent bba3859 commit e85047e
Show file tree
Hide file tree
Showing 17 changed files with 10 additions and 1,066 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
flake8 substra
- name: Install substra
run: pip install -e .
- name: Generate and validate CLI documentation
run: |
pip install pydantic==1.8.2
python bin/generate_cli_documentation.py --output-path references/cli.md
- name: Generate and validate SDK documentation
run: |
python bin/generate_sdk_documentation.py --output-path='references/sdk.md'
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed

- Function name from the Performance model ([#358](https://github.com/Substra/substra/pull/358))
- BREAKING: `substra.cli` module ([#362](https://github.com/Substra/substra/pull/362))
- BREAKING: `Client.from_config_file()`. The recommended way is to use the new config file format or env vars ([#362](https://github.com/Substra/substra/pull/362))

## [0.43.0](https://github.com/Substra/substra/releases/tag/0.43.0) - 2023-03-31

Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ pyclean:
find . -type d -name "__pycache__" -delete
rm -rf build/ dist/ *.egg-info

doc-cli: pyclean
python bin/generate_cli_documentation.py

doc-sdk: pyclean
python bin/generate_sdk_documentation.py
python bin/generate_sdk_schemas_documentation.py
python bin/generate_sdk_schemas_documentation.py --models --output-path='references/sdk_models.md'

doc: doc-cli doc-sdk
doc: doc-sdk

test: pyclean
pytest tests
83 changes: 0 additions & 83 deletions bin/generate_cli_documentation.py

This file was deleted.

86 changes: 0 additions & 86 deletions references/cli.md

This file was deleted.

31 changes: 0 additions & 31 deletions references/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,37 +287,6 @@ class.
**Returns:**

- `pathlib.Path`: Path of the downloaded model
## from_config_file
```text
from_config_file(profile_name: str = 'default', config_path: Union[str, pathlib.Path] = '~/.substra', tokens_path: Union[str, pathlib.Path] = '~/.substra-tokens', token: Optional[str] = None, retry_timeout: int = 300, backend_type: substra.sdk.schemas.BackendType = <BackendType.REMOTE: 'remote'>)
```

Returns a new Client configured with profile data from configuration files.

**Arguments:**
- `profile_name (str, optional)`: Name of the profile to load.
Defaults to 'default'.
- `config_path (Union[str, pathlib.Path], optional)`: Path to the
configuration file.
Defaults to '~/.substra'.
- `tokens_path (Union[str, pathlib.Path], optional)`: Path to the tokens file.
Defaults to '~/.substra-tokens'.
- `token (str, optional)`: Token to use for authentication (will be used
instead of any token found at tokens_path). Defaults to None.
- `retry_timeout (int, optional)`: Number of seconds before attempting a retry call in case
of timeout. Defaults to 5 minutes.
- `backend_type (schemas.BackendType, optional)`: Which mode to use.
Possible values are `remote`, `docker` and `subprocess`.
Defaults to `remote`.
In `remote` mode, assets are registered on a deployed platform which also executes the tasks.
In `subprocess` or `docker` mode, if no URL is given then all assets are created locally and tasks are
executed locally. If a URL is given then the mode is a hybrid one: new assets are
created locally but can access assets from the deployed Substra platform. The platform is in read-only
mode and tasks are executed locally.

**Returns:**

- `Client`: The new client.
## get_compute_plan
```text
get_compute_plan(self, key: str) -> substra.sdk.models.ComputePlan
Expand Down
7 changes: 0 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
install_requires=[
"click>=7.1.1,!=8.0.0", # issue with click 8.0.0 (#4)
"requests",
"docker",
"pyyaml",
"pydantic>=1.5.1",
"six",
"tqdm",
"python-slugify",
],
Expand All @@ -62,10 +60,5 @@
"docstring_parser",
],
},
entry_points={
"console_scripts": [
"substra=substra.cli.interface:cli",
],
},
zip_safe=False,
)
Empty file removed substra/cli/__init__.py
Empty file.
Loading

0 comments on commit e85047e

Please sign in to comment.