Skip to content

Commit

Permalink
Merge pull request #143 from NREL/Move-to-hatch
Browse files Browse the repository at this point in the history
minor edit
  • Loading branch information
AadilLatif authored Mar 25, 2024
2 parents b9ba2ba + f2ec277 commit 9f92231
Show file tree
Hide file tree
Showing 35 changed files with 118 additions and 182 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 '.[dev]'
- name: Run pytests
run: |
python -m pytest -v --disable-warnings
2 changes: 1 addition & 1 deletion docs/source/Respository documentaion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Python API interface
:toctree: _autosummary
:recursive:

PyDSS
pydss

12 changes: 1 addition & 11 deletions docs/source/_autosummary/PyDSS.api.src.app.pydss.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,11 @@ pydss.api.src.app.pydss

.. automodule:: pydss.api.src.app.pydss











.. rubric:: Classes

.. autosummary::

PyDSS
pydss



Expand Down
4 changes: 2 additions & 2 deletions docs/source/_autosummary/PyDSS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PyDSS
Pydss
=====

.. automodule:: PyDSS
.. automodule:: pydss



Expand Down
2 changes: 1 addition & 1 deletion docs/source/co-simulation_support.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Co-simulation interfaces
=========================

PyDSS provides two pathways for configuring pydss for a co-simulation with external simulators.
Pydss provides two pathways for configuring pydss for a co-simulation with external simulators.
These interface help researchers cut lead time in setting up and configuring co-simulation setups to
simulate cyber phsical interactions by coupling multiple domain scepific tools. Each interface has
certain pros and cons detailed in the documentation pages.
Expand Down
7 changes: 0 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@
import re
# import sys

# my_path = os.path.abspath('../PyDSS')
# print(f"{my_path=}")
# sys.path.insert(0, os.path.abspath('../PyDSS'))

import sphinx_rtd_theme
# import pydss
# import pydss
# import pydss.simulation_input_models
#from pydss.simulation_input_models import SimulationSettingsModel, ProjectModel

# -- Project information -----------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/source/hdf-data-format.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############
HDF Data Format
###############
This page describes the format pydss uses to export data in an HDF file. PyDSS
This page describes the format pydss uses to export data in an HDF file. Pydss
contains code to convert the raw data to pandas.DataFrame objects or Python
dictionaries, so normal users should not need to write their own tools to
interpret the data.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:align: center

#####
PyDSS
Pydss
#####

***********
Expand Down
2 changes: 1 addition & 1 deletion docs/source/interfaces.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Interfaces
=========================

PyDSS provides three easy to configure external interfaces. These interface help researchers cut lead time in setting up and configuring co-simulation setups to simulate cyber phsical interactions by coupling multiple domain scpific tools. The 'External_interfacing_example' project in the examples folder provides examples on how to set up and use each of these interfaces.
Pydss provides three easy to configure external interfaces. These interface help researchers cut lead time in setting up and configuring co-simulation setups to simulate cyber phsical interactions by coupling multiple domain scpific tools. The 'External_interfacing_example' project in the examples folder provides examples on how to set up and use each of these interfaces.

.. toctree::
:maxdepth: 3
Expand Down
2 changes: 1 addition & 1 deletion docs/source/project_layout.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _pydss_project_layout:

********************
PyDSS Project Layout
Pydss Project Layout
********************
A pydss project is made up of one or more scenarios that run simulations on a shared OpenDSS
model. The purpose of scenarios is to allow users to customize inputs, outputs, or controls.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Quick Start Guide
*****************

This page provides a short example to get pydss up and running. If you have not already installed
PyDSS, please follow the instructions at :ref:`installation_label`.
pydss, please follow the instructions at :ref:`installation_label`.

The basic steps are to create an empty project, copy your OpenDSS model files into that project,
customize the simuation settings, and then run the simulation.

Create an empty project
=======================
PyDSS requires a specific directory structure with configuration files that specify how to run a
Pydss requires a specific directory structure with configuration files that specify how to run a
simulation. Run this command to create an empty project.

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion docs/source/reports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This can be useful for debugging purposes when you develop your own reports.
***********
Output Data
***********
PyDSS stores generated reports in ``<project-path>/Reports``.
Pydss stores generated reports in ``<project-path>/Reports``.

