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

refactor ServerUtilities.py #7765

Open
belforte opened this issue Jul 17, 2023 · 6 comments
Open

refactor ServerUtilities.py #7765

belforte opened this issue Jul 17, 2023 · 6 comments

Comments

@belforte
Copy link
Member

Should have three files

  • what is used also in CRABClient, hopefully very little, which needs to stay py2/3 compat
    • create new file name here (e.g. constants !)
  • what is used only in server, so can move to py3 only and rely on pylint when changing
  • accept also that some code like encodeRequest can be duplicated or adapted to simpler use case and moved to ClientUtilities
@novicecpp
Copy link
Contributor

Just random though from reviewing #7800

  • Keep ServerUtilities.py for sharing code for both client and server.
  • Move all utils.py files into single directory src/python/utils like wmcore does.
    • This way, we can move RucioUtils.py into utils/rucio/functions.py and move RucioActions.py to utils/rucio/actions.py.
    • Also, mark src/python/utils directory exclusive for servers (REST/TW/PUB).

@belforte
Copy link
Member Author

belforte commented Aug 7, 2023

I like this idea, thanks @novicecpp
@mapellidario please add your thoughts. I defer further cleanup to after we have finalized this. No hurry.

@belforte
Copy link
Member Author

belforte commented Aug 8, 2023

Increased priority since it is good to have a plan. Which we will implement slowly

@belforte
Copy link
Member Author

hand to Vijay ?

@belforte
Copy link
Member Author

I will introduce src/python/Utils now. But I prefer to have few/no subdirectories there at this time, since I expect a limited number of files and there will be several utilities in common between TW and Publisher.

@belforte
Copy link
Member Author

belforte commented Jul 24, 2024

pfff.. CRABServer/src/python/Utils clashes with WMCore/src/python/Utils see #8557 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants