Skip to content
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

Fix naming scheme, property nullabilities #321

Merged
merged 9 commits into from
Sep 13, 2022
Merged

Fix naming scheme, property nullabilities #321

merged 9 commits into from
Sep 13, 2022

Conversation

nwithan8
Copy link
Member

@nwithan8 nwithan8 commented Sep 7, 2022

Description

  • All properties are now TitleCased rather than snake_cased
  • Some properties had to be renamed to avoid conflicts (look for "// X is the enclosing class name" comments)
  • Removed Verify/VerifyStrict parameters from Address (naming conflict, parameters aren't actually part of the Address object, they're API call params)
  • All properties are nullable (most if not all will NOT be null, but since they could be, to avoid compile complaints)
  • Addressed some IDE suggestions/warnings

Request

Testing

  • All unit tests pass, suggesting JSON de/serialization is still working with the new property names
  • All unit tests have been updated to use the new property names
  • Re-recorded all cassettes because GitHub CI failed for some reason.
    • API has issue with test pickups right now, bad cassette causing CI to fail.

Pull Request Type

Please select the option(s) that are relevant to this PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc)

@nwithan8 nwithan8 requested a review from a team September 7, 2022 20:49
@nwithan8
Copy link
Member Author

nwithan8 commented Sep 7, 2022

Putting into draft mode until Pickup buy API issues have been resolved.

@nwithan8 nwithan8 marked this pull request as draft September 7, 2022 21:05
- Some properties had to be renamed to avoid conflicts (look for "// X is the enclosing class name" comments)
- Removed Verify/VerifyStrict parameters from Address (naming conflict, parameters aren't actually part of the Address object, they're API call params)
- All properties are nullable (most if not all will NOT be null, but since they could be, to avoid compile complaints)
- Addressed some IDE suggestions/warnings
- Pickup buy is failing currently (API 500 error)
@nwithan8
Copy link
Member Author

nwithan8 commented Sep 9, 2022

Pickup test has been disabled for the time being. Re-enable ASAP.

@nwithan8 nwithan8 marked this pull request as ready for review September 9, 2022 18:31
Copy link
Member

@Justintime50 Justintime50 left a comment

Choose a reason for hiding this comment

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

  1. I don't like the renamed property changes, but it is what it is. Please call them out in the CHANGELOG.
  2. Now that things are marked nullable, we need to remove the compile warning check we ignored so that anything added in the future will throw errors appropriately if we forgot. I'm not seeing that here

CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
EasyPost.Tests/BatchTest.cs Show resolved Hide resolved
Comment on lines +18 to +19
<PackageReference Include="EasyVCR" Version="[0.4.0, 1.0.0)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="[17.3.0, 18.0.0)" />
Copy link
Member

Choose a reason for hiding this comment

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

I'm tired of seeing these changes in PRs. Can we enforce SOME kind of style for these? They are always getting bumped one way then bumped back the very next commit.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try to narrow down on what exactly does this

EasyPost.Tests/OrderTest.cs Show resolved Hide resolved
EasyPost/Models/API/Tracker.cs Outdated Show resolved Hide resolved
EasyPost/Models/API/Tracker.cs Outdated Show resolved Hide resolved
EasyPost/Models/API/TrackingDetail.cs Outdated Show resolved Hide resolved
EasyPost/Models/API/Verification.cs Outdated Show resolved Hide resolved
EasyPost/Models/API/Verifications.cs Outdated Show resolved Hide resolved
- Remove old nullability warning suppressions from main namespace (add to EasyPost.Tests)
- New nullability helper functions to check for nullable elements (see ShipmentService.CreateReturn)
EasyPost/Services/ShipmentService.cs Outdated Show resolved Hide resolved
- Remove now-unneeded nullability utilities
- Update CHANGELOG.md with info about nullable properties
- Suppress some IDE suggestions (I know better than the IDE sometimes)
@nwithan8 nwithan8 merged commit ea2dd5a into v4 Sep 13, 2022
@nwithan8 nwithan8 deleted the naming branch September 13, 2022 18:35
@Justintime50 Justintime50 mentioned this pull request Sep 14, 2022
4 tasks
@Justintime50 Justintime50 mentioned this pull request Oct 3, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants