gjwgit / rattleng

The New Generation R Analytics Desktop App
GNU General Public License v3.0
21 stars 9 forks source link

R: Standardise location for R data extraction logic #450

Open Lutra-Fs opened 2 months ago

Lutra-Fs commented 2 months ago

There's an inconsistency in the project structure regarding where R data extraction logic is stored. Currently, similar functionality is found in two different locations:

  1. lib\utils\get_missing.dart
  2. lib\r\extract_forest.dart

Both files are extracting data from the R console (PTY) and share code from lib/r/extract.dart. This inconsistency makes it unclear where to place new R-related extraction logic, such as getting the R temp directory.

To improve code organisation and maintainability, we need to:

  1. Determine the most appropriate location for R data extraction logic
  2. Consolidate existing code into the chosen location
  3. Update any imports or references to maintain functionality
  4. Establish guidelines for future R-related code additions

This standardisation will make it easier for developers to locate and manage R-related functionality within the project.

gjwgit commented 2 months ago

Thanks @Lutra-Fs. The intent is that R interactions go into lib/r so yes get_missing.dart is in the wrong place. This identifies a gap in our reviewing process. Let me know any others you find misplaced. I'll add a README in lib to capture this.

gjwgit commented 2 months ago

There are quite a few in utils that should be moved to r for this task.