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

Deprecate Profile.repository_path #5516

Merged

Commits on Jul 14, 2022

  1. Deprecate Profile.repository_path

    The `Profile.repository_path` was historically used to give the absolute
    filepath to the file repository on the local file system. However, this
    is a property of the storage backend and not all backends will have this.
    So instead of being generic to all profiles, this should be a storage
    specific setting.
    
    The property is deprecated and the functionality is added to a new function
    `aiida.storage.psql_dos.backend.get_filepath_container`. We considered
    adding it as a property on the `PsqlDosBackend` class, which makes the
    most sense semantically, but that made the code more complex than ideal.
    The reason for this is because the property needs to be accessed both
    from the backend as well as the associated migrator. However, the migrator
    cannot have a reference to the backend since the migrator is used to
    validate the backend class in its constructor, which would lead to a
    circular dependence. The alternative of implementing the property on the
    migrator and exposing it on the backend was possible, but also slightly
    convoluted. The root of this problem is the limitation in the current
    design that the migrator cannot have a reference to the storage backend
    to which it belongs, but this should be addressed in another commit.
    
    There is a also a slight difference in the implementation of the new
    function. It returns the path of the disk object store container, which
    is a subfolder of the original repository path. Old invocations of
    `profile.repository_path` should therefore be replaced with
    `get_filepath_container(profile).parent`.
    sphuber committed Jul 14, 2022
    Configuration menu
    Copy the full SHA
    dc16d11 View commit details
    Browse the repository at this point in the history