nemo.git
4 days ago* penalities.py: Reduce cyclomatic complexity of some functions. master
Ben Elliston [Mon, 14 Jun 2021 11:30:48 +0000 (21:30 +1000)]
* penalities.py: Reduce cyclomatic complexity of some functions.

4 days agoRemove dummy class definitions from doctests. Create objects with
Ben Elliston [Mon, 14 Jun 2021 11:08:24 +0000 (21:08 +1000)]
Remove dummy class definitions from doctests. Create objects with
type() instead.

5 days agoRemove trailing spaces from pythonapp.yml.
Ben Elliston [Sun, 13 Jun 2021 12:13:00 +0000 (22:13 +1000)]
Remove trailing spaces from pythonapp.yml.

5 days ago* evolve: Fix a bug in docstring handling.
Ben Elliston [Sun, 13 Jun 2021 11:58:04 +0000 (21:58 +1000)]
* evolve: Fix a bug in docstring handling.

5 days ago* scenarios.py: Import all necessary generator types to allow
Ben Elliston [Sun, 13 Jun 2021 11:23:59 +0000 (21:23 +1000)]
* scenarios.py: Import all necessary generator types to allow
short-hand abbreviations to be used in this module. It makes things
much more readable.

5 days agoRemove 'theworks' scenario. Make it a coverage test instead.
Ben Elliston [Sun, 13 Jun 2021 10:50:11 +0000 (20:50 +1000)]
Remove 'theworks' scenario. Make it a coverage test instead.

5 days ago* generators.py (HydrogenStorage): Fix doctest bug.
Ben Elliston [Sun, 13 Jun 2021 05:49:44 +0000 (15:49 +1000)]
* generators.py (HydrogenStorage): Fix doctest bug.

5 days ago* Makefile (lint): Lower the --min-confidence to 50 so that Vulture
Ben Elliston [Sun, 13 Jun 2021 05:20:43 +0000 (15:20 +1000)]
* Makefile (lint): Lower the --min-confidence to 50 so that Vulture
can catch more issues.

5 days ago* scenarios.py (theworks): Add WindOffshore and HydrogenGT generators.
Ben Elliston [Sun, 13 Jun 2021 05:20:19 +0000 (15:20 +1000)]
* scenarios.py (theworks): Add WindOffshore and HydrogenGT generators.

5 days ago* generators.py (HydrogenGT): Improve doctest.
Ben Elliston [Sun, 13 Jun 2021 05:19:11 +0000 (15:19 +1000)]
* generators.py (HydrogenGT): Improve doctest.

5 days ago* generators.py (HydrogenStorage): Remove unused full_p() method.
Ben Elliston [Sun, 13 Jun 2021 05:18:48 +0000 (15:18 +1000)]
* generators.py (HydrogenStorage): Remove unused full_p() method.

5 days ago* generators.py (Generator): Remove ramp_up/down_mw_per_h for now.
Ben Elliston [Sun, 13 Jun 2021 05:18:02 +0000 (15:18 +1000)]
* generators.py (Generator): Remove ramp_up/down_mw_per_h for now.

2 weeks agoBreak remaining long lines.
Ben Elliston [Thu, 3 Jun 2021 00:45:46 +0000 (10:45 +1000)]
Break remaining long lines.

2 weeks ago* Makefile (lint): No need to silence E1123.
Ben Elliston [Tue, 1 Jun 2021 07:53:51 +0000 (17:53 +1000)]
* Makefile (lint): No need to silence E1123.

3 weeks ago* utils.py (_generator_list): Break a long line.
Ben Elliston [Wed, 26 May 2021 23:25:13 +0000 (09:25 +1000)]
* utils.py (_generator_list): Break a long line.

4 weeks ago* polygons.py: Re-format to break long lines.
Ben Elliston [Wed, 19 May 2021 07:28:56 +0000 (17:28 +1000)]
* polygons.py: Re-format to break long lines.

4 weeks agoBreak some long lines.
Ben Elliston [Wed, 19 May 2021 07:25:52 +0000 (17:25 +1000)]
Break some long lines.

