-
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.
Merge pull request #16 from robcalon/feature/pre-commit
Feature/pre commit
- Loading branch information
Showing
53 changed files
with
3,002 additions
and
5,173 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ dnu/ | |
dist/ | ||
*.egg-info | ||
*.log | ||
.env | ||
*.env | ||
*.ruff_cache |
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,84 @@ | ||
# The repos are ordered in the way they are executed. | ||
# This is important because `autoflake` should run before `flake8`, for example | ||
|
||
default_stages: [commit, push] | ||
fail_fast: true | ||
minimum_pre_commit_version: 2.15.0 | ||
repos: | ||
|
||
- repo: local | ||
hooks: | ||
|
||
# checks for files that would conflict in case-insensitive filesystems. | ||
- id: check-case-conflict | ||
name: check-case-conflict | ||
entry: check-case-conflict | ||
language: python | ||
types: [ python ] | ||
|
||
# checks for files that contain merge conflict strings. | ||
- id: check-merge-conflict | ||
name: check-merge-conflict | ||
entry: check-merge-conflict | ||
language: python | ||
types: [ python ] | ||
|
||
# ensures that a file is either empty, or ends with one newline. | ||
- id: end-of-file-fixer | ||
name: end-of-file-fixer | ||
entry: end-of-file-fixer | ||
language: python | ||
types: [ python ] | ||
|
||
# removes utf-8 byte order marker. | ||
- id: fix-byte-order-marker | ||
name: fix-byte-order-marker | ||
entry: fix-byte-order-marker | ||
language: python | ||
types: [ python ] | ||
|
||
# replaces or checks mixed line ending. | ||
- id: mixed-line-ending | ||
name: mixed-line-ending | ||
entry: mixed-line-ending | ||
language: python | ||
types: [ python ] | ||
|
||
# trims trailing whitespace. | ||
- id: trailing-whitespace-fixer | ||
name: trailing-whitespace-fixer | ||
entry: trailing-whitespace-fixer | ||
language: python | ||
types: [ python ] | ||
|
||
# | ||
- id: black | ||
name: black | ||
entry: black | ||
files: "^(src|tests)" | ||
language: python | ||
types: [ python ] | ||
|
||
- id: ruff | ||
name: ruff | ||
entry: ruff | ||
files: "^(src|tests)" | ||
language: python | ||
types: [ python ] | ||
args: [--fix, --exit-non-zero-on-fix] | ||
|
||
# | ||
# - id: pylint | ||
# name: pylint | ||
# entry: pylint | ||
# files: "^(src|tests)" | ||
# language: python | ||
# types: [ python ] | ||
|
||
# | ||
- id: mypy | ||
name: mypy | ||
entry: mypy | ||
files: "^(src/pyetm/sessions|src/pyetm/client|src/pyetm/profiles)" | ||
language: python | ||
types: [ python ] |
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,13 +4,17 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "pyetm" | ||
version = "1.2.2" | ||
version = "1.3.0" | ||
|
||
description = "Python-ETM Connector" | ||
authors = [{name = "Rob Calon", email = "[email protected]"}] | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
license = {file = "LICENSE"} | ||
dependencies = ['requests>=2.26', 'pandas>=2.0'] | ||
dependencies = [ | ||
'requests>=2.26', | ||
'pandas>=2.0', | ||
] | ||
keywords = ["ETM", "Energy Transition Model"] | ||
classifiers = [ | ||
'Development Status :: 4 - Beta', | ||
|
@@ -28,14 +32,33 @@ classifiers = [ | |
'Programming Language :: Python :: 3.11', | ||
] | ||
|
||
[project.optional-dependencies] | ||
async = ["aiohttp>=3.8"] | ||
io = ["xlsxwriter>=3.0", "openpyxl>=3.0"] | ||
test = ["pytest", "responses", "aioresponses", "build", "twine"] | ||
all = ["pyetm[async]", "pyetm[io]", "pyetm[test]"] | ||
|
||
[project.urls] | ||
repository = "https://github.com/robcalon/pyetm" | ||
|
||
# [tool.distutils.bdist_wheel] | ||
# universal = true | ||
|
||
[project.optional-dependencies] | ||
async = ["aiohttp>=3.8"] | ||
excel = ["xlsxwriter>=3.0", "openpyxl>=3.0"] | ||
dev = [ | ||
"black", | ||
"mypy>=1.4.1", | ||
"pre-commit", | ||
"pre-commit-hooks", | ||
"pyetm[async, excel]", | ||
# "pylint", | ||
"ruff", | ||
"pandas-stubs", | ||
] | ||
|
||
[tool.setuptools.package-data] | ||
"pyetm.data" = ["*.csv"] | ||
|
||
[tool.pylint] | ||
max-args = 15 | ||
max-local = 20 | ||
|
||
[tool.mypy] | ||
disallow_untypes_defs = true | ||
# disallow_incomplete_defs = true |
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,2 +1,4 @@ | ||
"""init main module""" | ||
from .client import Client | ||
|
||
__all__ = ["Client"] |
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,2 +1,4 @@ | ||
"""init client module""" | ||
from .client import Client | ||
|
||
__all__ = ["Client"] |
Oops, something went wrong.