From 4199ab131d0c686463459d7dbf18f1c0e4ed99a7 Mon Sep 17 00:00:00 2001 From: Latif Date: Mon, 25 Mar 2024 11:48:36 -0600 Subject: [PATCH 1/3] bug fix on documentation --- docs/source/CLI interface.rst | 2 ++ docs/source/Respository documentaion.rst | 2 +- docs/source/_autosummary/PyDSS.api.server.rst | 2 +- .../_autosummary/PyDSS.api.src.web.handler.rst | 2 +- docs/source/_autosummary/PyDSS.cli.pydss.rst | 2 +- .../source/_autosummary/PyDSS.cli.run_server.rst | 2 +- .../_autosummary/PyDSS.pydss_fs_interface.rst | 1 - docs/source/_autosummary/PyDSS.rst | 4 ++-- docs/source/conf.py | 6 +++--- docs/source/index.rst | 16 +++++----------- src/pydss/__init__.py | 2 +- src/pydss/api/src/app/pydss.py | 2 +- src/pydss/api/src/web/handler.py | 2 +- 13 files changed, 20 insertions(+), 25 deletions(-) diff --git a/docs/source/CLI interface.rst b/docs/source/CLI interface.rst index ff727400..596c4117 100644 --- a/docs/source/CLI interface.rst +++ b/docs/source/CLI interface.rst @@ -1,3 +1,5 @@ +CLI Interface +^^^^^^^^^^^^^ .. click:: pydss.cli.pydss:cli :prog: Command line interface diff --git a/docs/source/Respository documentaion.rst b/docs/source/Respository documentaion.rst index 8cf61bfe..d5a2850b 100644 --- a/docs/source/Respository documentaion.rst +++ b/docs/source/Respository documentaion.rst @@ -6,5 +6,5 @@ Python API interface :toctree: _autosummary :recursive: - PyDSS + pydss diff --git a/docs/source/_autosummary/PyDSS.api.server.rst b/docs/source/_autosummary/PyDSS.api.server.rst index bcb1df5e..5d43455a 100644 --- a/docs/source/_autosummary/PyDSS.api.server.rst +++ b/docs/source/_autosummary/PyDSS.api.server.rst @@ -1,4 +1,4 @@ -pydss.api.server +pydss.api.server ================ .. automodule:: pydss.api.server diff --git a/docs/source/_autosummary/PyDSS.api.src.web.handler.rst b/docs/source/_autosummary/PyDSS.api.src.web.handler.rst index f2825df1..f6906b54 100644 --- a/docs/source/_autosummary/PyDSS.api.src.web.handler.rst +++ b/docs/source/_autosummary/PyDSS.api.src.web.handler.rst @@ -1,4 +1,4 @@ -pydss.api.src.web.handler +pydss.api.src.web.handler ========================= .. automodule:: pydss.api.src.web.handler diff --git a/docs/source/_autosummary/PyDSS.cli.pydss.rst b/docs/source/_autosummary/PyDSS.cli.pydss.rst index 5aa0e03f..69b4c151 100644 --- a/docs/source/_autosummary/PyDSS.cli.pydss.rst +++ b/docs/source/_autosummary/PyDSS.cli.pydss.rst @@ -1,4 +1,4 @@ -pydss.cli.pydss +pydss.cli.pydss =============== .. automodule:: pydss.cli.pydss diff --git a/docs/source/_autosummary/PyDSS.cli.run_server.rst b/docs/source/_autosummary/PyDSS.cli.run_server.rst index f8d47ab1..6437c411 100644 --- a/docs/source/_autosummary/PyDSS.cli.run_server.rst +++ b/docs/source/_autosummary/PyDSS.cli.run_server.rst @@ -1,4 +1,4 @@ -pydss.cli.run\_server +pydss.cli.run\_server ===================== .. automodule:: pydss.cli.run_server diff --git a/docs/source/_autosummary/PyDSS.pydss_fs_interface.rst b/docs/source/_autosummary/PyDSS.pydss_fs_interface.rst index 3afdd539..87f238cd 100644 --- a/docs/source/_autosummary/PyDSS.pydss_fs_interface.rst +++ b/docs/source/_autosummary/PyDSS.pydss_fs_interface.rst @@ -19,7 +19,6 @@ pydss.pydss\_fs\_interface PyDssArchiveFileInterfaceBase PyDssFileSystemInterface - PyDssFileSystemInterface PyDssTarFileInterface PyDssZipFileInterface diff --git a/docs/source/_autosummary/PyDSS.rst b/docs/source/_autosummary/PyDSS.rst index 75c3c7e5..75662137 100644 --- a/docs/source/_autosummary/PyDSS.rst +++ b/docs/source/_autosummary/PyDSS.rst @@ -1,7 +1,7 @@ -PyDSS +pydss ===== -.. automodule:: PyDSS +.. automodule:: pydss diff --git a/docs/source/conf.py b/docs/source/conf.py index 4caf6183..82725cc7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -43,12 +43,12 @@ def find_version(*file_paths): return version_match.group(1) raise RuntimeError("Unable to find version string.") -project = 'PyDSS' +project = 'Pydss' copyright = '2019, Aadil Latif' author = 'Aadil Latif' # The full version, including alpha/beta/rc tags -release = find_version("../../PyDSS", "__init__.py") +release = find_version("../../src/pydss", "__init__.py") # -- General configuration --------------------------------------------------- @@ -98,7 +98,7 @@ def find_version(*file_paths): redoc = [ { - 'name': 'PyDSS API', + 'name': 'Pydss API', 'page': 'api', 'spec': 'spec/swagger.yml', 'embed': True, diff --git a/docs/source/index.rst b/docs/source/index.rst index 5992d432..5001fb0a 100755 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -7,14 +7,14 @@ :align: center ##### -PyDSS +Pydss ##### *********** -About PyDSS +About Pydss *********** -PyDSS is a Python wrapper for OpenDSS that aims to expand upon its +Pydss is a Python wrapper for OpenDSS that aims to expand upon its organizational, analytical, and visualization capabilities with these features: - Allows the user to develop custom control algorithms for specific circuit elements and run them @@ -25,7 +25,7 @@ organizational, analytical, and visualization capabilities with these features: - Automates collection and analysis of circuit element results at each simulation time step. - Flexible architecture allows users to develop extensions. -PyDSS uses opendssdirect.py (https://pypi.org/project/OpenDSSDirect.py/) to communicate with +Pydss uses opendssdirect.py (https://pypi.org/project/OpenDSSDirect.py/) to communicate with OpenDSS. .. _installation_label: @@ -43,18 +43,12 @@ Here is an example conda command: $ conda create -n pydss python=3.9 -Install shapely with conda. pip, particularly on Windows, often fails to install its dependent -libraries. - -.. code-block:: bash - - $ conda install shapely Install the latest supported pydss version with this command: .. code-block:: bash - $ pip install dsspy + $ pip install NREL-pydss Alternatively, to get the lastest code from the master branch: diff --git a/src/pydss/__init__.py b/src/pydss/__init__.py index f2da49af..8d50e756 100644 --- a/src/pydss/__init__.py +++ b/src/pydss/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.0.1" +__version__ = "3.1.2" from pydss.utils.timing_utils import timer_stats_collector from . import * diff --git a/src/pydss/api/src/app/pydss.py b/src/pydss/api/src/app/pydss.py index ce17ee80..b6fc6a18 100644 --- a/src/pydss/api/src/app/pydss.py +++ b/src/pydss/api/src/app/pydss.py @@ -21,7 +21,7 @@ def __init__(self, event=None, queue=None, parameters=None): ''' TODO: work on logging.yaml file''' - logging.info("{} - initialized ".format({self.uuid})) + logger.info("{} - initialized ".format({self.uuid})) self.shutdownevent = event self.queue = queue diff --git a/src/pydss/api/src/web/handler.py b/src/pydss/api/src/web/handler.py index ce59a194..6319c59e 100644 --- a/src/pydss/api/src/web/handler.py +++ b/src/pydss/api/src/web/handler.py @@ -10,7 +10,7 @@ from pydss.pydss_project import PyDssProject, PyDssScenario, ControllerType from pydss.api.src.web.parser import bytestream_decode -from pydss.api.src.app.pydss import pydss +from pydss.api.src.app.pydss import PyDSS class Handler: From 30de628d057a91a167c3e85989b8b5fad5ace89d Mon Sep 17 00:00:00 2001 From: Latif Date: Mon, 25 Mar 2024 12:29:01 -0600 Subject: [PATCH 2/3] minor edits --- .github/workflows/pull_request_tests.yml | 2 +- docs/source/index.rst | 3 --- src/pydss/pyDSS.py | 30 ------------------------ 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/.github/workflows/pull_request_tests.yml b/.github/workflows/pull_request_tests.yml index beb5db91..0b422d57 100644 --- a/.github/workflows/pull_request_tests.yml +++ b/.github/workflows/pull_request_tests.yml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install '.[dev]' + python -m pip install -e . - name: Run pytests run: | python -m pytest -v --disable-warnings diff --git a/docs/source/index.rst b/docs/source/index.rst index 5001fb0a..d0945fef 100755 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,9 +3,6 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -.. figure:: _static/Logo.png - :align: center - ##### Pydss ##### diff --git a/src/pydss/pyDSS.py b/src/pydss/pyDSS.py index 3e5c31ae..9108de24 100644 --- a/src/pydss/pyDSS.py +++ b/src/pydss/pyDSS.py @@ -9,36 +9,6 @@ from pydss.simulation_input_models import SimulationSettingsModel, dump_settings from pydss.utils.utils import dump_data, load_data - -__author__ = "Aadil Latif" -__copyright__ = """ - BSD 3-Clause License - - Copyright (c) 2018, Alliance for Sustainable Energy LLC, All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the - following conditions are met: - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following - disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote - products derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -""" -__license__ = "BSD 3-Clause License" -__version__ = "2.0.4" -__maintainer__ = "Aadil Latif" -__email__ = "aadil.latif@nrel.gov, aadil.latif@gmail.com" -__status__ = "Production" - PYDSS_BASE_DIR = os.path.join(os.path.dirname(getattr(pydss, "__path__")[0]), "pydss") class instance(object): From f5f2f49ef0ceac4782929a88345fded870aa0769 Mon Sep 17 00:00:00 2001 From: Latif Date: Mon, 25 Mar 2024 12:46:56 -0600 Subject: [PATCH 3/3] pyproj update --- .github/workflows/pull_request_tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request_tests.yml b/.github/workflows/pull_request_tests.yml index 0b422d57..daa52618 100644 --- a/.github/workflows/pull_request_tests.yml +++ b/.github/workflows/pull_request_tests.yml @@ -7,9 +7,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] + #os: [ubuntu-latest, macos-latest] #os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9"] #["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 @@ -20,7 +21,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -e . + python -m pip install -e '.[dev]' - name: Run pytests run: | python -m pytest -v --disable-warnings