Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Charmve committed Jan 31, 2024
1 parent e77deda commit b295d4c
Show file tree
Hide file tree
Showing 545 changed files with 67,355 additions and 6,115 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 90
exclude = file1.py, **/__init__.py

28 changes: 28 additions & 0 deletions .github/workflows/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Style

> <b>Before you pull request, please run ``./scripts/format.sh --git``.</b>
This project is formatted with [clang-format][fmt] using the style file at the root of the repository. Please run clang-format before sending a pull request.

In general, try to follow the style of surrounding code. We mostly follow the [Google C++ style guide][cpp-style].

Commit messages should be in the imperative mood, as described in the [Git contributing file][git-contrib]:

> Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
> instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
> to do frotz", as if you are giving orders to the codebase to change
> its behaviour.
[fmt]: http://clang.llvm.org/docs/ClangFormat.html
[cpp-style]: https://google.github.io/styleguide/cppguide.html
[git-contrib]: http://git.kernel.org/cgit/git/git.git/tree/Documentation/SubmittingPatches?id=HEAD

# Tests

Please verify the tests pass by running the target `tests/run_tests`.

If you are adding functionality, add tests accordingly.

# Pull request process

Every pull request undergoes a code review. Unfortunately, github's code review process isn't great, but we'll manage. During the code review, if you make changes, add new commits to the pull request for each change. Once the code review is complete, rebase against the master branch and squash into a single commit.
43 changes: 43 additions & 0 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python checks
on:
pull_request:
types: [assigned]
branches:
- "*"
workflow_dispatch:
inputs:
placeholder:
description: "placeholder, no effect"
required: false
jobs:
check_license_and_format:
name: License and format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: format
id: format_check
run: |
bash ./scripts/format.sh --git
- name: install clang-format
id: clang-format
run: sudo apt install clang-format
- name: check for changes
run: |
if git diff --exit-code; then
echo "has_changes=false" >> $GITHUB_ENV
else
echo "has_changes=true" >> $GITHUB_ENV
fi
- name: Git push
if: ${{ env.has_changes == 'true' }}
id: git_push
run: |
git config --global user.email "yidazhang1@gmail.com"
git config --global user.name "ci-bot"
git add -u
git commit -m "auto format by CI"
git push
31 changes: 22 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[submodule "lift-splat-shoot"]
path = code/LSS
url = https://github.com/nv-tlabs/lift-splat-shoot
[submodule "BEVDet"]
path = code/BEVDet
url = https://github.com/HuangJunJie2017/BEVDet
[submodule "MonoScene"]
path = code/MonoScene
url = https://github.com/astra-vision/MonoScene
[submodule "BEVDepth"]
path = code/BEVDepth
url = https://github.com/Megvii-BaseDetection/BEVDepth
Expand Down Expand Up @@ -31,16 +37,17 @@
[submodule "OccNeRF"]
path = code/OccNeRF
url = https://github.com/LinShan-Bin/OccNeRF
[submodule "BEVDet"]
path = code/BEVDet
url = https://github.com/HuangJunJie2017/BEVDet
[submodule "MonoScene"]
path = code/MonoScene
url = https://github.com/astra-vision/MonoScene
[submodule "Sparse4D"]
path = code/Sparse4D
url = https://github.com/HorizonRobotics/Sparse4D
[submodule "FB-BEV"]
path = code/FB-BEV
url = https://github.com/NVlabs/FB-BEV

[submodule "UniAD"]
path = code/UniAD
url = https://github.com/OpenDriveLab/UniAD

[submodule "SurroundOcc"]
path = code/SurroundOcc
url = https://github.com/weiyithu/SurroundOcc
Expand Down Expand Up @@ -68,6 +75,12 @@
path = code/mae
url = https://github.com/facebookresearch/mae

[submodule "OccFormer"]
path = code/OccFormer
url = https://github.com/zhangyp15/OccFormer
[submodule "QNN"]
path = code/QNN
url = https://github.com/Charmve/QNN
[submodule "Lite"]
path = code/Lite
url = https://github.com/Charmve/Lite
[submodule "vision_module"]
path = code/vision_takes_all
url = https://github.com/Charmve/vision_takes_all
Empty file added CHANGELOG
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Python checks
on:
pull_request:
types: [assigned]
branches:
- "*"
workflow_dispatch:
inputs:
placeholder:
description: "placeholder, no effect"
required: false
jobs:
check_license_and_format:
name: License and format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Check Python format
id: py_check
run: |
python3 -m pip install black==19.10b0
python3 ci/check/run_py_format.py --source_dir $PWD
- name: Run Python Format
id: py_fmt
run: |
python3 -m pip install black==19.10b0
python3 ci/check/run_py_format.py --source_dir $PWD --fix
- name: install clang-format
id: clang-format
run: sudo apt install clang-format
- name: Run clang-format
id: C_fmt
run: find . -regex '.*\.\(cpp\|hpp\|cu\|c\|h\)' -exec clang-format -style=file -i {} \;
- name: check for changes
run: |
if git diff --exit-code; then
echo "has_changes=false" >> $GITHUB_ENV
else
echo "has_changes=true" >> $GITHUB_ENV
fi
- name: Git push
if: ${{ env.has_changes == 'true' }}
id: git_push
run: |
git config --global user.email "derrylin@hust.edu.cn"
git config --global user.name "ci-bot"
git add -u
git commit -m "auto format by CI"
git push
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# 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/

.idea/
checkpoints/onnx/*
checkpoints/pytorch/*
checkpoints/tensorrt/*
work_dirs/*
Loading

0 comments on commit b295d4c

Please sign in to comment.