Metadata-Version: 2.4
Name: pycompss-cli
Version: 3.4.9
Summary: Command Line Interface (CLI) for PyCOMPSs. Enables to run PyCOMPSs applications in different environments (docker, cluster, local) from a single command line.
Author-email: "Workflows and Distributed Computing Group (WDC) - Barcelona Supercomputing Center (BSC)" <compss@bsc.es>
Maintainer-email: "Workflows and Distributed Computing Group (WDC) - Barcelona Supercomputing Center (BSC)" <support-compss@bsc.es>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/bsc-wdc/pycompss-cli
Project-URL: Documentation, https://compss-doc.readthedocs.io/en/stable/Sections/08_PyCOMPSs_CLI/02_Usage.html
Project-URL: Repository, https://github.com/bsc-wdc/pycompss-cli
Keywords: distributed computing,PyCOMPSs,COMPSs,CLI
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: jsonschema
Requires-Dist: requests
Requires-Dist: rich
Requires-Dist: rocrate>=0.15.0
Requires-Dist: pyyaml
Requires-Dist: packaging
Requires-Dist: cryptography
Requires-Dist: paramiko
Provides-Extra: gui
Requires-Dist: PySide6; extra == "gui"
Provides-Extra: docker
Requires-Dist: docker>=7.0.0; extra == "docker"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: mypy>=0.981; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Requires-Dist: pylint-plugin-utils; extra == "dev"
Requires-Dist: types-requests; extra == "dev"
Requires-Dist: types-setuptools; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Requires-Dist: types-urllib3; extra == "dev"
Requires-Dist: types-paramiko; extra == "dev"
Requires-Dist: types-python-dateutil; extra == "dev"
Requires-Dist: types-toml; extra == "dev"
Requires-Dist: types-jsonschema; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: pytest-sugar; extra == "dev"
Requires-Dist: pytest-xdist; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: tox; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: sphinx.cmd; extra == "dev"
Requires-Dist: sphinx-autodoc-typehints; extra == "dev"
Requires-Dist: sphinx_rtd_theme; extra == "dev"
Requires-Dist: pip-licenses; extra == "dev"
Requires-Dist: license-expression; extra == "dev"
Requires-Dist: jq; extra == "dev"
Dynamic: license-file

# 🚀 PyCOMPSs CLI

