Implemented read_tbe function for reading and parsing TBE files using Rust#108
Open
DeviPriya-Kolla wants to merge 2 commits intomainfrom
Open
Implemented read_tbe function for reading and parsing TBE files using Rust#108DeviPriya-Kolla wants to merge 2 commits intomainfrom
DeviPriya-Kolla wants to merge 2 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #61
What was changed?
In this update, I implemented the read_tbe function that allows parsing and reading of TBE (Tabular Data) files. This function processes TBE data into a structured format, specifically reading various tables from the CSV-like file and storing them in a set of Rust structures.
Why was it changed?
The purpose of this change was to implement functionality that would allow the parsing and processing of TBE files, which was previously missing. These files contain tabular data that needed to be parsed into structured HashMap and Site structs for further processing.
By implementing the read_tbe function, we can now reliably parse these TBE files, extract relevant information, and handle it in a structured way that can be used by other parts of the application.
How was it changed?
Created
parse_tbefunction:src/functions/read_tbe.rsto parse the TBE file.HashMap<String, Table>.Tablestruct holds the parsed rows (data), attributes (att), and comments (cmt).Modified the
modelsmodule:Sitestruct insrc/models.rsto represent site data extracted from the TBE file.Handled TBE file sections:
TBL), attributes (ATT), comments (CMT), and data rows (BGNtoEOT).HashMap<String, String>, where each key is a column name and each value is the corresponding data.Integrated into the main application:
src/main.rs, I utilized theparse_tbefunction to read the TBE file and display the parsed data.Screenshots that show the changes (if applicable):
