Commit 600b1aa
authored
Unit tests + coverage reports, type checking, pre-commit, and requested fixes (#81)
* integrate mypy type checking into CI
* resolve #75
* resolve #73
* run pylint workflow on changes to workflow file
- fix a few long line warnings
- add rich to the py dev reqs
- add types-PyYAML to dev reqs
* resolve #76
normalize submodule path separators per runner's OS
* add unit tests for ignored paths
also make sure the current working directory is appended to the .gitmodules path
* run pytest in CI
- add pytest to dev reqs
- rename run-pylint.yml to run-dev-tests.yml
- install cpp-linter pkg in run-dev-tests.yml workflow
- upgrade actions/setup-python to v2 in run-dev-tests.yml workflow
- rename step in run-dev-tests.yml workflow
* resolve #74 and add unit tests for it
This allows the `lines-changed-only` option to accept the following values:
- false: All lines in a file are analyzed
- true: All lines in the diff are analyzed (including unchanged lines)
- strict: Only lines in the diff that contain additions are analyzed
gitignore some test resources as they are fetched running the tests.
Retain original repo structure when fetching files. This is only used when the user doesn't checkout the repo being analyzed.
* improve and test CLI arg parsing
* add unit test for database
also fix a typo in demo.hpp variable name
* switch to pre-commit; run pytest in a matrix
* parametrize unit tests
* fix changes to dev-test yaml
* make database path absolute
* use pathlib to resolve() relative paths in test
* let db path be independent of repo-root w/o docker
* this fails locally
* show me value for RUNNER_WORKSPACE
* use gh workspace if not in docker env
* simplify the paths' concatenation
* fix assignment of `Globals.FILES`
* treat unsupport events like a push
* explicitly set a env var when using docker
* ammend some logic
* show me some contents of folders on docker
* hardcode the correct worspace dir
* remove unused import
* try detecting the docker env better
* set the docker env var w/ a str
* assume that RUNNER_WORKSPACE is abs
* use only relativer path to db on docker
* Revert "use only relativer path to db on docker"
This reverts commit 37e3083.
* better test coverage
* mkdocstring doesn't support `Tuple[x, x]` type
see mkdocstrings/griffe/#95
* fix workflow
* revert changes to `get_line_cnt_from_cols()`
* upload without codecov token??
* ensure LF used on demo src
* update workflow
* re-implement newer `get_line_cnt_from_cols()`
* switch to pyproject.toml (setup.py is a dummy now)
* resolve version exe path better
* ammend make_annotations() (& its tests)
* adjust for pypi releases
* allow running locally & fix duplicate log cmds
* use pathlib.Path to open files
* rely on pathlib, update pkg name & CI workflows
* `is_relative_to()` introduced in python v3.9
* `lstrip(".")` from file's extension
* tidy v13 use abs path to std libs in output error
* build/install wheel in test CI
* oops, use correct artifact name
* remove identifying info from test's event payload
* make files list simpler for any event
* ammend walking the repo files/folders
This could probably get changed to using pathlib's glob mechanism.
* replace os.walk() with pathlib's rglob()
* only upload coverage report once from test CI
* use OS dependent path separators for DB path
* resolve #82
* ensure tidy fixit_lines end w/ a LF
* workflow continue only if `latest` tag was added
* include v7-9 for CI tests
* fix docs about `parse_ignore_option()`
Also, docs show type annotations in the function signatures
* fix `TidyNotification.__repr__()`
* tell CI to download clang-tools v7-9
* support older versions of clang-tidy YML output
* don't try to traverse a `None` obj
* add common hooks to pre-commit config
* add more configs to toml
This removes the need for a separate .coveragerc file
pytest can be executed without args based on the config in the toml
* update event triggers on dev-test CI workflow
* sort requirements.txt contents
* split pre-commit step into its own CI workflow
update version of used (external) actions
* pleasing pre-commit hooks
* fix run-test.yml (trailing whitespaces)
* revise README & remove .ci-ignore file
* add code coverage badge to README1 parent 8695d1f commit 600b1aa
File tree
38 files changed
+2906
-876
lines changed- .github/workflows
- cpp_linter
- demo
- docs
- tests
- capture_tools_output
- ignored_paths
38 files changed
+2906
-876
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
0 commit comments