[![PyPI version](https://img.shields.io/pypi/v/pycompss-cli.svg)](https://pypi.org/project/pycompss-cli/)
[![Python versions](https://img.shields.io/pypi/pyversions/pycompss-cli.svg)](https://pypi.org/project/pycompss-cli/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
[![Docker](https://img.shields.io/badge/docker-supported-blue.svg)](https://www.docker.com/)
[![pipeline status](https://gitlab.com/BSC-WDC/compss/tools/cli/badges/pipeline.svg)](https://gitlab.com/BSC-WDC/compss/tools/cli/-/commits/main)
![Ruff](https://img.shields.io/badge/linter-ruff-blue)
![Black](https://img.shields.io/badge/formatter-black-000000)
![Mypy](https://img.shields.io/badge/typing-mypy-blue)
![Pytest](https://img.shields.io/badge/tests-pytest-green)

> Command-line interface for the **PyCOMPSs programming model**
> Run distributed workflows seamlessly on **local machines**, **Docker**, and **remote clusters**

---

## ✨ Features

- ⚡ Run PyCOMPSs applications with zero complex setup
- 🐳 Built-in Docker environment support
- 🌍 Compatible with remote clusters and HPC environments
- 🔧 Easy integration with existing Python workflows

---

## 🚀 Quickstart

You can start using PyCOMPSs in three ways:

1. Install within a virtual environment (**RECOMMENDED**)
2. Install locally via pip
3. Use Docker-based environments

Choose the one that best suits you.

---

## 📦 Installation

### 🌟 Option 1: Virtual Environment (**RECOMMENDED**)

  To avoid conflicts with other Python packages, it is highly recommended to install `pycompss-cli` inside a virtual environment:

  **On Linux/macOS:**
  ```bash
  # Create the environment
  python3 -m venv venv
  # Activate it
  source venv/bin/activate
  # Install the package
  python3 -m pip install pycompss-cli
  ```

  **On Windows:**
  ```powershell
  # Create the environment
  python -m venv venv
  # Activate it
  .\venv\Scripts\activate
  # Install the package
  pip install pycompss-cli
  ```

---

### 🐍 **Option 2**: Conda Environment

  If you use Anaconda or Miniconda, you can create a dedicated environment to keep your dependencies isolated:

  ```bash
  # Create a new conda environment with Python 3.12
  conda create -n pycompss-env python=3.12
  # Activate the environment
  conda activate pycompss-env
  # Install the package via pip
  python3 -m pip install pycompss-cli
  ```

---

### ⚡ Option 3: Local Installation

  If you prefer a global installation (Linux, macOS, and Windows):

  ```bash
  python3 -m pip install pycompss-cli
  ```

---


This installs the following executables:

- `pycompss`
- `compss`
- `dislib`
- `qdislib`

All commands are equivalent and interchangeable.

> ⚠️ **Important**
> If you install with `--user`, make sure your local bin path is in `PATH`, otherwise the commands won't be available.

---

## 🐳 Docker Support (Optional but Recommended)

PyCOMPSs CLI can automatically manage Docker-based execution environments.

### Requirements

- Docker ≥ 17.12.0-ce

---

### 1. Install Docker

Choose your platform:

- 🍎 [Docker for Mac](https://store.docker.com/editions/community/docker-ce-desktop-mac)
  (or via [Homebrew](https://brew.sh/))

- 🐧 [Docker for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1)

- 🐧 [Docker for Arch Linux](https://wiki.archlinux.org/index.php/Docker#Installation)

> Some distributions use `docker-ce` instead of `docker`

---

### 2. Enable non-root usage

Add your user to the Docker group:

👉 <https://docs.docker.com/install/linux/linux-postinstall/>

---

### 3. Verify installation

```bash
docker --version
docker ps
```

Expected: no running containers initially.

---

### 4. Install Python Docker client

```bash
python3 -m pip install docker
```

---

## Example Usage

Check available options:

```bash
pycompss -h
```

Run a PyCOMPSs application:

```bash
pycompss run my_app.py
```

---

## 📖 Documentation

Full usage guide and advanced examples:

👉 <https://compss-doc.readthedocs.io/en/stable/Sections/08_PyCOMPSs_CLI/02_Usage.html>

---

## 🛠️ Development

Clone the repository:

```bash
git clone https://gitlab.bsc.es/wdc/compss/tools/cli.git
cd pycompss-cli
```

Install in development mode:

```bash
./install_editable.sh
```

### 🎨 GUI & Internationalization (i18n)

This project uses a GUI that requires a build process to convert UI files into Python code and to manage translations.

⚠️ Note: To run these scripts, you need pyside6-dev-tools (or equivalent) installed on your system.

#### 1. Update Interface

If you modify any `.ui` files, you must regenerate the corresponding Python files:

```bash
cd scripts
./1_build_py_from_ui.sh
cd ..
```

#### 2. Update Translations

To add new strings or translate the application to other languages, follow this sequential workflow:

1. **Extract strings:** Generate/update translation source files (`.ts`) from the UI:
   ```bash
   cd scripts
   ./2_build_ts_from_ui.sh
   cd ..
   ```
2. **Translate:** Manually check and edit the `.ts` files (using Qt Linguist or a text editor):
   ```bash
   cd scripts
   ./3_manual_ts_check.sh
   cd ..
   ```
3. **Compile:** Convert the edited `.ts` files into binary translation files (`.qm`) that the application can read:
   ```bash
   cd scripts
   ./4_build_qm_from_ts.sh
   cd ..
   ```

---


### 🛡️ Quality Control

We use the following tools to ensure code quality. You can run them locally:

- **Linting & Formatting:** `ruff` and `black`
- **Static Typing:** `mypy`
- **Deep Analysis:** `pylint`
- **Testing:** `pytest`

To run all tests:

```bash
cd scripts
./check.sh
```

---

## 🤝 Contributing

Contributions are welcome!

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Open a Pull Request 🚀

---

## 📄 License

Licensed under the **Apache License 2.0**.

---

## 🏢 About

Developed by:

**Workflows and Distributed Computing Group**
Department of Computer Science
Barcelona Supercomputing Center (BSC)
🌐 <http://www.bsc.es>

---

## ⭐ Support

If you find this project useful:

- ⭐ Star the repository
- 🐛 Report issues
- 💡 Suggest new features

---
