GEOS-DEV / GEOS-DEV/GEOS

Make preprocessed input files relocatable

Open
#1,967 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: feature
Dominant language
C++
Stars
287
Forks
109
Avg merge
4d 41m
Merged PRs (30d)
5

Description

What is the requested feature?
Would be nice if preprocessed files could be moved around on the filesystem without breaking.

Is your request related to a specific problem?
When using preprocessor workflow with a model that has additional assets (e.g. mesh or table files) that are external to XML, the resulting XML must be placed in the same directory as the source in order for relative paths to work correctly. Would be great if that were not the case, i.e. when scripting a parameter study I'd like each preprocessed file to be placed in an output directory alongside job outputs, etc. and not clutter the model input directory.

Describe the solution you'd like
I was thinking of introducing additional preprocessor syntax for paths that need to be resolved, e.g. using @ or some other symbol (exact details to be figured out):

<VTKMesh
  name="mesh"
  file="@data/mesh.vtu"/>

which the preprocessor turns into

<VTKMesh
  name="mesh"
  file="/home/klevtsov/models/AwesomeModel/data/mesh.vtu"/>

Describe alternatives you've considered
Copying the extra assets to the output directory together with preprocessed XML is not feasible: some mesh files are gigabytes in size. For the moment I'm just keeping preprocessed inputs in the original directory and cleaning them up once in a while, this is not too much trouble. However it takes a bit of extra bookkeeping to match output files to the exact inputs they were obtained from.

Additional context
I can implement this myself if we agree on direction. Seems like it would be easy enough to fit into existing regex-based infrastructure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named in the issue. Start by locating the regex-based preprocessor infrastructure and its handling of external asset paths; done means agreeing on the path syntax and making preprocessed XML relocatable without copying large assets, with coverage for the described mesh or table case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.