Skip to content

Commit

Permalink
Merge pull request #4 from mtdhuynh/docs
Browse files Browse the repository at this point in the history
Release UNIQUE v0.2.0
  • Loading branch information
gscebba authored Sep 25, 2024
2 parents 2aa8aab + 0e905b6 commit 5abdc99
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 27 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Simple workflow for deploying static content to GitHub Pages
name: UNIQUE Build

on:
# Runs on pushes targeting the default branches
push:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "package-build"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
build-package:
name: Build distribution 📦
runs-on: ubuntu-latest

# Steps to run to correctly build pypi package
steps:
# Check out repo
- name: Checkout repository contents
uses: actions/checkout@v4
# Install correct Python version in VM
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ">=3.8 <=3.12.1"
# Install flit and build binary wheel/source tarball
- name: Install flit
run: python3 -m pip install flit --user
- name: Build package with flit
run: flit build
# Store distribution packages
- name: Store distribution packages
uses: actions/upload-artifact@v4
with:
name: unique-package-distributions
path: dist/

# PyPI
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build-package
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/unique-uncertainty
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: unique-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

# TestPyPI
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build-package
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/unique-uncertainty

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: unique-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
<figcaption align=center><u><b>UN</b></u>certa<u><b>I</b></u>nty <u><b>QU</b></u>antification b<u><b>E</b></u>nchmark: a Python library for benchmarking uncertainty estimation and quantification methods for Machine Learning models predictions.</figcaption>
</figure>

