pepkit / peppy

Project metadata manager for PEPs in Python
https://pep.databio.org/peppy
BSD 2-Clause "Simplified" License
37 stars 12 forks source link

Cannot access pep.config.output_dir, must use pep.config["output_dir"] #463

Closed donaldcampbelljr closed 7 months ago

donaldcampbelljr commented 7 months ago

I'm currently updating pep-pipelines for snakemake integration: https://github.com/pepkit/pep-pipelines/blob/805cbc75ca2dfdf57bfee412987816e5f7c52d0a/pipelines/pep-snakemake/simple/pipelines/Snakefile#L6-L9

I noticed that the Snakefile calls pep.config.output_dir but this not work. Instead, I must change it to pep.config["output_dir"].

Is this intended behavior?

Using peppy v0.40.0a5

nsheff commented 7 months ago

probably. config used to be an attmap and no longer is.

I thought we had addressed this, but either way, I think we should change to using item access with brackets

khoroshevskyi commented 7 months ago

Unfortunately, this case is not back-compatible, all samples support attribute accession, but not config file items. config attribute is dict object so, all the items should be accessed using dict-like way

nsheff commented 7 months ago

that makes sense, so this will need to be updated.

donaldcampbelljr commented 7 months ago

Going forward using: pep.config["output_dir"]