From ae6ee1e30d651d2e4e0b13f288fd2322ba463ca6 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 18 May 2025 17:24:34 +0000 Subject: [PATCH 1/4] Update README.md with local development and testing instructions Co-Authored-By: liren@liquid.ai --- python_cli/README.md | 67 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/python_cli/README.md b/python_cli/README.md index 22917b7..e1d9a5f 100644 --- a/python_cli/README.md +++ b/python_cli/README.md @@ -34,6 +34,73 @@ database: schema: "labs" ``` +## Local Development + +### Setting Up the Development Environment + +To set up a local development environment for the Liquid Labs CLI: + +```bash +# Clone the repository (if you haven't already) +git clone https://github.com/Liquid4All/on-prem-stack.git +cd on-prem-stack/python_cli + +# Install the package in development mode with test dependencies +pip install -e ".[test]" + +# Install code quality tools +pip install black flake8 +``` + +### Running the CLI Locally + +There are several ways to run the CLI locally: + +1. Using Python module (recommended for development): +```bash +python -m liquidai_cli.cli [command] [args] +``` + +2. Using `uv` without installing the package: +```bash +uv run --directory . -m liquidai_cli.cli [command] [args] +``` + +3. After installing the package with pip: +```bash +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 From 0ca55cf12341cbdb5c52919b84de7b61bf8082a9 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 18 May 2025 17:31:00 +0000 Subject: [PATCH 2/4] Add dev dependency group for black and flake8 Co-Authored-By: liren@liquid.ai --- python_cli/README.md | 7 ++----- python_cli/pyproject.toml | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/python_cli/README.md b/python_cli/README.md index e1d9a5f..c57823e 100644 --- a/python_cli/README.md +++ b/python_cli/README.md @@ -45,11 +45,8 @@ To set up a local development environment for the Liquid Labs CLI: git clone https://github.com/Liquid4All/on-prem-stack.git cd on-prem-stack/python_cli -# Install the package in development mode with test dependencies -pip install -e ".[test]" - -# Install code quality tools -pip install black flake8 +# Install the package in development mode with test and development dependencies +pip install -e ".[test,dev]" ``` ### Running the CLI Locally diff --git a/python_cli/pyproject.toml b/python_cli/pyproject.toml index 47fa0eb..5e8d9e2 100644 --- a/python_cli/pyproject.toml +++ b/python_cli/pyproject.toml @@ -44,3 +44,7 @@ test = [ "pytest-cov>=4.0.0", "pytest-mock>=3.10.0", ] +dev = [ + "black>=23.0.0", + "flake8>=6.0.0", +] From 2258adbad0c3fe0bac904c89a869fb33ab8849ae Mon Sep 17 00:00:00 2001 From: Liren Tu Date: Sun, 18 May 2025 10:31:30 -0700 Subject: [PATCH 3/4] Update readme --- .github/workflows/python-ci.yaml | 2 +- python_cli/README.md | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/python-ci.yaml b/.github/workflows/python-ci.yaml index a3d3d5f..4ea2f55 100644 --- a/.github/workflows/python-ci.yaml +++ b/.github/workflows/python-ci.yaml @@ -31,7 +31,7 @@ jobs: python -m pip install --upgrade pip pip install .[test] pip install black flake8 - + - name: Run black run: | cd python_cli diff --git a/python_cli/README.md b/python_cli/README.md index c57823e..2ae30c5 100644 --- a/python_cli/README.md +++ b/python_cli/README.md @@ -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: @@ -41,7 +34,6 @@ database: To set up a local development environment for the Liquid Labs CLI: ```bash -# Clone the repository (if you haven't already) git clone https://github.com/Liquid4All/on-prem-stack.git cd on-prem-stack/python_cli @@ -53,18 +45,19 @@ pip install -e ".[test,dev]" There are several ways to run the CLI locally: -1. Using Python module (recommended for development): +- Using Python module (recommended for development): ```bash python -m liquidai_cli.cli [command] [args] ``` -2. Using `uv` without installing the package: +- Using `uv` without installing the package: ```bash uv run --directory . -m liquidai_cli.cli [command] [args] ``` -3. After installing the package with pip: +- Install the package in development mode with test dependencies ```bash +pip install -e ".[test,dev]" liquid-cli [command] [args] ``` From 228fe48a82ac001bb6b8d8a2f1b795152f23c96b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 18 May 2025 17:36:22 +0000 Subject: [PATCH 4/4] Update CI workflow to use dev dependency group Co-Authored-By: liren@liquid.ai --- .github/workflows/python-ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-ci.yaml b/.github/workflows/python-ci.yaml index 4ea2f55..c7f58ef 100644 --- a/.github/workflows/python-ci.yaml +++ b/.github/workflows/python-ci.yaml @@ -29,8 +29,7 @@ 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: |