Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
.git
__pycache__
cscs-checks
external
Jenkinsfile*
*.md
*.log

# Virtual environments
venv*
.venv*
ENV/
uv.lock

# ReFrame files
stage/
output/
perflogs/
1 change: 1 addition & 0 deletions .github/pseudo-cluster/reframe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause

FROM ubuntu:22.04
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
7 changes: 3 additions & 4 deletions .github/pseudo-cluster/reframe/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ sudo service munge start
# Needs to be copied in the shared home directory
cp -r /usr/local/share/reframe .
cd reframe
./bootstrap.sh
pip install coverage
uv sync --group dev
source $HOME/.profile

echo "Running unittests with backend scheduler: ${BACKEND}"

tempdir=$(mktemp -d -p /scratch)
TMPDIR=$tempdir coverage run --source=reframe ./test_reframe.py \
TMPDIR=$tempdir uv run coverage run --source=reframe ./test_reframe.py \
--rfm-user-config=ci-scripts/configs/ci-cluster.py \
--rfm-user-system=pseudo-cluster:compute-${BACKEND:-squeue}
coverage xml -o coverage.xml
uv run coverage xml -o coverage.xml
35 changes: 18 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -16,20 +16,20 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
./bootstrap.sh
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --group dev
- name: Generic Unittests
run: |
pip install coverage
coverage run --source=reframe ./test_reframe.py
coverage xml -o coverage.xml
uv run coverage run --source=reframe ./test_reframe.py
uv run coverage xml -o coverage.xml
- name: Upload coverage reports
uses: codecov/codecov-action@v4.2.0

