From fe8ecd4b6b953d019484f56ce7e88e967dca6111 Mon Sep 17 00:00:00 2001 From: bosonbaas Date: Mon, 22 Feb 2021 19:20:05 -0500 Subject: [PATCH] Removing support for Catlab before breaking change --- Project.toml | 4 ++-- src/functor.jl | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 10daeb9..900187c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "AlgebraicRelations" uuid = "1c3ea84b-a956-4dfe-a2f4-485757f48f1d" authors = ["bosonbaas "] -version = "0.2.2" +version = "0.2.3" [deps] AlgebraicPetri = "4f99eebe-17bf-4e98-b6a1-2c4f205a959b" @@ -13,7 +13,7 @@ LibPQ = "194296ae-ab2e-5f79-8cd4-7183a0a5a0d1" [compat] AlgebraicPetri = "0.6" AutoHashEquals = "0.2.0" -Catlab = "0.9, 0.10" +Catlab = "0.11" DataFrames = "0.21, 0.22" LibPQ = "1.4.0" julia = "1.0" diff --git a/src/functor.jl b/src/functor.jl index 3dc9f75..8295bf2 100644 --- a/src/functor.jl +++ b/src/functor.jl @@ -2,6 +2,7 @@ module Functors using Catlab using Catlab.Theories +using Catlab.Theories: attr using Catlab.Programs.RelationalPrograms using Catlab.CategoricalAlgebra using Catlab.CategoricalAlgebra.FinSets @@ -157,9 +158,9 @@ reorder_part!(acs::ACSet, type::Symbol, order::Array{Int, 1}) = function _reorder_part!(acs::ACSet{CD,AD,Ts,Idxed}, ::Val{ob}, order::Array{Int, 1}) where {CD,AD,Ts,Idxed,ob} - in_homs = filter(hom -> codom(CD, hom) == ob, CD.hom) - indexed_out_homs = filter(hom -> dom(CD, hom) == ob && hom ∈ Idxed, CD.hom) - indexed_attrs = filter(attr -> dom(AD, attr) == ob && attr ∈ Idxed, AD.attr) + in_homs = filter(c_hom -> codom(CD, c_hom) == ob, hom(CD)) + indexed_out_homs = filter(c_hom -> dom(CD, c_hom) == ob && c_hom ∈ Idxed, hom(CD)) + indexed_attrs = filter(c_attr -> dom(AD, c_attr) == ob && c_attr ∈ Idxed, attr(AD)) last_part = length(acs.tables[ob])