Skip to content

Commit

Permalink
Update to gitignore and to clean up the docstrings
Browse files Browse the repository at this point in the history
Docstring cleanup discussed in PR USEPA#393.
  • Loading branch information
dbhart committed Nov 15, 2023
1 parent 05c00ef commit 83b4192
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ temp*
examples/*.inp
wntr/tests/*.png

documentation/_local
documentation/apidoc
24 changes: 12 additions & 12 deletions wntr/epanet/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def read(self, inp_files, wn=None):
Returns
-------
:class:`~wntr.network.model.WaterNetworkModel`
WaterNetworkModel
A water network model object
"""
Expand Down Expand Up @@ -2449,21 +2449,21 @@ class BinFile(object):
Parameters
----------
results_type : list of ResultType, default=None
results_type : list of ResultType, optional
This parameter is *only* active when using a subclass of the BinFile that implements
a custom reader or writer. If None, then all results will be saved (node quality,
a custom reader or writer, by default None. If None, then all results will be saved (node quality,
demand, link flow, etc.). Otherwise, a list of result types can be passed to limit the memory used.
network : bool, default=False
Save a new WaterNetworkModel from the description in the output binary file. Certain
network : bool, optional
Save a new WaterNetworkModel from the description in the output binary file, by default None. Certain
elements may be missing, such as patterns and curves, if this is done.
energy : bool, default=False
Save the pump energy results.
statistics : bool, default=False
energy : bool, optional
Save the pump energy results, by default False.
statistics : bool, optional
Save the statistics lines (different from the stats flag in the inp file) that are
automatically calculated regarding hydraulic conditions.
convert_status : bool, default=True
Convert the EPANET link status (8 values) to simpler WNTR status (3 values). By
default, this is done, and the encoded-cause status values are converted simple state
automatically calculated regarding hydraulic conditions, by default False.
convert_status : bool, optional
Convert the EPANET link status (8 values) to simpler WNTR status (3 values), by default True.
When this is done, the encoded-cause status values are converted simple stat
values, instead.
Expand Down
10 changes: 0 additions & 10 deletions wntr/epanet/toolkit.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
"""
The wntr.epanet.toolkit module is a Python extension for the EPANET
Programmers Toolkit DLLs.
.. rubric:: Contents
.. autosummary::
runepanet
ENepanet
EpanetException
ENgetwarning
"""
import ctypes
import os
Expand Down
2 changes: 2 additions & 0 deletions wntr/sim/aml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""WNTR's algebraic modeling language module (SWIG)."""

from .expr import Var, Param, exp, log, sin, cos, tan, asin, acos, atan, inequality, sign, abs, value, ConditionalExpression
from .aml import Model, ParamDict, VarDict, ConstraintDict, Constraint

2 changes: 2 additions & 0 deletions wntr/sim/aml/aml.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""WNTR AML base classes."""

import sys
import scipy
from .evaluator import Evaluator
Expand Down
2 changes: 2 additions & 0 deletions wntr/sim/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Elements of the WNTRSimulator model."""

from wntr.sim.models import constants, param, var, constraint
2 changes: 2 additions & 0 deletions wntr/sim/models/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contant values used by WNTRSimulator."""

import logging
from wntr.utils.polynomial_interpolation import cubic_spline

Expand Down
2 changes: 2 additions & 0 deletions wntr/sim/models/constraint.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Modeling constraints for the WNTRSimulator."""

import logging
from wntr.sim import aml
import wntr.network
Expand Down
2 changes: 2 additions & 0 deletions wntr/sim/models/param.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Model parameters for the WNTRSimulator."""

import logging
from wntr.sim import aml
from wntr.utils.polynomial_interpolation import cubic_spline
Expand Down
2 changes: 2 additions & 0 deletions wntr/sim/models/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Utilities for the WNTRSimulator model."""

from wntr.utils.ordered_set import OrderedDict, OrderedSet
from six import with_metaclass
import abc
Expand Down
2 changes: 2 additions & 0 deletions wntr/sim/models/var.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Functions to add variables to the WNTRSimulator model."""

import logging
from wntr.sim import aml

Expand Down
2 changes: 2 additions & 0 deletions wntr/sim/network_isolation/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""The network isolation package (SWIG)."""

from wntr.sim.network_isolation.network_isolation import check_for_isolated_junctions, get_long_size
2 changes: 2 additions & 0 deletions wntr/utils/doc_inheritor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Utilitiy for inheriting docstrings."""

import inspect


Expand Down
2 changes: 2 additions & 0 deletions wntr/utils/logger.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Fuctions to set up a default handler for WNTR that will output to the console and to wntr.log."""

import logging
logging.getLogger('wntr').addHandler(logging.NullHandler())

Expand Down
2 changes: 2 additions & 0 deletions wntr/utils/ordered_set.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""An ordered set implementation (like an ordered dict)."""

import sys
from collections.abc import MutableSet
from collections import OrderedDict
Expand Down
2 changes: 2 additions & 0 deletions wntr/utils/polynomial_interpolation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Functions for a polynomial interpolation using cubic spline."""

def cubic_spline(x1, x2, f1, f2, df1, df2):
"""
Method to compute the coefficients of a smoothing polynomial.
Expand Down

0 comments on commit 83b4192

Please sign in to comment.