From 2824e9eef01f42ae7413b1f8e91e00b0130cd310 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Thu, 4 Apr 2024 10:21:42 -0600 Subject: [PATCH] clean up .gitignore; add a couple linters --- .gitignore | 106 ++--------------------------- .pre-commit-config.yaml | 9 +++ external/requirements.txt | 6 +- tests/{test_cli.py => cli_test.py} | 0 4 files changed, 17 insertions(+), 104 deletions(-) rename tests/{test_cli.py => cli_test.py} (100%) diff --git a/.gitignore b/.gitignore index 54107c0b..43fd6fab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,104 +1,8 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ *.egg-info/ -.installed.cfg -*.egg - -# 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/ +*.py[cod] .coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# dotenv -.env - -# virtualenv -.venv -venv/ -ENV/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ - -# nox virtual envs .nox/ +__pycache__/ +build/ +dist/ +docs/source/api/babelizer*rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 27b394d6..42dff1c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -65,6 +65,15 @@ repos: - id: end-of-file-fixer - id: forbid-new-submodules - id: trailing-whitespace + - id: name-tests-test + exclude: ^external + - id: file-contents-sorter + files: | + (?x)^( + requirements(-\w+)?.(in|txt)| + external/requirements(-\w+)?.(in|txt)| + .gitignore + ) - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.8.0 diff --git a/external/requirements.txt b/external/requirements.txt index 496776c5..049a9fb8 100644 --- a/external/requirements.txt +++ b/external/requirements.txt @@ -1,12 +1,12 @@ -bmi-tester>=0.5.4 bmi-c bmi-cxx bmi-fortran +bmi-tester>=0.5.4 bmipy -cmake c-compiler +cmake cxx-compiler fortran-compiler make -pkg-config pip +pkg-config diff --git a/tests/test_cli.py b/tests/cli_test.py similarity index 100% rename from tests/test_cli.py rename to tests/cli_test.py