Skip to content

Commit b2440f4

Browse files
authored
#220: copy workflows from the template-repository (#342)
* #220: copy workflows from the template-repository * #220: exclude doc directory from the find-trailing-whitespace workflow action * #220: remove trailing whitespaces in 2 files * #220: remove trailing whitespaces from 2 github actions yaml files
1 parent de70663 commit b2440f4

9 files changed

+97
-11
lines changed

.github/workflows/acceptance-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install packages
2727
run: |
2828
apt-get update && apt-get upgrade -y
29-
apt-get install -y git xvfb
29+
apt-get install -y git xvfb
3030
3131
- name: Install requirements
3232
run: |
@@ -77,7 +77,7 @@ jobs:
7777
- name: Install packages
7878
run: |
7979
apt-get update && apt-get upgrade -y
80-
apt-get install -y git xvfb
80+
apt-get install -y git xvfb
8181
8282
- name: Install requirements
8383
run: |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: PR checks (git --check)
2+
3+
on: pull_request
4+
5+
jobs:
6+
check:
7+
name: Run git check
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
ref: ${{ github.event.pull_request.head.sha }}
14+
- name: Fetch base_ref HEAD
15+
run: git fetch --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}}
16+
- name: Display base sha
17+
shell: bash
18+
run: echo "${{ github.event.pull_request.base.sha }}"
19+
- uses: joel-coffman/action-git-diff-check@0.1
20+
with:
21+
revision: ${{ github.event.pull_request.base.sha }}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: PR checks (commit formatting)
2+
3+
on: pull_request
4+
5+
jobs:
6+
check:
7+
name: Check commit message format
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
ref: ${{ github.event.pull_request.head.sha }}
14+
- name: Fetch base_ref HEAD
15+
run: git fetch origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}}
16+
- name: Display base sha
17+
shell: bash
18+
run: echo "${{ github.event.pull_request.base.sha }}"
19+
- uses: DARMA-tasking/check-commit-format@master
20+
with:
21+
revision: ${{ github.event.pull_request.base.sha }}
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: PR checks (PR description format)
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
jobs:
8+
check:
9+
name: Check PR description format
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: DARMA-tasking/check-pr-fixes-issue@master
13+
with:
14+
pr_branch: ${{ github.head_ref }}
15+
pr_title: ${{ github.event.pull_request.title }}
16+
pr_description: ${{ github.event.pull_request.body }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: PR checks (trailing whitespace)
2+
3+
on: pull_request
4+
5+
jobs:
6+
check:
7+
name: Find Trailing Whitespace
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: DARMA-tasking/find-trailing-whitespace@master
12+
with:
13+
exclude: "doc" # ; separated path to exclude
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: PR checks (unsigned commits)
2+
3+
on:
4+
pull_request
5+
6+
jobs:
7+
check:
8+
name: Check if there are any unsigned commits
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: DARMA-tasking/find-unsigned-commits@master
12+
with:
13+
repo_owner: ${{ github.event.repository.owner.login }}
14+
repo_name: ${{ github.event.repository.name }}
15+
pr_number: ${{ github.event.pull_request.number }}

.github/workflows/unit-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install packages
2424
run: |
2525
sudo apt-get update && sudo apt-get upgrade -y
26-
sudo apt-get install -y git xvfb
26+
sudo apt-get install -y git xvfb
2727
2828
- name: Python Setup
2929
uses: actions/setup-python@v2

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Make sure you have all required Pyhon packages installed with:
2323
pip install -r requirements-3.8.txt
2424
```
2525

26-
Requirements are divided into `LBAF dependencies` and `LBAF testing`.
26+
Requirements are divided into `LBAF dependencies` and `LBAF testing`.
2727

2828
`LBAF dependencies` are needed in order to LBAF to work.
2929

@@ -88,7 +88,7 @@ python JSON_data_files_validator.py --dir_path=<project-path>/data/8color-4node
8888

8989
# Optionally one could pass --file_prefix and/or --file_suffix
9090
# When one passes files with given prefix/suffix or both will be validated
91-
# When no prefix and suffix will be given validator will find most common prefix and suffix in the directory
91+
# When no prefix and suffix will be given validator will find most common prefix and suffix in the directory
9292
# and will use them for validation process
9393
python JSON_data_files_validator.py --dir_path=../../data/8color-4node --file_prefix=data --file_suffix=json
9494
```
@@ -109,8 +109,8 @@ VT data Extractor is located in:
109109
* `input_data_dir`: str - path to dir with files to extract e.g. `"../data/<dir-with-files>"`
110110
* `output_data_dir`: str - path to dir where files should be saved e.g. `"../output"` (will be created when doesn't exist)
111111
* `phases_to_extract`: list - list of phases `[int or str]` e.g. `[0, 1, "2-4"]` will extract phases `[0, 1, 2, 3, 4]`
112-
* `file_prefix`: str - data file prefix e.g. if filename is `stats.0.json`, then prefix should be set to "stats"
113-
* `file_suffix`: str - data file suffix e.g. if filename is `stats.0.json`, then suffix should be set to "json"
112+
* `file_prefix`: str - data file prefix e.g. if filename is `stats.0.json`, then prefix should be set to "stats"
113+
* `file_suffix`: str - data file suffix e.g. if filename is `stats.0.json`, then suffix should be set to "json"
114114
* `compressed`: bool - when True, brotli must be imported and then output data will be compressed
115115
* `schema_type`: str - should be `"LBDatafile"` or `"LBStatsfile"` depends on input data. Only `"LBStatsfile"` is supported
116116
* `check_schema`: bool - when True, validates schema (more time-consuming)

src/lbaf/IO/lbsMeshBasedVisualizer.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(
6262
self.__logger.error(
6363
f"Inconsistent quantity of interest maximum: {rank_qoi_max}")
6464
raise SystemExit(1)
65-
65+
6666
# Make sure that Phase instances were passed
6767
if not all([isinstance(p, Phase) for p in phases]):
6868
self.__logger.error(
@@ -103,7 +103,7 @@ def __init__(
103103

104104
# Compute discrete or pseudo-continuous object QOI range
105105
self.__object_qoi_range = self.compute_object_qoi_range(object_qoi)
106-
106+
107107
# Assemble file and path names from constructor parameters
108108
self.__rank_file_name = f"{output_file_stem}_rank_view.e"
109109
self.__object_file_name = f"{output_file_stem}_object_view"
@@ -373,7 +373,7 @@ def create_object_mesh(self, phase: Phase, object_mapping: set):
373373
b_arr.SetTuple1(point_index, m)
374374
if l_arr:
375375
l_arr.SetTuple1(point_index, o.get_load())
376-
376+
377377
# Update sent volumes
378378
for k, v in o.get_sent().items():
379379
sent_volumes.append((point_index, k, v))
@@ -442,7 +442,7 @@ def create_color_transfer_function(attribute_range, scheme=None):
442442
ctf.IndexedLookupOn()
443443
ctf.SetNumberOfIndexedColors(n_colors)
444444
for i, v in enumerate(attribute_range):
445-
ctf.SetAnnotation(v, f"{v}")
445+
ctf.SetAnnotation(v, f"{v}")
446446
ctf.SetIndexedColorRGBA(i, plt.cm.get_cmap("tab20")(i))
447447
ctf.Build()
448448
return ctf

0 commit comments

Comments
 (0)