-
Notifications
You must be signed in to change notification settings - Fork 33
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
Improve specification conformance of unicode bidi library-Initial step #19
Conversation
Please squash the commits. Please remove the extra Stray tab in generate.py.
In Rust code, space before function opening brace, and no blank lines after the opening brace or before the closing brace. |
@eefriedman can you re-review? Or should @mbrubeck review? |
@metajack Re-review what? My initial review comments still weren't addressed. @moharnab123saikia We can't merge a PR with failing tests; change the test to reflect the current state of the code, and add a comment like |
@eefriedman Sorry. I assumed he had addressed them since there were new commits. |
@eefriedman - we have made the changes. Can you please review the changes? |
Review status: 0 of 5 files reviewed at latest revision, 8 unresolved discussions. src/lib.rs, line 980 [r8] (raw file): src/lib.rs, line 1003 [r8] (raw file): src/lib.rs, line 1009 [r8] (raw file): src/lib.rs, line 1012 [r8] (raw file): src/lib.rs, line 1019 [r8] (raw file): src/lib.rs, line 1020 [r8] (raw file): src/lib.rs, line 1021 [r8] (raw file): tools/generate.py, line 199 [r8] (raw file): Comments from the review on Reviewable.io |
@eefriedman Please review. |
Review status: 0 of 5 files reviewed at latest revision, 5 unresolved discussions. src/lib.rs, line 980 [r9] (raw file): src/lib.rs, line 1013 [r9] (raw file): tools/generate.py, line 196 [r9] (raw file): tools/generate.py, line 198 [r9] (raw file): Comments from the review on Reviewable.io |
@mbrubeck Do we want the testcase files in this repository? |
@eefriedman, we have made the requested changes. Please let us know if you need any other changes. The only change that we have left out is the commented test case. This test case was failing and should get handled in the next steps. We have left it commented there for reference, and will remove the steps when the further steps have been completed. |
@eefriedman, @mbrubeck - Do we have to incorporate anymore changes? Can you please review. |
I'm waiting for an answer to #19 (comment) ; looks fine otherwise. |
Thanks! The new tests look good. Since the .txt files aren't used yet, let's leave them out of the repo (but keep the code to fetch them). Once we have some code to process the files, we can decide whether it makes sense to check them in. Reviewed 3 of 4 files at r1, 1 of 1 files at r10, 1 of 1 files at r11. src/BidiCharacterTest.txt, line 0 [r11] (raw file): Comments from the review on Reviewable.io |
@mbrubeck - I have commented out the code and deleted those two files from the repository. Please review the changes. |
Please fix the commit message (it currently contains a bunch of useless text from squashing). |
@ https://github.com/eefriedmaneefriedman https://github.com/eefriedman - Thanks and Regards, Please fix the commit message (it currently contains a bunch of useless — |
added test is_ltr Added test is_rtl added test removed_by_X9 added test not_removed_by_x9() Added test case to test_reorder_line()
It looks like the new version isn't rebased correctly (GitHub shows two commits). |
@eefriedman, we only see one commit from our side which is 'unicode-bidi/ 2a99bca'. Do you want us to squash our commit into your commit that is 'unicode-bidi/ 69e42af' |
@eefriedman - We are planning to reset and rebase our commits again. Maybe that will solve the issue. |
@eefriedman - When I clone the unicode-bidi repository (with none of our changes added) and run the tests defined in lib.rs, a folder called target is getting created. After I add our changes, should I let the folder remain in the repository and push the changes? |
|
@mbrubeck - Thanks for the clarification. Can you please review the changes. |
@mbrubeck @eefriedman , we wanted some clarification.
|
Currently, generate.py and Cargo aren't linked; generate.py modifies the source code. We could change this so generate.py generates a build artifact instead, I guess... but that isn't obviously worthwhile. Note that you wouldn't want the build process to fetch data from unicode.org: that would make the resulting binary unpredictable.
Currently, nowhere; the fact that the current generate.py saves the files into the current working directory is a bug. If we wanted to add the files to the repository, we could add a |
Currently, generate.py is run manually, and its output (
I suggest we do the same thing we do for the non-test code: Run generate.py manually, and check in all the files needed for running tests (either the
|
@eefriedman and @mbrubeck, thanks for the detailed replies. As far as we see, all are changes are in place. Do you see any more changes? Or are we good to go on the merge? |
This looks good to me. Thanks! Reviewed 3 of 4 files at r12. Comments from the review on Reviewable.io |
Oops, there's still a duplicate commit in there (accidentally created in a rebase?) but it doesn't seem to cause any issues so I'll just let this go through. |
@bors-servo r+ |
📌 Commit 2a99bca has been approved by |
Improve specification conformance of unicode bidi library-Initial step Files changed: src/lib.rs and tools/generate.py •added code to tools/generate.py to download the files: http://www.unicode.org/Public/UNIDATA/BidiTest.txt and http://www.unicode.org/Public/UNIDATA/BidiCharacterTest.txt •wrote manual rust tests in lib.rs that can be run automatically <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/unicode-bidi/19) <!-- Reviewable:end -->
☀️ Test successful - travis |
Hi @mbrubeck , @eefriedman We have the following queries about the subsequent steps of our project as mentioned here: https://github.com/servo/servo/wiki/Improve-specification-conformance-of-unicode-bidi-library
What function from lib.rs should we call to create test cases present in BidiTest.txt.
|
There's some basic documentation for the meaning of the bidi tests at the top of BidiTest.txt. Each test line consists of a list of bidi character classes. For each test line (lines without a starting # or @), two things should get checked: the level of each character (essentially the levels array returned from I'm pretty sure https://github.com/servo/unicode-bidi/blob/master/src/lib.rs#L687 is referring to the fact that the function only examines each character in the string once; it has nothing to do with the callers. |
@eefriedman Thanks for the explanation. I am unable to understand what the number 7 denotes in the test cases given below: |
It's a bitset, so 7 means 1|2|4, i.e. the test applies in contexts with an automatic paragraph level, a forced LTR paragraph level, and a forced RTL paragraph level; see http://unicode.org/reports/tr9/#The_Paragraph_Level . |
Files changed: src/lib.rs and tools/generate.py
•added code to tools/generate.py to download the files: http://www.unicode.org/Public/UNIDATA/BidiTest.txt and http://www.unicode.org/Public/UNIDATA/BidiCharacterTest.txt
•wrote manual rust tests in lib.rs that can be run automatically