Closed minhtuev closed 5 days ago
The changes in the fiftyone/constants.py
file involve updating the URL
and LICENSE
variables to dynamically retrieve values from the _META
dictionary. This allows for more flexible and configurable settings, providing default values if the keys are not found.
File | Change Summary |
---|---|
fiftyone/constants.py |
Updated URL and LICENSE to fetch values from _META with fallback defaults. |
In constants, where values roam, A change was made to fetch from home. URL and LICENSE now do seek, Their data source, more unique. A dynamic dance, a code ballet, Flexibility in a precise array.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Hmm, I don't believe those values will ever exist in _META
, which is why removed them. Do you see them in your environment?
I do ~ I thought it was a bit strange since we do have them in setup.py
In [1]: from importlib.metadata import metadata
In [2]: m = metadata("fiftyone")
In [3]: m.get("home-page")
Out[3]: 'https://github.com/voxel51/fiftyone'
In [4]: m.get("license")
Out[4]: 'Apache'
In [5]: m.get("missing-key", "Apache")
Out[5]: 'Apache'
What changes are proposed in this pull request?
Thanks Ben for the fix! Not sure if this is an improvement, but I thought we can try reading like a dictionary and passing default values if the keys do not exist.
(Please fill in changes proposed in this fix)
How is this patch tested? If it is not, please explain why.
(Details)
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)
What areas of FiftyOne does this PR affect?
fiftyone
Python library changesSummary by CodeRabbit