-
Notifications
You must be signed in to change notification settings - Fork 5k
Add uv support as python interpreter #7347
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
Conversation
…rrors, LazyBlob initialize is setting oid to nil despite non-nil passed in constructor
…ling from main, not sure why
|
Didn't add any tests because there don't seem to be any existing tests for supported languages in tests/test_samples.rb. |
|
@lildude Added uv to python interpreters in languages.yaml based on your comment in the issue: #7302 (comment) . Please merge & approve this PR. Also the required Github test workflows are blocked as maintainer approval is required - please approve them so they can run. |
lildude
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We explicitly request real world samples and state ""Hello world" examples will not be accepted." in the CONTRIBUTING.md file. Please replace this sample with a real example and update the template accordingly.
…es table from wikipedia
@lildude If that's really the case, then why are there existing hello world type Python sample scripts? #!/usr/bin/env python2.4
print "Python"Anyway, I replaced the uv hello world sample script with this Countries of the World script that downloads countries' names, codes etc. from a Wikipedia table. The new script is at samples/Python/uv-download-countries-of-the-world - this is the result of running it: $ ./uv-countries-of-the-world
Reading inline script metadata from `./uv-countries-of-the-world`
Downloading table from wikipedia...
Countries of the World:
Alpha-3 code Description Other name(s) or older name(s)
0 NaN Abkhazia Republic of Abkhazia (official, English), Aphs...
1 AFG Afghanistan Islamic Emirate of Afghanistan (de facto offic...
2 ALB Albania Republic of Albania (official, English), Repub...
3 DZA Algeria People's Democratic Republic of Algeria (offic...
4 AND Andorra Principality of Andorra (official, English), P...
.. ... ... ...
3 VNM Vietnam Socialist Republic of Vietnam (official, Engli...
0 ESH Western Sahara Sahrawi Arab Democratic Republic (official, En...
0 YEM Yemen Republic of Yemen (official, English), ٱلْجُمْ...
0 ZMB Zambia Republic of Zambia (official, English), Northe...
1 ZWE Zimbabwe Republic of Zimbabwe (official, English), Rhod...
[201 rows x 3 columns]
Saved downloaded data to wikipedia_countries.csvPlease review & merge now - let me know if any further changes are required. |
sohang3112
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As reviewer requested for more complex script than hello world, I have now replaced the uv hello world script with a script that downloads countries info from wikipedia table using pandas.
Because they pre-date the introduction of this requirement. |
lildude
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
Important
The changes in this PR will not appear on GitHub until the next release has been made and deployed. See here for more details.
Closes #7302 - make linguist recognize uv script as a python file.
Description
Add
uvas a python interpreter in its yaml, and also a sample script for testing.Now the sample uv script is successfully recognized as Python:
(Additional) how I setup locally
Opened my fork in Github Codespaces and ran:
Checklist:
NOTE: I wasn't sure which one is applicable for this change. I have checked the one that seemed appropriate, but also left 2 other sections that may be appropriate - please help regarding this:
I am fixing a misclassified language
I am changing the source of a syntax highlighting grammar
I am adding new or changing current functionality