Skip to content

Commit e2cb174

Browse files
Add entry point for RWM cli to setup.py (#56)
* Add entry point for RWM cli to setup.py
1 parent 1146ed7 commit e2cb174

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
lines changed

cli/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,12 @@ This Command-Line Interface (CLI) is designed to provide an easy and interactive
44

55
## Quick Start
66
1. Create a batch configuration (ex. `poc.json`) file using the syntax and structure outlined in the [RAI Workflow Framework README](../workflow/README.md).
7-
2. Add `rai-workflow-manager` as dependency to your `requirements.txt` file:
8-
```txt
9-
rai-workflow-manager==0.0.29
10-
```
11-
3. Build the project:
7+
2. Install Python 3.9+ ([Install Python using pyenv](#install-python-using-pyenv)).
8+
3. Install RWM:
129
```bash
13-
pyenv install 3.9
14-
pyenv local 3.9
15-
pip install --upgrade pip
16-
pip install virtualenv
17-
python -m virtualenv venv
18-
source ./venv/bin/activate
19-
pip install -r requirements.txt
20-
```
21-
4. Create main.py file with the following content:
22-
```python
23-
import cli.runner
24-
25-
if __name__ == "__main__":
26-
cli.runner.start()
10+
pip install rai-workflow-manager
2711
```
28-
5. Create `loader.toml` file with the following content:
12+
4. Create `loader.toml` file with the following content:
2913
```toml
3014
[[container]]
3115
name="input"
@@ -37,11 +21,10 @@ name="export"
3721
type="local"
3822
data_path="./output"
3923
```
40-
6. Run the following command to execute the batch configuration:
24+
5. Run the following command to execute the batch configuration:
4125
```bash
42-
python main.py \
26+
rwm --batch-config poc.json \
4327
--rel-config-dir <path>/rel \
44-
--batch-config poc.json \
4528
--env-config loader.toml \
4629
--engine <engine> \
4730
--database <database>
@@ -128,3 +111,14 @@ data_path="./data"
128111
| Parameter to set timeouts for steps | `--step-timeout` | `False` | | `String` | The value should be key value pairs separated by comma. Value must have `int` type. Example: `--step-timeout "step1=10,step2=20"` |
129112
| Force reimport of sources which are date-partitioned (both chunk and NOT chunk-partitioned) with in `--start-date` & `--end-date` range and all sources which are NOT date-partitioned. | `--force-reimport` | `False` | `False` | `BooleanOptionalAction` | `True` - `--force-reimport`, `False` - `--no-force-reimport`, no argument - default value |
130113
| Force reimport of sources which are NOT chunk-partitioned. If it's a date-partitioned source, it will be re-imported with in `--start-date` & `--end-date` range. | `--force-reimport-not-chunk-partitioned` | `False` | `False` | `BooleanOptionalAction` | `True` - `--force-reimport-not-chunk-partitioned`, `False` - `--no-force-reimport-not-chunk-partitioned`, no argument - default value |
114+
115+
## Install Python using pyenv
116+
117+
```bash
118+
pyenv install 3.9
119+
pyenv local 3.9
120+
pip install --upgrade pip
121+
pip install virtualenv
122+
python -m virtualenv venv
123+
source ./venv/bin/activate
124+
```

setup.py

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
long_description_content_type="text/markdown",
4949
name="rai-workflow-manager",
5050
packages=find_packages(exclude=['test', 'cli-e2e-test']),
51+
entry_points={
52+
"console_scripts": ['rwm = cli.runner:start']
53+
},
5154
include_package_data=True,
5255
url="https://github.com/RelationalAI/rai-workflow-manager",
5356
version=workflow.__version__)

workflow/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version_info__ = (0, 0, 29)
15+
__version_info__ = (0, 0, 30)
1616
__version__ = ".".join(map(str, __version_info__))

0 commit comments

Comments
 (0)