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

Replace ~/omero with standard OS-dependent paths #233

Closed
wants to merge 3 commits into from

Conversation

manics
Copy link
Member

@manics manics commented Jul 9, 2020

Replaces ~/omero with "standard" paths according to each operating system: https://pypi.org/project/appdirs/

Closes #210

@@ -42,6 +45,9 @@
orig_stdout = sys.stdout
orig_stderr = sys.stderr

# Application name, Owner (Windows only), Major version
APPDIR_DEFAULTS = ('OMERO.cli', 'OME', omero_version.split('.')[0])
Copy link
Member Author

@manics manics Jul 9, 2020

Choose a reason for hiding this comment

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

On OS X this results in:

  • get_omero_userdir: ~/Library/Application Support/OMERO.cli/5
  • get_omero_user_cache_dir: ~/Library/Caches/OMERO.cli/5

@sbesson sbesson mentioned this pull request Jul 9, 2020
@manics
Copy link
Member Author

manics commented Jul 9, 2020

Is this considered a breaking change that should wait for 6.0.0?. If so this could be split so only omero.util.get_omero_user_cache_dir() which was added in #162 uses the new paths

@sbesson
Copy link
Member

sbesson commented Jul 21, 2020

Few immediate thoughts:

  • agreed the changes are not breaking the API although we might want to review the impact of such a change
  • I suspect we will need to consider the case where downstream applications are accessing application data and moving away from ~/omero would break the expectations. In that sense, I think the delineation proposed in Replace ~/omero with standard OS-dependent paths #233 (comment) is probably an acceptable compromise as anything stored in a cache directory should be considered as potentially transient
  • more generally, do you have some mechanism that would allow the migration of data between the old user/cache directory and the new one
  • the application specific aspect of the paths also raises the questions of the unification with other OMERO clients e.g. OMERO.insight is using ~/omero/log

@manics
Copy link
Member Author

manics commented Aug 5, 2020

I'll rebase on top of #240

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.

OMERO CLI fails if a file ~/omero exists
2 participants