Skip to content

Commit a30f915

Browse files
Update README.md to install package via PyPI (#38)
* Add PyPI package information to `README.md` - Update Installation instructions to install the package directly from PyPI. - Add PyPI badge. * Bump project version to `1.2.1`
1 parent c1dc46c commit a30f915

File tree

2 files changed

+26
-42
lines changed

2 files changed

+26
-42
lines changed

README.md

Lines changed: 25 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<div align="center">
44

5+
[![PyPi](https://img.shields.io/pypi/v/direct-data-driven-mpc)](https://pypi.org/project/direct-data-driven-mpc)
56
[![GitHub Actions status](https://github.com/pavelacamposp/direct-data-driven-mpc/actions/workflows/ci_workflow.yml/badge.svg)](https://github.com/pavelacamposp/direct-data-driven-mpc/actions/workflows/ci_workflow.yml)
67
[![codecov](https://codecov.io/gh/pavelacamposp/direct-data-driven-mpc/graph/badge.svg)](https://codecov.io/gh/pavelacamposp/direct-data-driven-mpc)
78
[![Ruff](https://img.shields.io/badge/Lint%20%26%20Format-Ruff-blue?logo=ruff&logoColor=white)](https://github.com/astral-sh/ruff)
@@ -66,53 +67,36 @@ This package requires the following:
6667
```
6768

6869
## Installation
69-
Follow these steps to create a virtual environment and install this package:
70+
Install `direct-data-driven-mpc` via PyPI:
71+
```bash
72+
pip install direct-data-driven-mpc
73+
```
74+
**Note:** We recommend using a virtual environment to install this package, although it is not required.
7075

71-
> [!NOTE]
72-
> On some Unix-based systems (like Ubuntu/Debian), you may need to install `venv` manually if it's not included with Python:
73-
> - **On Ubuntu/Debian**: `sudo apt install python3-venv`
74-
> - **On macOS** and **Windows**: `venv` should be included with Python 3 by default. Make sure to check if Python is installed correctly.
75-
76-
1. Clone this repository.
77-
```bash
78-
git clone https://github.com/pavelacamposp/direct-data-driven-mpc.git
79-
```
80-
2. Navigate to the project directory:
81-
```bash
82-
cd direct-data-driven-mpc
83-
```
84-
3. Create a virtual environment in the project directory:
85-
- Unix/macOS:
86-
```bash
87-
python3 -m venv .venv
88-
```
89-
- Windows:
90-
```cmd
91-
python -m venv venv
92-
```
93-
4. Activate the virtual environment:
76+
### For Contributors:
77+
If you plan to contribute to or develop the project, follow these steps to set up a local development environment:
78+
1. Clone the repository and navigate to the project directory:
79+
```bash
80+
git clone https://github.com/pavelacamposp/direct-data-driven-mpc.git && cd direct-data-driven-mpc
81+
```
82+
2. Create and activate a virtual environment:
9483
- Unix/macOS:
95-
```bash
96-
source .venv/bin/activate
97-
```
84+
```bash
85+
python3 -m venv .venv && source .venv/bin/activate
86+
```
9887
- Windows:
99-
```cmd
100-
venv\Scripts\activate
101-
```
102-
5. Install `direct-data-driven-mpc` (Data-Driven MPC controller package):
88+
```cmd
89+
python -m venv venv && venv\Scripts\activate
90+
```
91+
3. Install the package with development dependencies:
10392
```bash
104-
pip install -e .
93+
pip install -e ".[dev]"
10594
```
10695

107-
> [!NOTE]
108-
> If you plan to contribute to or develop the project, you can install optional development dependencies by running:
109-
> ```bash
110-
> pip install -e ".[dev]"
111-
> ```
112-
> This will install tools like `pre-commit` and `mypy`. To enable automatic checks before each commit using `pre-commit` hooks, run:
113-
> ```bash
114-
> pre-commit install
115-
> ```
96+
This will install tools like `pre-commit` and `mypy`. To enable automatic checks before each commit using `pre-commit` hooks, run:
97+
```bash
98+
pre-commit install
99+
```
116100

117101
## Usage
118102
The example scripts [`lti_dd_mpc_example.py`](examples/lti_control/lti_dd_mpc_example.py) and [`nonlinear_dd_mpc_example.py`](examples/nonlinear_control/nonlinear_dd_mpc_example.py) demonstrate the setup, simulation, and data visualization of the Data-Driven MPC controllers applied to LTI and Nonlinear systems, respectively.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "direct-data-driven-mpc"
7-
version = "1.2.0"
7+
version = "1.2.1"
88
authors = [
99
{ name = "Pável A. Campos-Peña", email = "pcamposp@uni.pe" }
1010
]

0 commit comments

Comments
 (0)