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

Duplicated error message upon project load #483

Open
nsheff opened this issue Aug 14, 2023 · 5 comments
Open

Duplicated error message upon project load #483

nsheff opened this issue Aug 14, 2023 · 5 comments
Assignees
Milestone

Comments

@nsheff
Copy link
Contributor

nsheff commented Aug 14, 2023

Using the example pep in the dnameth pipeline, I see:

looper check
No project config defined (peppy), using: {'config_file': 'test_config.yaml', 'output_dir': '.', 'sample_pipeline_interfaces': None, 'project_pipeline_interfaces': None}. Read from dotfile (/home/nsheff/code/dnameth_pipelines/examples/.looper.yaml).
Config file does not have version key. Defaulting to 2.1.0
Looper version: 1.5.2-dev
Command: check
Config file does not have version key. Defaulting to 2.1.0
Not all environment variables were populated in derived attribute source: $CODE/microtest/data/{filename}
Not all environment variables were populated in derived attribute source: $CODE/microtest/data/{filename}
Not all environment variables were populated in derived attribute source: $CODE/microtest/data/{filename}
Not all environment variables were populated in derived attribute source: $CODE/microtest/data/{filename}
Traceback (most recent call last):
  File "/home/nsheff/.local/bin/looper", line 8, in <module>
    sys.exit(main())
  File "/home/nsheff/.local/lib/python3.8/site-packages/looper/looper.py", line 1125, in main
    p = Project(
  File "/home/nsheff/.local/lib/python3.8/site-packages/looper/project.py", line 118, in __init__
    setattr(self[EXTRA_KEY], attr_name, kwargs[attr_name])
  File "/home/nsheff/.local/lib/python3.8/site-packages/peppy/project.py", line 1365, in __getitem__
    return self._project_data[item]
KeyError: '_cli_extra'

Why does it say: Config file does not have version key. Defaulting to 2.1.0 two times?

is looper loading the PEP twice?

@nsheff
Copy link
Contributor Author

nsheff commented Aug 14, 2023

Ok, I don't think it's loading twice, I just think there are two error message for some reason -- also, one is not running through logmuse.

looper --verbosity 5 check
No project config defined (peppy), using: {'config_file': 'test_config.yaml', 'output_dir': '.', 'sample_pipeline_interfaces': None, 'project_pipeline_interfaces': None}. Read from dotfile (/home/nsheff/code/dnameth_pipelines/examples/.looper.yaml).
Config file does not have version key. Defaulting to 2.1.0
DEBU 11:41:39 | root:est:310 > Configured logger 'root' using logmuse v0.2.7 
INFO 11:41:39 | root:looper:1092 > Looper version: 1.5.2-dev
Command: check 
DEBU 11:41:39 | peppy:project:110 > Creating Project from file test_config.yaml 
DEBU 11:41:39 | peppy.utils:utils:148 > Creating a Project from a YAML file: test_config.yaml 
DEBU 11:41:39 | peppy:project:335 > Raw (test_config.yaml) config data: {'sample_table': 'microtest_annotation.csv', 'looper': {'output_dir': '$HOME/dnameth'}, 'sample_modifiers': {'append': {'pipeline_interfaces': '../piface_rrbs.yaml'}, 'imply': [{'if': {'organism': 'human'}, 'then': {'genome': 'hg38'}}, {'if': {'organism': 'mouse'}, 'then': {'genome': 'mm10'}}], 'derive': {'attributes': ['read1', 'read2'], 'sources': {'test_data_R1': 'examples/test_data/{sample_name}_R1.fastq.gz', 'test_data_R2': 'examples/test_data/{sample_name}_R2.fastq.gz', 'microtest': '$CODE/microtest/data/{filename}'}}}} 
DEBU 11:41:39 | peppy:project:368 > Adding attributes: sample_table, looper, sample_modifiers 
WARN 11:41:39 | peppy:project:1281 > Config file does not have version key. Defaulting to 2.1.0 
...

see how the first of the message lacks any logmuse styling?

@nsheff
Copy link
Contributor Author

nsheff commented Aug 14, 2023

Also, it should specify which config (that's a peppy thing)

@donaldcampbelljr
Copy link
Contributor

donaldcampbelljr commented Jan 17, 2024

Could you clarify the exact issue? It appears that the original title is not the actual issue.

Is it ensuring all information is displayed in the terminal via logmuse?

Running with newest version:

(venv) drc@databio:~/GITHUB/hello_looper/hello_looper$ looper --verbosity 5 check --looper-config .looper_pipestat.yaml
DEBU 14:10:08 | root:est:310 > Configured logger 'root' using logmuse v0.2.7 
INFO 14:10:08 | root:cli_looper:614 > Looper version: 1.6.0
Command: check 
DEBU 14:10:08 | peppy:project:113 > Creating Project from file /home/drc/GITHUB/hello_looper/hello_looper/./project/project_config.yaml 
DEBU 14:10:08 | peppy.utils:utils:172 > Creating a Project from a YAML file: /home/drc/GITHUB/hello_looper/hello_looper/./project/project_config.yaml 

Etc.

@nsheff nsheff changed the title Looper appears to be loading the PEP twice Duplicated error message upon project load Feb 16, 2024
@saanikat saanikat transferred this issue from pepkit/looper Apr 9, 2024
@saanikat
Copy link

saanikat commented Apr 9, 2024

After discussion, it was discovered that this issue lies in peppy.

@nsheff nsheff added this to the v0.41.0 milestone Jun 25, 2024
@khoroshevskyi
Copy link
Member

This issue should be solved together with #465

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

No branches or pull requests

4 participants