6 weeks agoBreak some long lines.
Ben Elliston [Sat, 8 May 2021 03:40:43 +0000 (13:40 +1000)]
Break some long lines.

6 weeks agoGenerate stub.py, don't keep it in git.
Ben Elliston [Fri, 7 May 2021 13:24:23 +0000 (23:24 +1000)]
Generate stub.py, don't keep it in git.

6 weeks ago* utils.py (plot): Add some doctests.
Ben Elliston [Fri, 7 May 2021 13:20:50 +0000 (23:20 +1000)]
* utils.py (plot): Add some doctests.
* scenarios.py (re100): Remove unnecessary else clause.

6 weeks ago* Makefile (coverage): Don't run replay with -x.
Ben Elliston [Fri, 7 May 2021 13:20:28 +0000 (23:20 +1000)]
* Makefile (coverage): Don't run replay with -x.

6 weeks agoImprove coverage tests.
Ben Elliston [Fri, 7 May 2021 12:42:01 +0000 (22:42 +1000)]
Improve coverage tests.

6 weeks agoImprove doctests.
Ben Elliston [Fri, 7 May 2021 12:41:24 +0000 (22:41 +1000)]
Improve doctests.

6 weeks ago* Makefile (lint): Run pydocstyle, too!
Ben Elliston [Fri, 7 May 2021 10:56:56 +0000 (20:56 +1000)]
* Makefile (lint): Run pydocstyle, too!

6 weeks ago* context.py (JSONEncoder): Remove; not needed.
Ben Elliston [Fri, 7 May 2021 10:56:06 +0000 (20:56 +1000)]
* context.py (JSONEncoder): Remove; not needed.

6 weeks ago* generators (Electrolyser::store): Rename hour argument to anonymous.
Ben Elliston [Fri, 7 May 2021 10:55:26 +0000 (20:55 +1000)]
* generators (Electrolyser::store): Rename hour argument to anonymous.

6 weeks agoFix more pydocstyle issues.
Ben Elliston [Fri, 7 May 2021 10:55:13 +0000 (20:55 +1000)]
Fix more pydocstyle issues.

6 weeks ago* Makefile (lint): Add more linters.
Ben Elliston [Fri, 7 May 2021 08:53:25 +0000 (18:53 +1000)]
* Makefile (lint): Add more linters.

6 weeks agoevolve: Rename lambda parameter name ('ignored' to '_').
Ben Elliston [Fri, 7 May 2021 08:52:15 +0000 (18:52 +1000)]
evolve: Rename lambda parameter name ('ignored' to '_').

6 weeks agoSuppress bandit warnings about urlopen.
Ben Elliston [Fri, 7 May 2021 08:51:34 +0000 (18:51 +1000)]
Suppress bandit warnings about urlopen.

6 weeks agopolygons.py (_region_table): Use a dictionary, not an intialised list.
Ben Elliston [Fri, 7 May 2021 08:09:13 +0000 (18:09 +1000)]
polygons.py (_region_table): Use a dictionary, not an intialised list.

6 weeks agoRemove unnecessary Pylint message suppression.
Ben Elliston [Fri, 7 May 2021 08:08:56 +0000 (18:08 +1000)]
Remove unnecessary Pylint message suppression.

6 weeks agoSort imports with isort.
Ben Elliston [Fri, 7 May 2021 07:51:55 +0000 (17:51 +1000)]
Sort imports with isort.

6 weeks agoRemove unncessary Pylint message suppression.
Ben Elliston [Fri, 7 May 2021 07:22:08 +0000 (17:22 +1000)]
Remove unncessary Pylint message suppression.

6 weeks agoFix more naming issues.
Ben Elliston [Fri, 7 May 2021 06:16:43 +0000 (16:16 +1000)]
Fix more naming issues.

6 weeks agoImprove lots of variable names to eliminate Pylint naming warnings.
Ben Elliston [Fri, 7 May 2021 05:31:46 +0000 (15:31 +1000)]
Improve lots of variable names to eliminate Pylint naming warnings.

