Open
Conversation
umsu2
reviewed
Feb 12, 2024
umsu2
reviewed
Feb 12, 2024
umsu2
reviewed
Feb 12, 2024
umsu2
reviewed
Feb 12, 2024
umsu2
reviewed
Feb 12, 2024
umsu2
reviewed
Feb 12, 2024
16 tasks
umsu2
reviewed
Feb 15, 2024
umsu2
reviewed
Feb 15, 2024
umsu2
reviewed
Feb 15, 2024
umsu2
reviewed
Feb 20, 2024
umsu2
approved these changes
Feb 20, 2024
umsu2
reviewed
Feb 27, 2024
| def __init__(self, registration_number): | ||
| self.registration_number = registration_number | ||
|
|
||
| def valid_registration_number_policy(self): |
Member
There was a problem hiding this comment.
Policies should have the same interface. this is 3 polices combined together.
class PolicyA:
def is_valid(): bool
def description(): ...
class PolicyB:
def is_valid(): bool
def description(): ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Issue Link: #19
This PR contains client class implementation for Business Licences in Vancouver Open Data Portal.
Since we only use Business Licences for now, the
BASE_URLis set to "https://opendata.vancouver.ca/api/explore/v2.1/catalog/datasets/business-licences/records", and the supporting class methods will help add parameters to this URLThe query works by using "where" clause to filter the dataset, and "select" clause to choose return parameter.
For instance, setting
where: businesstype="Short-Term Rentalwill filter the dataset for short-term rental businesses only.And setting
select: statuswill return the licence number status only.Licence number validity check (string format, length,...) is omitted as this should be implemented in the Policies, so it is assumed that the status query will always return meaningful results
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist:
Before you submit your pull request, please make sure you have completed the following:
Screenshots (if applicable)
Since we don't have pytest in CI yet, here's the test result

Additional Notes
Note that "licence" is used instead of "license" (grammar)