![Python](https://img.shields.io/badge/Python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12.1-blue)
![version](https://img.shields.io/badge/Version-v0.1.1-green)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-red.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Python](https://img.shields.io/pypi/pyversions/unique-uncertainty?label=Python)](https://pypi.org/project/unique-uncertainty/)
[![version](https://img.shields.io/pypi/v/unique-uncertainty?color=green&label=PyPI)](https://pypi.org/project/unique-uncertainty/)
[![PyPI downloads](https://img.shields.io/pypi/dm/unique-uncertainty?label=Downloads)](https://pypi.org/project/unique-uncertainty/)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-red)](https://opensource.org/licenses/BSD-3-Clause)
[![chemRxiv](https://img.shields.io/badge/chemRxiv-10.26434%2Fchemrxiv--2024--fmbgk-yellow)](https://doi.org/10.26434/chemrxiv-2024-fmbgk)
[![Docs](https://github.com/Novartis/UNIQUE/actions/workflows/docs.yml/badge.svg?branch=main)](https://opensource.nibr.com/UNIQUE/)
[![Build](https://github.com/Novartis/UNIQUE/actions/workflows/build.yml/badge.svg?branch=main)](https://pypi.org/project/unique-uncertainty/)


## Introduction
Expand All @@ -23,20 +26,23 @@

## Installation

![Python](https://img.shields.io/badge/Python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12.1-blue)
[![Python](https://img.shields.io/pypi/pyversions/unique-uncertainty?label=Python)](https://pypi.org/project/unique-uncertainty/)
[![version](https://img.shields.io/pypi/v/unique-uncertainty?color=green&label=PyPI)](https://pypi.org/project/unique-uncertainty/)
[![PyPI downloads](https://img.shields.io/pypi/dm/unique-uncertainty?label=Downloads)](https://pypi.org/project/unique-uncertainty/)
[![Build](https://github.com/Novartis/UNIQUE/actions/workflows/build.yml/badge.svg?branch=main)](https://pypi.org/project/unique-uncertainty/)

`UNIQUE` is currently compatible with Python 3.8 through 3.12.1. To install the latest release and use the package as is, run the following in a compatible environment of choice:

```bash
pip install git+https://github.com/Novartis/UNIQUE.git
pip install unique-uncertainty
```

Check out the docs for more installation instructions.
Check out the [docs](https://opensource.nibr.com/UNIQUE/installation.html#installation) for more installation instructions.


## Getting Started

Check out the docs for a complete set of instructions on how to prepare your data and the possible configurations offered by `UNIQUE`.
Check out the [docs](https://opensource.nibr.com/UNIQUE/getting_started/index.html#getting-started) for a complete set of instructions on how to prepare your data and the possible configurations offered by `UNIQUE`.


## Usage
Expand Down Expand Up @@ -64,12 +70,12 @@ Additionally, `UNIQUE` also generates graphical outputs in the form of tables an

### Examples

For more hands-on examples and detailed usage, check out some of the examples in the docs.
For more hands-on examples and detailed usage, check out some of the examples in the [docs](https://opensource.nibr.com/UNIQUE/examples/index.html#examples).


## Deep Dive

Check out the docs for an in-depth overview of `UNIQUE`'s concepts, functionalities, outputs, and references.
Check out the [docs](https://opensource.nibr.com/UNIQUE/indepth/index.html#deep-dive) for an in-depth overview of `UNIQUE`'s concepts, functionalities, outputs, and references.


## Contributing
Expand Down
Binary file modified docs/source/_static/error_model_schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/schema_high_level.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/schema_low_level.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
copyright = "2024, Novartis Pharma AG"
author = "Novartis Pharma AG"
# author = 'Minh Tam Davide Huynh, Gaetano Scebba, Jessica Lanini, Raquel Rodriguez-Perez'
version = str(unique.__version__)

version_badge_url = f"https://img.shields.io/badge/Version-v{version}-green"
version_badge_url = (
"https://img.shields.io/pypi/v/unique-uncertainty?label=PyPI&color=green"
)

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down Expand Up @@ -50,8 +51,10 @@
myst_heading_anchors = 3

myst_substitutions = {
"version": version,
"python_versions": r"![Python versions](https://img.shields.io/badge/Python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12.1-blue)",
"pypi_build_badge": "[![PyPI build](https://github.com/Novartis/UNIQUE/actions/workflows/build.yml/badge.svg?branch=main)](https://pypi.org/project/unique-uncertainty)",
"pypi_downloads_badge": "[![PyPI downloads](https://img.shields.io/pypi/dm/unique-uncertainty?label=Downloads)](https://pypi.org/project/unique-uncertainty)",
"pypi_version_badge": "[![PyPI version](https://img.shields.io/pypi/v/unique-uncertainty?label=PyPI&color=green)](https://pypi.org/project/unique-uncertainty)",
"python_versions_badge": "![Python versions](https://img.shields.io/pypi/pyversions/unique-uncertainty?label=Python)",
}

source_suffix = {
Expand Down Expand Up @@ -135,8 +138,8 @@
html_theme_options = {
"icon_links": [
{
"name": "Version",
"url": "https://github.com/Novartis/UNIQUE",
"name": "PyPI Version",
"url": "https://pypi.org/project/unique-uncertainty",
"icon": version_badge_url,
"type": "url",
}
Expand All @@ -146,7 +149,7 @@
"image_dark": "_static/unique_logo_dark_blue.png",
},
"repository_branch": "master",
"repository_provider": "bitbucket",
"repository_provider": "github",
"repository_url": "https://github.com/Novartis/UNIQUE",
"path_to_docs": "./docs/source",
"show_navbar_depth": 1,
Expand Down
10 changes: 7 additions & 3 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ myst:
{{description}}
:::
version_badge: "![Version badge](https://img.shields.io/badge/Version-vUNIQUE-green)"
# See: https://github.com/executablebooks/MyST-Parser/issues/279#issuecomment-752948379
license_badge: |
:::{image} https://img.shields.io/badge/License-BSD_3--Clause-red
Expand All @@ -30,6 +29,11 @@ myst:
:alt: Paper's DOI
:target: https://doi.org/10.26434/chemrxiv-2024-fmbgk
:::
docs_badge: |
:::{image} https://github.com/Novartis/UNIQUE/actions/workflows/docs.yml/badge.svg?branch=main
:alt: Documentation build status
:target: https://opensource.nibr.com/UNIQUE/
:::
high_level_schema: |
:::{figure} _static/schema_high_level.png
:alt: UNIQUE High-Level Schema
Expand All @@ -42,7 +46,7 @@ myst:

# Welcome to `UNIQUE`'s documentation!

{{python_versions}} {{version_badge | replace("UNIQUE", version)}} {{license_badge}} {{article_badge}}
{{python_versions_badge}} {{pypi_version_badge}} {{license_badge}} {{article_badge}} {{docs_badge}} {{pypi_build_badge}} {{pypi_downloads_badge}}

{{logo_light}} {{logo_dark}}

Expand All @@ -51,7 +55,7 @@ myst:
`UNIQUE` provides methods for quantifying and evaluating the uncertainty of Machine Learning (ML) models predictions. The library allows to:
* combine and benchmark multiple uncertainty quantification (UQ) methods simultaneously;
* evaluate the goodness of UQ methods against established metrics;
* generate intuitive visualizations to qualitatively assess how well the computed UQ methods represent the actual model uncertainty;
* generate intuiti ve visualizations to qualitatively assess how well the computed UQ methods represent the actual model uncertainty;
* enable the users to get a comprehensive overview of their ML model's performances from an uncertainty quantification perspective.

`UNIQUE` is a model-agnostic tool, meaning that it does not depend on any specific ML model building platform nor provides any ML model training functionality. It only requires the user to input their model's inputs and predictions.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ myst:
---
# Installation

{{python_versions}}
{{python_versions_badge}} {{pypi_version_badge}} {{pypi_downloads_badge}} {{pypi_build_badge}}

`UNIQUE` is currently compatible with Python 3.8 through 3.12.1. To install the latest release and use the package as is, run the following in a compatible environment of choice:

```bash
pip install git+https://github.com/Novartis/UNIQUE.git
pip install unique-uncertainty
```

:::{tip}
Expand Down
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "unique"
name = "unique-uncertainty"
authors = [
{name = "Raquel Rodriguez-Perez"},
{name = "Jessica Lanini"},
Expand All @@ -17,7 +17,6 @@ classifiers = [
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Private :: Do Not Upload",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand All @@ -33,7 +32,7 @@ classifiers = [
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
version = "0.1.1"
version = "0.2.0"
license = {file="LICENSE.md"}
description = "UNIQUE is a Python package for uncertainty quantification and benchmarking of ML models' predictions."
requires-python = ">=3.8,<=3.12.1"
Expand All @@ -57,7 +56,8 @@ dependencies = [
]

[project.urls]
Source = "https://github.com/Novartis/UNIQUE"
Repository = "https://github.com/Novartis/UNIQUE"
Documentation = "https://opensource.nibr.com/UNIQUE"

[project.optional-dependencies]
dev = [
Expand All @@ -81,6 +81,9 @@ dev = [
"tox-conda>=0.10,<=0.10.2",
]

[tool.flit.module]
name = "unique"

[tool.black]
line-length = 88
target-version = ["py38", "py39", "py310", "py311", "py312"]
Expand Down
2 changes: 0 additions & 2 deletions unique/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@
from .pipeline import Pipeline

__all__ = ["Pipeline"]

__version__ = "0.1.1"

0 comments on commit 5abdc99

Please sign in to comment.