Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚸 Just bind data config file instead of whole directory containing data config file #25

Open
1 task
shnizzedy opened this issue Feb 18, 2022 · 0 comments
Labels
enhancement New feature or request user-reported

Comments

@shnizzedy
Copy link
Member

Related problem

Right now, cpac read-only binds the directory containing a user-provided data config file

dc_dir = os.path.dirname(kwargs['data_config_file'])
self._bind_volume(dc_dir, dc_dir, 'r')
locals_from_data_config = Locals_to_bind()
locals_from_data_config.from_config_file(
kwargs['data_config_file']
)
which can cause trouble if the output (or logging or working) directory is a descendant of that directory (see 이지원 Google Groups/cpax_forum: Re: RuntimeError)

Proposed feature

Just bind the data config file itself, something like

 dc_file = os.path.abspath(kwargs['data_config_file']) 
 self._bind_volume(dc_file, dc_file, 'r') 
 locals_from_data_config = Locals_to_bind() 
 locals_from_data_config.from_config_file( 
     dc_file 
 ) 

Acceptance criteria

  • data config file binds read-only but doesn't (necessarily) bind its parent directory read-only

Alternatives

No response

Additional context

Maybe also bind individual files from the data config instead of their parent directories too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request user-reported
Projects
Status: No status
Development

No branches or pull requests

1 participant