Skip to content

Rebased #431: Default dt is 0 #490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 31, 2020

Conversation

bnavigator
Copy link
Contributor

Rebased version of #431. I had the updated tests already prepared in earlier versions of #438

@coveralls
Copy link

coveralls commented Dec 31, 2020

Coverage Status

Coverage increased (+0.3%) to 87.52% when pulling 75f3aef on bnavigator:rebase-pr431 into 6ed3f74 on python-control:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 87.005% when pulling adc8166 on bnavigator:rebase-pr431 into d66f4e4 on python-control:master.

@bnavigator bnavigator changed the title Rebase pr431 Rebased #431: default dt is 0 Dec 31, 2020
@bnavigator bnavigator changed the title Rebased #431: default dt is 0 Rebased #431: Default dt is 0 Dec 31, 2020
Copy link
Member

@murrayrm murrayrm left a comment

Choose a reason for hiding this comment

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

I look through the changes and these look good to me.

@@ -260,8 +258,6 @@ def testAddition(self, tsys):
TransferFunction.__add__(tsys.siso_tf1c, tsys.siso_tf1d)
with pytest.raises(ValueError):
TransferFunction.__add__(tsys.siso_tf1d, tsys.siso_tf2d)
with pytest.raises(ValueError):
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume these are removed because these tests are already performed above in eg ‘test_timenase_conversion’?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They don't raise an error anymore. You had an equivalent change in #431. dt=0.1 and dt=True are compatible now.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, makes sense!

@@ -223,7 +223,7 @@ def __init__(self, *args, **kwargs):
# TODO: not sure this can ever happen since dt is always present
try:
dt = args[0].dt
except NameError: # pragma: no coverage
except AttributeError:
Copy link
Contributor

Choose a reason for hiding this comment

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

🤙

Copy link
Contributor

@sawyerbfuller sawyerbfuller left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@bnavigator
Copy link
Contributor Author

Added one more simple test in order to not uncover a line. The double dt resolver is documented behavior and thus should be checked.

@bnavigator bnavigator merged commit d1502f4 into python-control:master Dec 31, 2020
@bnavigator bnavigator deleted the rebase-pr431 branch January 5, 2021 20:13
@murrayrm murrayrm added this to the 0.9.0 milestone Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants