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

feat!: indexing rework #12

Merged
merged 35 commits into from
Dec 11, 2023
Merged

feat!: indexing rework #12

merged 35 commits into from
Dec 11, 2023

Conversation

AayushSabharwal
Copy link
Member

Completely rework the indexing API, with tests

docs/src/api.md Outdated
isindependent_variable
isobserved
observed
istimedependent

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the naming/underscore placement here seems slightly inconsistent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isindependentvariable feels unreadable to me. Maybe isindepvar?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9bea164

@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Attention: 93 lines in your changes are missing coverage. Please review.

Comparison is base (cf0cfca) 0.00% compared to head (7a5c62f) 1.06%.

Files Patch % Lines
src/parameter_indexing.jl 0.00% 38 Missing ⚠️
src/symbol_cache.jl 0.00% 35 Missing ⚠️
src/interface.jl 0.00% 15 Missing ⚠️
src/trait.jl 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master     #12      +/-   ##
=========================================
+ Coverage    0.00%   1.06%   +1.06%     
=========================================
  Files           2       5       +3     
  Lines          33      94      +61     
=========================================
+ Hits            0       1       +1     
- Misses         33      93      +60     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

"""
issymbolic(x) = issymbolic(typeof(x))
issymbolic(::Type) = NotSymbolic()
issymbolic(::Type{Symbol}) = Symbolic()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there more possibilities than true/false from issymbolic?

Copy link
Member Author

@AayushSabharwal AayushSabharwal Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was considering adding a SymbolicArray trait variant, for SymArr and AbstractArray{<:something that implements Symbolic} but it's just as easy to check all(isequal(Symbolic()), issymbolic.(collect(sym))). Apart from that I think it's just true/false

@ChrisRackauckas ChrisRackauckas merged commit af679a3 into master Dec 11, 2023
11 checks passed
@ChrisRackauckas ChrisRackauckas deleted the as/indexing-rework branch December 11, 2023 12:52
@ChrisRackauckas
Copy link
Member

🎉

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 this pull request may close these issues.

4 participants