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

Graph._demes_map attr.ib should use repr=False. #291

Closed
grahamgower opened this issue May 5, 2021 · 0 comments · Fixed by #293
Closed

Graph._demes_map attr.ib should use repr=False. #291

grahamgower opened this issue May 5, 2021 · 0 comments · Fixed by #293

Comments

@grahamgower
Copy link
Member

grahamgower commented May 5, 2021

We don't want to see the _demes_map dict in the __repr__ string.

>>> import demes
>>> g=demes.load("examples/two_epoch.yml")
>>> from pprint import pprint
>>> pprint(repr(g))
("Graph(description='Single-population two-epoch demography.', "
 "time_units='generations', generation_time=None, doi=[], "
 "demes=[Deme(name='deme0', description='A deme that doubles in size 100 "
 "generations ago.', start_time=inf, ancestors=[], proportions=[], "
 'epochs=[Epoch(start_time=inf, end_time=100, start_size=1000, end_size=1000, '
 "size_function='constant', selfing_rate=0, cloning_rate=0), "
 'Epoch(start_time=100, end_time=0, start_size=2000, end_size=2000, '
 "size_function='constant', selfing_rate=0, cloning_rate=0)])], migrations=[], "
 "pulses=[], _deme_map={'deme0': Deme(name='deme0', description='A deme that "
 "doubles in size 100 generations ago.', start_time=inf, ancestors=[], "
 'proportions=[], epochs=[Epoch(start_time=inf, end_time=100, start_size=1000, '
 "end_size=1000, size_function='constant', selfing_rate=0, cloning_rate=0), "
 'Epoch(start_time=100, end_time=0, start_size=2000, end_size=2000, '
 "size_function='constant', selfing_rate=0, cloning_rate=0)])})")
grahamgower added a commit to grahamgower/demes-python that referenced this issue May 10, 2021
grahamgower added a commit to grahamgower/demes-python that referenced this issue May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant