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

Attempt to define the VarInfo interface #36

Merged
merged 5 commits into from Oct 21, 2021
Merged

Conversation

phipsgabler
Copy link
Member

Mostly the dictionary part of it. I am strongly leaning to adopting the Dictionaries.jl way.

@codecov
Copy link

codecov bot commented Sep 20, 2021

Codecov Report

Merging #36 (6ad74af) into main (f9fa387) will decrease coverage by 5.27%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
- Coverage   83.05%   77.77%   -5.28%     
==========================================
  Files           1        1              
  Lines          59      108      +49     
==========================================
+ Hits           49       84      +35     
- Misses         10       24      +14     
Impacted Files Coverage Δ
src/varname.jl 77.77% <0.00%> (-5.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9fa387...6ad74af. Read the comment docs.

varinfo-interface.md Outdated Show resolved Hide resolved

```julia
vi[@varname(x[1])] == 1
vi[@varname(x[1])].meta["bla"] == false
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe do this by more lenses?

vi[meta(@varname(x[1]), "bla")] == false

where meta(...) constructs a lens specially made for metadata.

Copy link
Member Author

Choose a reason for hiding this comment

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

OTOH, @yebai, this (or rather, the "defaulting" behaviour of the original varname) would violate a lens invariant we'd like to have:

vi[vn  meta(:bla)] != get(vi[vn], meta(:bla))

Co-authored-by: Hong Ge <hg344@cam.ac.uk>
@coveralls
Copy link

coveralls commented Oct 18, 2021

Pull Request Test Coverage Report for Build 1353658861

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.778%

Totals Coverage Status
Change from base Build 1217811956: 0.0%
Covered Lines: 84
Relevant Lines: 108

💛 - Coveralls

@yebai yebai marked this pull request as ready for review October 21, 2021 15:13
@yebai yebai merged commit 64d2c22 into main Oct 21, 2021
@yebai yebai deleted the phg/varinfo-interface branch October 21, 2021 15:13
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.

None yet

3 participants