Skip to content

Commit 0d94f88

Browse files
Initial commit
0 parents  commit 0d94f88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+7273
-0
lines changed

.github/workflows/black.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Black Formatting
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- 'repoaudit-v[0-9]+\.[0-9]+'
8+
paths:
9+
- 'src/**/*.py'
10+
11+
push:
12+
branches:
13+
- main
14+
- 'repoaudit-v[0-9]+\.[0-9]+'
15+
paths:
16+
- 'src/**/*.py'
17+
18+
jobs:
19+
black:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.x'
33+
34+
- name: Install Black
35+
run: pip install black
36+
37+
- name: Run Black
38+
run: |
39+
if [ "${{ github.event_name }}" = "pull_request" ]; then
40+
echo "Checking formatting on pull_request..."
41+
black --check src/
42+
else
43+
echo "Auto-formatting and pushing changes on push..."
44+
black src/
45+
if [[ `git status --porcelain` ]]; then
46+
git config user.name "github-actions[bot]"
47+
git config user.email "github-actions[bot]@users.noreply.github.com"
48+
git add src/
49+
git commit -m "chore: auto-format Python code in src/ with black"
50+
git push
51+
else
52+
echo "No formatting changes needed."
53+
fi
54+
fi

.github/workflows/mypy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Mypy Type Checking
2+
3+
on:
4+
push:
5+
paths:
6+
- 'src/**/*.py'
7+
8+
pull_request:
9+
paths:
10+
- 'src/**/*.py'
11+
12+
jobs:
13+
mypy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Cache pip dependencies
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r requirements.txt
37+
pip install mypy
38+
39+
- name: Run Mypy
40+
run: mypy src/
41+

.gitignore

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
.DS_Store
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
**/*.pyc
8+
9+
# C extensions
10+
*.so
11+
12+
*.pyc
13+
14+
# Ignore all content in benchmark directory...
15+
benchmark/*/
16+
!benchmark/*/toy/
17+
!benchmark/*/toy/**
18+
19+
log/
20+
result/
21+
seedcache/
22+
IRDB/
23+
24+
# **/run_info.json
25+
**.log
26+
result**
27+
bugscan_jy.sh
28+
extract_jy.sh
29+
30+
# Distribution / packaging
31+
.Python
32+
build/
33+
develop-eggs/
34+
dist/
35+
downloads/
36+
eggs/
37+
.eggs/
38+
lib/
39+
lib64/
40+
parts/
41+
sdist/
42+
var/
43+
wheels/
44+
share/python-wheels/
45+
*.egg-info/
46+
.installed.cfg
47+
*.egg
48+
MANIFEST
49+
50+
# PyInstaller
51+
# Usually these files are written by a python script from a template
52+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
53+
*.manifest
54+
*.spec
55+
56+
# Installer logs
57+
pip-log.txt
58+
pip-delete-this-directory.txt
59+
60+
# Unit test / coverage reports
61+
htmlcov/
62+
.tox/
63+
.nox/
64+
.coverage
65+
.coverage.*
66+
.cache
67+
nosetests.xml
68+
coverage.xml
69+
*.cover
70+
*.py,cover
71+
.hypothesis/
72+
.pytest_cache/
73+
cover/
74+
75+
# Translations
76+
*.mo
77+
*.pot
78+
79+
# Django stuff:
80+
*.log
81+
local_settings.py
82+
db.sqlite3
83+
db.sqlite3-journal
84+
85+
# Flask stuff:
86+
instance/
87+
.webassets-cache
88+
89+
# Scrapy stuff:
90+
.scrapy
91+
92+
# Sphinx documentation
93+
docs/_build/
94+
95+
# PyBuilder
96+
.pybuilder/
97+
target/
98+
99+
# Jupyter Notebook
100+
.ipynb_checkpoints
101+
102+
# IPython
103+
profile_default/
104+
ipython_config.py
105+
106+
# pyenv
107+
# For a library or package, you might want to ignore these files since the code is
108+
# intended to run in multiple environments; otherwise, check them in:
109+
# .python-version
110+
111+
# pipenv
112+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
113+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
114+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
115+
# install all needed dependencies.
116+
#Pipfile.lock
117+
118+
# poetry
119+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
120+
# This is especially recommended for binary packages to ensure reproducibility, and is more
121+
# commonly ignored for libraries.
122+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
123+
#poetry.lock
124+
125+
# pdm
126+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
127+
#pdm.lock
128+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
129+
# in version control.
130+
# https://pdm.fming.dev/#use-with-ide
131+
.pdm.toml
132+
133+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
134+
__pypackages__/
135+
136+
# Celery stuff
137+
celerybeat-schedule
138+
celerybeat.pid
139+
140+
# SageMath parsed files
141+
*.sage.py
142+
143+
# Environments
144+
.env
145+
.venv
146+
env/
147+
venv/
148+
ENV/
149+
env.bak/
150+
venv.bak/
151+
152+
# Spyder project settings
153+
.spyderproject
154+
.spyproject
155+
156+
# Rope project settings
157+
.ropeproject
158+
159+
# mkdocs documentation
160+
/site
161+
162+
# mypy
163+
.mypy_cache/
164+
.dmypy.json
165+
dmypy.json
166+
167+
# Pyre type checker
168+
.pyre/
169+
170+
# pytype static type analyzer
171+
.pytype/
172+
173+
# Cython debug symbols
174+
cython_debug/
175+
176+
# PyCharm
177+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
178+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
179+
# and can be added to the global gitignore or merged into this file. For a more nuclear
180+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
181+
#.idea/
182+
183+
# VS Code settings
184+
.vscode/
185+
186+
testcases/**
187+
188+
# java class files in regression testing
189+
src/test/regression_testing/test_files/java/**/*.class
190+
191+
# files used for regression testing script
192+
src/test/regression_testing/regression_results.md
193+
src/test/regression_testing/dif.txt

