Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Use the following to cite this repository:
author = {Christopher Teubert and Jason Watkins and Katelyn Jarvis},
title = {Prognostics As-A-Service (PaaS) Sandbox},
month = May,
year = 2024,
version = {1.7},
year = 2025,
version = {1.8},
url = {https://github.com/nasa/prog_server}
}
```

The corresponding reference should look like this:

C. Teubert, J. Watkins, K. Jarvis, Prognostics As-A-Service (PaaS) Sandbox, v1.7, May 2024. URL https://github.com/nasa/prog_server.
C. Teubert, J. Watkins, K. Jarvis, Prognostics As-A-Service (PaaS) Sandbox, v1.8, May 2025. URL https://github.com/nasa/prog_server.

## Notices
Copyright © 2021 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All Rights Reserved.
Expand Down
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "prog_server"
version = "1.8.0-pre"
dependencies = [
'progpy',
'requests',
'urllib3',
'flask'

]
requires-python = ">=3.9, <3.14"
authors = [
{name = "Christopher Teubert", email = "christopher.a.teubert@nasa.gov"},
{name = "Katelyn Griffith", email = "katelyn.j.griffith@nasa.gov"},
{name = "Jason Watkins"}
]
maintainers = [
{name = "Christopher Teubert", email = "christopher.a.teubert@nasa.gov"},
{name = "Katelyn Griffith", email = "katelyn.j.griffith@nasa.gov"}
]
description = "The NASA Prognostics As-A-Service (PaaS) Sandbox (a.k.a. prog_server) is a simplified Software Oriented Architecture (SOA) for performing prognostics of engineering systems. The PaaS Sandbox is a wrapper around the Prognostics Algorithms and Models Packages, allowing 1+ users to access these packages features through a REST API. The package is intended to be used as a research tool to prototype and benchmark Prognostics As-A-Service (PaaS) architectures and work on the challenges facing such architectures."
readme = "README.md"
license = "NASA-1.3"
license-files = ["license.pdf",]
keywords = ['prognostics', 'diagnostics', 'fault detection', 'fdir', 'physics modeling', 'prognostics and health management', 'PHM', 'health management', 'prognostics as a service', 'ivhm']
classifiers = [
'Development Status :: 5 - Production/Stable',

'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'Intended Audience :: Manufacturing',

'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Physics',

'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3 :: Only'
]

[project.urls]
Homepage = "https://nasa.github.io/progpy/"
Documentation = "https://nasa.github.io/progpy/"
Repository = "https://github.com/nasa/prog_server"
Issues = "https://github.com/nasa/prog_server/issues"
Organization = "https://www.nasa.gov/content/diagnostics-prognostics"
56 changes: 0 additions & 56 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/prog_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# National Aeronautics and Space Administration. All Rights Reserved.

from prog_client.session import Session
__version__ = '1.7.0'
__version__ = '1.8.0-pre'
16 changes: 11 additions & 5 deletions src/prog_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .models.prog_server import server
import time

__version__ = '1.7.0'
__version__ = '1.8.0-pre'

def run(**kwargs):
"""
Expand All @@ -14,10 +14,13 @@ def run(**kwargs):
host (str, optional): Server host. Defaults to '127.0.0.1'.
port (int, optional): Server port. Defaults to 8555.
debug (bool, optional): If the server is started in debug mode
models (dict[str, PrognosticsModel]): a dictionary of extra models to consider. The key is the name used to identify it.
predictors (dict[str, predictors.Predictor]): a dictionary of extra predictors to consider. The key is the name used to identify it.
state_estimators (dict[str, state_estimators.StateEstimator]): a dictionary of extra estimators to consider. The key is the name used to identify it.
"""
server.run(**kwargs)

def start(timeout=10, **kwargs):
def start(timeout: float=10, **kwargs) -> None:
"""
Start the server (not blocking).

Expand All @@ -28,16 +31,19 @@ def start(timeout=10, **kwargs):
host (str, optional): Server host. Defaults to '127.0.0.1'.
port (int, optional): Server port. Defaults to 8555.
debug (bool, optional): If the server is started in debug mode
models (dict[str, PrognosticsModel]): a dictionary of extra models to consider. The key is the name used to identify it.
predictors (dict[str, predictors.Predictor]): a dictionary of extra predictors to consider. The key is the name used to identify it.
state_estimators (dict[str, state_estimators.StateEstimator]): a dictionary of extra estimators to consider. The key is the name used to identify it.
"""
server.start(**kwargs)
for i in range(timeout):
for _ in range(timeout):
if server.is_running():
return
time.sleep(1)
server.stop()
raise Exception("Server startup timeout")

def stop(timeout=10):
def stop(timeout: float=10) -> None:
"""
Stop the server.

Expand All @@ -51,7 +57,7 @@ def stop(timeout=10):
time.sleep(1)
raise Exception("Server startup timeout")

def is_running():
def is_running() -> bool:
"""
Check if the server is running.
"""
Expand Down
Loading