Skip to content

Commit

Permalink
Update project-config style (#260)
Browse files Browse the repository at this point in the history
* Update project-config style
  • Loading branch information
mondeja committed Dec 1, 2022
1 parent 470cfbf commit ed34700
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 160 deletions.
146 changes: 8 additions & 138 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,144 +1,14 @@
# Package custom ignores
/__main__.py
/docs/_build/
/docs/dev/reference/
/dev.md
/example-project
/LC_MESSAGES
prueba.md
prueba.po
report.html
temp/
.hatch/

# 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/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
*.whl
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/
__pycache__/
.hatch/
report.html
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
htmlcov/
*.egg-info/
venv*/
*.whl
*.tgz
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.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/
.vscode

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/mondeja/project-config
rev: v0.7.7
rev: v0.7.8
hooks:
- id: project-config
- repo: meta
Expand All @@ -10,13 +10,13 @@ repos:
- id: check-useless-excludes
name: check-useless-excludes
- repo: https://github.com/asottile/pyupgrade
rev: v3.1.0
rev: v3.2.3
hooks:
- id: pyupgrade
args:
- --py37-plus
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
name: trailing-whitespace
Expand All @@ -34,7 +34,7 @@ repos:
files: \.bat$
name: '*.bat end of lines'
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.2
rev: v3.0.0-alpha.4
hooks:
- id: prettier
types_or:
Expand All @@ -52,7 +52,7 @@ repos:
- id: add-trailing-comma
name: add-trailing-comma
- repo: https://github.com/flakeheaven/flakeheaven
rev: 3.0.0
rev: 3.2.1
hooks:
- id: flakeheaven
additional_dependencies:
Expand All @@ -74,7 +74,7 @@ repos:
- pysetenv
entry: pysetenv FLAKEHEAVEN_CACHE_TIMEOUT=0 flakeheaven lint
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.7.0
rev: v2.0.0
hooks:
- id: autopep8
- repo: https://github.com/PyCQA/isort
Expand All @@ -89,13 +89,13 @@ repos:
- -c
- .yamllint.yaml
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.6.1
rev: 2.6.2
hooks:
- id: editorconfig-checker
name: editorconfig-checker
alias: ec
- repo: https://github.com/myint/autoflake
rev: v1.7.5
rev: v2.0.0
hooks:
- id: autoflake
args:
Expand Down
25 changes: 13 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ dependencies = [
all = "coverage run -m pytest"
unit = "coverage run -m pytest tests/test_unit"
integration = "coverage run -m pytest tests/test_integration --override-ini addopts=-svv"
cov = """hatch run +py=py310 tests:all &&
coverage html &&
python -c 'import webbrowser as w;w.open("http://127.0.0.1:8088")' &&
python -m http.server 8088 -b localhost -d htmlcov
"""
cov = [
"hatch run +py=py310 tests:all",
"coverage html",
"python -c 'import webbrowser as w;w.open(\"http://127.0.0.1:8088\")'",
"python -m http.server 8088 -b localhost -d htmlcov"
]

[[tool.hatch.envs.tests.matrix]]
python = ["py37", "py38", "py39", "py310"]
Expand All @@ -102,13 +103,13 @@ targets = [{ file = "pyproject.toml" }, { file = "docs/pre-commit-hooks.rst" }]
[tool.project-config]
cache = "2 days"
style = [
"gh://mondeja/project-config-styles@v2/python/base.json5",
"gh://mondeja/project-config-styles@v2/python/single-quotes.json5",
"gh://mondeja/project-config-styles@v2/python/line-length-80.json5",
"gh://mondeja/project-config-styles@v2/python/tests.json5",
"gh://mondeja/project-config-styles@v2/python/sphinx.json5",
"gh://mondeja/project-config-styles@v2/python/readthedocs.json5",
"gh://mondeja/project-config-styles@v2/python/google-docstrings.json5"
"gh://mondeja/project-config-styles@v3/python/base.json5",
"gh://mondeja/project-config-styles@v3/python/single-quotes.json5",
"gh://mondeja/project-config-styles@v3/python/line-length-80.json5",
"gh://mondeja/project-config-styles@v3/python/tests.json5",
"gh://mondeja/project-config-styles@v3/python/sphinx.json5",
"gh://mondeja/project-config-styles@v3/python/readthedocs.json5",
"gh://mondeja/project-config-styles@v3/python/google-docstrings.json5"
]

[tool.pytest.ini_options]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Installation using setup.py is no longer supported.
Use `python -m pip install .` instead.
Use `pip install .` instead.
"""

import sys
Expand All @@ -10,7 +10,7 @@
sys.exit(__doc__)

# Fake reference so GitHub still considers it a real package
# for statistics purposes.
# for statistics purposes:
setup(
name='mdpo',
)

0 comments on commit ed34700

Please sign in to comment.