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

Relax type signature to AbstractString for term_id? #7

Open
harryscholes opened this issue Aug 16, 2019 · 1 comment
Open

Relax type signature to AbstractString for term_id? #7

harryscholes opened this issue Aug 16, 2019 · 1 comment

Comments

@harryscholes
Copy link

Base.getindex(ontology::Ontology, term_id::TermId) = ontology.terms[term_id]
Base.getindex(ontology::Ontology, term_ids::Set{TermId}) =
[ontology[t_id] for t_id in term_ids]

At the moment this doesn't work for e.g. term_id::SubString{String}

@alyst
Copy link
Collaborator

alyst commented Aug 19, 2019

@harryscholes Relaxing to term_id::AbstractString and term_ids::Set{<:AbstractString} seems reasonable for me. Would you like to submit a PR? We also would need to add tests to ensure the relaxed indexing actually works.

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

2 participants