From dcc3e3c704b52a3ea805318427cdf964b7c19452 Mon Sep 17 00:00:00 2001 From: Matt Cuffaro Date: Fri, 13 Dec 2024 22:31:58 -0500 Subject: [PATCH 1/4] autodocs, new buildkite pipeline --- .buildkite/pipeline.yml | 23 +++------------- docs/literate/migrations_intro.jl | 4 ++- docs/src/api.md | 9 +++++++ src/DataMigrations.jl | 2 ++ src/Migrations.jl | 45 +++++++++++++++---------------- 5 files changed, 39 insertions(+), 44 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index e16b015..5eca904 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,24 +1,7 @@ -env: - JULIA_VERSION: "1.10.2" - GATAS_HOME: "~/.gatas/buildkite/agents/$BUILDKITE_AGENT_NAME" - steps: - - label: ":hammer: Build Project" - env: - JULIA_DEPOT_PATH: "$GATAS_HOME" - commands: - - "module load julia" - - "julia --project=docs --color=yes -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.precompile()'" - - - wait - - - label: ":scroll: Build docs and run tests" - env: - JULIA_DEPOT_PATH: "$GATAS_HOME" - JULIA_PROJECT: "docs/" - command: - - "srun --cpus-per-task=16 --mem=64G --time=1:00:00 --output=.buildkite/build_%j.log --unbuffered .buildkite/jobscript.sh" + - label: ":arrow_down: Load AlgebraicJulia pipeline" + command: | + curl -s https://raw.githubusercontent.com/AlgebraicJulia/.github/main/buildkite/pipeline.yml | buildkite-agent pipeline upload - wait - diff --git a/docs/literate/migrations_intro.jl b/docs/literate/migrations_intro.jl index 21dda54..38e9299 100644 --- a/docs/literate/migrations_intro.jl +++ b/docs/literate/migrations_intro.jl @@ -1,4 +1,6 @@ -# DataMigrations.jl includes facilities for categorical data migrations. +# # Introduction to Data Migrations + +# DataMigrations.jl includes facilities for categorical data migrations. # We'll start by example, working with some graph schemas from Catlab. using Catlab, DataMigrations diff --git a/docs/src/api.md b/docs/src/api.md index 774cc05..a8206d0 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -3,3 +3,12 @@ ```@autodocs Modules = [DataMigrations] ``` + +```@autodocs +Modules = [DataMigrations.Migrations] +``` + +```@autodocs +Modules = [DataMigrations.DiagrammaticPrograms] +Private = false +``` diff --git a/src/DataMigrations.jl b/src/DataMigrations.jl index 99cf373..ee601bf 100644 --- a/src/DataMigrations.jl +++ b/src/DataMigrations.jl @@ -13,9 +13,11 @@ module DataMigrations using Reexport export func + include("Migrations.jl") include("DiagrammaticPrograms.jl") @reexport using .Migrations @reexport using .DiagrammaticPrograms + end diff --git a/src/Migrations.jl b/src/Migrations.jl index ca30792..9df8c5f 100644 --- a/src/Migrations.jl +++ b/src/Migrations.jl @@ -94,7 +94,7 @@ consisting of `shape_map`, `diagram_map`, and `precomposed_diagram` is whiskered with `X` (except where it's undefined), and then the functions in `params` are used to fill in the gaps. -See also [`QueryDiagram`](@ref), [`param_compose`](@ref) +See also [`QueryDiagram`](@ref) """ struct QueryDiagramHom{T,C<:Cat,F<:FinFunctor,Φ<:FinTransformation,D<:Functor{<:FinCat,C},Params<:AbstractDict}<:DiagramHom{T,C} shape_map::F @@ -143,28 +143,6 @@ DiagramHom{T}(f::QueryDiagramHom) where T = QueryDiagramHom{T}(f.shape_map, f.diagram_map, f.precomposed_diagram,get_params(f)) -#Note there's currently no composition of QueryDiagramHoms. - -#This and some others can probably be dispatched to just querydiagramhoms? -""" - compose(f::DiagramHom,F::Functor,params[;kw...]) - -Whisker a partially-defined `DiagramHom` with a -`Functor`, using the dictionary `params` to fill in any gaps. - -While [`QueryDiagramHom`](@ref)s have internal `params` for a similar -purpose, it is sometimes necessary to borrow `params` from -a [`QueryDiagram`](@ref) or [`DataMigration`](@ref) containing `f`, which -is the functionality enabled here. - -See also: `param_compose` -""" -function compose(f::DiagramHom{T}, F::Functor, params;kw...) where T - whiskered = param_compose(diagram_map(f),F,params) - DiagramHom{T}(shape_map(f), whiskered, - compose(f.precomposed_diagram, F; kw...)) -end - """ param_compose(α,H,params) @@ -194,6 +172,27 @@ function param_compose(α::FinTransformation, H::Functor,params) FinTransformation(new_components,compose(F, H), compose(G, H)) end +#Note there's currently no composition of QueryDiagramHoms. + +#This and some others can probably be dispatched to just querydiagramhoms? +""" + compose(f::DiagramHom,F::Functor,params[;kw...]) + +Whisker a partially-defined `DiagramHom` with a +`Functor`, using the dictionary `params` to fill in any gaps. + +While [`QueryDiagramHom`](@ref)s have internal `params` for a similar +purpose, it is sometimes necessary to borrow `params` from +a [`QueryDiagram`](@ref) containing `f`, which +is the functionality enabled here. +""" +function compose(f::DiagramHom{T}, F::Functor, params;kw...) where T + whiskered = param_compose(diagram_map(f),F,params) + DiagramHom{T}(shape_map(f), whiskered, + compose(f.precomposed_diagram, F; kw...)) +end + + """ compose(d::QueryDiagram,F::Functor[;kw...]) From 3f6be8ff5787c0ab12cbc585966f4bc6b4f76b98 Mon Sep 17 00:00:00 2001 From: Matt Cuffaro Date: Fri, 13 Dec 2024 22:38:38 -0500 Subject: [PATCH 2/4] adding two files for buildkite --- .buildkite/build_docs.sh | 16 ++++++++++++++++ .buildkite/run_tests.sh | 15 +++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 .buildkite/build_docs.sh create mode 100755 .buildkite/run_tests.sh diff --git a/.buildkite/build_docs.sh b/.buildkite/build_docs.sh new file mode 100755 index 0000000..20646dd --- /dev/null +++ b/.buildkite/build_docs.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +pwd; hostname; date + +if [ $# -ne 1 ]; then + echo "Usage: $0 VERSION" + echo "Example: $0 1.10.0" + exit 1 +fi + +VERSION=$1 + +module load julia/$VERSION + +echo "Building documentation..." +julia --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.status(); Pkg.instantiate(); include("docs/make.jl")' diff --git a/.buildkite/run_tests.sh b/.buildkite/run_tests.sh new file mode 100755 index 0000000..ff1ee73 --- /dev/null +++ b/.buildkite/run_tests.sh @@ -0,0 +1,15 @@ +#!/bin/bash +pwd; hostname; date + +if [ $# -ne 1 ]; then + echo "Usage: $0 VERSION" + echo "Example: $0 1.10.0" + exit 1 +fi + +VERSION=$1 + +module load julia/$VERSION + +echo "Running tests..." +julia --project -e "using Pkg; Pkg.status(); Pkg.test()" From 128da0c8b4cf2c6a3b32eb7d073455a6f1dd7683 Mon Sep 17 00:00:00 2001 From: Matt Cuffaro Date: Fri, 13 Dec 2024 23:43:20 -0500 Subject: [PATCH 3/4] amending git workflow --- .github/workflows/julia_ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/julia_ci.yml b/.github/workflows/julia_ci.yml index 3c33ba8..9dabe35 100644 --- a/.github/workflows/julia_ci.yml +++ b/.github/workflows/julia_ci.yml @@ -40,8 +40,6 @@ jobs: if: github.event_name == 'pull_request' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.action == 'test') uses: AlgebraicJulia/.github/.github/workflows/julia_ci.yml@main secrets: inherit - with: - docs: false CompatHelper: if: github.event_name == 'schedule' uses: AlgebraicJulia/.github/.github/workflows/julia_compat.yml@main From a1f10df0a326c0b75ccd551566dcf071b51f6b01 Mon Sep 17 00:00:00 2001 From: Matt Cuffaro Date: Tue, 17 Dec 2024 20:51:08 -0500 Subject: [PATCH 4/4] Coauthored by: James P. Fairbanks fairbanksj@ufl.edu