rcabench-platform 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rcabench_platform-0.1.2/.dockerignore +11 -0
- rcabench_platform-0.1.2/.gitattributes +1 -0
- rcabench_platform-0.1.2/.github/dependabot.yml +15 -0
- rcabench_platform-0.1.2/.github/workflows/ci.yml +28 -0
- rcabench_platform-0.1.2/.github/workflows/publish.yml +26 -0
- rcabench_platform-0.1.2/.gitignore +24 -0
- rcabench_platform-0.1.2/.python-version +1 -0
- rcabench_platform-0.1.2/Dockerfile +28 -0
- rcabench_platform-0.1.2/PKG-INFO +115 -0
- rcabench_platform-0.1.2/README.md +95 -0
- rcabench_platform-0.1.2/cli/prepare_inputs.py +392 -0
- rcabench_platform-0.1.2/docker/clickhouse_dataset/Dockerfile +16 -0
- rcabench_platform-0.1.2/docker/clickhouse_dataset/cli.sh +34 -0
- rcabench_platform-0.1.2/docker/clickhouse_dataset/entrypoint.sh +4 -0
- rcabench_platform-0.1.2/docker-compose.yml +15 -0
- rcabench_platform-0.1.2/justfile +20 -0
- rcabench_platform-0.1.2/main.py +7 -0
- rcabench_platform-0.1.2/pyproject.toml +63 -0
- rcabench_platform-0.1.2/scripts/docker.sh +51 -0
- rcabench_platform-0.1.2/src/rcabench_platform/__init__.py +0 -0
- rcabench_platform-0.1.2/src/rcabench_platform/py.typed +0 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/cli/main.py +37 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/cli/rcabench_.py +48 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/cli/self_.py +11 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/clients/k8s.py +85 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/clients/rcabench_.py +59 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/folders.py +14 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/logging.py +68 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/utils/env.py +17 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/utils/fmap.py +80 -0
- rcabench_platform-0.1.2/src/rcabench_platform/v1/utils/serde.py +36 -0
- rcabench_platform-0.1.2/uv.lock +2179 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.ipynb linguist-documentation
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "uv" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "monthly"
|
|
12
|
+
groups:
|
|
13
|
+
dependencies:
|
|
14
|
+
patterns:
|
|
15
|
+
- "*"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- 'feat/**'
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
- 'feat/**'
|
|
12
|
+
schedule:
|
|
13
|
+
- cron: '0 0 * * 0' # at midnight of each sunday
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
develop:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
# - uses: de-vri-es/setup-git-credentials@v2
|
|
21
|
+
# with:
|
|
22
|
+
# credentials: ${{secrets.GH_ACTION_PAT_CREDENTIALS }}
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
- uses: taiki-e/install-action@just
|
|
25
|
+
- uses: astral-sh/setup-uv@v3
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
- run: just ci
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
packages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
pypi:
|
|
15
|
+
name: Publish to PyPI
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
environment:
|
|
18
|
+
name: pypi
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: taiki-e/install-action@just
|
|
22
|
+
- uses: astral-sh/setup-uv@v3
|
|
23
|
+
with:
|
|
24
|
+
enable-cache: true
|
|
25
|
+
- run: uv build
|
|
26
|
+
- run: uv publish --trusted-publishing always
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
.devbox
|
|
12
|
+
|
|
13
|
+
# IDE files
|
|
14
|
+
.vscode/
|
|
15
|
+
.idea/
|
|
16
|
+
|
|
17
|
+
# Project directories
|
|
18
|
+
/.cache
|
|
19
|
+
/data
|
|
20
|
+
/db
|
|
21
|
+
/logs
|
|
22
|
+
/output
|
|
23
|
+
/target
|
|
24
|
+
/temp
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
FROM ubuntu:24.04
|
|
2
|
+
|
|
3
|
+
# https://docs.docker.com/build/cache/optimize/#use-cache-mounts
|
|
4
|
+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
5
|
+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
6
|
+
apt update && apt-get install -y \
|
|
7
|
+
gcc curl wget git just
|
|
8
|
+
|
|
9
|
+
ENV UV_LINK_MODE=copy
|
|
10
|
+
|
|
11
|
+
# https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
|
|
12
|
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
13
|
+
|
|
14
|
+
WORKDIR /app
|
|
15
|
+
|
|
16
|
+
RUN uv python install 3.13
|
|
17
|
+
|
|
18
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
19
|
+
--mount=type=bind,source=uv.lock,target=uv.lock \
|
|
20
|
+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
21
|
+
uv sync --locked --no-install-project
|
|
22
|
+
|
|
23
|
+
ADD . /app
|
|
24
|
+
|
|
25
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
26
|
+
uv sync --locked
|
|
27
|
+
|
|
28
|
+
CMD ["/bin/bash"]
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rcabench-platform
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: An experiment framework for Root Cause Analysis
|
|
5
|
+
Author-email: Nugine <xuyangwang@link.cuhk.edu.cn>
|
|
6
|
+
Requires-Python: >=3.13
|
|
7
|
+
Requires-Dist: clickhouse-connect>=0.8.17
|
|
8
|
+
Requires-Dist: kubernetes>=32.0.1
|
|
9
|
+
Requires-Dist: loguru>=0.7.3
|
|
10
|
+
Requires-Dist: marimo[recommended]>=0.13.10
|
|
11
|
+
Requires-Dist: minio>=7.2.15
|
|
12
|
+
Requires-Dist: mysql-connector-python>=9.3.0
|
|
13
|
+
Requires-Dist: pandas>=2.2.3
|
|
14
|
+
Requires-Dist: pyarrow>=20.0.0
|
|
15
|
+
Requires-Dist: rcabench>=0.3.26
|
|
16
|
+
Requires-Dist: requests>=2.32.3
|
|
17
|
+
Requires-Dist: tqdm>=4.67.1
|
|
18
|
+
Requires-Dist: typer>=0.15.4
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# rcabench-platform
|
|
22
|
+
|
|
23
|
+
An experiment framework for Root Cause Analysis (RCA), supporting fast development of RCA algorithms and their evaluation on various datasets.
|
|
24
|
+
|
|
25
|
+
## Development Guide
|
|
26
|
+
|
|
27
|
+
### Requirements
|
|
28
|
+
|
|
29
|
+
#### Operating System
|
|
30
|
+
|
|
31
|
+
This project is primarily developed and tested on Ubuntu 24.04 LTS or later versions. Other Linux distributions and macOS environments should be compatible with minimal configuration adjustments.
|
|
32
|
+
|
|
33
|
+
Windows is not officially supported. While some functionality may work in Windows environments (especially through WSL), we cannot guarantee full compatibility or provide dedicated support.
|
|
34
|
+
|
|
35
|
+
#### Toolchain
|
|
36
|
+
|
|
37
|
+
| Toolchain | Version |
|
|
38
|
+
| :------------------------------------------------: | :-----: |
|
|
39
|
+
| [uv](https://docs.astral.sh/uv) | ^0.7.5 |
|
|
40
|
+
| [just](https://github.com/casey/just) | ^1.21.0 |
|
|
41
|
+
| [Docker Engine](https://docs.docker.com/engine/) | * |
|
|
42
|
+
| [Docker Compose](https://docs.docker.com/compose/) | * |
|
|
43
|
+
|
|
44
|
+
#### IDE
|
|
45
|
+
|
|
46
|
+
Recommended setup
|
|
47
|
+
|
|
48
|
+
+ [Visual Studio Code](https://code.visualstudio.com/) with the following extensions:
|
|
49
|
+
+ [Python Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.python-extension-pack)
|
|
50
|
+
+ [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
51
|
+
+ [Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
|
|
52
|
+
+ [Git Graph](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph)
|
|
53
|
+
+ [Data Wrangler](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.datawrangler)
|
|
54
|
+
|
|
55
|
+
### Git
|
|
56
|
+
|
|
57
|
+
#### Commit Message
|
|
58
|
+
|
|
59
|
+
We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
|
|
60
|
+
|
|
61
|
+
#### Branching Strategy
|
|
62
|
+
|
|
63
|
+
When you are developing a new feature, create a new branch from `main` and name it according to the following convention:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
<your github id>/feat/<feature-name>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This branch prefixed with your github id, is your own working branch. You can force-push to it freely. Do anything you want in this branch.
|
|
70
|
+
|
|
71
|
+
When you are done with the feature, create a pull request to `main` and invite other developers to review your code. If the code is approved, it will be merged into `main`. Then you can start a new branch from `main` and continue your work.
|
|
72
|
+
|
|
73
|
+
The `main` branch is the default branch for this repository. `main` is protected and should not be used for development. Before merging any changes into `main`, ensure that the following conditions are met:
|
|
74
|
+
+ The branch is up to date with `main`.
|
|
75
|
+
+ The branch is free of merge conflicts.
|
|
76
|
+
+ The basic checks passed successfully.
|
|
77
|
+
+ **The changes will not break other developers' workflow.**
|
|
78
|
+
|
|
79
|
+
### Workflow
|
|
80
|
+
|
|
81
|
+
#### Download source code
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
git clone git@github.com:LGU-SE-Internal/rcabench-platform.git
|
|
85
|
+
cd rcabench-platform
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
#### Run basic checks
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
just dev
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If the basic checks pass, then your python environment is correct and ready for development.
|
|
95
|
+
|
|
96
|
+
#### Local development services
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
docker compose up -d
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
docker compose down
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
We have the following localhost services running in the background:
|
|
107
|
+
+ [neo4j](https://neo4j.com/): for graph visualization
|
|
108
|
+
|
|
109
|
+
### Commands
|
|
110
|
+
|
|
111
|
+
Test if the environment is set up correctly by running the following command:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
./main.py self test
|
|
115
|
+
```
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# rcabench-platform
|
|
2
|
+
|
|
3
|
+
An experiment framework for Root Cause Analysis (RCA), supporting fast development of RCA algorithms and their evaluation on various datasets.
|
|
4
|
+
|
|
5
|
+
## Development Guide
|
|
6
|
+
|
|
7
|
+
### Requirements
|
|
8
|
+
|
|
9
|
+
#### Operating System
|
|
10
|
+
|
|
11
|
+
This project is primarily developed and tested on Ubuntu 24.04 LTS or later versions. Other Linux distributions and macOS environments should be compatible with minimal configuration adjustments.
|
|
12
|
+
|
|
13
|
+
Windows is not officially supported. While some functionality may work in Windows environments (especially through WSL), we cannot guarantee full compatibility or provide dedicated support.
|
|
14
|
+
|
|
15
|
+
#### Toolchain
|
|
16
|
+
|
|
17
|
+
| Toolchain | Version |
|
|
18
|
+
| :------------------------------------------------: | :-----: |
|
|
19
|
+
| [uv](https://docs.astral.sh/uv) | ^0.7.5 |
|
|
20
|
+
| [just](https://github.com/casey/just) | ^1.21.0 |
|
|
21
|
+
| [Docker Engine](https://docs.docker.com/engine/) | * |
|
|
22
|
+
| [Docker Compose](https://docs.docker.com/compose/) | * |
|
|
23
|
+
|
|
24
|
+
#### IDE
|
|
25
|
+
|
|
26
|
+
Recommended setup
|
|
27
|
+
|
|
28
|
+
+ [Visual Studio Code](https://code.visualstudio.com/) with the following extensions:
|
|
29
|
+
+ [Python Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.python-extension-pack)
|
|
30
|
+
+ [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
31
|
+
+ [Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
|
|
32
|
+
+ [Git Graph](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph)
|
|
33
|
+
+ [Data Wrangler](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.datawrangler)
|
|
34
|
+
|
|
35
|
+
### Git
|
|
36
|
+
|
|
37
|
+
#### Commit Message
|
|
38
|
+
|
|
39
|
+
We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
|
|
40
|
+
|
|
41
|
+
#### Branching Strategy
|
|
42
|
+
|
|
43
|
+
When you are developing a new feature, create a new branch from `main` and name it according to the following convention:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
<your github id>/feat/<feature-name>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This branch prefixed with your github id, is your own working branch. You can force-push to it freely. Do anything you want in this branch.
|
|
50
|
+
|
|
51
|
+
When you are done with the feature, create a pull request to `main` and invite other developers to review your code. If the code is approved, it will be merged into `main`. Then you can start a new branch from `main` and continue your work.
|
|
52
|
+
|
|
53
|
+
The `main` branch is the default branch for this repository. `main` is protected and should not be used for development. Before merging any changes into `main`, ensure that the following conditions are met:
|
|
54
|
+
+ The branch is up to date with `main`.
|
|
55
|
+
+ The branch is free of merge conflicts.
|
|
56
|
+
+ The basic checks passed successfully.
|
|
57
|
+
+ **The changes will not break other developers' workflow.**
|
|
58
|
+
|
|
59
|
+
### Workflow
|
|
60
|
+
|
|
61
|
+
#### Download source code
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone git@github.com:LGU-SE-Internal/rcabench-platform.git
|
|
65
|
+
cd rcabench-platform
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
#### Run basic checks
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
just dev
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If the basic checks pass, then your python environment is correct and ready for development.
|
|
75
|
+
|
|
76
|
+
#### Local development services
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
docker compose up -d
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
docker compose down
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
We have the following localhost services running in the background:
|
|
87
|
+
+ [neo4j](https://neo4j.com/): for graph visualization
|
|
88
|
+
|
|
89
|
+
### Commands
|
|
90
|
+
|
|
91
|
+
Test if the environment is set up correctly by running the following command:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
./main.py self test
|
|
95
|
+
```
|