Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse better with python #22

Merged
merged 78 commits into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
1aff6c7
upload new demo image
2bndy5 Aug 22, 2021
26c6744
Revert "upload new demo image"
2bndy5 Aug 22, 2021
c8b7121
Merge branch 'shenxianpeng:master' into master
2bndy5 Aug 22, 2021
a274052
update readme & upload new demo pic
2bndy5 Aug 22, 2021
c9b8889
avoids duplicated checks on commits to open PR
2bndy5 Aug 22, 2021
778e10d
fix workflow from last commit
2bndy5 Aug 22, 2021
8da8e0d
Revert "fix workflow from last commit"
2bndy5 Aug 23, 2021
d0a6384
Merge branch 'master' of https://github.com/shenxianpeng/cpp-linter-a…
2bndy5 Aug 23, 2021
ae35f76
Merge branch 'shenxianpeng:master' into main
2bndy5 Aug 25, 2021
5f26213
create python scripts
2bndy5 Aug 25, 2021
dff4311
output event payload & pip3 ver
2bndy5 Aug 25, 2021
1c6430a
echo pip3 list
2bndy5 Aug 25, 2021
42cc6b7
switch action to this branch
2bndy5 Aug 25, 2021
ef15a71
echo pip3 list
2bndy5 Aug 25, 2021
de1af91
install pip and list modules
2bndy5 Aug 25, 2021
3695098
typo
2bndy5 Aug 25, 2021
da31167
pip3 install requests
2bndy5 Aug 25, 2021
bda1233
switching to only python
2bndy5 Aug 25, 2021
8179543
should've read the docker docs
2bndy5 Aug 25, 2021
50779b0
switching back to ENTRYPOINT
2bndy5 Aug 25, 2021
96e65ea
typo
2bndy5 Aug 25, 2021
973556d
don't upgrade if files exist outside /use dir
2bndy5 Aug 25, 2021
95c81a9
use python as an entrypoint
2bndy5 Aug 26, 2021
a4ba767
add project.toml
2bndy5 Aug 26, 2021
ab88e49
bad syntax
2bndy5 Aug 26, 2021
cfab05b
try again
2bndy5 Aug 26, 2021
52d6027
hard_code version in setup.py
2bndy5 Aug 26, 2021
1ac2c5d
try pip install
2bndy5 Aug 26, 2021
dd2bed8
only upgrade pip
2bndy5 Aug 26, 2021
1b36fda
test on source files
2bndy5 Aug 26, 2021
31a9bc9
headers are dicts
2bndy5 Aug 26, 2021
ed98bc0
test on source files
2bndy5 Aug 26, 2021
7f6c96f
fix posting comment using requsts
2bndy5 Aug 27, 2021
0f216e2
fix passing verbosity to CLI args
2bndy5 Aug 27, 2021
35bb88d
Merge branch 'main' into parse-better
2bndy5 Aug 27, 2021
fe7f779
action uses current branch for now
2bndy5 Aug 27, 2021
293af27
parsing everything; no diff action yet
2bndy5 Aug 30, 2021
ed05a7b
show all debug in logs
2bndy5 Aug 30, 2021
233bd11
use bot's id not mine
2bndy5 Aug 30, 2021
21feadd
double trigger action
2bndy5 Aug 30, 2021
deb6848
auto-verbose logging on repeated runs
2bndy5 Aug 30, 2021
cc5e224
show me then run number
2bndy5 Aug 30, 2021
1bbfeda
support sync events in PRs
2bndy5 Aug 30, 2021
f29e163
switch to mkdocs
2bndy5 Sep 2, 2021
7ed9572
fix bad indent in yml
2bndy5 Sep 2, 2021
01ff4fc
install pkg before documenting
2bndy5 Sep 2, 2021
5d6c1c7
typo
2bndy5 Sep 2, 2021
911bf92
compatible w/ windows; add diff-only input option
2bndy5 Sep 22, 2021
ff536a6
diff comments working on PR from clang-tidy advice
2bndy5 Sep 22, 2021
cf989be
rolling back diff comments; update docs
2bndy5 Sep 23, 2021
448f28b
use bot id
2bndy5 Sep 23, 2021
9ee2c5d
disable diff-only in demo
2bndy5 Sep 23, 2021
6f1abe3
Update setup.py
2bndy5 Sep 23, 2021
7b046cf
try mkdocs gh-deploy
2bndy5 Sep 23, 2021
edc215c
use a gh action to publish docs
2bndy5 Sep 23, 2021
eaed42a
oops. ignoe release only condition for now
2bndy5 Sep 23, 2021
66aff4b
change doc's favicon
2bndy5 Sep 23, 2021
9866c7f
[no ci] publish docs only on release event
2bndy5 Sep 23, 2021
eb1a32a
rename docs CI workflow
2bndy5 Sep 23, 2021
f909f81
prototype badge
2bndy5 Sep 23, 2021
0ef4866
[no ci] augment doc build instructions
2bndy5 Sep 23, 2021
6b12fa7
update readme & demo picture
2bndy5 Sep 23, 2021
724f910
[no ci] pub docs on release
2bndy5 Sep 23, 2021
95915a2
update docs
2bndy5 Sep 23, 2021
2ea4d42
disable mkdocs CI (switching to rtfd CI)
2bndy5 Sep 24, 2021
84df726
fix some review suggestions
2bndy5 Sep 24, 2021
fc2543b
update badge in readme
2bndy5 Sep 24, 2021
c09fc8f
Use lazy % formatting in logging functions
2bndy5 Sep 26, 2021
9ccaa07
fix more code-inspector notices
2bndy5 Sep 26, 2021
45f206a
slight refactor and switch to pylint
2bndy5 Sep 26, 2021
5f4f80e
fix pylint workflow
2bndy5 Sep 26, 2021
4363e02
run pylint on PR synch events too
2bndy5 Sep 26, 2021
35b71ce
Tell code-inspector to ignore python srcs
2bndy5 Sep 26, 2021
5ae6817
Tell code inspector to ignore mkdocs.yml
2bndy5 Sep 26, 2021
bb0d935
ran black
2bndy5 Sep 27, 2021
508943d
self review changes
2bndy5 Sep 28, 2021
5f1a81a
Update .github/workflows/run-pylint.yml
2bndy5 Sep 28, 2021
7313d1f
add gitpod badge to root README.md
2bndy5 Sep 29, 2021
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
2 changes: 2 additions & 0 deletions .ci-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python_action
mkdocs.yml
shenxianpeng marked this conversation as resolved.
Show resolved Hide resolved
32 changes: 32 additions & 0 deletions .github/workflows/build-docs.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: dev-docs

