forked from mongodb/motor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOTOR-896 Set up pre-commit (mongodb#145)
- Loading branch information
Showing
18 changed files
with
173 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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 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 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,2 @@ | ||
# Initial pre-commit reformat | ||
1e62b868ea58afeb42b3d0346e33776561c16ab6 |
This file contains 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,45 @@ | ||
name: Python Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
pre-commit: | ||
name: pre-commit | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --hook-stage=manual | ||
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.6", "3.10"] | ||
fail-fast: false | ||
name: CPython ${{ matrix.python-version }}-${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: 'setup.py' | ||
- name: Start MongoDB with Custom Options | ||
run: | | ||
mkdir data | ||
mongod --fork --dbpath=$(pwd)/data --logpath=$PWD/mongo.log --setParameter enableTestCommands=1 | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install -U pip tox tox-gh-actions | ||
- name: Run tests | ||
run: | | ||
tox |
This file contains 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,49 @@ | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
exclude: WHEEL | ||
exclude_types: [json] | ||
- id: forbid-new-submodules | ||
- id: trailing-whitespace | ||
exclude: .patch | ||
exclude_types: [json] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.1.0 | ||
hooks: | ||
- id: black | ||
files: \.py$ | ||
args: [--line-length=100] | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.7.0 | ||
hooks: | ||
- id: isort | ||
files: \.py$ | ||
args: [--profile=black] | ||
|
||
# We use the Python version instead of the original version which seems to require Docker | ||
# https://github.com/koalaman/shellcheck-precommit | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.8.0.1 | ||
hooks: | ||
- id: shellcheck | ||
name: shellcheck | ||
args: ["--severity=warning"] | ||
|
||
- repo: https://github.com/sirosen/check-jsonschema | ||
rev: 0.10.2 | ||
hooks: | ||
- id: check-jsonschema | ||
name: "Check GitHub Workflows" | ||
files: ^\.github/workflows/ | ||
types: [yaml] | ||
args: ["--schemafile", "https://json.schemastore.org/github-workflow"] |
This file contains 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 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 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,8 +1,25 @@ | ||
include README.rst | ||
include LICENSE | ||
include tox.ini | ||
include doc/Makefile | ||
include doc/examples/tornado_change_stream_templates/index.html | ||
recursive-include doc *.rst | ||
recursive-include doc *.py | ||
recursive-include doc *.png | ||
recursive-include test *.py | ||
recursive-include test *.pem | ||
recursive-include doc *.conf | ||
recursive-include doc *.css | ||
recursive-include doc *.js | ||
recursive-include doc *.txt | ||
recursive-include doc *.bat | ||
recursive-include synchro *.py | ||
|
||
exclude .readthedocs.yaml | ||
exclude .git-blame-ignore-revs | ||
exclude .pre-commit-config.yaml | ||
exclude release.sh | ||
exclude ez_setup.py | ||
exclude RELEASE.rst | ||
exclude CONTRIBUTING.rst | ||
exclude .evergreen/* |
This file contains 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 +0,0 @@ | ||
|
||
This file contains 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 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 |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
.. currentmodule:: motor.motor_tornado | ||
|
||
.. autoclass:: MotorClientEncryption | ||
:members: | ||
:members: |
This file contains 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 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 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 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 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 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 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