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

Graphs inconsistent w/the specification are accepted #576

Open
molpopgen opened this issue Nov 15, 2024 · 0 comments
Open

Graphs inconsistent w/the specification are accepted #576

molpopgen opened this issue Nov 15, 2024 · 0 comments

Comments

@molpopgen
Copy link
Collaborator

The Python API will accept this graph:

import demes

yaml = """
time_units: generations
demes:
 - name: A
   epochs:
    - start_size: 1000
 - name: B
   epochs:
    - start_size: 1000
 - name: C
   epochs:
    - start_size: 1000
pulses:
- sources: [A]
  dest: C
  proportions: [0.]
  time: 10
"""

g = demes.loads(yaml)

The JSON schema of the specification excludes 0 as a valid value for a proportion:

  proportion:
    type: number
    exclusiveMinimum: 0
    maximum: 1

Some casually grepping of the test cases in the demes-spec repo indicated that 0.0 doesn't appear anywhere over there. I could have missed it, though.

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

No branches or pull requests

1 participant