Skip to content

Conversation

@mstraut
Copy link
Contributor

@mstraut mstraut commented May 6, 2023

5/5/2023

5/5/2023
@github-actions
Copy link

github-actions bot commented May 6, 2023

Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:

  • Reviewer (someone other than author) should look for bugs, efficiency, readability, testing, and coverage in examples (if relevant).
  • Ensure that each PR adding a new feature should include a test verifying that feature.
  • All errors from static analysis must be resolved.
  • Review the test coverage reports (if there is a change) - will be added as comment on PR if there is a change
  • Review the software benchmarking results (if there is a change) - will be added as comment on PR
  • Any added dependencies are included in requirements.txt, setup.py, and dev_guide.rst (this document)
  • All warnings from static analysis must be reviewed and resolved - if deemed appropriate.

5/5/2023
@mstraut mstraut marked this pull request as draft May 6, 2023 05:44
@mstraut mstraut requested a review from teubert May 6, 2023 21:34
@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1688942
import thrown object 0.6307466000000002
model initialization 0.16983400000000004
set noise 0.7905057000000002
simulate 0.41376550000000023
simulate with saving 1.3234873999999999
simulate with saving, dt 1.4122969999999997
simulate with printing results, dt 1.8491702000000005
Plot results 21.4408717
Metrics 0.04769589999999724
Surrogate Model Generation 4.379669400000001
surrogate sim 1.6106236999999979
surrogate sim, dt 3.9738390999999993

To:

Test Time (s)
import main 0.17378380000000004
import thrown object 0.6170778999999997
model initialization 2.9591431999999998
set noise 0.7763596999999995
simulate 15.329666200000002
simulate with saving 36.28476499999999
simulate with saving, dt 54.6860944
simulate with printing results, dt 66.9489459
Plot results 21.346808699999997
Metrics 0.05045189999998456
Surrogate Model Generation 69.4914096
surrogate sim 36.03887020000002
surrogate sim, dt 125.99130730000002

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1287625
import thrown object 0.5040186
model initialization 0.12327700000000008
set noise 0.6240432000000002
simulate 0.3091917999999998
simulate with saving 0.9640062
simulate with saving, dt 1.0747350000000004
simulate with printing results, dt 1.293278
Plot results 14.988108099999998
Metrics 0.039014500000000396
Surrogate Model Generation 3.2565142000000016
surrogate sim 1.1110831999999995
surrogate sim, dt 3.0210884999999976

To:

Test Time (s)
import main 0.12838530000000015
import thrown object 0.5025163000000001
model initialization 2.0494181
set noise 0.6452711000000004
simulate 10.6873936
simulate with saving 24.7461604
simulate with saving, dt 38.7417398
simulate with printing results, dt 45.41405839999999
Plot results 15.332148900000007
Metrics 0.040965700000015204
Surrogate Model Generation 46.837524900000005
surrogate sim 24.47898329999998
surrogate sim, dt 82.93904300000003

5/10/2023
@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.15223450000000005
import thrown object 0.5986568999999999
model initialization 0.14834819999999982
set noise 0.7223990000000002
simulate 0.37143400000000026
simulate with saving 1.2260554
simulate with saving, dt 1.3918651999999998
simulate with printing results, dt 1.6920036000000005
Plot results 21.391778
Metrics 0.044712600000000435
Surrogate Model Generation 4.584827399999998
surrogate sim 1.8058960999999982
surrogate sim, dt 4.190774600000005

To:

Test Time (s)
import main 0.17110479999999995
import thrown object 0.6214203
model initialization 3.0529458000000003
set noise 0.8630487999999996
simulate 16.0231513
simulate with saving 36.79509779999999
simulate with saving, dt 56.68528620000001
simulate with printing results, dt 65.55630949999998
Plot results 22.48542169999999
Metrics 0.05446329999998056
Surrogate Model Generation 69.3542176
surrogate sim 38.1561251
surrogate sim, dt 125.12926580000004

