Skip to content

Commit dfe2333

Browse files
committed
Fix tests
1 parent 549a269 commit dfe2333

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
- name: Update
100100
run: pip install --upgrade --upgrade-strategy eager -e .
101101
- name: Run tests
102-
run: python -m tests.test_composites
102+
run: python -m tests.test_composite
103103
test_data_model:
104104
timeout-minutes: 15
105105
runs-on: ubuntu-latest

scripts/test_copyright.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ def check_copyright(directory: str, invalid_files: list) -> bool:
3535
def main():
3636
print("\n\nTesting Files for Copyright Information")
3737

38-
root = '../prog_models'
38+
root = '../progpy'
3939
invalid_files = []
4040
copyright_confirmed = check_copyright(root, invalid_files)
4141

4242
if not copyright_confirmed:
4343
raise Exception(f"Failed test\nFiles missing copyright information: {invalid_files}")
44+
else:
45+
print('No missing copyright statements')
4446

4547
if __name__ == '__main__':
4648
main()

tutorial.ipynb

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@
2525
"* __States__: Internal parameters (typically hidden states) used to represent the state of the system- can be the same as inputs/outputs but do not have to be.\n",
2626
"* __Performance Metrics__: Performance characteristics of a system that are a function of system state, but are not directly measured. For example, a performance metric for a electric motor might be the maximum achievable torque \n",
2727
"\n",
28-
"The `prog_models` package has the following structure\n",
29-
"* `prog_models.data_models` - package containing algorithms for data-driven models, and parent class `prog_models.data_models.DataModel`\n",
30-
"* `prog_models.datasets` - package containing tools for downloading a few relevant datasets\n",
31-
"* `prog_models.loading` - package containing tools for representing different loading profiles\n",
32-
"* `prog_models.models.*` - implemented models (e.g., pump, valve, battery)\n",
33-
"* `prog_models.utils.*` - various utility functions and classes\n",
34-
"* `prog_models.CompositeModel` - model of a system-of-systems, combining multiple interrelated models into a single model\n",
35-
"* `prog_model.EnsembleModel` - model combining multiple models of the same system into a single model\n",
36-
"* `prog_models.LinearModel` - parent class for simple linear models\n",
37-
"* `prog_models.PrognosticsModel` - parent class for all prognostics models - defines interfaces that a model must implement, and tools for simulating said model\n",
28+
"The `progpy` package has the following structure\n",
29+
"* `progpy.data_models` - package containing algorithms for data-driven models, and parent class `prog_models.data_models.DataModel`\n",
30+
"* `progpy.datasets` - package containing tools for downloading a few relevant datasets\n",
31+
"* `progpy.loading` - package containing tools for representing different loading profiles\n",
32+
"* `progpy.models.*` - implemented models (e.g., pump, valve, battery)\n",
33+
"* `progpy.utils.*` - various utility functions and classes\n",
34+
"* `progpy.CompositeModel` - model of a system-of-systems, combining multiple interrelated models into a single model\n",
35+
"* `progpy.EnsembleModel` - model combining multiple models of the same system into a single model\n",
36+
"* `progpy.LinearModel` - parent class for simple linear models\n",
37+
"* `progpy.PrognosticsModel` - parent class for all prognostics models - defines interfaces that a model must implement, and tools for simulating said model\n",
3838
"\n",
39-
"In addition to the `prog_models` package, the GitHub repository includes many examples illustrating how to use the package (see `examples/`), a template for implementing a new model (`prog_model_template`), and this tutorial (`tutorial.ipynb`). Documentation for prog_models and the full ProgPy can be found at <https://nasa.github.io/progpy>,\n",
39+
"In addition to the `proypy` package, the GitHub repository includes many examples illustrating how to use the package (see `examples/`), a template for implementing a new model (`prog_model_template`), and this tutorial (`tutorial.ipynb`). Documentation for ProgPy can be found at <https://nasa.github.io/progpy>,\n",
4040
"\n",
41-
"Before you start, make sure to install prog_models using the following command:\n",
41+
"Before you start, make sure to install progpy using the following command:\n",
4242
"\n",
43-
" pip install prog_models\n",
43+
" pip install progpy\n",
4444
"\n",
4545
"Now let's get started with some examples"
4646
]
@@ -60,18 +60,18 @@
6060
"source": [
6161
"This first example is for using the included prognostics models. \n",
6262
"\n",
63-
"The `prog_models.models` package includes implemented models, including ones for pumps, valves, batteries, and more. See <https://nasa.github.io/progpy/api_ref/prog_models/IncludedModels.html> for a full description of the included models.\n",
63+
"The `progpy.models` package includes implemented models, including ones for pumps, valves, batteries, and more. See <https://nasa.github.io/progpy/api_ref/prog_models/IncludedModels.html> for a full description of the included models.\n",
6464
"\n",
6565
"First thing to do is to import the model you would like to use:"
6666
]
6767
},
6868
{
6969
"cell_type": "code",
70-
"execution_count": 2,
70+
"execution_count": null,
7171
"metadata": {},
7272
"outputs": [],
7373
"source": [
74-
"from prog_models.models import BatteryCircuit"
74+
"from progpy.models import BatteryCircuit"
7575
]
7676
},
7777
{
@@ -86,7 +86,7 @@
8686
},
8787
{
8888
"cell_type": "code",
89-
"execution_count": 3,
89+
"execution_count": null,
9090
"metadata": {},
9191
"outputs": [],
9292
"source": [
@@ -177,7 +177,7 @@
177177
},
178178
{
179179
"cell_type": "code",
180-
"execution_count": 4,
180+
"execution_count": null,
181181
"metadata": {},
182182
"outputs": [],
183183
"source": [
@@ -263,7 +263,7 @@
263263
"metadata": {},
264264
"outputs": [],
265265
"source": [
266-
"from prog_models.loading import Piecewise\n",
266+
"from progpy.loading import Piecewise\n",
267267
"# Variable (piece-wise) future loading scheme \n",
268268
"future_loading = Piecewise(batt.InputContainer, [600, 900, 1800, 3000, float('inf')], {'i': [2, 1, 4, 2, 3]})"
269269
]
@@ -425,7 +425,7 @@
425425
"metadata": {},
426426
"outputs": [],
427427
"source": [
428-
"from prog_models.models import ThrownObject\n",
428+
"from progpy.models import ThrownObject\n",
429429
"\n",
430430
"# Create an instance of the thrown object model with no process noise\n",
431431
"m = ThrownObject(process_noise=False)\n",
@@ -803,7 +803,7 @@
803803
"metadata": {},
804804
"outputs": [],
805805
"source": [
806-
"from prog_models import PrognosticsModel\n",
806+
"from progpy import PrognosticsModel\n",
807807
"\n",
808808
"class ThrownObject(PrognosticsModel):\n",
809809
" \"\"\"\n",
@@ -1242,7 +1242,7 @@
12421242
"* `examples.sim`, `examples.sim_battery_eol`, `examples.sim_pump`, `examples.sim_valve`, `examples.sim_powertrain`, `examples.sim_dcmotor_singlephase`: Examples using specific models from `prog_models.models`\n",
12431243
"* `examples.lstm_model`, `examples.full_lstm_model`, and `examples.custom_model`: Examples using data-driven models\n",
12441244
"\n",
1245-
"Thank you for trying out this tutorial. Open an issue on github (https://github.com/nasa/prog_models/issues) or email Chris Teubert (christopher.a.teubert@nasa.gov) with any questions or issues."
1245+
"Thank you for trying out this tutorial. Open an issue on github (https://github.com/nasa/progpy/issues) or email Chris Teubert (christopher.a.teubert@nasa.gov) with any questions or issues."
12461246
]
12471247
},
12481248
{
@@ -1270,7 +1270,7 @@
12701270
"name": "python",
12711271
"nbconvert_exporter": "python",
12721272
"pygments_lexer": "ipython3",
1273-
"version": "3.9.6"
1273+
"version": "3.11.0"
12741274
},
12751275
"metadata": {
12761276
"interpreter": {

0 commit comments

Comments
 (0)