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
5 changes: 2 additions & 3 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ jobs:
run: |
cd python_cli
python -m pip install --upgrade pip
pip install .[test]
pip install black flake8

pip install .[test,dev]

- name: Run black
run: |
cd python_cli
Expand Down
71 changes: 64 additions & 7 deletions python_cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ pip install liquidai-cli

A `docker-compose.yaml` file is also shipped together with the package. Any changes to this file may cause some unexpected behaviors.

### Run with `uv`
`uv` allows to run this tool without installing the package into the system.

```bash
uv run --directory [PATH_TO_THIS_DIRECTORY] liquidai [command] [args]
```

## Configuration

The CLI uses a YAML configuration file (`liquid.yaml`) in your working directory. A default configuration will be created on first use, but you can customize it:
Expand All @@ -34,6 +27,70 @@ database:
schema: "labs"
```

## Local Development

### Setting Up the Development Environment

To set up a local development environment for the Liquid Labs CLI:

```bash
git clone https://github.com/Liquid4All/on-prem-stack.git
cd on-prem-stack/python_cli

# Install the package in development mode with test and development dependencies
pip install -e ".[test,dev]"
```

### Running the CLI Locally

There are several ways to run the CLI locally:

- Using Python module (recommended for development):
```bash
python -m liquidai_cli.cli [command] [args]
```

- Using `uv` without installing the package:
```bash
uv run --directory . -m liquidai_cli.cli [command] [args]
```

- Install the package in development mode with test dependencies
```bash
pip install -e ".[test,dev]"
liquid-cli [command] [args]
```

### Running Tests

To run tests for the Liquid Labs CLI:

```bash
# Run all tests with verbose output
pytest -v

# Run tests with coverage reporting
pytest --cov=liquidai_cli

# Run tests with coverage reporting and generate XML report (used in CI)
pytest --cov=liquidai_cli --cov-report=xml
```

### Code Quality Checks

Before submitting changes, make sure to run the following code quality checks:

```bash
# Check code formatting with black
black . --check

# Run linting with flake8
flake8 .

# You can also format your code automatically with black
black .
```

## Usage

### Stack Management
Expand Down
4 changes: 4 additions & 0 deletions python_cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ test = [
"pytest-cov>=4.0.0",
"pytest-mock>=3.10.0",
]
dev = [
"black>=23.0.0",
"flake8>=6.0.0",
]