.gitmodules

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
[submodule "benchmark/Cpp/sofa-pbrpc"]
2+
path = benchmark/Cpp/sofa-pbrpc
3+
url = https://github.com/baidu/sofa-pbrpc.git
4+
[submodule "benchmark/Cpp/htop"]
5+
path = benchmark/Cpp/htop
6+
url = https://github.com/htop-dev/htop.git
7+
[submodule "benchmark/Go/sally"]
8+
path = benchmark/Go/sally
9+
url = https://github.com/uber-go/sally.git
10+
[submodule "benchmark/Go/fasthttp"]
11+
path = benchmark/Go/fasthttp
12+
url = https://github.com/valyala/fasthttp.git
13+
[submodule "benchmark/Go/go-zero"]
14+
path = benchmark/Go/go-zero
15+
url = https://github.com/zeromicro/go-zero.git
16+
[submodule "benchmark/Go/fiber"]
17+
path = benchmark/Go/fiber
18+
url = https://github.com/gofiber/fiber.git
19+
[submodule "benchmark/Go/gnet"]
20+
path = benchmark/Go/gnet
21+
url = https://github.com/panjf2000/gnet.git
22+
[submodule "benchmark/Go/echo"]
23+
path = benchmark/Go/echo
24+
url = https://github.com/labstack/echo.git
25+
[submodule "benchmark/Go/zap"]
26+
path = benchmark/Go/zap
27+
url = https://github.com/uber-go/zap.git
28+
[submodule "benchmark/Go/fx"]
29+
path = benchmark/Go/fx
30+
url = https://github.com/uber-go/fx.git
31+
[submodule "benchmark/Go/dig"]
32+
path = benchmark/Go/dig
33+
url = https://github.com/uber-go/dig.git
34+
[submodule "benchmark/Go/atomic"]
35+
path = benchmark/Go/atomic
36+
url = https://github.com/uber-go/atomic.git
37+
[submodule "benchmark/Go/multierr"]
38+
path = benchmark/Go/multierr
39+
url = https://github.com/uber-go/multierr.git
40+
[submodule "benchmark/Go/goleak"]
41+
path = benchmark/Go/goleak
42+
url = https://github.com/uber-go/goleak.git
43+
[submodule "benchmark/Go/tally"]
44+
path = benchmark/Go/tally
45+
url = https://github.com/uber-go/tally.git
46+
[submodule "benchmark/Go/automaxprocs"]
47+
path = benchmark/Go/automaxprocs
48+
url = https://github.com/uber-go/automaxprocs.git
49+
[submodule "benchmark/Go/nilaway"]
50+
path = benchmark/Go/nilaway
51+
url = https://github.com/uber-go/nilaway.git
52+
[submodule "benchmark/Go/mock"]
53+
path = benchmark/Go/mock
54+
url = https://github.com/uber-go/mock.git
55+
[submodule "benchmark/Go/dosa"]
56+
path = benchmark/Go/dosa
57+
url = https://github.com/uber-go/dosa.git
58+
[submodule "benchmark/Go/config"]
59+
path = benchmark/Go/config
60+
url = https://github.com/uber-go/config.git
61+
[submodule "benchmark/Go/ratelimit"]
62+
path = benchmark/Go/ratelimit
63+
url = https://github.com/uber-go/ratelimit.git
64+
[submodule "benchmark/Go/cff"]
65+
path = benchmark/Go/cff
66+
url = https://github.com/uber-go/cff.git
67+
[submodule "benchmark/Go/hackeroni"]
68+
path = benchmark/Go/hackeroni
69+
url = https://github.com/uber-go/hackeroni.git
70+
[submodule "benchmark/Go/gwr"]
71+
path = benchmark/Go/gwr
72+
url = https://github.com/uber-go/gwr.git
73+
[submodule "benchmark/Go/flagoverride"]
74+
path = benchmark/Go/flagoverride
75+
url = https://github.com/uber-go/flagoverride.git
76+
[submodule "benchmark/Go/icu4go"]
77+
path = benchmark/Go/icu4go
78+
url = https://github.com/uber-go/icu4go.git
79+
[submodule "benchmark/Go/go-helix"]
80+
path = benchmark/Go/go-helix
81+
url = https://github.com/uber-go/go-helix.git
82+
[submodule "benchmark/Go/protoidl"]
83+
path = benchmark/Go/protoidl
84+
url = https://github.com/uber-go/protoidl.git
85+
[submodule "benchmark/Go/mapdecode"]
86+
path = benchmark/Go/mapdecode
87+
url = https://github.com/uber-go/mapdecode.git
88+
[submodule "benchmark/Go/tools"]
89+
path = benchmark/Go/tools
90+
url = https://github.com/uber-go/tools.git
91+
[submodule "benchmark/Go/kafka-client"]
92+
path = benchmark/Go/kafka-client
93+
url = https://github.com/uber-go/kafka-client.git
94+
[submodule "benchmark/Go/gopatch"]
95+
path = benchmark/Go/gopatch
96+
url = https://github.com/uber-go/gopatch.git

0 commit comments

Comments
 (0)