5/10/2023
@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.16423140000000003
import thrown object 0.6042523000000002
model initialization 0.1416082999999997
set noise 0.7687653000000001
simulate 0.3431025000000001
simulate with saving 1.0760266
simulate with saving, dt 1.1899463
simulate with printing results, dt 1.4363791000000008
Plot results 17.861935199999998
Metrics 0.04242239999999953
Surrogate Model Generation 3.7657386000000024
surrogate sim 1.245507100000001
surrogate sim, dt 3.4014394000000046

To:

Test Time (s)
import main 0.16217559999999986
import thrown object 0.6122855
model initialization 0.14182000000000006
set noise 0.7637155
simulate 0.3559413
simulate with saving 1.1035187999999998
simulate with saving, dt 1.2476507000000003
simulate with printing results, dt 1.4970346
Plot results 17.603295
Metrics 0.04591639999999941
Surrogate Model Generation 25.3002432
surrogate sim 1.286413599999996
surrogate sim, dt 3.4666157000000055

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2023

Codecov Report

Merging #527 (2e8c658) into dev (569b6d1) will decrease coverage by 0.17%.
The diff coverage is 83.84%.

@@            Coverage Diff             @@
##              dev     #527      +/-   ##
==========================================
- Coverage   84.65%   84.48%   -0.17%     
==========================================
  Files          34       34              
  Lines        2515     2585      +70     
==========================================
+ Hits         2129     2184      +55     
- Misses        386      401      +15     
Impacted Files Coverage Δ
src/prog_models/models/dcmotor.py 98.14% <ø> (ø)
src/prog_models/models/pneumatic_valve.py 92.12% <ø> (ø)
src/prog_models/models/thrown_object.py 93.33% <ø> (ø)
src/prog_models/prognostics_model.py 85.63% <0.00%> (ø)
src/prog_models/sim_result.py 88.39% <81.70%> (-6.42%) ⬇️
src/prog_models/utils/containers.py 89.00% <88.09%> (+1.82%) ⬆️
src/prog_models/models/centrifugal_pump.py 97.14% <100.00%> (+0.08%) ⬆️
src/prog_models/utils/calc_error.py 82.87% <100.00%> (ø)

5/10/2023
@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.12888539999999993
import thrown object 0.5000396
model initialization 0.12435240000000003
set noise 0.6561826
simulate 0.3080637999999998
simulate with saving 0.9659770000000001
simulate with saving, dt 1.0737665
simulate with printing results, dt 1.2918219000000004
Plot results 14.977321299999998
Metrics 0.03885069999999757
Surrogate Model Generation 3.275659600000001
surrogate sim 1.1100722000000012
surrogate sim, dt 3.0170123999999987

To:

Test Time (s)
import main 0.13276929999999987
import thrown object 0.5082612
model initialization 0.12031329999999985
set noise 0.6232266000000002
simulate 0.2977166999999996
simulate with saving 0.9456231000000002
simulate with saving, dt 1.0417108000000006
simulate with printing results, dt 1.2478394999999995
Plot results 14.6922657
Metrics 0.0372918999999996
Surrogate Model Generation 21.333820000000003
surrogate sim 1.106538300000004
surrogate sim, dt 2.9826011000000037

@mstraut mstraut marked this pull request as ready for review May 11, 2023 06:46
Copy link
Collaborator

@teubert teubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few cosmetic comments, now I'm going to look into sim_result and container

Copy link
Collaborator

@teubert teubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great first step towards data frames simresult and container. I'll review the tests next.

Comment on lines 39 to 41
Getter -- creating multi row pd.DataFrame from data list of dict
Return: pd.DataFrame, of all the data and times
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Getter -- creating multi row pd.DataFrame from data list of dict
Return: pd.DataFrame, of all the data and times
pd.DataFrame: A pandas DataFrame representing the SimResult data

