Skip to content

Commit

Permalink
add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
erexer committed Nov 7, 2024
1 parent bb48aef commit 189b4f8
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 45 deletions.
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# pre-commit hooks require a user to have installed `pre-commit`:
# $ pip install pre-commit
# Then install the hooks within the repo:
# $ cd /PATH/TO/REPO
# $ pre-commit install

repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix]
exclude: .rst
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
args: [--line-length=100]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
93 changes: 48 additions & 45 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,66 +4,69 @@

def readme():
"""Return the contents of the project README file."""
with open('README.md') as f:
with open("README.md") as f:
return f.read()


version = re.search(r"__version__ = ['\"]([^'\"]*)['\"]", open('mosartwmpy/_version.py').read(), re.M).group(1)
version = re.search(
r"__version__ = ['\"]([^'\"]*)['\"]", open("mosartwmpy/_version.py").read(), re.M
).group(1)

setup(
name='mosartwmpy',
name="mosartwmpy",
version=version,
packages=find_packages(),
url='https://github.com/IMMM-SFA/mosartwmpy',
license='BSD2-Simplified',
author='Travis Thurber',
author_email='travis.thurber@pnnl.gov',
description='Python implementation of MOSART-WM: A water routing and management model',
url="https://github.com/IMMM-SFA/mosartwmpy",
license="BSD2-Simplified",
author="Travis Thurber",
author_email="travis.thurber@pnnl.gov",
description="Python implementation of MOSART-WM: A water routing and management model",
long_description=readme(),
long_description_content_type="text/markdown",
python_requires='>=3.9,<4.0',
python_requires=">=3.9,<4.0",
include_package_data=True,
entry_points={
'console_scripts': [
'create_grand_parameters = mosartwmpy.utilities.create_grand_parameters:create_grand_parameters',
'bil_to_parquet = mosartwmpy.utilities.bil_to_parquet:bil_to_parquet',
"console_scripts": [
"create_grand_parameters = mosartwmpy.utilities.create_grand_parameters:create_grand_parameters",
"bil_to_parquet = mosartwmpy.utilities.bil_to_parquet:bil_to_parquet",
]
},
install_requires=[
'bmipy>=2.0',
'click>=8.0.1',
'contextily>=1.2.0',
'dask[complete]>=2021.10.0',
'geopandas>=0.10.2',
'h5netcdf>=0.11.0',
'hvplot>=0.7.3',
'matplotlib>=3.4.3',
'nc-time-axis>=1.4.0',
'netCDF4>=1.5.7',
'numba>=0.53.1',
'numpy>=1.20.3,<2.0',
'pandas>=1.3.4',
'pathvalidate>=2.5.0',
'psutil>=5.8.0',
'pyarrow>=6.0.0',
'pyomo>=6.2',
'python-benedict>=0.24.3',
'regex>=2021.10.23',
'requests>=2.26.0',
'rioxarray>=0.8.0',
'tqdm>=4.62.3',
'xarray>=0.19.0'
"bmipy>=2.0",
"click>=8.0.1",
"contextily>=1.2.0",
"dask[complete]>=2021.10.0",
"geopandas>=0.10.2",
"h5netcdf>=0.11.0",
"hvplot>=0.7.3",
"matplotlib>=3.4.3",
"nc-time-axis>=1.4.0",
"netCDF4>=1.5.7",
"numba>=0.53.1",
"numpy>=1.20.3,<2.0",
"pandas>=1.3.4",
"pathvalidate>=2.5.0",
"psutil>=5.8.0",
"pyarrow>=6.0.0",
"pyomo>=6.2",
"python-benedict>=0.24.3",
"regex>=2021.10.23",
"requests>=2.26.0",
"rioxarray>=0.8.0",
"tqdm>=4.62.3",
"xarray>=0.19.0",
],
extras_require={
'dev': [
'build>=0.7.0',
'nbsphinx>=0.8.7',
'recommonmark>=0.7.1',
'setuptools>=58.3.0',
'sphinx==4.2.0',
'sphinx-panels>=0.6.0',
'sphinx-rtd-theme>=1.0.0',
'twine>=3.4.2'
"dev": [
"build>=0.7.0",
"nbsphinx>=0.8.7",
"recommonmark>=0.7.1",
"setuptools>=58.3.0",
"sphinx==4.2.0",
"sphinx-panels>=0.6.0",
"sphinx-rtd-theme>=1.0.0",
"twine>=3.4.2",
"pre-commit",
]
}
},
)

0 comments on commit 189b4f8

Please sign in to comment.