6 weeks agoRemove stray blanks before docstrings (from pydocstyle).
Ben Elliston [Fri, 7 May 2021 02:17:01 +0000 (12:17 +1000)]
Remove stray blanks before docstrings (from pydocstyle).

6 weeks agoImprove docstrings through suggestions made by pydocstyle.
Ben Elliston [Fri, 7 May 2021 02:13:28 +0000 (12:13 +1000)]
Improve docstrings through suggestions made by pydocstyle.

6 weeks agogenerators.py: Eradicate commented out line.
Ben Elliston [Thu, 6 May 2021 07:49:57 +0000 (17:49 +1000)]
generators.py: Eradicate commented out line.

6 weeks agoMove guide.ipynb into new doc subdirectory.
Ben Elliston [Mon, 3 May 2021 12:28:09 +0000 (22:28 +1000)]
Move guide.ipynb into new doc subdirectory.

6 weeks agoRefactor: move demand scenarios from scenarios.py to demand.py.
Ben Elliston [Mon, 3 May 2021 12:22:49 +0000 (22:22 +1000)]
Refactor: move demand scenarios from scenarios.py to demand.py.

6 weeks ago* summary.awk: POSIX does not allow operator ** (exponentiation).
Ben Elliston [Sun, 2 May 2021 09:48:27 +0000 (19:48 +1000)]
* summary.awk: POSIX does not allow operator ** (exponentiation).
  Use ^ instead for portability.

6 weeks ago* regions.py (__deepcopy__): Anonymise unused argument.
Ben Elliston [Sat, 1 May 2021 09:39:32 +0000 (19:39 +1000)]
* regions.py (__deepcopy__): Anonymise unused argument.

7 weeks agoTweak.
Ben Elliston [Sat, 1 May 2021 01:58:15 +0000 (11:58 +1000)]
Tweak.

7 weeks ago* scenarios.py (re100): Reduce complexity.
Ben Elliston [Fri, 30 Apr 2021 11:24:48 +0000 (21:24 +1000)]
* scenarios.py (re100): Reduce complexity.

7 weeks agoRemove more unused code.
Ben Elliston [Thu, 29 Apr 2021 12:08:12 +0000 (22:08 +1000)]
Remove more unused code.

7 weeks agoDocument using summary.awk.
Ben Elliston [Thu, 29 Apr 2021 12:02:11 +0000 (22:02 +1000)]
Document using summary.awk.

7 weeks agoRemove tracking of energy exchanges between polygons.
Ben Elliston [Thu, 29 Apr 2021 11:29:54 +0000 (21:29 +1000)]
Remove tracking of energy exchanges between polygons.
Remove -t options to evolve and replay.
Remove Dijkstra's shortest path algorithm (dijkstra/*.py).

7 weeks agoFix lots more PEP257 issues.
Ben Elliston [Thu, 29 Apr 2021 06:31:52 +0000 (16:31 +1000)]
Fix lots more PEP257 issues.

7 weeks agoFix new flake8 warnings.
Ben Elliston [Thu, 29 Apr 2021 06:21:15 +0000 (16:21 +1000)]
Fix new flake8 warnings.

7 weeks agoFix more Codacy issues.
Ben Elliston [Wed, 28 Apr 2021 11:17:54 +0000 (21:17 +1000)]
Fix more Codacy issues.

7 weeks agoFix more Codacy issues.
Ben Elliston [Tue, 27 Apr 2021 13:00:25 +0000 (23:00 +1000)]
Fix more Codacy issues.

7 weeks agoFix more Codacy warnings.
Ben Elliston [Tue, 27 Apr 2021 12:51:35 +0000 (22:51 +1000)]
Fix more Codacy warnings.

7 weeks agoFix a Codacy warning in polygons.py.
Ben Elliston [Tue, 27 Apr 2021 12:45:04 +0000 (22:45 +1000)]
Fix a Codacy warning in polygons.py.

