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

indexd.py should coerce types where possible #524

Open
znatty22 opened this issue Jun 20, 2019 · 0 comments
Open

indexd.py should coerce types where possible #524

znatty22 opened this issue Jun 20, 2019 · 0 comments
Labels
refactor Something needs to be done better

Comments

@znatty22
Copy link
Member

Right now if try to submit:

{
  'availability': 'Immediate Download',
 'data_type': 'Aligned Reads',
 'external_id': 's3://kf-seq-data-bcm/chung/HKT73CCXX-5.hgv.bam',
 'file_format': 'bam',
 'file_name': 'HKT73CCXX-5.hgv.bam',
 'hashes': {'etag': '98ebe560095b231a3050812cc58a8b84-8100'},
 'is_harmonized': 'False',
 'reference_genome': 'hs37d5',
 'size': '67939600949',
 'urls': ['s3://kf-seq-data-bcm/chung/HKT73CCXX-5.hgv.bam']
}

Indexd errors because it says size must be an int. I think indexd.py should coerce types where possible (maybe only size?). Dataservice does this for other fields (prob either via sqlalchemy or marshmallow), so the same behavior should be implemented for indexd fields too.

@znatty22 znatty22 added the refactor Something needs to be done better label Jun 20, 2019
@dankolbman dankolbman removed their assignment Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Something needs to be done better
Projects
None yet
Development

No branches or pull requests

2 participants