-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More CI (mypy, coverage), setup pre-commit, formatting (#24)
* add pre-commit config file * clang format tweaks * run black * ci: add mypy gha workflow * add pre-commit note in README * fix mypy gha job * fix trailing whitespace * configure mypy * use micromamba gha for tests * fix tests gha * typo * enable coverage * try fix codecov upload * add coverage badge in README
- Loading branch information
Showing
14 changed files
with
239 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
--- | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
ColumnLimit: 100 | ||
TabWidth: 4 | ||
IndentWidth: 4 | ||
PointerAlignment: Left | ||
ReferenceAlignment: Pointer | ||
IndentAccessModifiers: false | ||
AccessModifierOffset: -4 | ||
BinPackArguments: false | ||
BinPackParameters: false | ||
ExperimentalAutoDetectBinPacking: false | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortLambdasOnASingleLine: Inline | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
name: Lint | ||
|
||
jobs: | ||
lint: | ||
name: mypy | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup micromamba | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
environment-file: ci/environment.yml | ||
environment-name: spherely-dev | ||
extra-specs: | | ||
python=3.11 | ||
- name: Build and install spherely | ||
run: | | ||
python -m pip install . -v --no-build-isolation | ||
- name: Install mypy | ||
run: | | ||
python -m pip install 'mypy<0.990' | ||
- name: Run mypy | ||
run: | | ||
python -m mypy --install-types --non-interactive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: mixed-line-ending | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
args: [--safe, --quiet] | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v15.0.7 | ||
hooks: | ||
- id: clang-format | ||
args: [--style=file] | ||
|
||
ci: | ||
autofix_prs: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,4 +54,4 @@ Predicates | |
intersects | ||
contains | ||
within | ||
disjoint | ||
disjoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.