7 weeks agoFix more Codacy warnings.
Ben Elliston [Tue, 27 Apr 2021 12:36:44 +0000 (22:36 +1000)]
Fix more Codacy warnings.

7 weeks agoFix more Codacy warnings.
Ben Elliston [Tue, 27 Apr 2021 12:20:30 +0000 (22:20 +1000)]
Fix more Codacy warnings.

7 weeks agoFix Codacy warnings (D213).
Ben Elliston [Tue, 27 Apr 2021 12:15:40 +0000 (22:15 +1000)]
Fix Codacy warnings (D213).

7 weeks agoFix some Codacy warnings (D211).
Ben Elliston [Tue, 27 Apr 2021 12:09:21 +0000 (22:09 +1000)]
Fix some Codacy warnings (D211).

7 weeks agoSilence new Pylint warnings.
Ben Elliston [Sat, 24 Apr 2021 21:00:23 +0000 (07:00 +1000)]
Silence new Pylint warnings.

8 weeks agopenalties.py: Fix Pylint warnings that crept in.
Ben Elliston [Tue, 20 Apr 2021 11:42:40 +0000 (21:42 +1000)]
penalties.py: Fix Pylint warnings that crept in.

2 months agoMove penalty functions from evolve into nemo/penalties.py.
Ben Elliston [Mon, 5 Apr 2021 12:52:27 +0000 (22:52 +1000)]
Move penalty functions from evolve into nemo/penalties.py.

2 months agogenerators.py: Stop disabling the Pylint too-many-lines message.
Ben Elliston [Mon, 5 Apr 2021 09:35:48 +0000 (19:35 +1000)]
generators.py: Stop disabling the Pylint too-many-lines message.

2 months agoscenarios.py: From nemo.polygons import wildcard.
Ben Elliston [Mon, 5 Apr 2021 09:34:37 +0000 (19:34 +1000)]
scenarios.py: From nemo.polygons import wildcard.

2 months agoFix doctests.
Ben Elliston [Sun, 4 Apr 2021 13:01:22 +0000 (23:01 +1000)]
Fix doctests.

2 months agogenerators.py (TraceGenerator): Default label to None.
Ben Elliston [Sun, 4 Apr 2021 12:58:45 +0000 (22:58 +1000)]
generators.py (TraceGenerator): Default label to None.

2 months agoRevert "scenarios.py (theworks): Pass label=None for all generators."
Ben Elliston [Sun, 4 Apr 2021 12:58:28 +0000 (22:58 +1000)]
Revert "scenarios.py (theworks): Pass label=None for all generators."

This reverts commit b2a33a764a697ad21fab57508de2907015acb6aa.

2 months agogenerators.py (DemandResponse): Tweak docstrings.
Ben Elliston [Sun, 4 Apr 2021 12:52:29 +0000 (22:52 +1000)]
generators.py (DemandResponse): Tweak docstrings.

2 months agogenerators.py: Rename OffshoreWind to WindOffshore.
Ben Elliston [Sun, 4 Apr 2021 12:52:01 +0000 (22:52 +1000)]
generators.py: Rename OffshoreWind to WindOffshore.

2 months agogenerators.py: Improve docstrings.
Ben Elliston [Sun, 4 Apr 2021 12:41:55 +0000 (22:41 +1000)]
generators.py: Improve docstrings.

2 months agoscenarios.py (theworks): Pass label=None for all generators.
Ben Elliston [Sun, 4 Apr 2021 12:41:15 +0000 (22:41 +1000)]
scenarios.py (theworks): Pass label=None for all generators.

2 months agogenerators.py: Derive CST from TraceGenerator.
Ben Elliston [Sun, 4 Apr 2021 11:47:51 +0000 (21:47 +1000)]
generators.py: Derive CST from TraceGenerator.

2 months agogenerators.py: Always make label default to None. If the label value
Ben Elliston [Sun, 4 Apr 2021 11:40:07 +0000 (21:40 +1000)]
generators.py: Always make label default to None. If the label value
None makes it all the way up to the Generator constructor, then form
the label using self.__class__.__name__.

