Skip to content

Commit

Permalink
Merge pull request #220 from NREL/bnb/dh_refactor
Browse files Browse the repository at this point in the history
Bnb/dh refactor
  • Loading branch information
bnb32 authored Nov 5, 2024
2 parents 90bd738 + b8ebeeb commit 6ea8113
Show file tree
Hide file tree
Showing 213 changed files with 34,875 additions and 38,879 deletions.
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion .github/linters/.flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
ignore = E731,E402,F,W503
ignore = E731,E402,F,W503,E203
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,bin/tmp/*
max-complexity = 12
4 changes: 3 additions & 1 deletion .github/linters/.python-lint
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ confidence=
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=
no-member,
attribute-defined-outside-init,
arguments-renamed,
unspecified-encoding,
consider-using-f-string,
Expand Down Expand Up @@ -498,4 +500,4 @@ known-third-party=enchant

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtin.Exception
1 change: 1 addition & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_GITHUB_ACTIONS: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_MARKDOWN: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request_tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Pytests

on:
on:
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -37,4 +37,4 @@ jobs:
python -m pip install .[test]
- name: Run pytest
run: |
python -m pytest -v --disable-warnings
python -m pytest -v --disable-warnings
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
coverage/lcov.info
lcov.info
*.png

# Translations
Expand Down Expand Up @@ -119,3 +121,6 @@ tags
# pixi environments
.pixi
*.egg-info

# test dirs
exo_cache
33 changes: 20 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: flake8
- id: mixed-line-ending
- repo: https://github.com/PyCQA/pylint
- id: check-json
- id: check-yaml
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: flake8
args: [--config, .github/linters/.flake8]
- id: mixed-line-ending
- repo: https://github.com/PyCQA/pylint
rev: v3.1.0
hooks:
- id: pylint
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
hooks:
- id: ruff
- id: pylint
args:
[
--rcfile,
.github/linters/.python-lint,
]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.3
hooks:
- id: ruff
73 changes: 8 additions & 65 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[MASTER]
[MAIN]

# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
Expand Down Expand Up @@ -55,76 +55,20 @@ confidence=
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=
no-name-in-module,
no-member,
attribute-defined-outside-init,
arguments-renamed,
unspecified-encoding,
consider-using-f-string,
# Defaults
print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
import-star-module-level,
raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
consider-using-f-string,
unspecified-encoding,
# Custom
protected-access,
fixme,
Expand All @@ -145,7 +89,6 @@ disable=
too-many-nested-blocks,
invalid-name,
import-error,
bad-continuation,
try-except-raise,
no-else-raise,
no-else-return,
Expand Down Expand Up @@ -558,4 +501,4 @@ known-third-party=enchant

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtin.Exception
8 changes: 3 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#################
Welcome to SUP3R!
#################

|Docs| |Tests| |Linter| |PyPi| |PythonV| |Codecov| |Zenodo|

Expand Down Expand Up @@ -30,14 +28,14 @@ Welcome to SUP3R!
The Super Resolution for Renewable Resource Data (sup3r) software uses
generative adversarial networks to create synthetic high-resolution wind and
solar spatiotemporal data from coarse low-resolution inputs. To get started,
check out the sup3r command line interface (CLI) `here
<https://nrel.github.io/sup3r/_cli/sup3r.html#sup3r>`_.
check out the sup3r command line interface `(CLI)
<https://nrel.github.io/sup3r/_cli/sup3r.html#sup3r>`__.

Installing sup3r
================

NOTE: The installation instruction below assume that you have python installed
on your machine and are using `conda <https://docs.conda.io/en/latest/index.html>`_
on your machine and are using `conda <https://docs.conda.io/en/latest/index.html>`__
as your package/environment manager.

Option 1: Install from PIP (recommended for analysts):
Expand Down
Loading

0 comments on commit 6ea8113

Please sign in to comment.