Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbette committed May 10, 2024
2 parents e54dd81 + 5f41816 commit b17d302
Show file tree
Hide file tree
Showing 47 changed files with 9,421 additions and 53 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,24 @@ name: Python application

on:
push:
branches: [ master ]
branches:
- '*'
pull_request:
branches: [ master ]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: false
tags: tbarbette/npf:latest

build:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ tests/local

npf.egg-info/
tmp/
.vscode/
.vscode/

venv
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y python3 python3-pip git
COPY . /npf
RUN cd /npf && python3 -m pip install -r /npf/requirements.txt
CMD [""]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ pip3 install --user npf

At run-time, NPF uses SSH and can benefit from usage of sudo and NFS, see the [run-time dependencies](https://npf.readthedocs.io/en/latest/usage.html#run-time-dependencies) in the documentation for more information.

#### With docker ####
We provide a Dockerfile to use npf.

```bash
docker build --tag npf .
docker run -it npf npf-compare ...
```

### Big picture ###
Your *.npf* test file is composed of a serie of sections, as in the example given above. The sections describe the scripts to run, where to run them, what variables should be tested, what are their ranges, configuration parameters such as timeout or graph colors, etc. Each section is described in more details in [the "writing test script" documentation](https://npf.readthedocs.io/en/latest/tests.html).

Expand Down
10 changes: 10 additions & 0 deletions doc/build_graphs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

python3 ./npf-run.py --test integration/filter.npf --graph-size 4 2.5 --graph-filename doc/filter.png
python3 ./npf-run.py 'local:Default' --test doc/example_multiple_result.npf --graph-size 3 2.5 --graph-filename doc/example_multiple_result_default.png --force-retest
python3 ./npf-run.py 'local:Add' --test doc/example_multiple_result.npf --graph-size 3 2.5 --graph-filename doc/example_multiple_result_add.png --config 'result_add={THROUGHPUT}' --force-retest
python3 ./npf-run.py 'local:Append' --test doc/example_multiple_result.npf --graph-size 3 2.5 --graph-filename doc/example_multiple_result_append.png --config 'result_append={THROUGHPUT}' --force-retest
python3 ./npf-run.py local:Namespace --test doc/example_namespaces.npf --graph-size 4 2.5 --graph-filename doc/example_namespaces.svg
python3 ./npf-run.py 'local:Namespace (synced)' --test doc/example_namespaces.npf --graph-size 4 2.5 --graph-filename doc/example_namespaces_synced.svg --config 'var_sync={TIME}'
4 changes: 4 additions & 0 deletions doc/example_multiple_result.npf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
%script
echo "RESULT-THROUGHPUT 6"
echo "RESULT-THROUGHPUT 10"
echo "RESULT-THROUGHPUT 26"
Binary file added doc/example_multiple_result_add-THROUGHPUT.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 added doc/example_multiple_result_append-THROUGHPUT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b17d302

Please sign in to comment.