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

Roman's strategy for combine() capability #30

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

IanMayo
Copy link
Member

@IanMayo IanMayo commented Nov 12, 2019

No description provided.

@codecov
Copy link

codecov bot commented Nov 12, 2019

Codecov Report

Merging #30 into develop will decrease coverage by 2.12%.
The diff coverage is 17.64%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #30      +/-   ##
===========================================
- Coverage    96.58%   94.45%   -2.13%     
===========================================
  Files           12       10       -2     
  Lines          586      379     -207     
===========================================
- Hits           566      358     -208     
- Misses          20       21       +1
Impacted Files Coverage Δ
data_highlight/support/line.py 100% <ø> (ø) ⬆️
data_highlight/highlighter.py 78.68% <13.33%> (-21.32%) ⬇️
data_highlight/support/token.py 96.42% <50%> (+10.71%) ⬆️
data_highlight/support/char_array.py 100% <0%> (ø) ⬆️
test/test_Combine.py
data_highlight/support/combine.py
test/test_Splitting.py 98.38% <0%> (+0.05%) ⬆️
... and 2 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 12dab24...b8a1bc0. Read the comment docs.

first_token.array_of_tokens.append(i)


return first_token
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for that @Romucmad - I've been quite relaxed about type checking. Maybe this is a case where it's justified. Other than that, my approach was similar to yours, though I found that extend() adds the individual items to the other array, rather than adding the whole list:

image

Oh, I also avoided modifying the first token - so it can still be used to highlight where just it has been used. If we have Date and Time tokens, we may combine them for some one parser for this file, and we may wish to leave them separate for another parser on this file.

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.

2 participants