2 months agogenerators.py: Remove 'delimiter' argument from various constructors
Ben Elliston [Sun, 4 Apr 2021 11:07:52 +0000 (21:07 +1000)]
generators.py: Remove 'delimiter' argument from various constructors
for simplicity. Move 'label' parameter closer to the front of the
parameter list and less frequently used optional keywords to the end
of the parameter list.

scenarios.py: Update all callers.

2 months agoRename non_synchronous_p to synchronous_p and invert all the logic.
Ben Elliston [Sun, 4 Apr 2021 08:36:36 +0000 (18:36 +1000)]
Rename non_synchronous_p to synchronous_p and invert all the logic.

2 months agogenerators.py (Geothermal_HSA, Geothermal_EGS): Remove unnecessary
Ben Elliston [Sun, 4 Apr 2021 07:13:52 +0000 (17:13 +1000)]
generators.py (Geothermal_HSA, Geothermal_EGS): Remove unnecessary
__init__ functions.

2 months agogenerators.py (PV1Axis, Behind_Meter_PV): Remove unnecessary __init__
Ben Elliston [Sun, 4 Apr 2021 03:42:13 +0000 (13:42 +1000)]
generators.py (PV1Axis, Behind_Meter_PV): Remove unnecessary __init__
functions.

2 months agoreplay: Append magic --ignore-gooey option to the command line if any
Ben Elliston [Sun, 4 Apr 2021 03:09:51 +0000 (13:09 +1000)]
replay: Append magic --ignore-gooey option to the command line if any
other command line options are passed. This allows replay to revert to
terminal output for batched operation without bringing up the GUI.

2 months agoreplay: Robustify processing of demand_modifier options.
Ben Elliston [Sun, 4 Apr 2021 03:09:19 +0000 (13:09 +1000)]
replay: Robustify processing of demand_modifier options.

2 months agoreplay: Improve help text for -x/---plot.
Ben Elliston [Sun, 4 Apr 2021 03:08:50 +0000 (13:08 +1000)]
replay: Improve help text for -x/---plot.

2 months agoutils.py: Fix Matplotlib warning:
Ben Elliston [Sun, 4 Apr 2021 02:55:53 +0000 (12:55 +1000)]
utils.py: Fix Matplotlib warning:

  UserWarning: color is redundantly defined by the 'color' keyword
  argument and the fmt string "yv" (-> color='y'). The keyword
  argument will take precedence.

This warning started due to a Matplotlib upgrade. The format string
"yv" has been in NEMO for a very long time and, as far as I can tell,
was incorrect from the beginning. The color keyword was correctly
forcing the markers to be red, so this error was never evident.

2 months agoMakefile (pdoc): Be explicit about running pdoc3, not pdoc, to avoid
Ben Elliston [Thu, 1 Apr 2021 12:05:20 +0000 (23:05 +1100)]
Makefile (pdoc): Be explicit about running pdoc3, not pdoc, to avoid
picking up the wrong pdoc utility.

2 months agogenerators.py: Disable Pylint 'too-many-lines' message.
Ben Elliston [Thu, 1 Apr 2021 11:06:56 +0000 (22:06 +1100)]
generators.py: Disable Pylint 'too-many-lines' message.

2 months agoAppend magic --ignore-gooey option to the command line if any other
Ben Elliston [Thu, 1 Apr 2021 03:17:55 +0000 (14:17 +1100)]
Append magic --ignore-gooey option to the command line if any other
command line options are passed. This allows NEMO to revert to
terminal output for batched operation without bringing up the GUI.

2 months agoRevert "evolve: Set use_cmd_args to True in the Gooey decorator."
Ben Elliston [Thu, 1 Apr 2021 03:16:49 +0000 (14:16 +1100)]
Revert "evolve: Set use_cmd_args to True in the Gooey decorator."

This reverts commit 4d4b9598869ef637b1d1fe3a4427b5192e8f48b0.

