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

Changes to the RunDB frontend for rucio #164

Merged
merged 11 commits into from
Aug 17, 2020
Merged

Changes to the RunDB frontend for rucio #164

merged 11 commits into from
Aug 17, 2020

Conversation

SidAhmedMa
Copy link
Contributor

Hello, this is the long-awaited version that allows access to Rucio's data on Dali directly (I hope it works perfectly 🤞). Knowing that obviously I have already done a lot of tests.

@feigaodm feigaodm requested review from ershockley and tunnell July 31, 2020 00:48
straxen/rundb.py Outdated
@@ -105,8 +105,9 @@ def __init__(self,
self.collection = self.client[mongo_dbname][mongo_collname]

self.backends = [
strax.S3Backend(**s3_kwargs),
strax.FileSytemBackend(),
#strax.S3Backend(**s3_kwargs),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not removing those lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These lines correspond to backends that still exist, so you have the choice between removing the comments, which will make you have 3 backends in all, or leaving it like that, which will make it go faster.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay I do not get it why do we have to comment out those existing backends? Either they exist and we use them then we should not comment them out, or they do not exist and we do not use them, in this case we can remove those lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I will remove the comments

@WenzDaniel
Copy link
Collaborator

Hej Sid, thanks a lot. I just briefly skimmed over the code. Could you a share with us some examples?

@SidAhmedMa
Copy link
Contributor Author

Hej Sid, thanks a lot. I just briefly skimmed over the code. Could you a share with us some examples?

Very good suggestion, you should already know that this is my first pr :). However I also have to submit a draft on strax (as you suggested to me), so the changes will be complete.

Remove comments on S3Backend and FileSytemBackend backends
@SidAhmedMa
Copy link
Contributor Author

Hello everyone, given the particular structure of rucio, which for each file matches a sub-sub-folder, it was mandatory to create a new backend to manage this new structure,

In the new structure, we use strax.rucio as the backend and the database frontend, you will find a notebook below which shows the tests I performed.

Notebook: /dali/lgrandi/sahmedma/rucio-backend-test.ipynb

@WenzDaniel
Copy link
Collaborator

Hi Sid, thanks a lot. Could you also upload this notebook to our analysis repo? This makes it easier for people to look into it. You could use the following directory: https://github.com/XENONnT/analysiscode/tree/master/StraxTests

@SidAhmedMa
Copy link
Contributor Author

Hi Sid, thanks a lot. Could you also upload this notebook to our analysis repo? This makes it easier for people to look into it. You could use the following directory: https://github.com/XENONnT/analysiscode/tree/master/StraxTests

It's done. Thank you by teaching me how it works :)

SidAhmedMa and others added 2 commits August 4, 2020 14:16
Removing try and except, which make some errors
@JoranAngevaare
Copy link
Contributor

JoranAngevaare commented Aug 14, 2020

This feature is tested and ready for merge. It is now available as AxFoundation/strax#300 is also merged

straxen/rundb.py Outdated
@@ -40,6 +40,7 @@ def __init__(self,
local_only=False,
new_data_path=None,
reader_ini_name_is_mode=False,
rucio_path = '/dali/lgrandi/rucio/',
Copy link
Collaborator

@WenzDaniel WenzDaniel Aug 17, 2020

Choose a reason for hiding this comment

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

Not sure if we have anywhere in straxen dali related paths except for the contexts. Maybe you could change this into None and add this information simply to the context?

Copy link
Contributor

Choose a reason for hiding this comment

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

There are some references to specific places/hosts even in this file:

'dali': r'^dali.*rcc.*',

if self.hostname.endswith('xenon.local'):

But indeed perhaps it's nicer to put it in the context 1ac9c56

Copy link
Collaborator

@WenzDaniel WenzDaniel 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 thanks, you two.

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.

3 participants