Skip to content

Commit 5769fcd

Browse files
committed
Initial commit
0 parents  commit 5769fcd

Some content is hidden

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

49 files changed

+2928
-0
lines changed

.github/workflows/linting.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: linting check
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
id-token: write
11+
contents: write
12+
security-events: write
13+
packages: read
14+
actions: read
15+
16+
jobs:
17+
build:
18+
timeout-minutes: 180
19+
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os: [ubuntu-20.04, ubuntu-22.04]
24+
python-version: [3.8, 3.9]
25+
26+
steps:
27+
- name: Action checkout
28+
uses: actions/checkout@v2
29+
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Installing package
36+
run: |
37+
python -m pip install -e .[dev]
38+
39+
- name: Run Ruff
40+
uses: chartboost/ruff-action@v1
41+
42+
- name: Run ShellCheck
43+
uses: ludeeus/action-shellcheck@master
44+
45+
- name: Component detection
46+
uses: advanced-security/[email protected]
47+
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@v3
50+
with:
51+
languages: ${{ matrix.language }}
52+
build-mode: ${{ matrix.build-mode }}
53+
54+
- name: Perform CodeQL Analysis
55+
uses: github/codeql-action/analyze@v3

.gitignore

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

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# For new customized pre-commit, pleae check out https://stackoverflow.com/a/64014324
2+
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: check-added-large-files
8+
args: ["--maxkb=5000"]
9+
10+
- repo: https://github.com/shellcheck-py/shellcheck-py
11+
rev: v0.9.0.2
12+
hooks:
13+
- id: shellcheck
14+
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
rev: v0.3.7
17+
hooks:
18+
- id: ruff
19+
- id: ruff-format

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python: Current File",
9+
"type": "python",
10+
"request": "launch",
11+
"program": "${file}",
12+
"console": "integratedTerminal"
13+
}
14+
]
15+
}

.vscode/settings.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"files.associations": {
3+
".env": "shellscript"
4+
},
5+
"python.languageServer": "Pylance",
6+
"python.analysis.stubPath": "build/typings",
7+
"python.analysis.typeCheckingMode": "basic",
8+
"editor.formatOnSave": true,
9+
"editor.formatOnPaste": false,
10+
"files.eol": "\n",
11+
"files.insertFinalNewline": true,
12+
"files.trimFinalNewlines": true,
13+
"files.trimTrailingWhitespace": true,
14+
"python.defaultInterpreterPath": "/opt/conda/bin/python",
15+
"cmake.configureOnOpen": false,
16+
"git.postCommitCommand": "push",
17+
"terminal.integrated.cursorStyle": "underline",
18+
"[python]": {
19+
"editor.formatOnSave": true,
20+
"editor.defaultFormatter": "charliermarsh.ruff"
21+
},
22+
"isort.args": [
23+
"--profile",
24+
"black"
25+
],
26+
"ruff.lint.run": "onSave",
27+
"ruff.format.args": [
28+
"args: [--config=pyproject.toml]"
29+
],
30+
"ruff.lint.args": [
31+
"args: [--config=pyproject.toml]",
32+
"--unsafe-fixes", // Aggressive fixes.
33+
],
34+
}

.vscode/tasks.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Doctest current python file",
8+
"type": "shell",
9+
"command": "python -m doctest ${file}",
10+
"group": "test",
11+
"presentation": {
12+
"reveal": "always",
13+
}
14+
}
15+
]
16+
}

CODE_OF_CONDUCT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4+
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Microsoft Corporation.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

0 commit comments

Comments
 (0)