Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[flake8]
ignore = E203, E266, W503, C901, E741, F401
max-line-length = 100
max-complexity = 18
select = B,C,E,F,W,T4,B9
extend-exclude = build*

per-file-ignores =
test/python/*.py: F401, F821
26 changes: 26 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: qa

on:
pull_request:
branches:
- main

jobs:
check-flake8:
name: Python linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install flake8

- name: Lint with flake8
run: |
flake8 . --count --show-source --statistics
6 changes: 3 additions & 3 deletions OpenSn_Logo_CAD/opensn.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Append parent directory to locate the pyopensn modules
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../../../")))
from pyopensn.mesh import MeshGenerator, FromFileMeshGenerator
from pyopensn.xs import CreateSimpleOneGroup
from pyopensn.xs import MultiGroupXS, CreateSimpleOneGroup
from pyopensn.source import VolumetricSource
from pyopensn.aquad import GLCProductQuadrature3DXYZ
from pyopensn.solver import DiscreteOrdinatesSolver, SteadyStateSolver
Expand Down Expand Up @@ -58,8 +58,8 @@
}
],
xs_map=[
{ "block_ids": [0], "xs": xs_source },
{ "block_ids": [1], "xs": xs_block },
{"block_ids": [0], "xs": xs_source},
{"block_ids": [1], "xs": xs_block},
],
options={
"scattering_order": 0,
Expand Down