pepkit / peppy

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

Project comparison is incorrect #285

Closed stolarczyk closed 5 years ago

stolarczyk commented 5 years ago

comparing two "identical" Projects produces misleading results:

In [6]: cfg="/home/mjs5kd/code/example_peps/example_subprojects2/project_confi
   ...: g.yaml"

In [8]: p1=peppy.Project(cfg)
Loading divvy config file: /home/mjs5kd/code/pepenv/uva_rivanna.yaml
In your divvy config file, please use 'compute_packages' instead of 'compute'
Available packages: singularity_local, default, largemem, singularity_slurm, sigterm, local, parallel
Activating compute package 'default'

In [9]: p2=peppy.Project(cfg)
Loading divvy config file: /home/mjs5kd/code/pepenv/uva_rivanna.yaml
In your divvy config file, please use 'compute_packages' instead of 'compute'
Available packages: singularity_local, default, largemem, singularity_slurm, sigterm, local, parallel
Activating compute package 'default'

In [10]: p1==p2
Out[10]: False

I would make use of __eq__ method in caravel.

Or if we don't want user to compare these, at least a NotImplemented exception of some sort should be raised. What do you think?

Also, I think it was brought up at some point, but couldn't find the issue.

vreuter commented 5 years ago

Yeah that's weird it's probably an atypical thing for a user to do but this should be solved upstream in peppy ideally; thanks for pointing it out.

vreuter commented 5 years ago

OK locally for me the use case here now behaves as expected. @michalstolarczyk if you want to test again, can you pull peppy dev and reinstall locally? That should bring in the necessary attmap update the accompanies the peppy change.

stolarczyk commented 5 years ago

works now 🥇

thanks