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

Match vpic-api behavior #2

Open
1 of 4 tasks
sshane opened this issue Feb 21, 2024 · 0 comments
Open
1 of 4 tasks

Match vpic-api behavior #2

sshane opened this issue Feb 21, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sshane
Copy link

sshane commented Feb 21, 2024

Or have it match this library's behavior, so it is more of a drop-in replacement. I thought a formal issue would be a good idea to track this and for discussion.

  • For example, invalid or foreign (format, check digit, and/or model year character bad) VINs throw an immediate exception instead of returning an object where you can check an error code/text field. I think it is best if you can parse as much of the VIN that VPIC lets you (even if just make), with some error field

  • Standardize return values: does None for electrification_level mean unknown or no electrification?

    In [11]: TypedClient().decode_vin('5FNRL6H4X').electrification_level
    Out[11]: ''
  • Partial decoding would be nice, but not required

    In [16]: TypedClient().decode_vin('4T1C31AK').electrification_level
    Out[16]: 'HEV (Hybrid Electric Vehicle) - Level Unknown'
    
    In [17]: VIN('4T1C31AK').electrification_level
    ValueError: VIN must be exactly 17 characters long
  • Model year is an int in this library, and a string in vpic-api

@davidpeckham davidpeckham added the enhancement New feature or request label Feb 21, 2024
@davidpeckham davidpeckham self-assigned this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants