[WIP] Progress on reader.go

Review Request #11872 — Created Nov. 10, 2021 and updated

jordanvandenbruel
DiffX
master
diffx

This WIP contains all of the work for GoDiffX since there are some tweaks coming
to the utils as I actually put them into practice.

reader.go is almost finished, and I think it should be working properly. The
code is still a mess and partially documented, so I will need to go back and
clean that up.

There have also been some small modifications to the base files I created as
I found better ways to implement them so that they are more useful for reader.go

Manually tested reader.go with the first python test case (test_with_simple_diff) and
it works if you change the length from 692 to 696 (not sure why the python version is 692).
Insight into why my code isn't working and why the length should be 692 would be appreciated!

Other updated files have not been tested.

Summary Author
Create LICENSE and README for project
Jordan
Create basic support files for diffx.
Jordan
Write basic constants for options.go
Jordan
Wrote code for sections.go
Jordan
Update documentation for sections.go
Jordan
Write all custom errors for godiffx.
Jordan
Add documentation and fix line value for DiffXParseError
Jordan
Create text values and write SplitLines
Jordan
Fix Errors and Write StripBom Method.
Jordan
Created test files and wrote init tests for Errors.go
Jordan
Finish tests for errors.go
Jordan
Add testing for sections.go
Jordan
Wrote unit tests for finished functions in text.go
Jordan
Create new error for invalid encoding.
Jordan
Create encode method for text.go
Jordan
Add GetNewlineForType function in text.go
Jordan
Finish manually testing all functions for text.go
Jordan
Write tests for line ending methods.
Jordan
Wrote unit test for encoding function
Jordan
Test a few more edge cases in the code.
Jordan
Write initial documentation for unifiedDiffs.go.
Jordan
WIP update for unifiedDiffs.go
Jordan
Finished unified_diffs.go
Jordan
Write basics for unifiedDiffs testing and fix bugs encountered.
Jordan
Update unifiedDiff tests to ensure proper returns and tweaked bugs.
Jordan
Start progress on reader.go
Jordan
Decode function, ReadUntil function, and a few misc changes in Reader.go
Jordan
Finish readContent and readHeader for reader.go
Jordan
functioning reader with miscellaneous changes to better support it.
Jordan
jordanvandenbruel
Review request changed

Summary:

-[WIP] Start to reader.go
+[WIP] Progress on reader.go

Description:

~  

This commit is not really a finished product, but rather to show the

~   progress so far on reader.go. It's been challenging trying to find
~   an appropriate way to create a parser where there may be different
~   items in each iteration. Unlike Python, Go does not support dictionaries
~   that hold different items, so a more robust struct must be created to
~   hold all of the information.

  ~

This WIP contains all of the work for GoDiffX since there are some tweaks coming

  ~ to the utils as I actually put them into practice.

  ~
  ~

reader.go is almost finished, and I think it should be working properly. The

  ~ code is still a mess and partially documented, so I will need to go back and
  ~ clean that up.

  +
  +

There have also been some small modifications to the base files I created as

  + I found better ways to implement them so that they are more useful for reader.go

Testing Done:

~  

None of this has really been tested since there is not finished product,

~   but I am trying to figure out the parts needed to get this to work via
~   small manual tests.

  ~

Manually tested reader.go with the first python test case (test_with_simple_diff) and

  ~ it works if you change the length from 692 to 696 (not sure why the python version is 692).
  ~ Insight into why my code isn't working and why the length should be 692 would be appreciated!

  +
  +

Other updated files have not been tested.

Commits:

Summary Author
-
Start to reader.go
Jordan
+
Create LICENSE and README for project
Jordan
+
Create basic support files for diffx.
Jordan
+
Write basic constants for options.go
Jordan
+
Wrote code for sections.go
Jordan
+
Update documentation for sections.go
Jordan
+
Write all custom errors for godiffx.
Jordan
+
Add documentation and fix line value for DiffXParseError
Jordan
+
Create text values and write SplitLines
Jordan
+
Fix Errors and Write StripBom Method.
Jordan
+
Created test files and wrote init tests for Errors.go
Jordan
+
Finish tests for errors.go
Jordan
+
Add testing for sections.go
Jordan
+
Wrote unit tests for finished functions in text.go
Jordan
+
Create new error for invalid encoding.
Jordan
+
Create encode method for text.go
Jordan
+
Add GetNewlineForType function in text.go
Jordan
+
Finish manually testing all functions for text.go
Jordan
+
Write tests for line ending methods.
Jordan
+
Wrote unit test for encoding function
Jordan
+
Test a few more edge cases in the code.
Jordan
+
Write initial documentation for unifiedDiffs.go.
Jordan
+
WIP update for unifiedDiffs.go
Jordan
+
Finished unified_diffs.go
Jordan
+
Write basics for unifiedDiffs testing and fix bugs encountered.
Jordan
+
Update unifiedDiff tests to ensure proper returns and tweaked bugs.
Jordan
+
Start progress on reader.go
Jordan
+
Decode function, ReadUntil function, and a few misc changes in Reader.go
Jordan
+
Finish readContent and readHeader for reader.go
Jordan
+
functioning reader with miscellaneous changes to better support it.
Jordan

Diff:

Revision 2 (+6261 -411)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...