Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (quaquel#345)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.0 → 24.2.0](psf/black@23.12.0...24.2.0)
- [github.com/asottile/pyupgrade: v3.15.0 → v3.15.1](asottile/pyupgrade@v3.15.0...v3.15.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Mar 12, 2024
1 parent ebc96e9 commit c7f6657
Show file tree
Hide file tree
Showing 107 changed files with 108 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: 23.12.0
rev: 24.2.0
hooks:
- id: black-jupyter
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py39-plus]
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In the 2.5.0 release of the EMAworkbench we introduce a new experimental MPIeval
Furthermore, the pair plots for scenario discovery now allow contour plots and bivariate histograms (#288). When doing Prim you can inspect multiple boxed and display them in a single figure (#317).

### Breaking changes
From 3.0 onwards, the names of parameters, constants, constraints, and outcomes must be valid python identifiers. From this version onwards, a DeprecationWarning is raised if the name is not a valid Python identifier.
From 3.0 onwards, the names of parameters, constants, constraints, and outcomes must be valid python identifiers. From this version onwards, a DeprecationWarning is raised if the name is not a valid Python identifier.

### What's Changed
#### 🎉 New features added
Expand Down
1 change: 1 addition & 0 deletions docs/source/pyplots/basicEnvelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@author: jhkwakkel
"""

import matplotlib.pyplot as plt

from expWorkbench import load_results
Expand Down
1 change: 1 addition & 0 deletions docs/source/pyplots/basicEnvelope2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@author: jhkwakkel
"""

import matplotlib.pyplot as plt

from expWorkbench import load_results
Expand Down
1 change: 1 addition & 0 deletions docs/source/pyplots/basicLines.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@author: jhkwakkel
"""

import matplotlib.pyplot as plt

from expWorkbench import load_results
Expand Down
1 change: 1 addition & 0 deletions docs/source/pyplots/basicLines2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@author: jhkwakkel
"""

import matplotlib.pyplot as plt

from expWorkbench import load_results
Expand Down
1 change: 1 addition & 0 deletions docs/source/pyplots/basicMultiplotScatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@author: jhkwakkel
"""

import matplotlib.pyplot as plt

from expWorkbench import load_results
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/b_and_w_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
what is needed for the workbench.
"""

import itertools
import math

Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/cart.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
a wrapper around scikit-learn's version of CART.
"""

import io
import math
from io import StringIO
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/clusterer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
complex invariant distance. For details see `Steinmann et al (2020) <https://doi.org/10.1016/j.techfore.2020.120052>`_
"""

import itertools

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/dimensional_stacking.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
by simply selecting uncertain factors in some other manner.
"""

import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/feature_scoring.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Feature scoring functionality"""

import math
from operator import itemgetter

Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
as much as possible on the api used for PRIM and CART.
"""

import sys

import matplotlib as mpl
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/pairs_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This module provides R style pairs plotting functionality.
"""

import matplotlib.cm as cm
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/parcoords.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using matplotlib.
"""

import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
be used as is, or serve as an example for writing your own code.
"""

import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import ConnectionPatch
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/plotting_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Plotting utility functions
"""

import copy
import enum

Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
the jupyter notebook.
"""

import copy
import itertools
import warnings
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/regional_sa.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
zoom in on any given uncertainty in more detail.
"""

import math
import operator

Expand Down
1 change: 1 addition & 0 deletions ema_workbench/analysis/scenario_discovery_util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Scenario discovery utilities used by both :mod:`cart` and :mod:`prim`
"""

import abc
import enum
import itertools
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/connectors/netlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
substantial overhead.
"""

from pynetlogo.core import NetLogoException

from ema_workbench.em_framework.model import Replicator, SingleReplication
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/connectors/pysd_connector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
pysd connector
"""

import os

import pysd
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/connectors/simio_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
connector assumes Simio is installed in C:/Program Files (x86)/Simio
"""

import os
import sys
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/connectors/vensim.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:mod:`vensimDLLwrapper` can also be used directly.
"""

import decimal
import math
import os
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/connectors/vensimDLLwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"""

import ctypes
import struct
import sys
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
progress, always call super.
"""

import abc
import csv
import os
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
optimization
"""

import enum
import numbers
import os
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/experiment_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
helper module for running experiments and keeping track of which model
has been initialized with which policy.
"""

from ema_workbench.util.ema_logging import method_logger
from ..util import get_module_logger, EMAError, CaseError

Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/futures_ipyparallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
with IPython parallel.
"""

import collections
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/futures_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
support for using the multiprocessing library in combination with the workbench
"""

import logging
import multiprocessing
import os
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
an instance of an extension of this abstract base class.
"""

import operator
import os
import warnings
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""

import copy
import functools
import os
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/outcomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Module for outcome classes
"""

import abc
import collections
import numbers
Expand Down
4 changes: 2 additions & 2 deletions ema_workbench/em_framework/parameters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""parameters and related helper classes and functions"""

import abc
import numbers

Expand Down Expand Up @@ -43,8 +44,7 @@ def __set_name__(self, cls, name):
self.internal_name = "_" + name

@abc.abstractmethod
def get_bound(self, instance):
...
def get_bound(self, instance): ...


class UpperBound(Bound):
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/salib_samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Samplers for working with SALib
"""

import operator
import warnings

Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Monte Carlo sampling.
"""

import abc
import itertools
import operator
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/em_framework/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""utilities used throughout em_framework"""

import copy
import itertools
from collections import OrderedDict, UserDict
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.. codeauthor:: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
"""

from ema_workbench import RealParameter, TimeSeriesOutcome, ema_logging, perform_experiments

from ema_workbench.connectors.excel import ExcelModel
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_flu.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
chamarat <c.hamarat (at) tudelft (dot) nl>
"""

import matplotlib.pyplot as plt
import numpy as np
from numpy import sin, min, exp
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_lake_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
see https://gist.github.com/dhadka/a8d7095c98130d8f73bc
"""

import math

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_mpi_lake_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
see https://gist.github.com/dhadka/a8d7095c98130d8f73bc
"""

import math
import time

Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_netlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
with the one that comes with NetLogo.
"""

import numpy as np

from ema_workbench import (
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.. codeauthor:: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
"""

from ema_workbench import Model, RealParameter, ScalarOutcome, ema_logging, perform_experiments


Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_simio.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@author: jhkwakkel
"""

from ema_workbench import ema_logging, CategoricalParameter, MultiprocessingEvaluator, ScalarOutcome

from ema_workbench.connectors.simio_connector import SimioModel
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_vensim.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.. codeauthor:: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
chamarat <c.hamarat (at) tudelft (dot) nl>
"""

from ema_workbench import TimeSeriesOutcome, perform_experiments, RealParameter, ema_logging

from ema_workbench.connectors.vensim import VensimModel
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_vensim_advanced_flu.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.. codeauthor:: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
epruyt <e.pruyt (at) tudelft (dot) nl>
"""

import numpy as np

from ema_workbench import (
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_vensim_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@author: jhkwakkel
"""

from ema_workbench import (
RealParameter,
TimeSeriesOutcome,
Expand Down
1 change: 1 addition & 0 deletions ema_workbench/examples/example_vensim_flu.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.. codeauthor:: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
epruyt <e.pruyt (at) tudelft (dot) nl>
"""

import numpy as np

from ema_workbench import (
Expand Down
Loading

0 comments on commit c7f6657

Please sign in to comment.