Updating documentation to describe it as a property. Describing it as a getter might make people expect to call it as a function.

self._frame = None

def time(self, index : int) -> float:
def get_time(self, index: int) -> float:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change? This will change the interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was so confusing when looking at self.time(x) and self.time[x] side by side that I felt like that change would help with readability. It's also following the python naming convention

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with your statement about this following python naming conventions though. I think this is more java naming conventions, python prefers to use the name rather than get_name.

From https://python-consistency.readthedocs.io/en/latest/conventions.html:
"* Do not use get_... Prefer to use the name without the get_ prefix."

That said, I see what you mean about the confusion of self.times[x] and self.time(x). And with times being accessible, this function is also redundant. Why don't we instead move towards making users access times[x] only? We can keep time for one release (per ProgPy policy) with a deprecation warning telling users to use .times[x] instead. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant was that the function getting an object variable such as time shouldn't have the same name, yes I instinctively renamed it get_time, it should have been gettime. That kind of naming convention. I realized later that this would be deprecated. I agree with the warning.

Comment on lines 149 to 151
if all(item in self.frame.columns.to_list() for item in keys) is True:
with_keys_numpy = self.frame.drop(['time'], axis=1)[keys].to_numpy(dtype=np.float64)
return with_keys_numpy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if all(item in self.frame.columns.to_list() for item in keys) is True:
with_keys_numpy = self.frame.drop(['time'], axis=1)[keys].to_numpy(dtype=np.float64)
return with_keys_numpy
for key in keys:
if key not in self.frame:
raise KeyError(f'Every key in keys must be present in SimResult. Missing {key}')
return self.frame[keys].to_numpy(dtype=np.float64)

Rewrote to raise exception

mstraut and others added 3 commits May 11, 2023 15:37
Co-authored-by: Christopher Teubert <christopher.a.teubert@nasa.gov>
edited based on Chris Teubert suggestion
Co-authored-by: Christopher Teubert <christopher.a.teubert@nasa.gov>
Copy link
Collaborator

@teubert teubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great initial step towards pandas data frame simresult and *containers. Great work!

A few small recommendations.

Thanks,
Chris

import sys
import unittest

from numpy import float64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use np.float64 instead of importing it separately

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think that was added by pycharm

