Skip to content

Add data path configuration and moved data files#212

Merged
Rushin-Makwana merged 2 commits intodevelopfrom
setup-new-data-path
Mar 16, 2026
Merged

Add data path configuration and moved data files#212
Rushin-Makwana merged 2 commits intodevelopfrom
setup-new-data-path

Conversation

@Rushin-Makwana
Copy link
Collaborator

@Rushin-Makwana Rushin-Makwana commented Mar 9, 2026

Moved all the CSVs/ JSON Files to the Data folder which is now available in the parent directory( adjacent to Middleware Folder), added a data.path.route property in application.properties that now points to new Data Folder and updated AbstractProducer accordingly to get the data from this new path

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this related to IntelliJ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Some run/debug configuration related. I will remove it. It's not needed

configured = configured.trim();
if (configured.startsWith("~")) {
configured = configured.replaceFirst("^~", System.getProperty("user.home"));
}
Copy link
Collaborator

@MinetteMeyo MinetteMeyo Mar 13, 2026

Choose a reason for hiding this comment

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

Should it not return this computed path? java.nio.file.Paths.get(configured).toAbsolutePath().normalize();

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes just in case the path doesn't exist, I kept the fallback condition. But it's fine, I have updated the logic slightly to return this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Alright! I was trying to understand and I felt like the path has to be returned. Thanks for confirming.

Copy link
Collaborator

@MinetteMeyo MinetteMeyo left a comment

Choose a reason for hiding this comment

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

PR looks good and works with BuildingProducer (I've pulled and tested it). Just a reminder: data files are in subfolders of Data/, so resolve the subfolder before accessing the file.

@Rushin-Makwana Rushin-Makwana merged commit e6899dd into develop Mar 16, 2026
1 check passed
@Rushin-Makwana Rushin-Makwana deleted the setup-new-data-path branch March 16, 2026 15:49
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