Name | LbAPLocal JSON |
Version |
0.7.4
JSON |
| download |
home_page | |
Summary | Tool to locally run tests for AnalysisProductions |
upload_time | 2024-02-03 15:22:47 |
maintainer | |
docs_url | None |
author | LHCb |
requires_python | >=3.9 |
license | |
keywords |
lhcb
analysisproductions
dirac
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LbAPLocal
LbAPLocal is the python library for running offline tests for the LHCb AnalysisProductions framework.
## Usage
LbAPLocal is installed by default with the LHCb environment on lxplus. For users on external clusters, one can source the LHCb environment from CVMFS to get setup: ``` source /cvmfs/lhcb.cern.ch/lib/LbEnv ```
After installing, LbAPLocal can be run from the command line with the following options:
```
Usage: lb-ap [OPTIONS] COMMAND [ARGS]...
Command line tool for the LHCb AnalysisProductions
Options:
--version
--help Show this message and exit.
Commands:
versions List the available tags of the Analysis Productions...
checkout Clean out the current copy of the specified production and...
clone Clone the AnalysisProductions repository and do lb-ap...
list List the available production folders by running 'lb-ap list'
list-checks List the checks for a specific production by running lb-ap...
render Render the info.yaml for a given production
validate Validate the configuration for a given production
test Execute a job locally
check Run checks for a production
debug Start an interactive session inside the job's environment
reproduce Reproduce an existing online test locally
parse-log Read a Gaudi log file and extract information
```
To update an existing production:
```bash
$ lb-ap checkout <version> <working_group> <production> <branch>
```
where `version` is the latest version of AnalysisProductions corresponding to `production`, `working_group` is the working group the production belongs to, `production` is the production you want to update and `branch` is the name of the branch you want to work on.
If you don't yet have a local copy of AnalysisProductions:
```bash
$ lb-ap clone <version> <working_group> <production> <branch> <clone_type>
```
where `version`, `working_group`, `production` and `branch` are defined as above. `clone_type` can be either `ssh`, `https` or `krb5`, by default it is `ssh`.
To see which versions of the repository are available for a given production:
```bash
$ lb-ap versions B2OC B02DKPi
The available versions for B02DKPi are:
v0r0p1674088
v0r0p1735460
.
.
.
```
To see which productions are available locally:
```bash
$ lb-ap list
The available productions are:
* MyAnalysis
```
To see which jobs are available for a given production:
```bash
$ lb-ap list MyAnalysis
The available jobs for MyAnalysis are:
* My2016MagDownJob
* My2016MagUpJob
```
To see which checks are defined for a given production:
```bash
$ lb-ap list-checks MyAnalysis
The checks defined for MyAnalysis are:
* MyRangeCheck (type: range)
* MyOtherRangeCheck (type: range)
* MyNumEntriesCheck (type: num_entries)
```
To see which checks are used for a job within a given production:
```bash
$ lb-ap list-checks MyAnalysis My2016MagDownJob
The checks defined for MyAnalysis that are required by My2016MagDownJob are:
* MyRangeCheck (type: range)
* MyNumEntriesCheck (type: num_entries)
```
To render the templating in `info.yaml` for a given production:
```bash
$ lb-ap render MyAnalysis
```
To validate the configuration of a given production:
```bash
$ lb-ap validate MyAnalysis
Rendering info.yaml for MyAnalysis
YAML parsed successfully
YAML validated successfully
```
To run a test of a job interactively:
```bash
$ lb-ap debug MyAnalysis My2016MagDownJob
Welcome to analysis productions debug mode:
The production can be tested by running:
gaudirun.py -T '$ANALYSIS_PRODUCTIONS_DYNAMIC/Lb2Lll/MC_2017_MagDown_Lb2PsiL_mm_strip_autoconf.py' '$ANALYSIS_PRODUCTIONS_BASE/Lb2Lll/stripping_seq.py' prodConf_DaVinci_00012345_00006789_1.py
[DaVinci v45r5] output $
```
To test a job non-interactively:
```bash
$ lb-ap test MyAnalysis My2016MagDownJob
Success! Output can be found in xxxxxxxxxxxx
```
For both interactive and non-interactive testing, when testing a job that depends on another job to provide the input file the dependent job will be tested first and its output passed to the requested job. If the dependent job has already been run the location of its output can be passed to the requested job by appending `-i <output_file_path>` to `lb-ap test <production_name> <job_name>`.
To test a job on a specific input file:
```bash
$ lb-ap test MyAnalysis My2016MagDownJob -i InputFileLocation
Success! Output can be found in xxxxxxxxxxxx
```
InputFileLocation can be either an LFN or a path to a local file. This is also valid for the debug command.
To run only the checks for a job (non-interactively, requiring the output from an earlier successful `test` command):
```bash
$ lb-ap check MyAnalysis My2016MagDownJob local-tests/path/to/output/OUTPUT_NTUPLE.ROOT
All checks passed! Any output can be found in local-tests/path/to/output/checks
```
To run only the checks for a job but saving the output to a different location (non-interactively, requiring the output from an earlier successful `test` command):
```bash
$ lb-ap check MyAnalysis My2016MagDownJob local-tests/path/to/output/OUTPUT_NTUPLE.ROOT another/file/path
All checks passed! Any output can be found in another/file/path
```
To read a Gaudi log file and extract information:
```bash
$ lb-ap parse-log Job.log
Summary of log messages in: Job.log
Found 2659 ERROR messages
* 2649 instances of "*** Flag container MC/TrackInfo not found."
* 9 instances of "HltSelReportsDecoder:: Failed to add Hlt selection name Hlt2RecSummary to its container "
* 1 instances of "HltSelReportsDecoder:: The ERROR message is suppressed : ' Failed to add Hlt selection name Hlt2RecSummary to its container '"
Found 61 WARNING messages
* 7 instances of "TupleToolBremInfo:: TupleToolBremInfo requires fullDST - BremP and BremOrigin might not be reliable (Multiplicity is OK)"
and 54 others (50 unique), pass "--suppress=0" to show all messages
Errors have been detected!
* Lines: 3275, 3277, 3279, 3281, 3283 and 17 others
This message indicates the location specified for the information being accessed by
RelatedInfo does not exist. It is likely that either:
* The location specified is incorrect, try looking for it with dst-dump.
* The given information was never stored for that candidate, in which case the use of
RelatedInfo should be removed.
General explanations
* Line: 6318
Histograms are not being saved as no filename has been specified for storing them. This
message is harmless and normally ignored.
Error: Found issues in log
```
Raw data
{
"_id": null,
"home_page": "",
"name": "LbAPLocal",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "LHCb AnalysisProductions DIRAC",
"author": "LHCb",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/62/3e/60b2e2f6e20bfa9ab215b102ac004fc0a18fe9d33950aa490b457a6d09ff/LbAPLocal-0.7.4.tar.gz",
"platform": null,
"description": "# LbAPLocal\n\nLbAPLocal is the python library for running offline tests for the LHCb AnalysisProductions framework.\n\n\n## Usage\n\nLbAPLocal is installed by default with the LHCb environment on lxplus. For users on external clusters, one can source the LHCb environment from CVMFS to get setup: ``` source /cvmfs/lhcb.cern.ch/lib/LbEnv ```\nAfter installing, LbAPLocal can be run from the command line with the following options:\n\n```\nUsage: lb-ap [OPTIONS] COMMAND [ARGS]...\n\n Command line tool for the LHCb AnalysisProductions\n\nOptions:\n --version\n --help Show this message and exit.\n\nCommands:\n versions List the available tags of the Analysis Productions...\n checkout Clean out the current copy of the specified production and...\n clone Clone the AnalysisProductions repository and do lb-ap...\n list List the available production folders by running 'lb-ap list'\n list-checks List the checks for a specific production by running lb-ap...\n render Render the info.yaml for a given production\n validate Validate the configuration for a given production\n test Execute a job locally\n check Run checks for a production\n debug Start an interactive session inside the job's environment\n reproduce Reproduce an existing online test locally\n parse-log Read a Gaudi log file and extract information\n```\n\nTo update an existing production:\n```bash\n$ lb-ap checkout <version> <working_group> <production> <branch>\n```\nwhere `version` is the latest version of AnalysisProductions corresponding to `production`, `working_group` is the working group the production belongs to, `production` is the production you want to update and `branch` is the name of the branch you want to work on.\n\nIf you don't yet have a local copy of AnalysisProductions:\n```bash\n$ lb-ap clone <version> <working_group> <production> <branch> <clone_type>\n```\nwhere `version`, `working_group`, `production` and `branch` are defined as above. `clone_type` can be either `ssh`, `https` or `krb5`, by default it is `ssh`.\n\nTo see which versions of the repository are available for a given production:\n```bash\n$ lb-ap versions B2OC B02DKPi\nThe available versions for B02DKPi are:\n v0r0p1674088\n v0r0p1735460\n .\n .\n .\n```\n\nTo see which productions are available locally:\n```bash\n$ lb-ap list\nThe available productions are:\n* MyAnalysis\n```\n\nTo see which jobs are available for a given production:\n```bash\n$ lb-ap list MyAnalysis\nThe available jobs for MyAnalysis are:\n* My2016MagDownJob\n* My2016MagUpJob\n```\n\nTo see which checks are defined for a given production:\n```bash\n$ lb-ap list-checks MyAnalysis\nThe checks defined for MyAnalysis are:\n* MyRangeCheck (type: range)\n* MyOtherRangeCheck (type: range)\n* MyNumEntriesCheck (type: num_entries)\n```\n\nTo see which checks are used for a job within a given production:\n```bash\n$ lb-ap list-checks MyAnalysis My2016MagDownJob\nThe checks defined for MyAnalysis that are required by My2016MagDownJob are:\n* MyRangeCheck (type: range)\n* MyNumEntriesCheck (type: num_entries)\n```\n\nTo render the templating in `info.yaml` for a given production:\n```bash\n$ lb-ap render MyAnalysis\n```\n\nTo validate the configuration of a given production:\n```bash\n$ lb-ap validate MyAnalysis\nRendering info.yaml for MyAnalysis\nYAML parsed successfully\nYAML validated successfully\n```\n\nTo run a test of a job interactively:\n```bash\n$ lb-ap debug MyAnalysis My2016MagDownJob\n\nWelcome to analysis productions debug mode:\n\nThe production can be tested by running:\n\ngaudirun.py -T '$ANALYSIS_PRODUCTIONS_DYNAMIC/Lb2Lll/MC_2017_MagDown_Lb2PsiL_mm_strip_autoconf.py' '$ANALYSIS_PRODUCTIONS_BASE/Lb2Lll/stripping_seq.py' prodConf_DaVinci_00012345_00006789_1.py\n\n[DaVinci v45r5] output $\n```\n\nTo test a job non-interactively:\n```bash\n$ lb-ap test MyAnalysis My2016MagDownJob\nSuccess! Output can be found in xxxxxxxxxxxx\n```\n\nFor both interactive and non-interactive testing, when testing a job that depends on another job to provide the input file the dependent job will be tested first and its output passed to the requested job. If the dependent job has already been run the location of its output can be passed to the requested job by appending `-i <output_file_path>` to `lb-ap test <production_name> <job_name>`.\n\nTo test a job on a specific input file:\n```bash\n$ lb-ap test MyAnalysis My2016MagDownJob -i InputFileLocation\nSuccess! Output can be found in xxxxxxxxxxxx\n```\nInputFileLocation can be either an LFN or a path to a local file. This is also valid for the debug command.\n\nTo run only the checks for a job (non-interactively, requiring the output from an earlier successful `test` command):\n```bash\n$ lb-ap check MyAnalysis My2016MagDownJob local-tests/path/to/output/OUTPUT_NTUPLE.ROOT\nAll checks passed! Any output can be found in local-tests/path/to/output/checks\n```\n\nTo run only the checks for a job but saving the output to a different location (non-interactively, requiring the output from an earlier successful `test` command):\n```bash\n$ lb-ap check MyAnalysis My2016MagDownJob local-tests/path/to/output/OUTPUT_NTUPLE.ROOT another/file/path\nAll checks passed! Any output can be found in another/file/path\n```\n\nTo read a Gaudi log file and extract information:\n```bash\n$ lb-ap parse-log Job.log\nSummary of log messages in: Job.log\n Found 2659 ERROR messages\n * 2649 instances of \"*** Flag container MC/TrackInfo not found.\"\n * 9 instances of \"HltSelReportsDecoder:: Failed to add Hlt selection name Hlt2RecSummary to its container \"\n * 1 instances of \"HltSelReportsDecoder:: The ERROR message is suppressed : ' Failed to add Hlt selection name Hlt2RecSummary to its container '\"\n Found 61 WARNING messages\n * 7 instances of \"TupleToolBremInfo:: TupleToolBremInfo requires fullDST - BremP and BremOrigin might not be reliable (Multiplicity is OK)\"\n and 54 others (50 unique), pass \"--suppress=0\" to show all messages\n\nErrors have been detected!\n * Lines: 3275, 3277, 3279, 3281, 3283 and 17 others\n This message indicates the location specified for the information being accessed by\n RelatedInfo does not exist. It is likely that either:\n\n * The location specified is incorrect, try looking for it with dst-dump.\n * The given information was never stored for that candidate, in which case the use of\n RelatedInfo should be removed.\n\nGeneral explanations\n * Line: 6318\n Histograms are not being saved as no filename has been specified for storing them. This\n message is harmless and normally ignored.\nError: Found issues in log\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Tool to locally run tests for AnalysisProductions",
"version": "0.7.4",
"project_urls": {
"Bug Reports": "https://gitlab.cern.ch/lhcb-dpa/analysis-productions/lbaplocal/-/issues",
"Homepage": "https://gitlab.cern.ch/lhcb-dpa/analysis-productions/lbaplocal",
"Source": "https://gitlab.cern.ch/lhcb-dpa/analysis-productions/lbaplocal"
},
"split_keywords": [
"lhcb",
"analysisproductions",
"dirac"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b57553003676e59260de65f507a627511f4dff24bb26fb862e2aea138728adb6",
"md5": "bedfdebe84bc9d4bc7fa64a1d6d9e4f5",
"sha256": "43dcc9f0441ca7879e934039f2683165775b3e128b6387ad84ddd5580ad5f6d8"
},
"downloads": -1,
"filename": "LbAPLocal-0.7.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bedfdebe84bc9d4bc7fa64a1d6d9e4f5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 32174,
"upload_time": "2024-02-03T15:22:44",
"upload_time_iso_8601": "2024-02-03T15:22:44.828900Z",
"url": "https://files.pythonhosted.org/packages/b5/75/53003676e59260de65f507a627511f4dff24bb26fb862e2aea138728adb6/LbAPLocal-0.7.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "623e60b2e2f6e20bfa9ab215b102ac004fc0a18fe9d33950aa490b457a6d09ff",
"md5": "3e3e3e9ee1c84b57d2937a30be318979",
"sha256": "2d75064de14d9e522cff1e737c4cb76c20682cfc7329f33e39ef674a19917429"
},
"downloads": -1,
"filename": "LbAPLocal-0.7.4.tar.gz",
"has_sig": false,
"md5_digest": "3e3e3e9ee1c84b57d2937a30be318979",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 313588,
"upload_time": "2024-02-03T15:22:47",
"upload_time_iso_8601": "2024-02-03T15:22:47.352012Z",
"url": "https://files.pythonhosted.org/packages/62/3e/60b2e2f6e20bfa9ab215b102ac004fc0a18fe9d33950aa490b457a6d09ff/LbAPLocal-0.7.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-03 15:22:47",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "lbaplocal"
}