Skip to content

Conversation

@Nic-Ma
Copy link
Contributor

@Nic-Ma Nic-Ma commented Nov 17, 2021

Fixes #3346 .

Description

This PR simplified AsDiscrete according to the feedback.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 17, 2021

Hi @wyli @ericspod ,

As we changed many args of the transform, I feel it's very confusing to maintain the deprecated args in it, so I deleted the deprecated args directly. Can we accept this slightly breaking change in v0.8?

Thanks.

@Nic-Ma Nic-Ma requested review from ericspod and wyli November 17, 2021 11:51
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma changed the title [WIP] 3346 simplify AsDiscrete transform 3346 simplify AsDiscrete transform Nov 17, 2021
@Nic-Ma Nic-Ma marked this pull request as ready for review November 17, 2021 12:29
@Nic-Ma Nic-Ma changed the title 3346 simplify AsDiscrete transform 3346 Simplify AsDiscrete transform Nov 17, 2021
@Nic-Ma Nic-Ma requested a review from rijobro November 17, 2021 12:29
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 17, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 17, 2021

/build

@ericspod
Copy link
Member

We should use the deprecated decorators to mark removed arguments and document it in the docstring, that should be enough for breaking changes though I know my code a lot of the tutorials will need changing. Raising exceptions for wrong value types would help as well. We're going to be changing other transforms a lot as well before 1.0 so I don't think this will be the only thing.

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

Hi @wyli @ericspod ,

Thanks for your review and comments.
I updated the PR to add the deprecated information and raise error, could you please help review it again?

Thanks in advance.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

@Nic-Ma Nic-Ma requested a review from wyli November 18, 2021 11:49
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

@Nic-Ma Nic-Ma enabled auto-merge (squash) November 18, 2021 14:58
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

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