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

[AL-1589] Autocomplete and code highlighting #1453

Merged
merged 10 commits into from
Feb 7, 2022
Merged

Conversation

farizrahman4u
Copy link
Contributor

🚀 🚀 Pull Request

Checklist:

  • My code follows the style guidelines of this project and the Contributing document
  • I have commented my code, particularly in hard-to-understand areas
  • I have kept the coverage-rate up
  • I have performed a self-review of my own code and resolved any problems
  • I have checked to ensure there aren't any other open Pull Requests for the same change
  • I have described and made corresponding changes to the relevant documentation
  • New and existing unit tests pass locally with my changes

Changes

@codecov
Copy link

codecov bot commented Jan 23, 2022

Codecov Report

Merging #1453 (a3b6f82) into main (250fbae) will decrease coverage by 0.52%.
The diff coverage is 87.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1453      +/-   ##
==========================================
- Coverage   91.69%   91.16%   -0.53%     
==========================================
  Files         179      181       +2     
  Lines       14910    14984      +74     
==========================================
- Hits        13671    13660      -11     
- Misses       1239     1324      +85     
Flag Coverage Δ
unittests 91.16% <87.68%> (-0.53%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
hub/core/query/autocomplete.py 81.25% <81.25%> (ø)
hub/core/query/test/test_autocomplete.py 100.00% <100.00%> (ø)
hub/api/tests/test_api_with_compression.py 89.78% <0.00%> (-10.22%) ⬇️
hub/core/tests/test_compression.py 94.39% <0.00%> (-5.61%) ⬇️
hub/core/fast_forwarding.py 66.66% <0.00%> (-2.30%) ⬇️
hub/tests/path_fixtures.py 90.34% <0.00%> (-2.30%) ⬇️
hub/api/tests/test_api.py 97.73% <0.00%> (-2.27%) ⬇️
hub/core/storage/s3.py 62.22% <0.00%> (-1.94%) ⬇️
hub/core/compression.py 83.46% <0.00%> (-1.93%) ⬇️
hub/core/meta/tensor_meta.py 84.75% <0.00%> (-1.92%) ⬇️
... and 47 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 250fbae...a3b6f82. Read the comment docs.

import hub


def test_autcomplete():
Copy link
Contributor

Choose a reason for hiding this comment

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

Please convert to and split into unit tests.

last_type = last_token["type"]
last_string = last_token["string"]

if last_type == "UNKNOWN":
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have better structure for this ? Perhaps, Dict[Token, Func] ?
Or at least documentation of what is going on here ?

@farizrahman4u farizrahman4u changed the title Autocomplete and code highlighting [AL-1589] Autocomplete and code highlighting Feb 1, 2022
Copy link
Contributor

@AbhinavTuli AbhinavTuli left a comment

Choose a reason for hiding this comment

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

Tough to review this currently, docstrings and comments are needed.

Copy link
Contributor

@AbhinavTuli AbhinavTuli left a comment

Choose a reason for hiding this comment

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

Add more codecov, rest looks good.

@farizrahman4u farizrahman4u merged commit f8d501a into main Feb 7, 2022
@farizrahman4u farizrahman4u deleted the fr_autocomplete branch February 7, 2022 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants