Skip to content

Commit bb23763

Browse files
committed
Merge branch 'main' into 412-user-guide-and-api-documentation
2 parents 15c4452 + 2e80e75 commit bb23763

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1103
-1662
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
branches:
77
- main
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
changes:
1115
runs-on: ubuntu-latest

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ jobs:
2424
pre-commit run --all-files end-of-file-fixer
2525
pre-commit run --all-files trailing-whitespace
2626
pre-commit run --all-files typos
27+
pre-commit run --all-files nbstripout

.github/workflows/release.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ jobs:
4545

4646
- name: Build package distributions
4747
run: |
48-
cp --remove-destination LICENSE skore/LICENSE
49-
cp --remove-destination README.md skore/README.md
5048
cd skore
5149
5250
python -m pip install build
@@ -83,6 +81,33 @@ jobs:
8381
with:
8482
verify-metadata: false
8583

84+
- name: Post to slack
85+
continue-on-error: true
86+
uses: slackapi/[email protected]
87+
with:
88+
channel-id: "product-releases"
89+
payload: |
90+
{
91+
"blocks": [
92+
{
93+
"type": "section",
94+
"text": {
95+
"type": "mrkdwn",
96+
"text": ${{ toJSON(github.event.release.html_url) }}
97+
}
98+
},
99+
{
100+
"type": "section",
101+
"text": {
102+
"type": "mrkdwn",
103+
"text": ${{ toJSON(format('>>> {0}', github.event.release.body)) }}
104+
}
105+
}
106+
]
107+
}
108+
env:
109+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
110+
86111
clean:
87112
name: Delete package distributions artifacts
88113
runs-on: ubuntu-latest