unittest-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -38,12 +38,12 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
./bootstrap.sh
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --group dev
- name: Generic Unittests
run: |
pip install coverage
coverage run --source=reframe ./test_reframe.py
coverage xml -o coverage.xml
uv run coverage run --source=reframe ./test_reframe.py
uv run coverage xml -o coverage.xml
- name: Upload coverage reports
uses: codecov/codecov-action@v4.2.0

Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Setup up Python ${{ matrix.python-version }}
Expand All @@ -115,11 +115,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Generate Wheel
run: |
python -m pip install --upgrade pip setuptools build
python -m build
curl -LsSf https://astral.sh/uv/install.sh | sh
uv build
- name: Install Wheel
run: |
python -m pip install dist/*.whl
uv tool install dist/*.whl
- name: Test Installation
run: |
reframe -V
Expand All @@ -129,7 +129,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -138,7 +138,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Doc Requirements
run: |
python -m pip install -r docs/requirements.txt
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --group docs
- name: Build documentation
run: |
make -C docs
uv run make -C docs
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup up Python 3.13
- name: Setup up Python 3.14
uses: actions/setup-python@v5
with:
python-version: 3.13
python-version: 3.14
- name: Generate dist packages
run: |
python -m pip install --upgrade pip setuptools build
python -m build
uv build
- name: Publish ReFrame to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/test-flux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Reframe
# Flux Python bindings are installed in the container; we need to create
# and include them in the venv, because the simple `uv run` command runs
# in an isolated venv
- name: Install ReFrame
run: |
apt-get update && apt-get install -y python3-pip
./bootstrap.sh
export PATH=$PWD/bin:$PATH
which reframe
apt-get update && apt-get install -y curl
curl -LsSf https://astral.sh/uv/install.sh | sh
. $HOME/.local/bin/env
uv venv --system-site-packages
. .venv/bin/activate
uv sync --group dev

# Any additional examples added here will be tested
- name: Start Flux and Run Test
run: |
export PATH=$PWD/bin:$PATH
which reframe
flux start reframe -c examples/howto/flux -C examples/howto/flux/settings.py -l
flux start reframe -c examples/howto/flux -C examples/howto/flux/settings.py -r
flux start coverage run --source=reframe ./test_reframe.py --rfm-user-config=examples/howto/flux/settings.py
coverage xml -o coverage.xml
# export PATH=$PWD/bin:$PATH
flux start uv run reframe -c examples/howto/flux -C examples/howto/flux/settings.py -l
flux start uv run reframe -c examples/howto/flux -C examples/howto/flux/settings.py -r
flux start uv run coverage run --source=reframe ./test_reframe.py --rfm-user-config=examples/howto/flux/settings.py
uv run coverage xml -o coverage.xml
- name: Upload coverage reports
uses: codecov/codecov-action@v4.2.0
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ celerybeat-schedule
.env

# virtualenv
venv/
venv*
.venv*
ENV/

# Spyder project settings
Expand Down
94 changes: 75 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[![DOI](https://zenodo.org/badge/89384186.svg)](https://zenodo.org/badge/latestdoi/89384186)<br/>
[![Twitter Follow](https://img.shields.io/twitter/follow/ReFrameHPC?style=social)](https://twitter.com/ReFrameHPC)

# ReFrame in a Nutshell
# Overview

ReFrame is a powerful framework for writing system regression tests and benchmarks, specifically targeted to HPC systems.
The goal of the framework is to abstract away the complexity of the interactions with the system, separating the logic of a test from the low-level details, which pertain to the system configuration and setup.
Expand All @@ -36,50 +36,106 @@ Please visit the project's documentation [page](https://reframe-hpc.readthedocs.

## Installation

ReFrame is fairly easy to install.
All you need is Python 3.6 or above and to run its bootstrap script:
ReFrame is fairly easy to install as PyPI package.

```bash
git clone https://github.com/reframe-hpc/reframe.git
cd reframe
./bootstrap.sh
./bin/reframe -V
# Fetch uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install ReFrame
uv tool install reframe-hpc

# Check the installation
reframe -V
```

This will place the `reframe` executable under `$HOME/.local/bin` and the package under `$HOME/.local/share/uv/tools/reframe-hpc`.
To make available the manpage and the shell completions add the following lines in your shell's profile script:

### Bash/Zsh

Add the following lines to your `$HOME/.profile`:

```bash
export MANPATH=${HOME}/.local/share/uv/tools/reframe-hpc/share/man:${MANPATH}:
source ${HOME}/.local/share/uv/tools/reframe-hpc/share/bash-completion/completions/reframe
```

### Fish

Add the following lines to your `$HOME/.config/fish/config.fish`:

```bash
set -apgx MANPATH ${HOME}/.local/share/uv/tools/reframe-hpc/share/man ""
source ${HOME}/.local/share/uv/tools/reframe-hpc/share/fish/vendor_completions.d/reframe.fish
```

> NOTE: Using `uv` is not required to install ReFrame.
> You can use any modern Python build system that recognizes the `pyproject.toml` file.

### Multi-architecture installations on shared filesystem

If you plan to install ReFrame for multiple platforms in a shared installation, you should make sure each installation resides in a different prefix.
You can achieve this with `uv` as follows:

```bash
export UV_TOOL_BIN_DIR=$HOME/.local/$(uname -m)/bin
export UV_TOOL_DIR=$HOME/.local/$(uname -m)/share/uv/tools
uv tool install reframe-hpc
export PATH=$UV_TOOL_BIN_DIR:$PATH
reframe -V
```

Alternatively, you can use ephemeral venvs and let `uv` handle them with `uvx`:

```bash
uvx reframe --version
```

If you want a specific release, please refer to the documentation [page](https://reframe-hpc.readthedocs.io/en/stable/started.html).
This will pull ReFrame's dependencies and run it.
It also caches them, so that the next time you invoke it, it will not download and install them again.
The only "downside" of this method is that you have to always invoke ReFrame through `uvx`, as opposed to the `uv tool install` method, where the `reframe` execcutable is installed in a standard path.


## Running from source

If you want to run the latest ReFrame directly from the repo, you can simply clone the repo and `uv run` ReFrame:

```bash
git clone https://github.com/reframe-hpc/reframe.git
cd reframe
uv run reframe --version
```

### Running the unit tests

You can optionally run the framework's unit tests with the following command:
To run the the framework's unit tests use the following command:

```bash
./test_reframe.py -v
uv sync --group dev
uv run ./test_reframe.py -v
```

NOTE: Unit tests require a POSIX-compliant C compiler (available through the `cc` command), as well as the `make` utility.
> NOTE: Unit tests require a POSIX-compliant C compiler (available through the `cc` command), as well as the `make` utility.

### Building the documentation locally

You may build the documentation of the master manually as follows:
You may also build the documentation locally:

```
./bootstrap.sh +docs
```bash
uv sync --group docs
uv run make -C docs
```

For viewing it, you may do the following:

```
```bash
cd docs/html
python3 -m http.server
```

The documentation is now up on [localhost:8000](http://localhost:8000), where you can navigate with your browser.

## Test library

The framework comes with an experimental library of tests that users can either run from the command line directly or extend and fine tune them for their systems. See [here](https://reframe-hpc.readthedocs.io/en/stable/hpctestlib.html) for more details.

## Public test repositories

The ReFrame HPC [community Github page](https://github.com/reframe-hpc) provides mirror forks of interesting ReFrame test repositories maintained by various sites or projects.
Expand Down
23 changes: 0 additions & 23 deletions bin/reframe

This file was deleted.

Loading
Loading