-
Notifications
You must be signed in to change notification settings - Fork 86
Setup: Init - Initial setup.py and basic configs #4
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ea9ef52
Setup: Init - Initial setup.py and basic configs
abuccts 99ed3f1
Update max-line-length in lint
abuccts 64b8dd7
Update according to comments
abuccts e81eb62
Add lint rules for quotes, docstring, type hint
abuccts 4e0c1bf
Add spelling check for typo
abuccts 1e078c6
Fix warning and typo
abuccts c16235f
Add pre-commit config
abuccts 1994575
Update description accordingly
abuccts 097aac6
Merge branch 'dev' into xiongyf/setup-py
abuccts 3b9f9e7
Add docstrings and remove exception rules
abuccts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # SuperBench | ||
| outputs | ||
| *.tar.gz | ||
|
|
||
| # Python | ||
| __pycache__ | ||
| *.pyc | ||
| *.pyo | ||
| *.pyd | ||
|
|
||
| # Git | ||
| .git | ||
| .github |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| indent_style = space | ||
| indent_size = 4 | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [*.py] | ||
| max_line_length = 79 | ||
|
|
||
| [*.yaml] | ||
| indent_size = 2 | ||
|
|
||
| [*.json] | ||
| indent_size = 2 | ||
| insert_final_newline = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [flake8] | ||
| inline-quotes = single | ||
| multiline-quotes = double | ||
| docstring-quotes = double | ||
| docstring-convention = google | ||
| max-complexity = 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| * text=auto eol=lf | ||
|
|
||
| # Source files | ||
| bin/* text | ||
| *.py text diff=python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: Lint | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - dev | ||
|
|
||
| jobs: | ||
| spelling: | ||
| name: Spelling check | ||
| runs-on: ubuntu-16.04 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Install dependencies | ||
| run: | | ||
| curl -L https://git.io/misspell | sudo bash -s -- -b /bin | ||
| - name: Check spelling | ||
| run: | | ||
| misspell -error . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| # Created by https://github.com/github/gitignore | ||
|
|
||
| # SuperBench tmp files | ||
| outputs/ | ||
| *.tar.gz | ||
|
|
||
| # 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/ | ||
| 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/ | ||
| cover/ | ||
|
|
||
| # 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 | ||
| .pybuilder/ | ||
| target/ | ||
|
|
||
| # Jupyter Notebook | ||
| .ipynb_checkpoints | ||
|
|
||
| # IPython | ||
| profile_default/ | ||
| ipython_config.py | ||
|
|
||
| # pyenv | ||
| # For a library or package, you might want to ignore these files since the code is | ||
| # intended to run in multiple environments; otherwise, check them in: | ||
| # .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/ | ||
|
|
||
| # pytype static type analyzer | ||
| .pytype/ | ||
|
|
||
| # Cython debug symbols | ||
| cython_debug/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [mypy] | ||
| ignore_missing_imports = True | ||
|
cp5555 marked this conversation as resolved.
|
||
| scripts_are_modules = True | ||
|
|
||
| [superbench] | ||
| warn_return_any = True | ||
| disallow_untyped_defs = True | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Run `pre-commit install` to install | ||
|
cp5555 marked this conversation as resolved.
|
||
| # See https://pre-commit.com for more information | ||
|
|
||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v3.2.0 | ||
| hooks: | ||
| - id: check-added-large-files | ||
| - id: check-docstring-first | ||
| - id: check-json | ||
| - id: check-yaml | ||
| - id: detect-private-key | ||
| - id: double-quote-string-fixer | ||
| - id: end-of-file-fixer | ||
| - id: trailing-whitespace | ||
| - repo: https://github.com/pre-commit/mirrors-yapf | ||
| rev: v0.30.0 | ||
| hooks: | ||
| - id: yapf | ||
| name: Format code using yapf | ||
| - repo: https://github.com/pre-commit/mirrors-mypy | ||
| rev: v0.800 | ||
| hooks: | ||
| - id: mypy | ||
| name: Check type hint using mypy | ||
| - repo: https://gitlab.com/pycqa/flake8 | ||
| rev: 3.8.4 | ||
| hooks: | ||
| - id: flake8 | ||
| name: Lint code using flake8 | ||
| additional_dependencies: | ||
| - flake8-quotes | ||
| - flake8-docstrings | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [style] | ||
| based_on_style = pep8 | ||
| spaces_before_comment = 4 | ||
| blank_line_before_module_docstring = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include LICENSE README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,25 @@ | ||
| # TODO: The maintainer of this repo has not yet edited this file | ||
| **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? | ||
| - **No CSS support:** Fill out this template with information about how to file issues and get help. | ||
| - **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). | ||
| - **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. | ||
| *Then remove this first heading from this SUPPORT.MD file before publishing your repo.* | ||
| # Support | ||
| ## How to file issues and get help | ||
| This project uses GitHub Issues to track bugs and feature requests. Please search the existing | ||
| issues before filing new issues to avoid duplicates. For new issues, file your bug or | ||
| feature request as a new Issue. | ||
| For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE | ||
| FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER | ||
| CHANNEL. WHERE WILL YOU HELP PEOPLE?**. | ||
| ## Microsoft Support Policy | ||
| Support for this **PROJECT or PRODUCT** is limited to the resources listed above. | ||
| # TODO: The maintainer of this repo has not yet edited this file | ||
|
|
||
| **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? | ||
|
|
||
| - **No CSS support:** Fill out this template with information about how to file issues and get help. | ||
| - **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). | ||
| - **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. | ||
|
|
||
| *Then remove this first heading from this SUPPORT.MD file before publishing your repo.* | ||
|
|
||
| # Support | ||
|
|
||
| ## How to file issues and get help | ||
|
|
||
| This project uses GitHub Issues to track bugs and feature requests. Please search the existing | ||
| issues before filing new issues to avoid duplicates. For new issues, file your bug or | ||
| feature request as a new Issue. | ||
|
|
||
| For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE | ||
| FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER | ||
| CHANNEL. WHERE WILL YOU HELP PEOPLE?**. | ||
|
|
||
| ## Microsoft Support Policy | ||
|
|
||
| Support for this **PROJECT or PRODUCT** is limited to the resources listed above. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.