From 21c88dbca8747d66ce35cca6b8ebe1bf8bf58ac3 Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Wed, 19 Jun 2024 13:41:34 -0700 Subject: [PATCH 01/10] I have added a parser to --cds-items which attempts to help the user search for the experiment and then bring up an cds items. --- hutch_python/epics_arch.py | 84 ++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 18 deletions(-) diff --git a/hutch_python/epics_arch.py b/hutch_python/epics_arch.py index 21d47022..5094c7ed 100644 --- a/hutch_python/epics_arch.py +++ b/hutch_python/epics_arch.py @@ -53,16 +53,15 @@ def _create_parser(): parser.add_argument('--level', '-l', required=False, type=str, default="INFO", help='Change the logging level, e.g. DEBUG to show the debug logging stream') - - parser.add_argument('--cds-items', nargs=2, action='store', default=None, - help="Pulls all data from CDS tab in the form of a " - "dictionary. E.g.: xppx1003221 --cds-items run_xx " - "experiment_name, where xx is the run number. This option " - "will not automatically update the archfile.") + + parser.add_argument('--cds-items', action='store_true', default=None, + help="Pulls all data from CDS tab. E.g.: xppx1003221 run21 X-10032" + "This option will not automatically update the archfile.") parser.add_argument('--softlink', '-sl', action='store_true', default=None, help="create softlink for experiment. This is run after " "the archfile has been updated/created.") + parser.add_argument('--link-path', '-sl_path', action='store', default=EPICS_ARCH_FILE_PATH, help="Provide user with option to supply custom path for " @@ -139,7 +138,7 @@ def create_arch_file(experiment, level=None, hutch=None, path=None, dry_run=Fals if experiment and not dry_run: # set the path to write the epicsArch file to. if cds_items: - pull_cds_data(experiment, cds_items) + pull_cds_items(experiment) return if path: if path and not os.path.exists(path): @@ -156,11 +155,11 @@ def create_arch_file(experiment, level=None, hutch=None, path=None, dry_run=Fals print_dry_run(experiment) -def pull_cds_data(exp, run): +def pull_cds_items(exp): """ - Gather all user objects from the CDS tab in the questionnaire. - Parse objects and separate them based on type. - Display them in the console via PrettyTable. + Gather all user obejcts from the CDS tab in the questionnaire. + Parse objects and sperate them based on type. + Display them in the console vie PrettyTable. Parameters ---------- @@ -168,21 +167,68 @@ def pull_cds_data(exp, run): The experiment's name e.g. xppx1003221 run: ''str'' The run number e.g. run21 - + ---------- Outputs ------- PrettyTable visualization of cds objects + ------- + + """ + """ + pull run data from questionnaire api, then take the data and sort it + create Pretty Table instance and if the values from the run data contain pcdssetup + then put them into a seperate dictionary as they are cds items """ - # pull run data from questionnaire api, then take the data and sort it - # create PrettyTable instance and if the values from the run data contain - # pcdssetup then put them into a seperate dictionary as they are cds items - logger.debug('pull_cds_items(%s)', exp) + logger.debug('pull_cds_items:', exp) client = QuestionnaireClient() - logger.debug("in cds items, run numb:", str(run[1])) - runDetails_Dict = client.getProposalDetailsForRun(str(run[0]), str(run[1])) + + formatted_run_id = '' + + # handle formatting of proposal id, want: e.g. X-10032 + # Case - Expected Format: e.g. xppx1003221 + if re.match('^.{4}[0-9]{7}$', exp): + logger.debug("experiment name format") + run_num = 'run'+exp[-2:] + logger.debug('run num', run_num) + run_hutch = str(exp[0:3]) + logger.debug('run_hutch', run_hutch) + run_id = str(exp[3:-2]) + logger.debug('run_id', run_id) + formatted_run_id = run_id.capitalize() + formatted_run_id = formatted_run_id[:1] + '-' + formatted_run_id[1:] + + elif re.match('[A-Z]{1}-[0-9]{5}$', exp) or re.match('^[A-Z]{2}[0-9]{2}$', exp): + # Case - Proposal ID Format, have user enter run num manually + logger.debug("run_id format") + formatted_run_id = exp + run_num = 'run' + str(input('Please enter run number: ')) + else: + print('Unrecognized format, please follow the prompts to find experiment data.') + run_num = input('Please enter run number: ') + formatted_run_id = input('Please enter proposal ID: ') + + logger.debug('formatted run_id', formatted_run_id) + logger.debug('run_num', run_num) + + matchedKey = '' + + try: + runDetails_Dict = client.getProposalsListForRun(run_num) + for key, vals in runDetails_Dict.items(): + logger.debug(formatted_run_id, key) + if str(key) == str(formatted_run_id): + logger.debug('matched key', key) + matchedKey = key + + except Exception as e: + print("An invalid https request, please check the run number, proposal id and experiment number:", e) + + runDetails_Dict = client.getProposalDetailsForRun(run_num, matchedKey) + sorted_runDetails_Dict = dict(sorted(runDetails_Dict.items())) cds_dict = {} myTable = PrettyTable(["Alias", "PV Base", "Type"]) + for keys, vals in sorted_runDetails_Dict.items(): if "pcdssetup" in keys: cds_dict[keys] = vals @@ -193,6 +239,7 @@ def pull_cds_data(exp, run): # iterate through all cds items and label them based on their type # use the struct members to identify + displayList = [] for k, v in cds_dict.items(): if re.match('pcdssetup-motors.*-name', k): @@ -219,6 +266,7 @@ def pull_cds_data(exp, run): elif re.match('pcdssetup-temp.*-name', k): pv = cds_dict.get(re.sub('name', 'pvbase', k), '') displayList.append(QStruct(v, pv, "temperature")) + # logger.debug("displayList", displayList) for struct in displayList: myTable.add_row([struct.alias, struct.pvbase, struct.pvtype]) From c7ce34e549620ad4201c37d80754d2eb68545cfb Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Wed, 19 Jun 2024 14:14:26 -0700 Subject: [PATCH 02/10] Cleaned up some error handling. --- hutch_python/qs_load.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hutch_python/qs_load.py b/hutch_python/qs_load.py index 8807bdb1..70b9fc82 100644 --- a/hutch_python/qs_load.py +++ b/hutch_python/qs_load.py @@ -1,5 +1,6 @@ import logging import os.path + from configparser import ConfigParser, NoOptionError import happi @@ -16,6 +17,7 @@ logger = logging.getLogger(__name__) + def get_qs_objs(expname): """ Gather user objects from the experiment questionnaire. From 245328e8bdcf87a59144b9d8d8ebeff6462035f3 Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Wed, 19 Jun 2024 14:20:54 -0700 Subject: [PATCH 03/10] Removing unused vars. --- hutch_python/qs_load.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/hutch_python/qs_load.py b/hutch_python/qs_load.py index 70b9fc82..f46e97f9 100644 --- a/hutch_python/qs_load.py +++ b/hutch_python/qs_load.py @@ -16,8 +16,6 @@ logger = logging.getLogger(__name__) - - def get_qs_objs(expname): """ Gather user objects from the experiment questionnaire. From ff5faaf6d508abcd2fb2e99427ab3a2f85d54c2b Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Thu, 20 Jun 2024 09:58:08 -0700 Subject: [PATCH 04/10] trying to fix git conflict, fixed pull cds data --- hutch_python/epics_arch.py | 23 +++++++++++++++++------ hutch_python/qs_load.py | 7 +++++++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/hutch_python/epics_arch.py b/hutch_python/epics_arch.py index 5094c7ed..10f014ef 100644 --- a/hutch_python/epics_arch.py +++ b/hutch_python/epics_arch.py @@ -19,6 +19,8 @@ psdm_qs_cli = None QuestionnaireClient = None +logger = logging.getLogger(__name__) + # Annotation with dataclass, making struct to help organize cds objects in prettytable @dataclass @@ -28,9 +30,6 @@ class QStruct: pvtype: str -logger = logging.getLogger(__name__) - - def _create_parser(): """Argument Parser Setup. Define shell commands.""" parser = argparse.ArgumentParser(description='Create an epicsArch file ' @@ -155,7 +154,13 @@ def create_arch_file(experiment, level=None, hutch=None, path=None, dry_run=Fals print_dry_run(experiment) +<<<<<<< HEAD def pull_cds_items(exp): +======= +# def pull_cds_data(exp, run): +def pull_cds_data(exp): + logger.debug("in client") +>>>>>>> eb930eb (trying to fix git conflict, fixed pull cds data) """ Gather all user obejcts from the CDS tab in the questionnaire. Parse objects and sperate them based on type. @@ -179,6 +184,7 @@ def pull_cds_items(exp): create Pretty Table instance and if the values from the run data contain pcdssetup then put them into a seperate dictionary as they are cds items """ + logger.debug('pull_cds_items:', exp) client = QuestionnaireClient() @@ -190,8 +196,6 @@ def pull_cds_items(exp): logger.debug("experiment name format") run_num = 'run'+exp[-2:] logger.debug('run num', run_num) - run_hutch = str(exp[0:3]) - logger.debug('run_hutch', run_hutch) run_id = str(exp[3:-2]) logger.debug('run_id', run_id) formatted_run_id = run_id.capitalize() @@ -204,6 +208,7 @@ def pull_cds_items(exp): run_num = 'run' + str(input('Please enter run number: ')) else: print('Unrecognized format, please follow the prompts to find experiment data.') + run_num = input('Please enter run number: ') formatted_run_id = input('Please enter proposal ID: ') @@ -222,8 +227,14 @@ def pull_cds_items(exp): except Exception as e: print("An invalid https request, please check the run number, proposal id and experiment number:", e) + sys.exit() - runDetails_Dict = client.getProposalDetailsForRun(run_num, matchedKey) + try: + runDetails_Dict = client.getProposalDetailsForRun(run_num, matchedKey) + # questionnaireFlag = True + except (Exception, UnboundLocalError) as e: + print('Could not find experiment, please check to make sure information is correct.', e) + sys.exit() sorted_runDetails_Dict = dict(sorted(runDetails_Dict.items())) cds_dict = {} diff --git a/hutch_python/qs_load.py b/hutch_python/qs_load.py index f46e97f9..c392428b 100644 --- a/hutch_python/qs_load.py +++ b/hutch_python/qs_load.py @@ -1,6 +1,9 @@ import logging import os.path +<<<<<<< HEAD +======= +>>>>>>> eb930eb (trying to fix git conflict, fixed pull cds data) from configparser import ConfigParser, NoOptionError import happi @@ -16,6 +19,10 @@ logger = logging.getLogger(__name__) +<<<<<<< HEAD +======= + +>>>>>>> eb930eb (trying to fix git conflict, fixed pull cds data) def get_qs_objs(expname): """ Gather user objects from the experiment questionnaire. From 13902864f035a0b19c73bf5541507efc6d6f154f Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Fri, 21 Jun 2024 09:05:24 -0700 Subject: [PATCH 05/10] Fixed merge errors. --- hutch_python/epics_arch.py | 22 ++++++++++++---------- hutch_python/qs_load.py | 7 ------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/hutch_python/epics_arch.py b/hutch_python/epics_arch.py index 10f014ef..becc8222 100644 --- a/hutch_python/epics_arch.py +++ b/hutch_python/epics_arch.py @@ -7,6 +7,7 @@ import sys from dataclasses import dataclass +from kerberos import GSSError from prettytable import PrettyTable from .constants import EPICS_ARCH_FILE_PATH @@ -52,9 +53,9 @@ def _create_parser(): parser.add_argument('--level', '-l', required=False, type=str, default="INFO", help='Change the logging level, e.g. DEBUG to show the debug logging stream') - + parser.add_argument('--cds-items', action='store_true', default=None, - help="Pulls all data from CDS tab. E.g.: xppx1003221 run21 X-10032" + help="Pulls all data from CDS tab. E.g.: epicsarch-qs xppx1003221 --cds-items" "This option will not automatically update the archfile.") parser.add_argument('--softlink', '-sl', action='store_true', default=None, @@ -65,6 +66,7 @@ def _create_parser(): default=EPICS_ARCH_FILE_PATH, help="Provide user with option to supply custom path for " "softlink. Defaults to: /cds/group/pcds/dist/pds/{}/misc/.") + return parser @@ -86,6 +88,7 @@ def logger_setup(args): def create_arch_file(experiment, level=None, hutch=None, path=None, dry_run=False, cds_items=None, softlink=None, link_path=None): + """ Create an epicsArch file for the experiment. @@ -154,13 +157,7 @@ def create_arch_file(experiment, level=None, hutch=None, path=None, dry_run=Fals print_dry_run(experiment) -<<<<<<< HEAD def pull_cds_items(exp): -======= -# def pull_cds_data(exp, run): -def pull_cds_data(exp): - logger.debug("in client") ->>>>>>> eb930eb (trying to fix git conflict, fixed pull cds data) """ Gather all user obejcts from the CDS tab in the questionnaire. Parse objects and sperate them based on type. @@ -186,9 +183,14 @@ def pull_cds_data(exp): """ logger.debug('pull_cds_items:', exp) - client = QuestionnaireClient() + try: + client = QuestionnaireClient() + except GSSError: + print('No kerberos token found; rerun after running kinit') + sys.exit() formatted_run_id = '' + run_num = '' # handle formatting of proposal id, want: e.g. X-10032 # Case - Expected Format: e.g. xppx1003221 @@ -209,7 +211,7 @@ def pull_cds_data(exp): else: print('Unrecognized format, please follow the prompts to find experiment data.') - run_num = input('Please enter run number: ') + run_num = 'run' + input('Please enter run number: ') formatted_run_id = input('Please enter proposal ID: ') logger.debug('formatted run_id', formatted_run_id) diff --git a/hutch_python/qs_load.py b/hutch_python/qs_load.py index c392428b..8807bdb1 100644 --- a/hutch_python/qs_load.py +++ b/hutch_python/qs_load.py @@ -1,9 +1,5 @@ import logging import os.path -<<<<<<< HEAD - -======= ->>>>>>> eb930eb (trying to fix git conflict, fixed pull cds data) from configparser import ConfigParser, NoOptionError import happi @@ -19,10 +15,7 @@ logger = logging.getLogger(__name__) -<<<<<<< HEAD -======= ->>>>>>> eb930eb (trying to fix git conflict, fixed pull cds data) def get_qs_objs(expname): """ Gather user objects from the experiment questionnaire. From 9b6312d54e7ccbe390c8726c74b6b0c2ee10cda3 Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Fri, 21 Jun 2024 10:51:14 -0700 Subject: [PATCH 06/10] hoping this acutally fixes things --- hutch_python/epics_arch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hutch_python/epics_arch.py b/hutch_python/epics_arch.py index becc8222..9821127a 100644 --- a/hutch_python/epics_arch.py +++ b/hutch_python/epics_arch.py @@ -66,7 +66,6 @@ def _create_parser(): default=EPICS_ARCH_FILE_PATH, help="Provide user with option to supply custom path for " "softlink. Defaults to: /cds/group/pcds/dist/pds/{}/misc/.") - return parser @@ -158,6 +157,8 @@ def create_arch_file(experiment, level=None, hutch=None, path=None, dry_run=Fals def pull_cds_items(exp): + logger.debug("in client") + """ Gather all user obejcts from the CDS tab in the questionnaire. Parse objects and sperate them based on type. From 3261b3b4ab4861de67f45297430b5056c648b569 Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Mon, 24 Jun 2024 14:05:26 -0700 Subject: [PATCH 07/10] Resolving reviewer comments from the PR. --- hutch_python/epics_arch.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hutch_python/epics_arch.py b/hutch_python/epics_arch.py index 9821127a..f8cb67c9 100644 --- a/hutch_python/epics_arch.py +++ b/hutch_python/epics_arch.py @@ -157,12 +157,11 @@ def create_arch_file(experiment, level=None, hutch=None, path=None, dry_run=Fals def pull_cds_items(exp): - logger.debug("in client") """ - Gather all user obejcts from the CDS tab in the questionnaire. - Parse objects and sperate them based on type. - Display them in the console vie PrettyTable. + Gather all user objects from the CDS tab in the questionnaire. + Parse objects and separate them based on type. + Display them in the console via PrettyTable. Parameters ---------- @@ -170,7 +169,7 @@ def pull_cds_items(exp): The experiment's name e.g. xppx1003221 run: ''str'' The run number e.g. run21 - ---------- + Outputs ------- PrettyTable visualization of cds objects @@ -182,7 +181,7 @@ def pull_cds_items(exp): create Pretty Table instance and if the values from the run data contain pcdssetup then put them into a seperate dictionary as they are cds items """ - + logger.debug("in client") logger.debug('pull_cds_items:', exp) try: client = QuestionnaireClient() @@ -229,15 +228,15 @@ def pull_cds_items(exp): matchedKey = key except Exception as e: - print("An invalid https request, please check the run number, proposal id and experiment number:", e) - sys.exit() + logger.error("An invalid https request, please check the run number, proposal id and experiment number:", e) + return try: runDetails_Dict = client.getProposalDetailsForRun(run_num, matchedKey) # questionnaireFlag = True except (Exception, UnboundLocalError) as e: - print('Could not find experiment, please check to make sure information is correct.', e) - sys.exit() + logger.error('Could not find experiment, please check to make sure information is correct.', e) + return sorted_runDetails_Dict = dict(sorted(runDetails_Dict.items())) cds_dict = {} From 80568047bae68c9a365366e3e3c232c85d7bbf0d Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Wed, 3 Jul 2024 11:55:57 -0700 Subject: [PATCH 08/10] Cleaned up logger statements, added checks for ws cfgs and kerberos tokens and edited cases for propsal ID matching. --- conda-recipe/meta.yaml | 1 + hutch_python/epics_arch.py | 65 ++++++++++++++++++++++++-------------- requirements.txt | 1 + 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index f02eab9b..5184b11a 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -43,6 +43,7 @@ requirements: - pyyaml >=5.4.0 - requests >=2.26.0 - simplejson >=3.17.0 + - pykerberos test: commands: diff --git a/hutch_python/epics_arch.py b/hutch_python/epics_arch.py index f8cb67c9..c188a2e8 100644 --- a/hutch_python/epics_arch.py +++ b/hutch_python/epics_arch.py @@ -2,12 +2,13 @@ import argparse import logging import os +import os.path import re import subprocess import sys +from configparser import ConfigParser, NoOptionError from dataclasses import dataclass -from kerberos import GSSError from prettytable import PrettyTable from .constants import EPICS_ARCH_FILE_PATH @@ -80,8 +81,8 @@ def main(): def logger_setup(args): # Setting up the logger, to show the level when enabled - logging.getLogger().addHandler(logging.NullHandler()) - logging.basicConfig(level="INFO") + # logging.getLogger().addHandler(logging.NullHandler()) + logging.basicConfig() logger.setLevel(args.level) @@ -182,27 +183,46 @@ def pull_cds_items(exp): then put them into a seperate dictionary as they are cds items """ logger.debug("in client") - logger.debug('pull_cds_items:', exp) - try: - client = QuestionnaireClient() - except GSSError: - print('No kerberos token found; rerun after running kinit') - sys.exit() + logger.debug('pull_cds_items: %s', exp) + + cfg = ConfigParser() + cfgs = cfg.read(['qs.cfg', '.qs.cfg', + os.path.expanduser('~/.qs.cfg'), + 'web.cfg', '.web.cfg', + os.path.expanduser('~/.web.cfg')]) + # Ws-auth + client = None + if cfgs: + user = cfg.get('DEFAULT', 'user', fallback=None) + try: + print("Trying to authenticate with cfg file.") + pw = cfg.get('DEFAULT', 'pw') + client = QuestionnaireClient(use_kerberos=False, user=user, pw=pw) + except NoOptionError: + logger.error("Could not find valid username and password in qs.cfg or web.cfg, attempting to autheticate with kerberos instead.") + else: + logger.debug("Cfgs could not be found. ") + if client is None: + try: + client = QuestionnaireClient(use_kerberos=True) + except Exception as exc: + logger.error("Not able to authenticate with kerberos, please make sure you have an active token.") + raise exc formatted_run_id = '' run_num = '' # handle formatting of proposal id, want: e.g. X-10032 # Case - Expected Format: e.g. xppx1003221 - if re.match('^.{4}[0-9]{7}$', exp): + if re.match('^[a-zA-Z]{4}[0-9]+[0-9]{2}$', exp): logger.debug("experiment name format") run_num = 'run'+exp[-2:] - logger.debug('run num', run_num) + logger.debug('run num: %s', run_num) run_id = str(exp[3:-2]) - logger.debug('run_id', run_id) + logger.debug('run_id: %s', run_id) formatted_run_id = run_id.capitalize() formatted_run_id = formatted_run_id[:1] + '-' + formatted_run_id[1:] - + # Case - X-10032 or LY45 elif re.match('[A-Z]{1}-[0-9]{5}$', exp) or re.match('^[A-Z]{2}[0-9]{2}$', exp): # Case - Proposal ID Format, have user enter run num manually logger.debug("run_id format") @@ -214,28 +234,28 @@ def pull_cds_items(exp): run_num = 'run' + input('Please enter run number: ') formatted_run_id = input('Please enter proposal ID: ') - logger.debug('formatted run_id', formatted_run_id) - logger.debug('run_num', run_num) + logger.debug('formatted run_id: %s', formatted_run_id) + logger.debug('run_num: %s', run_num) matchedKey = '' try: runDetails_Dict = client.getProposalsListForRun(run_num) for key, vals in runDetails_Dict.items(): - logger.debug(formatted_run_id, key) + logger.debug("%s, %s", formatted_run_id, key) if str(key) == str(formatted_run_id): - logger.debug('matched key', key) + logger.debug('matched key: %s', key) matchedKey = key except Exception as e: - logger.error("An invalid https request, please check the run number, proposal id and experiment number:", e) + logger.error("An invalid https request, please check the run number, proposal id and experiment number: %s", e) return try: runDetails_Dict = client.getProposalDetailsForRun(run_num, matchedKey) # questionnaireFlag = True except (Exception, UnboundLocalError) as e: - logger.error('Could not find experiment, please check to make sure information is correct.', e) + logger.error('Could not find experiment, please check to make sure information is correct: %s', e) return sorted_runDetails_Dict = dict(sorted(runDetails_Dict.items())) @@ -279,7 +299,7 @@ def pull_cds_items(exp): elif re.match('pcdssetup-temp.*-name', k): pv = cds_dict.get(re.sub('name', 'pvbase', k), '') displayList.append(QStruct(v, pv, "temperature")) - # logger.debug("displayList", displayList) + # logger.debug("displayList: %s", displayList) for struct in displayList: myTable.add_row([struct.alias, struct.pvbase, struct.pvtype]) @@ -358,7 +378,7 @@ def check_for_duplicates(qs_data, af_data): # Looking for duplicates of PVs in the questionaire # also print out the alias for PV, change removing to warning operator to remove dup then rerun for dup in pvDuplicate: - logger.debug("!Duplicate PV in questionnaire!:" + str(dup)) + logger.debug("!Duplicate PV in questionnaire!: " + str(dup)) for value in rev_keyDict[dup][1:]: logger.debug("Found PV duplicate(s) from questionnaire: " + value + ", " + sorted_qsDict[value]) @@ -390,8 +410,7 @@ def check_for_duplicates(qs_data, af_data): sorted_afDict = dict(sorted(sorted_afDict.items())) updated_arch_list = [x for item in sorted_afDict.items() for x in item] - logger.debug("\nUpdated Arch List:\n") - logger.debug(updated_arch_list) + logger.debug("\nUpdated Arch List: %s\n", updated_arch_list) return updated_arch_list diff --git a/requirements.txt b/requirements.txt index 8d123a86..7a513f2a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,6 +18,7 @@ pyqt5 pyyaml>=5.4.0 requests>=2.26.0 simplejson>=3.17.0 +pykerberos # Some are unavailable on pypi: # elog From 5af14a944aa57230f1dbaa10522e6961ae6ed05b Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Fri, 5 Jul 2024 10:27:01 -0700 Subject: [PATCH 09/10] Adding pip dependency and reformatting meta.yaml --- .github/workflows/standard.yml | 2 +- conda-recipe/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/standard.yml b/.github/workflows/standard.yml index 82e73c7a..9231d21e 100644 --- a/.github/workflows/standard.yml +++ b/.github/workflows/standard.yml @@ -24,7 +24,7 @@ jobs: # System packages to be installed only for conda-based testing: conda-system-packages: "" # System packages to be installed only for pip-based testing: - pip-system-packages: "" + pip-system-packages: "libkrb5-dev" # System packages to be installed only for documentation: docs-system-packages: "pandoc" # Set if using setuptools-scm for the conda-build workflow diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 5184b11a..4a3ebd7e 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -39,11 +39,11 @@ requirements: - psdaq-control-minimal >=3.3.19 - psdm_qs_cli >=0.3.1 - pyfiglet >=0.8.0 + - pykerberos - pyqt =5 - pyyaml >=5.4.0 - requests >=2.26.0 - simplejson >=3.17.0 - - pykerberos test: commands: From d03e89e2fc0a8c3eec0f0ab680c643525474ccb1 Mon Sep 17 00:00:00 2001 From: Christian Tsoi-A-Sue Date: Tue, 9 Jul 2024 08:18:02 -0700 Subject: [PATCH 10/10] fixing some formatting issues --- hutch_python/epics_arch.py | 2 -- requirements.txt | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hutch_python/epics_arch.py b/hutch_python/epics_arch.py index c188a2e8..accef327 100644 --- a/hutch_python/epics_arch.py +++ b/hutch_python/epics_arch.py @@ -174,8 +174,6 @@ def pull_cds_items(exp): Outputs ------- PrettyTable visualization of cds objects - ------- - """ """ pull run data from questionnaire api, then take the data and sort it diff --git a/requirements.txt b/requirements.txt index 7a513f2a..78485a31 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,11 +14,12 @@ pcdsdevices>=7.0.0 pcdsutils>=0.5.0 psdaq-control-minimal pyfiglet>=0.8.0 +pykerberos pyqt5 pyyaml>=5.4.0 requests>=2.26.0 simplejson>=3.17.0 -pykerberos + # Some are unavailable on pypi: # elog