Skip to content

Commit ed4361d

Browse files
authored
Merge pull request #445 from DARMA-tasking/develop
Update master from develop
2 parents 99a929f + e38ea38 commit ed4361d

File tree

787 files changed

+101597
-5927
lines changed

Some content is hidden

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

787 files changed

+101597
-5927
lines changed

.env

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
REPO=lifflander1/lbaf
2+
BASE=python:3.8-slim-buster
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@v3
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 }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish Python package to PyPi
2+
on: push
3+
jobs:
4+
build-n-publish:
5+
name: Build and publish Python Package to PyPi
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Set up Python 3.8
10+
uses: actions/setup-python@v4
11+
with:
12+
python-version: 3.8
13+
- name: Install build
14+
run: |
15+
python -m pip install build --user
16+
- name: Build a binary wheel and a source tarball
17+
run: |
18+
python -m build --sdist --wheel --outdir dist/ .
19+
- name: Publish package
20+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
21+
uses: pypa/gh-action-pypi-publish@release/v1
22+
with:
23+
user: __token__
24+
password: ${{ secrets.PYPI_API_TOKEN }}
25+
verbose: true
26+
print-hash: true
+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@v3
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 }}

.github/workflows/code-quality.yml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Code Quality (Tests, Linting, Coverage)
2+
on: push
3+
concurrency:
4+
group: CI-${{ github.head_ref }}
5+
cancel-in-progress: true
6+
7+
jobs:
8+
code-quality:
9+
continue-on-error: false
10+
strategy:
11+
max-parallel: 10
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest]
15+
python-version: ['3.8', '3.9']
16+
runs-on: ${{ matrix.os }}
17+
env:
18+
deploy_badges_src_branch: develop
19+
deploy_badges_dst_branch: deploy-badges
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Install packages
24+
run: |
25+
sudo apt-get update -y
26+
sudo apt-get install -y git xvfb
27+
28+
- name: Python Setup
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r requirements.txt
37+
pip install tox-gh-actions
38+
39+
- name: Register Github Actions Problem matchers (pylint)
40+
run: |
41+
echo "::add-matcher::.github/workflows/matchers/pylint.json"
42+
43+
- name: Running Tests, Pylint and Coverage using TOX
44+
id: run_tox
45+
run: |
46+
tox
47+
if [ -e "./artifacts/pylint.txt" ]; then PYLINT_REPORT_EXISTS="true"; else PYLINT_REPORT_EXISTS="false"; fi
48+
echo "pylint_report_exists=$PYLINT_REPORT_EXISTS" >> $GITHUB_OUTPUT
49+
if [ -e "./artifacts/coverage.txt" ]; then COVERAGE_REPORT_EXISTS="true"; else COVERAGE_REPORT_EXISTS="false"; fi
50+
echo "coverage_report_exists=$COVERAGE_REPORT_EXISTS" >> $GITHUB_OUTPUT
51+
52+
- name: Report Test results
53+
uses: phoenix-actions/test-reporting@v12
54+
if: success() || failure()
55+
with:
56+
name: Tests report (${{ matrix.os }}, ${{ matrix.python-version }})
57+
path: artifacts/unittest/reports/TEST-*.xml
58+
reporter: java-junit
59+
output-to: step-summary
60+
61+
- name: Upload pylint artifact
62+
if: |
63+
steps.run_tox.outputs.pylint_report_exists == 'true'
64+
uses: actions/upload-artifact@v3
65+
with:
66+
name: pylint
67+
path: artifacts/pylint.txt
68+
retention-days: 1
69+
70+
- name: Upload coverage artifact
71+
if: |
72+
steps.run_tox.outputs.coverage_report_exists == 'true'
73+
uses: actions/upload-artifact@v3
74+
with:
75+
name: coverage
76+
path: artifacts/coverage.txt
77+
retention-days: 1
78+
79+
- name: Create Pylint badge
80+
if: |
81+
github.ref_name == env.deploy_badges_src_branch &&
82+
steps.run_tox.outputs.pylint_report_exists == 'true'
83+
run: |
84+
mkdir -p badges
85+
PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' ./artifacts/pylint.txt)
86+
anybadge --label=Pylint --file=badges/pylint.svg --value=$PYLINT_SCORE 2=red 4=orange 8=yellow 10=green
87+
88+
- name: Create Coverage badge
89+
if: |
90+
github.ref_name == env.deploy_badges_src_branch &&
91+
steps.run_tox.outputs.coverage_report_exists == 'true'
92+
run: |
93+
mkdir -p badges
94+
COVERAGE_SCORE=$(sed -n '/TOTAL/,/%/p' artifacts/coverage.txt | rev | cut -d" " -f1 | rev | tr -d % )
95+
anybadge --label=Coverage --file=badges/coverage.svg --value=$COVERAGE_SCORE coverage
96+
97+
- name: Deploy badges
98+
uses: JamesIves/github-pages-deploy-action@v4
99+
if: github.ref_name == env.deploy_badges_src_branch &&
100+
(steps.run_tox.outputs.coverage_report_exists == 'true' || steps.run_tox.outputs.pylint_report_exists == 'true')
101+
with:
102+
branch: ${{ env.deploy_badges_dst_branch }}
103+
folder: ./badges
104+
clean: false
105+
commit-message: ${{ github.event.head_commit.message }}

