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

adding proc card displays #31

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

sihyunjeon
Copy link
Contributor

No description provided.

@@ -17,6 +17,25 @@ def prepare_default_card(self):
if glob.glob(f'{cards_path}/*_cuts.f'):
os.system(f'cp {cards_path}/*_cuts.f {job_files_path}')


def get_proc_card(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this doesn't do anything in madgraph_gridpack.py. It's only for main.py:get_proc_card web api purposes

with open(f'{cards_path}/*_proc_card.dat') as input_file:
proc_card = input_file.read()
else:
raise Exception(f'Could not find {cards_path} as process card')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

proc card should always exist


if glob.glob(f'{cards_path}/*_madspin_card.dat'):
with open(f'{cards_path}/*_madpsin_card.dat') as input_file:
proc_card += '\n\n\n\n' + input_file.read()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

madspin card depends on situations (might not exist)

proc_card += input_file.read()

return proc_card

Copy link
Contributor Author

Choose a reason for hiding this comment

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

madspin card depends on situation, add #### banner to split proc_card and madspin_card.dat parts


return output_text(fragment, headers={'Content-Type': 'text/plain'})
content = gridpack.get_proc_card()
return output_text(content, headers={'Content-Type': 'text/plain'})
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 are proc_card reading part from madgraph_gridpack.get_proc_card()


return output_text(fragment, headers={'Content-Type': 'text/plain'})


Copy link
Contributor Author

Choose a reason for hiding this comment

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

this i didn't really touch other than copy pasting to this other lines

@@ -24,6 +22,14 @@ def get_run_card(self):
dataset_dict.get('template_user', []),
template_vars)

return run_card + '\n\n'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

run card and customize card are split into two now (for better api displays)

@@ -33,21 +39,21 @@ def get_run_card(self):
dataset_dict.get('model_params_user', []),
model_params_vars)

return run_card + '\n' + customize_card
return customize_card
Copy link
Contributor Author

Choose a reason for hiding this comment

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

run card and customize card are split into two now (for better api displays)

with open(output_file_name, 'w') as output_file:
output_file.write(run_card)
output_file.write(input_card)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rename run_card to input_card following powheg input convention powheg.input
Here run_card and customize_card are read, glued, and written to powheg.input


def get_customize_card(self):
def get_proc_card(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simply rename

@@ -56,25 +62,25 @@ def get_customize_card(self):
template_name = dataset_dict['template']
return template_name.split('.', 1)[0]

def prepare_customize_card(self):
def prepare_proc_card(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

simply renamed

@sihyunjeon
Copy link
Contributor Author

@ggonzr Hi geovanny,

More or less there, I am not sure "where the clickable icons are defined" so this is missing but other than that i've made small changes for better visualization of the cards.

for madgraph,

  1. Added a function to read proc_card.dat

for powheg,

  1. First renamed the run_card to input_card
  2. input_card is split into two run_card and customize_card
  3. These two are glued together to form one input_card

So now for every submission, I believe following 3 functions will work

  1. get_proc_card
  2. get_run_card
  3. get_customize_card
    ==> In the actions tab, can we make these three and clickable in the above order along with the fragment file? so there should be 4 icons to display cards now

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.

1 participant