2 months agoRevert "Document --ignore-gooey."
Ben Elliston [Thu, 1 Apr 2021 03:16:08 +0000 (14:16 +1100)]
Revert "Document --ignore-gooey."

This reverts commit 3f6d74b8eb6dc5b540e76582b460b845fb2ffa2a.

2 months agoRevert "evolve: Add --ignore-gooey option so that it turns up in --help."
Ben Elliston [Thu, 1 Apr 2021 03:15:55 +0000 (14:15 +1100)]
Revert "evolve: Add --ignore-gooey option so that it turns up in --help."

This reverts commit 33a261da5360e33e84e81656c83e56a12c0f2ca9.

2 months agogenerators.py: New OffshoreWind class.
Ben Elliston [Thu, 1 Apr 2021 03:03:19 +0000 (14:03 +1100)]
generators.py: New OffshoreWind class.

2 months agoguide.ipynb: Replace "IPython" with "Jupyter" throughout.
Ben Elliston [Sat, 27 Mar 2021 22:37:38 +0000 (09:37 +1100)]
guide.ipynb: Replace "IPython" with "Jupyter" throughout.

2 months agopythonapp.yml: Install libGLU development package for wxPython build.
Ben Elliston [Sat, 27 Mar 2021 21:16:25 +0000 (08:16 +1100)]
pythonapp.yml: Install libGLU development package for wxPython build.

2 months agoDocument --ignore-gooey.
Ben Elliston [Sat, 27 Mar 2021 12:26:52 +0000 (23:26 +1100)]
Document --ignore-gooey.

2 months agoevolve: Add --ignore-gooey option so that it turns up in --help.
Ben Elliston [Sat, 27 Mar 2021 12:23:24 +0000 (23:23 +1100)]
evolve: Add --ignore-gooey option so that it turns up in --help.

2 months agoevolve: Set use_cmd_args to True in the Gooey decorator.
Ben Elliston [Sat, 27 Mar 2021 12:14:40 +0000 (23:14 +1100)]
evolve: Set use_cmd_args to True in the Gooey decorator.

2 months agoRevert "Don't use Gooey if the user passes any command line arguments."
Ben Elliston [Sat, 27 Mar 2021 11:59:58 +0000 (22:59 +1100)]
Revert "Don't use Gooey if the user passes any command line arguments."

This reverts commit 858f968acc9579819f4106aa236212e1e2ea6a31.

2 months agoguide.ipynb: Improve user guide.
Ben Elliston [Thu, 25 Mar 2021 06:49:59 +0000 (17:49 +1100)]
guide.ipynb: Improve user guide.

2 months agosetup.py (install_requires): Update.
Ben Elliston [Thu, 25 Mar 2021 03:52:27 +0000 (14:52 +1100)]
setup.py (install_requires): Update.

3 months agogenerators.py: Add _thousands and _currency formatting functions to
Ben Elliston [Thu, 11 Mar 2021 13:02:22 +0000 (00:02 +1100)]
generators.py: Add _thousands and _currency formatting functions to
simplify format strings throughout.

7 months agoMakefile (lint): Disable message E1123 due to Pylint control flow bug.
Ben Elliston [Wed, 28 Oct 2020 04:08:33 +0000 (15:08 +1100)]
Makefile (lint): Disable message E1123 due to Pylint control flow bug.

8 months agoMakefile (check): Set PYTHONOPTIMIZE=0 in the environment so that
Ben Elliston [Mon, 12 Oct 2020 14:12:22 +0000 (01:12 +1100)]
Makefile (check): Set PYTHONOPTIMIZE=0 in the environment so that
assert works in tests.

9 months agoscenarios.py (theworks): Reduce the number of local variables to
Ben Elliston [Wed, 9 Sep 2020 11:48:39 +0000 (21:48 +1000)]
scenarios.py (theworks): Reduce the number of local variables to
silence a Pylint warning.

9 months agoShorten long lines.
Ben Elliston [Wed, 9 Sep 2020 11:47:44 +0000 (21:47 +1000)]
Shorten long lines.