******************
Adding New Reports
Expand Down
12 changes: 6 additions & 6 deletions docs/source/spec/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ paths:
required: true
schema:
type: string
example: C:/Users/alatif/Desktop/PyDSS_2.0/PyDSS/examples
example: C:/Users/alatif/Desktop/pydss_2.0/pydss/examples
style: form
explode: true
responses:
Expand Down Expand Up @@ -205,7 +205,7 @@ paths:
required: true
schema:
type: string
example: C:/Users/alatif/Desktop/PyDSS_2.0/PyDSS/examples
example: C:/Users/alatif/Desktop/pydss_2.0/pydss/examples
style: form
explode: true
responses:
Expand Down Expand Up @@ -241,7 +241,7 @@ paths:
UUID: None
"/simulators/pydss":
put:
summary: Run a command on an active instance of PyDSS
summary: Run a command on an active instance of pydss
tags:
- Simulation
requestBody:
Expand Down Expand Up @@ -330,15 +330,15 @@ paths:
Error tolerance: 0.001
Control mode: Static
Simulation Type: QSTS
Project Path: C:/Users/alatif/Desktop/PyDSS_2.0/PyDSS/examples
Project Path: C:/Users/alatif/Desktop/pydss_2.0/pydss/examples
Active Project: custom_contols
Active Scenario: base_case
DSS File: Master_Spohn_existing_VV.dss
Co-simulation Mode: false
Log Results: false
Export Data Tables: true
Export Data In Memory: true
Federate name: PyDSS_x
Federate name: pydss_x
required: false
responses:
'200':
Expand Down Expand Up @@ -366,7 +366,7 @@ paths:
Message: Failed to create a pydss instance
UUID: None
delete:
summary: Deletes an active instance of PyDSS
summary: Deletes an active instance of pydss
tags:
- Simulation
parameters:
Expand Down
6 changes: 3 additions & 3 deletions docs/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
********
Tutorial
********
This page describes how to run simulations with pydss. If you have not already installed PyDSS,
This page describes how to run simulations with pydss. If you have not already installed pydss,
please follow the instructions at :ref:`installation_label`.

Create a project
================
PyDSS requires a specific directory structure with configuration files that specify how to run a
Pydss requires a specific directory structure with configuration files that specify how to run a
simulation. Run this command to create an empty project.

.. code-block:: bash
Expand Down Expand Up @@ -120,7 +120,7 @@ column represents. This can vary by element.

Data Viewer
-----------
PyDSS includes a simple Jupyter notebook UI that allows you to plot element results.
Pydss includes a simple Jupyter notebook UI that allows you to plot element results.
Here's how to start it. Note that you must be in the directory where you ran
``pydss run <my-project>`` when you start the notebook.

Expand Down
6 changes: 3 additions & 3 deletions examples/custom_contols/ProfileManager.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Control mode" = "Static"
"Disable pydss controllers" = false
"Simulation Type" = "QSTS"
"Project Path" = "C:\\Users\\alatif\\Desktop\\PyDSS_2.0\\PyDSS_src\\examples"
"Project Path" = "C:\\Users\\alatif\\Desktop\\pydss_2.0\\pydss_src\\examples"
"Active Project" = "custom_contols"
"Active Scenario" = ""
"DSS File" = "Master_Spohn_existing_VV.dss"
Expand Down Expand Up @@ -78,6 +78,6 @@ Uninterruptible = true

[Profiles]
"Use profile manager" = false
"Profile store path" = "C:\\Users\\alatif\\Desktop\\PyDSS_2.0\\PyDSS_src\\examples\\custom_contols\\Profiles\\profiles.hdf5"
"Profile mapping" = "C:\\Users\\alatif\\Desktop\\PyDSS_2.0\\PyDSS_src\\examples\\custom_contols\\Profiles\\mapping.toml"
"Profile store path" = "C:\\Users\\alatif\\Desktop\\pydss_2.0\\pydss_src\\examples\\custom_contols\\Profiles\\profiles.hdf5"
"Profile mapping" = "C:\\Users\\alatif\\Desktop\\pydss_2.0\\pydss_src\\examples\\custom_contols\\Profiles\\mapping.toml"

2 changes: 1 addition & 1 deletion examples/external_interfaces/Python_example/run_pyDSS.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
default=r'simulation.toml')
def run_pyDSS(pydss_path, sim_path, sim_file):
sys.path.append(pydss_path)
sys.path.append(os.path.join(pydss_path, 'PyDSS'))
sys.path.append(os.path.join(pydss_path, 'pydss'))
file1 = open(os.path.join(sim_path, sim_file),"r")
text = file1.read()
sim_args = toml.loads(text)
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ classifiers = [
"Programming Language :: Python :: 3",
]
dependencies = [
"aiohttp_swagger3>=0.4.3",
"aiohttp",
"bokeh",
"click",
"h5py",
"helics",
"loguru",
"matplotlib",
"networkx",
"numpy",
"OpenDSSDirect.py==0.8.4",
Expand All @@ -56,6 +52,10 @@ dev = [
"sphinx",
"sphinx-rtd-theme",
]
server = [
"aiohttp_swagger3>=0.4.3",
"aiohttp",
]

[project.scripts]
pydss = "pydss.cli.pydss:cli"
Expand Down
2 changes: 1 addition & 1 deletion src/pydss/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.0.1"
__version__ = "3.1.2"

from pydss.utils.timing_utils import timer_stats_collector
from . import *
Loading

0 comments on commit 9f92231

Please sign in to comment.