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

Re-organize the code #268

Open
chaen opened this issue Jun 28, 2024 · 2 comments
Open

Re-organize the code #268

chaen opened this issue Jun 28, 2024 · 2 comments

Comments

@chaen
Copy link
Contributor

chaen commented Jun 28, 2024

The __init__.py contains too much code, but we agree we want to avoid the extreme of one class per file (from JobDB import JobDB style).
The current consensus would be like that:

  • at a package level (router for example) we have one file per system (configuration.py for example)
  • If we need more files (think of jobs, which have the sandbox, the joblogging, etc), we put them in a sub module (e.g routers.job). The code goes in a specific file (job.py, joblogging.py) but we use the the __init__.py to expose the specific file
@fstagni
Copy link
Contributor

fstagni commented Aug 14, 2024

Right now, I see that https://github.com/DIRACGrid/diracx/blob/main/diracx-routers/src/diracx/routers/job_manager/__init__.py contains the code of what in DIRAC was JobManager and JobMonitor handlers. The only other WMS related router created is https://github.com/DIRACGrid/diracx/blob/main/diracx-routers/src/diracx/routers/job_manager/sandboxes.py.

Do I understand correctly that you would prefer to re-organize in a way similar to what is done for auth ? (https://github.com/DIRACGrid/diracx/blob/main/diracx-routers/src/diracx/routers/auth/__init__.py)

@ryuwd
Copy link

ryuwd commented Sep 18, 2024

#296 will split the job manager handlers across more than one file

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

No branches or pull requests

3 participants