galaxyproject / ephemeris

Library for managing Galaxy plugins - tools, index data, and workflows.
https://ephemeris.readthedocs.org/
Other
27 stars 38 forks source link

Set Library Permissions #187

Closed mira-miracoli closed 1 year ago

mira-miracoli commented 1 year ago

I added a tool to set the permissions of ALL datasets in a given data library (in folders and subfolders) at once to the given roles. It is a workaround for one point of this Issue, I created.

Usage:

usage: set_library_permissions [-h] [-v] [-g GALAXY] [-u USER] [-p PASSWORD] [-a API_KEY] [--library LIBRARY] [--roles ROLES]

Currently the default loglevel is INFO. I don't have experience with this so please tell me if I should change it.

mira-miracoli commented 1 year ago

Thank you for your reviews and suggestions @hexylena :)

hexylena commented 1 year ago

Sorry @mira-miracoli, the linter has some additional requests for you to re-order the imports and add whitespace here and there to make it happy.

hexylena commented 1 year ago
Traceback (most recent call last):
  File "/home/runner/work/ephemeris/ephemeris/.tox/py36-integration/bin/shed-tools", line 8, in <module>
    sys.exit(main())
 ...
  File "/home/runner/work/ephemeris/ephemeris/.tox/py36-integration/lib/python3.6/site-packages/bioblend/galaxyclient.py", line 266, in key
    headers = self.json_headers.copy()
AttributeError: 'GalaxyInstance' object has no attribute 'json_headers'

that looks unrelated, but not sure what's causing that

mira-miracoli commented 1 year ago

I saw it failing in the actions before, I don't know if it is a issue related to my code

mira-miracoli commented 1 year ago

Shall I change something or can we merge it?

hexylena commented 1 year ago

@nsoranzo any ideas about this error?

nsoranzo commented 1 year ago

That error was fixed in commit https://github.com/galaxyproject/bioblend/commit/22f2d8919b2144f45e1ff83df1431c11de8a92ed , which was first released in BioBlend v0.17.0 . That release also dropped support for Python 3.6 (EOL for almost a year now), which is the version used in the tests. So my suggestion would be to update the GitHub workflows to use Python 3.7 .

nsoranzo commented 1 year ago

You may also want to add a python_requires (e.g. https://github.com/galaxyproject/gravity/blob/main/setup.py#L39 ) which is metadata used by PyPI and pip.

natefoo commented 1 year ago

Someone with more privileges than me (@mvdbeek?) will need to change the branch protection requirements to now depend on the update test names since their name includes the python version.

Got it

mvdbeek commented 1 year ago

Thanks @mira-miracoli and reviewers, very cool work!