Skip to content

Commit

Permalink
feat: Relase package on PyPI (#126)
Browse files Browse the repository at this point in the history
* build: Update anomalib and smp to point to pypi releases, update torch to avoid using urls

* docs: Fix broken links for public images, update installation to mention pypi

* build: Bump version

* build: Update anomalib version

* build: Upgrade version

* build: Update pipeline to publish on pypi

* build: Revert correct version
  • Loading branch information
lorenzomammana authored Jul 15, 2024
1 parent 1640df6 commit cb1fb4a
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 307 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PyPI release

on:
push:
branches: [main]

defaults:
run:
shell: bash

jobs:
publish-to-pypi:
name: Publish to PyPI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
timeout-minutes: 60
environment:
name: pypi
url: https://pypi.org/p/quadra
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
- name: Build distribution 📦
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
# Changelog
All notable changes to this project will be documented in this file.

### [2.2.1]

#### Updated

- Update anomalib version, improve release workflow

### [2.2.0]

#### Updated

- Update dependencies to support publishing Quadra to PyPI

### [2.1.13]

#### Updated

- Improve safe batch size computation for sklearn based classification tasks

### [2.1.12]
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1></h1>
<p align="center">
<img src="docs/images/quadra_text_logo.png" alt="Quadra Logo" width="100%">
<img src="https://github.com/orobix/quadra/raw/main/docs/images/quadra_text_logo.png" alt="Quadra Logo" width="100%">
</p>

<p align="center">
Expand All @@ -20,7 +20,7 @@
alt="pre-commit"
/></a>
<a href="https://github.com/econchick/interrogate"><img
src="docs/images/interrogate_badge.svg"
src="https://github.com/orobix/quadra/raw/main/docs/images/interrogate_badge.svg"
alt="interrogate"
/></a>
<a href="https://github.com/PyCQA/pylint"><img
Expand All @@ -42,16 +42,14 @@ ______________________________________________________________________

## Quick Start Guide

Currently we support installing from source since the library is not yet available on `PyPI` and currently supported Python versions are `3.9` and `3.10`.

If you use pip to manage your packages, you can install `quadra` from source by running the following command:
If you use pip to manage your packages, you can install `quadra` from PyPi by running the following command:
```shell
pip install git+https://github.com/orobix/quadra.git
pip install quadra
```

If instead you prefer to use poetry, you can install `quadra` from source by running the following command:
If instead you prefer to use poetry, you can install `quadra` from PyPi by running the following command:
```shell
poetry add git+https://github.com/orobix/quadra.git
poetry add quadra
```

If you don't have virtual environment ready, Let's set up our environment for using the `quadra` library. We have two parts in this guide: Common setup and Environment-specific setup.
Expand Down Expand Up @@ -92,13 +90,13 @@ source myenv/bin/activate

* **Install the `quadra` package** with pip:
```shell
pip install git+https://github.com/orobix/quadra.git
pip install quadra
```

* **Install the `quadra` package** with poetry:
```shell
curl -sSL https://install.python-poetry.org | python3 -
poetry add git+https://github.com/orobix/quadra.git
poetry add quadra
```

4. **Run from CLI**:
Expand Down
Loading

0 comments on commit cb1fb4a

Please sign in to comment.