.github/workflows/skore.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
fail-fast: true
3838
matrix:
39-
python-version: ['3.11', '3.12']
39+
python-version: ['3.9', '3.10', '3.11', '3.12']
4040
steps:
4141
- uses: actions/checkout@v4
4242
- uses: actions/setup-python@v5
@@ -59,17 +59,13 @@ jobs:
5959
pre-commit run --all-files ruff
6060
6161
# Build
62-
cp --remove-destination ../LICENSE ./LICENSE
63-
cp --remove-destination ../README.md ./README.md
64-
6562
python -m build
6663
6764
# Install
68-
python -m pip install dist/*.whl --no-dependencies
69-
python -m pip install -r requirements.txt -r requirements-test.txt
65+
wheel=(dist/*.whl); python -m pip install "${wheel}[test]"
7066
7167
# Test
72-
python -m pytest
68+
python -m pytest src/ tests/
7369
7470
cleanup:
7571
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ ipython_config.py
8383
# pyenv
8484
# For a library or package, you might want to ignore these files since the code is
8585
# intended to run in multiple environments; otherwise, check them in:
86-
# .python-version
86+
.python-version
8787

8888
# pipenv
8989
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.

.pre-commit-config.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-yaml
66
- id: check-toml
@@ -11,12 +11,18 @@ repos:
1111
- id: trailing-whitespace
1212

1313
- repo: https://github.com/crate-ci/typos
14-
rev: v1.24.6
14+
rev: v1.26.0
1515
hooks:
1616
- id: typos
1717

18+
- repo: https://github.com/kynan/nbstripout
19+
rev: 0.7.1
20+
hooks:
21+
- id: nbstripout
22+
args: [--keep-id]
23+
1824
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.6.5
25+
rev: v0.6.9
2026
hooks:
2127
- id: ruff
2228
files: ^(src|tests)/

CONTRIBUTING.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Bug reports are welcome, especially those reported with [short, self-contained,
1010

1111
### Quick start
1212

13-
You'll need Python>=3.12 to build the backend and Node>=20 to build the skore-ui. Then, you can install dependencies and run the UI with:
13+
You'll need `python >=3.9, <3.13` to build the backend and Node>=20 to build the skore-ui. Then, you can install dependencies and run the UI with:
1414
```sh
15-
make install
15+
make install-skore
1616
make build-skore-ui
1717
make serve-ui
1818
```
@@ -24,19 +24,14 @@ If you want to contribute, please continue with the three other sections.
2424

2525
Install backend dependencies with
2626
```sh
27-
make install
27+
make install-skore
2828
```
2929

3030
You can run the API server with
3131
```sh
3232
make serve-api
3333
```
3434

35-
When dependencies are changed in `pyproject.toml` the lockfiles should be updated via [`pip-compile`](https://github.com/jazzband/pip-tools):
36-
```sh
37-
make pip-compile
38-
```
39-
4035
### skore-ui
4136

4237
Install skore-ui dependencies with

Makefile

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
1-
SKORE_ROOT ?= ".datamander"
2-
3-
pip-compile:
4-
python -m piptools compile --output-file=skore/requirements.txt skore/pyproject.toml
5-
python -m piptools compile --extra=test --output-file=skore/requirements-test.txt skore/pyproject.toml
6-
python -m piptools compile --extra=tools --output-file=skore/requirements-tools.txt skore/pyproject.toml
7-
81
install-skore:
9-
cp LICENSE skore/LICENSE
10-
cp README.md skore/README.md
11-
12-
python -m pip install \
13-
-e skore/ \
14-
-r skore/requirements.txt \
15-
-r skore/requirements-test.txt \
16-
-r skore/requirements-tools.txt
17-
18-
rm skore/LICENSE
19-
rm skore/README.md
20-
2+
python -m pip install -e './skore[test]'
213
pre-commit install
224

235
build-skore-ui:
@@ -35,7 +17,7 @@ build-skore-ui:
3517
mv skore-ui/dist/ skore/src/skore/ui/static
3618

3719
serve-skore-ui:
38-
SKORE_ROOT=$(SKORE_ROOT) python -m uvicorn \
20+
python -m uvicorn \
3921
--factory skore.ui.app:create_app \
4022
--reload --reload-dir skore/src \
4123
--host 0.0.0.0 \

README.md

Lines changed: 59 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,96 @@
1-
# skore
1+
# 👋 Welcome to skore
22

33
![ci](https://github.com/probabl-ai/skore/actions/workflows/ci.yml/badge.svg?event=push)
44
![python](https://img.shields.io/badge/python-3.11%20|%203.12-blue?style=flat&logo=python)
55

6-
## Installation
6+
`skore` allows data scientists to create tracking and visualization from their Python code:
7+
1. Users can store objects of different types: python lists and dictionaries, `numpy` arrays, `scikit-learn` fitted models, `matplotlib`, `altair`, and `plotly` figures, etc. Storing some values over time allows one to perform **tracking** and also to **visualize** them:
8+
2. They can visualize these stored objects on a dashboard. The dashboard is user-friendly: objects can easily be organized.
9+
3. This dashboard can be exported into a HTML file.
710

8-
For now, the only supported method to use skore is from source.
9-
Follow the instructions in [CONTRIBUTING.md](https://github.com/probabl-ai/skore/blob/main/CONTRIBUTING.md#quick-start) to install dependencies and start the UI.
11+
These are only the first features of `skore`'s roadmap.
12+
`skore` is a work in progress and, on the long run, it aims to be an all-inclusive library for data scientists.
13+
Stay tuned!
1014

11-
## Quick start
15+
<p align="center">
16+
<img width="100%" src="https://github.com/sylvaincom/sylvaincom.github.io/blob/master/files/probabl/skore/2024_10_08_skore_demo.gif"/>
17+
</p>
1218

13-
For a complete introductory example, see our [basic usage notebook](https://github.com/probabl-ai/skore/blob/main/examples/basic_usage.ipynb). The resulting skore report has been exported to [this HTML file](https://gist.github.com/augustebaum/6b21dbd7f7d5a584fbf2c1956692574e): download it and open it in your browser to visualize it.
19+
## ⚙️ Installation
20+
21+
You can install `skore` by using `pip`:
22+
```bash
23+
pip install -U skore
24+
```
25+
26+
## 🚀 Quick start
27+
=======
1428

1529
In your shell, run the following to create a project file `project.skore` (the default) in your current working directory:
16-
```sh
17-
python -m skore create
30+
```bash
31+
python -m skore create 'project.skore'
1832
```
1933

20-
Run the following in your Python code to load the project:
34+
Run the following in your Python code (in the same working directory) to load the project, store some objects, delete them, etc:
2135
```python
2236
from skore import load
2337

38+
# load the project
2439
project = load("project.skore")
25-
```
2640

27-
You can save items you need to track in your project:
28-
```python
41+
# save an item you need to track in your project
2942
project.put("my int", 3)
30-
```
3143

32-
You can also get them back:
33-
```python
44+
# get an item's value
3445
project.get("my int")
35-
```
3646

37-
By default, strings are assumed to be Markdown:
38-
```python
47+
# by default, strings are assumed to be Markdown:
3948
project.put("my string", "Hello world!")
40-
```
4149

42-
Note that `put` overwrites previous data
43-
```python
50+
# `put` overwrites previous data
4451
project.put("my string", "Hello again!")
45-
```
4652

47-
You can list all the keys in a project with:
48-
```python
49-
project.list_keys()
50-
```
53+
# list all the keys in a project
54+
print(project.list_item_keys())
5155

52-
You can delete items with:
53-
```python
56+
# delete an item
5457
project.delete_item("my int")
5558
```
5659

57-
Then, in the directory containing your project, run the following command to start the UI locally:
58-
```sh
60+
Then, in the directory containing your project, run the following command in your shell to start the UI locally:
61+
```bash
5962
python -m skore launch project.skore
6063
```
61-
6264
This will automatically open a browser at the UI's location.
65+
In the `Elements` tab on the left, you can visualize the stored items.
66+
Create a new `View`, then you can then add items into this view.
67+
68+
💡 Note that after launching the dashboard, you can keep modifying current items or store new ones, and the dashboard will automatically be refreshed.
69+
70+
👨‍🏫 For a complete introductory example, see our [basic usage notebook](https://github.com/probabl-ai/skore/blob/main/examples/basic_usage.ipynb).
71+
It shows you how to store all types of items: python lists and dictionaries, `numpy` arrays, `scikit-learn` fitted models, `matplotlib`, `altair`, and `plotly` figures, etc.
72+
The resulting `skore` report has been exported to [this HTML file](https://sylvaincom.github.io/files/probabl/skore/basic_usage.html).
73+
74+
## 🔨 Contributing
75+
76+
Thank you for your interest!
77+
See [CONTRIBUTING.md](https://github.com/probabl-ai/skore/blob/main/CONTRIBUTING.md).
6378

79+
## 💬 Where to ask questions
6480

65-
## Roadmap
81+
| Type | Platforms |
82+
|-------------------------------------|----------------------------------|
83+
| 🐛 Bug reports | [GitHub Issue Tracker] |
84+
| ✨ Feature requests and ideas | [GitHub Issue Tracker] & [Discord] |
85+
| 💬 Usage questions, discussions, contributions, etc | [Discord] |
6686

67-
With Skore, you can:
68-
- Store data
69-
- Visualize data
87+
[GitHub Issue Tracker]: https://github.com/probabl-ai/skore/issues
88+
[Discord]: https://discord.gg/scBZerAGwW
7089

71-
In the future, you will be able to:
72-
- Share visualizations of your data
73-
- Extract insights from your data
74-
- Get tips on how to improve your data science code
90+
---
7591

76-
## Contributing
92+
Brought to you by:
7793

78-
See [CONTRIBUTING.md](https://github.com/probabl-ai/skore/blob/main/CONTRIBUTING.md) for more information and to contribute to the evolution of this library.
94+
<a href="https://probabl.ai" target="_blank">
95+
<img width="120" src="https://sylvaincom.github.io/files/probabl/logo_probabl.svg" alt="Probabl logo">
96+
</a>

skore-ui/package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)