Comment on lines 41 to 44
c1.matrix[1][0] = -2.0
c1.update({'b': -2.0})
self.assertTrue(np.all(c1.matrix == np.array([[-1.], [-2.]])))
self.assertEqual(c1['b'], -2.0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
c1.matrix[1][0] = -2.0
c1.update({'b': -2.0})
self.assertTrue(np.all(c1.matrix == np.array([[-1.], [-2.]])))
self.assertEqual(c1['b'], -2.0)
c1.matrix[1][0] = -2.0
self.assertTrue(np.all(c1.matrix == np.array([[-1.], [-2.]])))
self.assertEqual(c1['b'], -2.0)
# Test update function
c1.update({'b': -2.0})
self.assertTrue(np.all(c1.matrix == np.array([[-1.], [-2.]])))
self.assertEqual(c1['b'], -2.0)

The way it's currently done doesn't test .matrix setting. Instead it tests that either matrix or update works.

class TestSimResult(unittest.TestCase):
def setUp(self):
# set stdout (so it wont print)
"""def setUp(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please uncomment the setup/tear down

mstraut and others added 3 commits May 11, 2023 15:53
@github-actions
Copy link

github-actions bot commented Jun 9, 2023

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1288836
import thrown object 0.49648879999999984
model initialization 0.12496139999999989
set noise 0.6627915
simulate 0.3037658999999997
simulate with saving 0.9527321999999998
simulate with saving, dt 1.0570594999999998
simulate with printing results, dt 1.2606169000000005
Plot results 15.2357325
Metrics 0.03632350000000173
Surrogate Model Generation 1.629252300000001
surrogate sim 1.0935138000000002
surrogate sim, dt 2.9778962

To:

Test Time (s)
import main 0.13037049999999994
import thrown object 0.495835
model initialization 0.15970720000000016
set noise 0.6886657999999999
simulate 0.49853900000000007
simulate with saving 1.4242454999999996
simulate with saving, dt 1.8312670999999998
simulate with printing results, dt 2.2824747000000007
Plot results 15.0886781
Metrics 0.037081399999998155
Surrogate Model Generation 2.2090365999999975
surrogate sim 1.523309300000001
surrogate sim, dt 3.8248682999999986

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1543315999999999
import thrown object 0.6177611999999999
model initialization 0.1788539
set noise 0.8229703000000002
simulate 0.4214039999999999
simulate with saving 1.3393465000000004
simulate with saving, dt 1.4290231000000002
simulate with printing results, dt 1.8480918999999991
Plot results 21.032969700000002
Metrics 0.04913389999999751
Surrogate Model Generation 2.189084900000001
surrogate sim 1.570381300000001
surrogate sim, dt 4.027496500000005

To:

Test Time (s)
import main 0.16326470000000004
import thrown object 0.6582208
model initialization 0.23395750000000026
set noise 0.8355778000000003
simulate 0.7064260999999998
simulate with saving 2.0297435000000004
simulate with saving, dt 2.5773346000000013
simulate with printing results, dt 3.3136384999999997
Plot results 21.454272699999997
Metrics 0.04678990000000027
Surrogate Model Generation 3.0608138999999994
surrogate sim 2.2248215999999985
surrogate sim, dt 5.242842100000004

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1582785
import thrown object 0.5980397000000002
model initialization 0.1419166999999999
set noise 0.7950373000000002
simulate 0.34914200000000006
simulate with saving 1.0946268
simulate with saving, dt 1.1973795999999997
simulate with printing results, dt 1.4421397999999996
Plot results 17.3295276
Metrics 0.0423435000000012
Surrogate Model Generation 1.870361599999999
surrogate sim 1.2441554000000004
surrogate sim, dt 3.451635200000002

To:

Test Time (s)
import main 0.15451039999999994
import thrown object 0.6168441
model initialization 0.1868208
set noise 0.7737510999999997
simulate 0.5872192000000003
simulate with saving 1.6520324999999998
simulate with saving, dt 2.1170463
simulate with printing results, dt 2.627762099999999
Plot results 17.453264599999997
Metrics 0.04454409999999953
Surrogate Model Generation 2.5546870000000013
surrogate sim 1.756214700000001
surrogate sim, dt 4.441989100000001

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1320401
import thrown object 0.49668650000000003
model initialization 0.12322539999999993
set noise 0.6470186999999998
simulate 0.2983612
simulate with saving 0.9206751
simulate with saving, dt 1.0099388
simulate with printing results, dt 1.2207917000000004
Plot results 14.6454238
Metrics 0.03607170000000082
Surrogate Model Generation 1.613153399999998
surrogate sim 1.0633740999999972
surrogate sim, dt 2.913326099999999

To:

Test Time (s)
import main 0.12863010000000008
import thrown object 0.49515280000000006
model initialization 0.15845140000000013
set noise 0.6584129999999999
simulate 0.4937746999999999
simulate with saving 1.3937467
simulate with saving, dt 1.7938317000000001
simulate with printing results, dt 2.2184240000000006
Plot results 14.629806799999999
Metrics 0.037227299999997854
Surrogate Model Generation 2.1913113000000024
surrogate sim 1.499084100000001
surrogate sim, dt 3.7535483999999997

@teubert teubert force-pushed the prog_models_feature/containers_simresult_tests_updates branch from 07cd465 to b3ad9b0 Compare June 14, 2023 18:53
@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.17307570000000005
import thrown object 0.6515225
model initialization 0.14857429999999971
set noise 0.8510928
simulate 0.3621118000000001
simulate with saving 1.1418754
simulate with saving, dt 1.2432287000000004
simulate with printing results, dt 1.4896137999999999
Plot results 18.024970099999997
Metrics 0.045826500000000436
Surrogate Model Generation 1.9226562000000023
surrogate sim 1.300839700000001
surrogate sim, dt 3.6165664

To:

Test Time (s)
import main 0.17423599999999984
import thrown object 0.6706965999999999
model initialization 0.19351800000000008
set noise 0.8457722000000003
simulate 0.5998131
simulate with saving 1.7147163999999995
simulate with saving, dt 2.1601532000000008
simulate with printing results, dt 2.699556600000001
Plot results 18.0834185
Metrics 0.046258500000000424
Surrogate Model Generation 2.6281307999999974
surrogate sim 1.816513999999998
surrogate sim, dt 4.580036399999997

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.16481689999999993
import thrown object 0.5988382999999999
model initialization 0.1315427
set noise 0.7328891999999998
simulate 0.31960799999999967
simulate with saving 1.0335968000000002
simulate with saving, dt 1.1723048
simulate with printing results, dt 1.3347619999999996
Plot results 15.5906459
Metrics 0.043805799999997674
Surrogate Model Generation 1.7192198000000012
surrogate sim 1.1949883999999997
surrogate sim, dt 3.1840978

To:

Test Time (s)
import main 0.1536896000000001
import thrown object 0.591227
model initialization 0.17371099999999995
set noise 0.7625256999999999
simulate 0.5434502000000001
simulate with saving 1.4976866000000006
simulate with saving, dt 1.9189181999999994
simulate with printing results, dt 2.3415159999999995
Plot results 15.9389539
Metrics 0.042342800000000125
Surrogate Model Generation 2.4826529000000015
surrogate sim 1.6951421999999994
surrogate sim, dt 4.092196000000005

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1657557999999999
import thrown object 0.6112215000000001
model initialization 0.1777791000000002
set noise 0.8251105000000001
simulate 0.41075079999999975
simulate with saving 1.2978941000000002
simulate with saving, dt 1.4289136999999998
simulate with printing results, dt 1.8071604
Plot results 21.621587400000003
Metrics 0.046481899999999854
Surrogate Model Generation 2.2103234
surrogate sim 1.548168099999998
surrogate sim, dt 3.9261839999999992

To:

Test Time (s)
import main 0.16758709999999977
import thrown object 0.6204573999999998
model initialization 0.23061339999999975
set noise 0.8095716999999998
simulate 0.7002213999999998
simulate with saving 2.1308347000000003
simulate with saving, dt 2.5020268000000003
simulate with printing results, dt 3.2871360000000003
Plot results 21.5585777
Metrics 0.04890660000000224
Surrogate Model Generation 3.058802799999995
surrogate sim 2.2449733999999992
surrogate sim, dt 5.251999300000001

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.12059859999999989
import thrown object 0.5205937999999999
model initialization 0.11849029999999994
set noise 0.6697134
simulate 0.2947630000000001
simulate with saving 0.8946456999999999
simulate with saving, dt 1.0078661999999996
simulate with printing results, dt 1.2281006000000003
Plot results 14.3309494
Metrics 0.039217400000001845
Surrogate Model Generation 1.5729031000000013
surrogate sim 0.9912896999999994
surrogate sim, dt 2.8421930999999994

To:

Test Time (s)
import main 0.1129407
import thrown object 0.4963987999999997
model initialization 0.15350639999999993
set noise 0.6766726000000003
simulate 0.4897935999999996
simulate with saving 1.3780139
simulate with saving, dt 1.7728869999999999
simulate with printing results, dt 2.2235327000000007
Plot results 14.1810345
Metrics 0.04333239999999705
Surrogate Model Generation 2.1799582000000015
surrogate sim 1.3991748000000008
surrogate sim, dt 3.6776368999999995

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.14864750000000004
import thrown object 0.5517048
model initialization 0.12767820000000007
set noise 0.6984181
simulate 0.3026429999999998
simulate with saving 0.9610307000000002
simulate with saving, dt 1.0408475999999998
simulate with printing results, dt 1.248519
Plot results 15.3390829
Metrics 0.03814270000000164
Surrogate Model Generation 1.6505013999999996
surrogate sim 1.0954626999999988
surrogate sim, dt 3.0255314999999996

To:

Test Time (s)
import main 0.14230339999999986
import thrown object 0.5431355000000002
model initialization 0.1652727999999999
set noise 0.700491
simulate 0.5114406000000002
simulate with saving 1.4784693999999998
simulate with saving, dt 1.8850252999999997
simulate with printing results, dt 2.3438339
Plot results 15.313340400000001
Metrics 0.039438499999999266
Surrogate Model Generation 2.274673
surrogate sim 1.5625836
surrogate sim, dt 3.9291561000000037

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.1428851
import thrown object 0.5349402000000001
model initialization 0.1298564000000002
set noise 0.7016714
simulate 0.3128782000000001
simulate with saving 0.963714
simulate with saving, dt 1.0828154000000003
simulate with printing results, dt 1.2839334999999998
Plot results 15.3158876
Metrics 0.038239099999998416
Surrogate Model Generation 1.664439999999999
surrogate sim 1.1009966999999996
surrogate sim, dt 3.059284899999998

To:

Test Time (s)
import main 0.14524779999999993
import thrown object 0.5384419
model initialization 0.16477969999999997
set noise 0.7031017999999998
simulate 0.5118103
simulate with saving 1.4540403
simulate with saving, dt 1.8608671999999995
simulate with printing results, dt 2.2887054000000004
Plot results 15.194566
Metrics 0.03873529999999903
Surrogate Model Generation 2.2622781999999972
surrogate sim 1.537526500000002
surrogate sim, dt 3.9175938000000023

@github-actions
Copy link

Benchmarking Results [Update]
From:

Test Time (s)
import main 0.12970229999999994
import thrown object 0.4919091
model initialization 0.12372009999999989
set noise 0.6660678
simulate 0.2947643000000002
simulate with saving 0.9291450000000001
simulate with saving, dt 1.0142345000000001
simulate with printing results, dt 1.2218626000000006
Plot results 14.955618000000001
Metrics 0.03625269999999858
Surrogate Model Generation 1.6245168999999997
surrogate sim 1.0678658999999975
surrogate sim, dt 2.9441257999999983

To:

Test Time (s)
import main 0.13520599999999994
import thrown object 0.5169628999999998
model initialization 0.1575321999999999
set noise 0.6535229999999999
simulate 0.4923324
simulate with saving 1.4117007
simulate with saving, dt 1.8229349999999993
simulate with printing results, dt 2.2346735000000004
Plot results 14.999581399999999
Metrics 0.03785530000000037
Surrogate Model Generation 2.1998879000000002
surrogate sim 1.4362662999999998
surrogate sim, dt 3.7183792000000047

Copy link
Contributor Author

@mstraut mstraut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change of warning is fine.

import sys
import unittest

from numpy import float64
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think that was added by pycharm

self._frame = None

def time(self, index : int) -> float:
def get_time(self, index: int) -> float:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant was that the function getting an object variable such as time shouldn't have the same name, yes I instinctively renamed it get_time, it should have been gettime. That kind of naming convention. I realized later that this would be deprecated. I agree with the warning.

DeprecationWarning, stacklevel=2)
return super().__getitem__(item)

def iloc(self, item):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it has been done

@teubert teubert merged commit bc0162f into dev Jun 16, 2023
@teubert teubert deleted the prog_models_feature/containers_simresult_tests_updates branch June 16, 2023 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants