Skip to content

Set Library Permissions#187

Merged
mvdbeek merged 16 commits intogalaxyproject:masterfrom
mira-miracoli:set-library-permissions
Nov 30, 2022
Merged

Set Library Permissions#187
mvdbeek merged 16 commits intogalaxyproject:masterfrom
mira-miracoli:set-library-permissions

Conversation

@mira-miracoli
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member

@hexylena hexylena left a comment

Choose a reason for hiding this comment

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

Some small review comments, this will be really nice to have :)

Comment thread src/ephemeris/set_library_permissions.py Outdated
Comment thread src/ephemeris/set_library_permissions.py Outdated
Comment thread src/ephemeris/set_library_permissions.py Outdated
Comment thread src/ephemeris/set_library_permissions.py Outdated
mira-miracoli and others added 2 commits November 18, 2022 15:58
yes thanks you!

Co-authored-by: Helena <hexylena@galaxians.org>
Copy link
Copy Markdown
Member

@hexylena hexylena left a comment

Choose a reason for hiding this comment

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

looks great with the new progress bar, fantastic!

Comment thread src/ephemeris/set_library_permissions.py Outdated
Comment thread src/ephemeris/set_library_permissions.py Outdated
@mira-miracoli mira-miracoli requested review from mvdbeek and removed request for hexylena November 21, 2022 14:15
Comment thread src/ephemeris/set_library_permissions.py
@mira-miracoli mira-miracoli requested review from hexylena and removed request for mvdbeek November 22, 2022 12:14
Copy link
Copy Markdown
Member

@hexylena hexylena left a comment

Choose a reason for hiding this comment

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

looks good to me! great work @mira-miracoli

Comment thread src/ephemeris/set_library_permissions.py Outdated
Comment thread src/ephemeris/set_library_permissions.py Outdated
Comment thread src/ephemeris/set_library_permissions.py Outdated
Comment thread src/ephemeris/set_library_permissions.py Outdated
mira-miracoli and others added 4 commits November 23, 2022 16:19
Co-authored-by: Helena <hexylena@galaxians.org>
Co-authored-by: Helena <hexylena@galaxians.org>
Co-authored-by: Helena <hexylena@galaxians.org>
Co-authored-by: Helena <hexylena@galaxians.org>
@mira-miracoli
Copy link
Copy Markdown
Contributor Author

Thank you for your reviews and suggestions @hexylena :)

@hexylena
Copy link
Copy Markdown
Member

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
Copy link
Copy Markdown
Member

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
Copy link
Copy Markdown
Contributor Author

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

@mira-miracoli
Copy link
Copy Markdown
Contributor Author

Shall I change something or can we merge it?

@hexylena
Copy link
Copy Markdown
Member

@nsoranzo any ideas about this error?

@nsoranzo
Copy link
Copy Markdown
Member

That error was fixed in commit galaxyproject/bioblend@22f2d89 , 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 .

@hexylena hexylena force-pushed the set-library-permissions branch from 9685f9e to 867cf97 Compare November 28, 2022 13:49
@nsoranzo
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

@hexylena hexylena left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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.

@natefoo
Copy link
Copy Markdown
Member

natefoo commented Nov 30, 2022

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 mvdbeek merged commit b2b1cb3 into galaxyproject:master Nov 30, 2022
@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Nov 30, 2022

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

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.

5 participants