.github/workflows/deploy_docs.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches: [ '297-add-automated-generated-documentation-from-LBAF' ]
6+
7+
jobs:
8+
build-and-deploy-docs:
9+
runs-on: ubuntu-latest
10+
env:
11+
project-directory: /home/runner/work/LB-analysis-framework/LB-analysis-framework
12+
docs-directory: /home/runner/work/LB-analysis-framework/LB-analysis-framework/docs
13+
docs-output: /home/runner/work/LB-analysis-framework/LB-analysis-framework/docs/output
14+
docs-generator: /home/runner/work/LB-analysis-framework/LB-analysis-framework/m.css/documentation
15+
python-version: '3.8'
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python ${{ env.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ env.python-version }}
23+
architecture: 'x64'
24+
- name: Install Python dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip3 install docutils jinja2 pygments
29+
- name: Clone documentation generator
30+
working-directory: ${{ env.project-directory }}
31+
run: |
32+
git clone https://github.com/mosra/m.css.git
33+
- name: Build documentation
34+
working-directory: ${{ env.docs-generator }}
35+
run: |
36+
python python.py ${{ env.docs-directory }}/docs_config.py
37+
# .nojekyll file is needed for GitHub Pages to know it's getting a ready webpage
38+
# and there is no need to generate anything
39+
- name: Generate nojekyll file
40+
working-directory: ${{ env.docs-output }}
41+
run: touch .nojekyll
42+
# This action moves the content of `generated_docs` to the `deploy-doc-site` branch
43+
- name: Deploy docs
44+
uses: JamesIves/github-pages-deploy-action@v4
45+
with:
46+
branch: deploy-doc-site
47+
folder: ${{ env.docs-output }}
48+
clean: true
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@v3
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 }}
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "pylint-error",
5+
"severity": "error",
6+
"pattern": [
7+
{
8+
"regexp": "^(.+):(\\d+):(\\d+):\\s([FE]\\d{4}):\\s(.+)$",
9+
"file": 1,
10+
"line": 2,
11+
"column": 3,
12+
"message": 5,
13+
"code": 4
14+
}
15+
]
16+
},
17+
{
18+
"owner": "pylint-warning",
19+
"severity": "warning",
20+
"pattern": [
21+
{
22+
"regexp": "^(.+):(\\d+):(\\d+):\\s([W]\\d{4}):\\s(.+)$",
23+
"file": 1,
24+
"line": 2,
25+
"column": 3,
26+
"message": 5,
27+
"code": 4
28+
}
29+
]
30+
},
31+
{
32+
"owner": "pylint-notice",
33+
"severity": "notice",
34+
"pattern": [
35+
{
36+
"regexp": "^(.+):(\\d+):(\\d+):\\s([CR]\\d{4}):\\s(.+)$",
37+
"file": 1,
38+
"line": 2,
39+
"column": 3,
40+
"message": 5,
41+
"code": 4
42+
}
43+
]
44+
}
45+
]
46+
}

.gitignore

+19-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
*.pyc
1+
__pycache__
2+
*.egg-info
3+
*.pyc
4+
.coverage
5+
.env
6+
.pytest_cache
7+
.tox
8+
/.idea
9+
/artifacts
10+
/build
11+
/dist
12+
/m.css
13+
/venv*
14+
output
15+
/src/Applications/Include
16+
/src/Applications/Lib
17+
/src/Applications/Scripts
18+
/src/Applications/tcl
19+
/src/lbaf/imported

0 commit comments

Comments
 (0)