Skip to content

Commit 270f28d

Browse files
Merge branch 'main' into test-coverage-json
2 parents b7f1185 + 7906d99 commit 270f28d

37 files changed

+6870
-6345
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ we ask contributors to stick to the following guidelines:
4141
7. Use [variable](https://www.python.org/dev/peps/pep-0008/#variable-annotations) and [function](https://www.python.org/dev/peps/pep-0008/#function-annotations)
4242
annotations.
4343
8. All methods should be thoroughly tested with PyTest (see [Testing]() below).
44+
9. Optionally run `autopep8 causal_testing` to prevent linter errors.
45+
10. Optionally run `isort causal_testing` to ensure imports are done in the right order (this will also help prevent linter errors).
46+
11. Format code using `black causal_testing`.
47+
12. Linting code using `pylint causal_testing` is advised.

.github/workflows/lint-format.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Linting and formatting
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.ref }}-${{ github.workflow }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
name: MegaLinter
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v2
19+
20+
- name: MegaLinter
21+
id: ml
22+
uses: oxsecurity/megalinter/flavors/python@v6
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For detailed check status
25+
26+
- name: Archive production artifacts
27+
if: ${{ success() }} || ${{ failure() }}
28+
uses: actions/upload-artifact@v2
29+
with:
30+
name: MegaLinter reports
31+
path: |
32+
megalinter-reports
33+
mega-linter.log

.mega-linter.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Configuration file for MegaLinter
2+
# See all available variables at https://oxsecurity.github.io/megalinter/configuration/ and in linters documentation
3+
4+
ENABLE_LINTERS:
5+
- PYTHON_PYLINT
6+
- PYTHON_BLACK
7+
8+
GITHUB_STATUS_REPORTER: true
9+
10+
FILTER_REGEX_INCLUDE: (causal_testing/)

0 commit comments

Comments
 (0)