on:
push:
pull_request:
types: [opened]

jobs:
using-mkdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install doc's deps
run: |
python3 -m pip install -r docs/requirements.txt
python3 -m pip install .
- name: Build docs
run: mkdocs build
- name: Save artifact
uses: actions/upload-artifact@v2
with:
name: "cpp linter action dev docs"
path: site/**
- name: upload to github pages
if: ${{ github.event_name == 'release'}}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site
4 changes: 1 addition & 3 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ name: cpp-linter
on:
push:
pull_request:
types: [opened]

jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: C/C++ Lint Action
uses: shenxianpeng/cpp-linter-action@master
- uses: shenxianpeng/cpp-linter-action@master
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/run-pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Check python code"

on: [push, pull_request]

jobs:
using-pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install pylint and action deps
run: |
python3 -m pip install --upgrade pylint
python3 -m pip install -r requirements.txt
- name: run pylint
run: |
pylint python_action/**
pylint setup.py
184 changes: 182 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,183 @@
# local demo specific
.cpp_linter_action_changed_files.json
clang_format_report.txt
clang_tidy_report.txt
clang_format*.txt
clang_tidy*.txt
act.exe
clang_tidy_output.yml
clang_format_output.xml
event_payload.json
comments.json

#### ignores for Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# exclude local VSCode's settings folder
.vscode/

#### ignores for C++
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Cmake build-in-source generated stuff
CMakeUserPresets.json
CMakeCache.txt
CPackConfig.cmake
CPackSourceConfig.cmake
CMakeFiles
cmake_install.cmake
# compile_commands.json
Loading