Skip to content

Commit

Permalink
Set up more housekeeping
Browse files Browse the repository at this point in the history
More gitignore boilerplate from https://github.com/github/gitignore.
  • Loading branch information
madig committed Feb 4, 2019
1 parent 0260e2d commit 64c1368
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 11 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.{yaml,yml}]
indent_style = space
indent_size = 2
125 changes: 115 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,122 @@
# Byte-compiled files
*.pyc
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Packaging
*.egg
# 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/
*.eggs
build
dist
shivs/
.installed.cfg
*.egg
MANIFEST

# Unit test
.cache/
# 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
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# 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

# celery beat schedule file
celerybeat-schedule

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

# Visual Studio Code
.vscode

# auto-generated version file
Lib/fontmake/_version.py
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/ambv/black
rev: 18.9b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/asottile/blacken-docs
rev: v0.3.0
hooks:
- id: blacken-docs
additional_dependencies: [black==18.9b0]
- repo: https://github.com/asottile/pyupgrade
rev: v1.11.1
hooks:
- id: pyupgrade
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-ast
- id: mixed-line-ending
args: ["--fix=lf"]
- id: debug-statements
- id: flake8
additional_dependencies: [flake8-bugbear]
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ python:
- "2.7"
- "3.6"

cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/pre-commit

install:
- pip install --upgrade pip
- pip install -r test_requirements.txt .
- pip install pre-commit -r test_requirements.txt .

script:
- pre-commit run --all-files --show-diff-on-failure
- (cd test && ./run.sh)

after_success:
Expand Down

0 comments on commit 64c1368

Please sign in to comment.