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

@acset silently ignores nonexistent names #55

Closed
filonik-cmu opened this issue Sep 14, 2023 · 4 comments
Closed

@acset silently ignores nonexistent names #55

filonik-cmu opened this issue Sep 14, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@filonik-cmu
Copy link

filonik-cmu commented Sep 14, 2023

MWE

@acset Graph begin V = 2; E = 3; src = [1,1,1]; target = [2,2,2] end
@epatters epatters changed the title @acset silently ignores nonexistent names @acset silently ignores nonexistent names Sep 14, 2023
@epatters epatters transferred this issue from AlgebraicJulia/Catlab.jl Sep 14, 2023
@epatters epatters added the bug Something isn't working label Sep 14, 2023
@filonik-cmu
Copy link
Author

filonik-cmu commented Sep 14, 2023

Also, @acset silently ignores missing attributes (perhaps intentional), but subsequent migrations fail.

MWE

g₁ = @acset WeightedGraph{Float64} begin V = 2; E = 3; src = [1,1,1]; tgt = [2,2,2] end
g₂ = @migrate WeightedGraph{Float64} g₁ begin
  V => V
  E => E
  src => src
  tgt => tgt
  Weight => Weight
  weight => weight
end

@jpfairbanks
Copy link
Member

Ohh, it took me a while to understand the problem because I was reading target as tgt. Yeah we should check that all the names exist in the initializer. How urgently do we want to work on this?

@filonik-cmu
Copy link
Author

filonik-cmu commented Nov 9, 2023

For me personally it is not as urgent as some of the other issues, but if they don't introduce any unforeseen consequences, I think these kinds of checks would be good for robustness/guarding against user errors.

@slwu89
Copy link
Member

slwu89 commented Feb 15, 2024

Closed with #110

@slwu89 slwu89 closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants