Skip to content

Commit 6b26d8d

Browse files
Migration to Tractables (#138)
* update project toml for julia 1.10 * migration to tractables * compat helper * tagbot * ci update * fix compat * update toml * ChowLiuTrees = "0.2" * bump version
1 parent 388be0e commit 6b26d8d

File tree

11 files changed

+78
-48
lines changed

11 files changed

+78
-48
lines changed

.github/workflows/ci.yml

+48-26
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,56 @@
1-
name: Unit Tests
2-
3-
# Controls when the action will run. Triggers the workflow on push or pull request
4-
# events but only for the master branch
5-
on:
6-
pull_request:
1+
name: Unit Tests
2+
on:
73
push:
4+
branches: [master]
5+
tags: ["*"]
6+
pull_request:
87
workflow_dispatch:
9-
10-
8+
permissions:
9+
actions: write
10+
contents: read
1111
env:
1212
DATADEPS_ALWAYS_ACCEPT: 1
1313
JIVE_PROCS: 1
14-
1514
jobs:
16-
build:
17-
runs-on: ubuntu-20.04
18-
15+
test:
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
version:
22+
- '1.6'
23+
- '1'
24+
- 'nightly'
25+
os:
26+
- ubuntu-latest
27+
arch:
28+
- x64
1929
steps:
20-
21-
- uses: actions/checkout@v2
22-
- uses: julia-actions/setup-julia@latest
30+
- uses: actions/checkout@v4
31+
- uses: julia-actions/setup-julia@v2
2332
with:
24-
version: 1.7
25-
26-
# Runs a single command using the runners shell
27-
- name: Unit Tests
28-
run: |
29-
julia --project --check-bounds=yes --depwarn=yes -e 'import Pkg; Pkg.test(; coverage=true)'
30-
31-
- name: Codecov Upload
32-
run: |
33-
julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder());'
34-
33+
version: ${{ matrix.version }}
34+
arch: ${{ matrix.arch }}
35+
- uses: julia-actions/cache@v1
36+
- uses: julia-actions/julia-buildpkg@v1
37+
- uses: julia-actions/julia-runtest@v1
38+
- uses: julia-actions/julia-processcoverage@v1
39+
- uses: codecov/codecov-action@v2
40+
with:
41+
file: lcov.info
42+
docs:
43+
name: Documentation
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: julia-actions/julia-buildpkg@latest
48+
- run: |
49+
sudo apt-get -qq update
50+
sudo apt install -y pdf2svg texlive-latex-base texlive-binaries texlive-pictures texlive-latex-extra texlive-luatex
51+
luatex -v
52+
pdflatex -v
53+
- uses: julia-actions/julia-docdeploy@latest
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/compathelper.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@ name: CompatHelper
22
on:
33
schedule:
44
- cron: '0 0 */7 * *'
5-
65
workflow_dispatch:
7-
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
811
jobs:
912
CompatHelper:
1013
runs-on: ubuntu-latest
11-
14+
1215
steps:
1316
- name: Pkg.add("CompatHelper")
1417
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
15-
18+
1619
- name: CompatHelper.main()
1720
env:
1821
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1922
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
20-
23+
2124
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/tagbot.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: TagBot
22
on:
3-
issue_comment: # THIS BIT IS NEW
3+
issue_comment:
44
types:
55
- created
66
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: 3
710
permissions:
811
actions: read
912
checks: read

Project.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ProbabilisticCircuits"
22
uuid = "2396afbe-23d7-11ea-1e05-f1aa98e17a44"
33
authors = ["Guy Van den Broeck <[email protected]>"]
4-
version = "0.4.1"
4+
version = "0.5.0"
55

66
[deps]
77
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
@@ -16,8 +16,8 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1616
TikzGraphs = "b4f28e30-c73f-5eaf-a395-8a9db949a742"
1717

1818
[compat]
19-
CUDA = "3.8.1, 4"
20-
ChowLiuTrees = "0.1.1"
19+
CUDA = "3.8.1, 4, 5"
20+
ChowLiuTrees = "0.2"
2121
CodecZlib = "0.7"
2222
DirectedAcyclicGraphs = "0.1.3, 0.2"
2323
Graphs = "1"
@@ -26,3 +26,5 @@ MetaGraphs = "0.7"
2626
SpecialFunctions = "2.1"
2727
TikzGraphs = "1.3"
2828
julia = "1.6"
29+
Random = "1"
30+

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
# Probabilistic<wbr>Circuits<wbr>.jl
66

7-
[![Unit Tests](https://github.com/Juice-jl/ProbabilisticCircuits.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Juice-jl/ProbabilisticCircuits.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster) [![codecov](https://codecov.io/gh/Juice-jl/ProbabilisticCircuits.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/Juice-jl/ProbabilisticCircuits.jl) [![](https://img.shields.io/badge/docs-stable-green.svg)](https://juice-jl.github.io/ProbabilisticCircuits.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://juice-jl.github.io/ProbabilisticCircuits.jl/dev)
7+
[![Unit Tests](https://github.com/Tractables/ProbabilisticCircuits.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Tractables/ProbabilisticCircuits.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster) [![codecov](https://codecov.io/gh/Tractables/ProbabilisticCircuits.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/Tractables/ProbabilisticCircuits.jl) [![](https://img.shields.io/badge/docs-stable-green.svg)](https://Tractables.github.io/ProbabilisticCircuits.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://Tractables.github.io/ProbabilisticCircuits.jl/dev)
88

9-
This package provides functionalities for learning/constructing probabilistic circuits and using them to compute various probabilistic queries. It is part of the [Juice package](https://github.com/Juice-jl) (Julia Circuit Empanada).
9+
This package provides functionalities for learning/constructing probabilistic circuits and using them to compute various probabilistic queries. It is part of the [Juice package](https://github.com/Tractables) (Julia Circuit Empanada).
1010

1111
## Testing
1212

README_DEV.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Follow these instructions to install and use ProbabilisticCircuits.jl as a devel
66

77
Install the Julia package in development mode by running
88

9-
julia -e 'using Pkg; Pkg.develop(PackageSpec(url="https://github.com/Juice-jl/ProbabilisticCircuits.jl.git"))'
9+
julia -e 'using Pkg; Pkg.develop(PackageSpec(url="https://github.com/Tractables/ProbabilisticCircuits.jl.git"))'
1010

1111
By default this will install the package at `~/.julia/dev` and allow you to change the code there. See the [Pkg manual](https://julialang.github.io/Pkg.jl/v1/managing-packages/#Developing-packages-1) for more details. One can adjust the development directory using environment variables or simply create a symbolic link to/from your favorite development directory.
1212

1313

1414
Depending on your usecase you might also want to have `LogicCircuits.jl` in develop mode, in that case run the following to do both:
1515

16-
julia -e 'using Pkg; Pkg.develop([PackageSpec(url="https://github.com/Juice-jl/LogicCircuits.jl.git"),PackageSpec(url="https://github.com/Juice-jl/ProbabilisticCircuits.jl.git")])'
16+
julia -e 'using Pkg; Pkg.develop([PackageSpec(url="https://github.com/Tractables/LogicCircuits.jl.git"),PackageSpec(url="https://github.com/Tractables/ProbabilisticCircuits.jl.git")])'
1717

1818

1919
## Testing
@@ -57,8 +57,8 @@ The example is for Circuit Model Zoo, but should work for others:
5757

5858
1. Push new updates to [UCLA-StarAI/Circuit-Model-Zoo](https://github.com/UCLA-StarAI/Circuit-Model-Zoo)
5959
2. Do a [new zoo release](https://github.com/UCLA-StarAI/Circuit-Model-Zoo/releases).
60-
3. Update the `LogicCircuits.jl`'s `Artifact.toml` file with new git tag and hash. Example commit can be found [here](https://github.com/Juice-jl/LogicCircuits.jl/commit/1cd3fda02fa7bd82d1fa02898ee404edce0d7b14).
61-
4. Do the same for `ProbabilisticCircuits.jl`'s `Artifact.toml` file. Example commit [here](https://github.com/Juice-jl/ProbabilisticCircuits.jl/commit/da7d3678b5f2254e60229632f74cc619505e2b2d).
60+
3. Update the `LogicCircuits.jl`'s `Artifact.toml` file with new git tag and hash. Example commit can be found [here](https://github.com/Tractables/LogicCircuits.jl/commit/1cd3fda02fa7bd82d1fa02898ee404edce0d7b14).
61+
4. Do the same for `ProbabilisticCircuits.jl`'s `Artifact.toml` file. Example commit [here](https://github.com/Tractables/ProbabilisticCircuits.jl/commit/da7d3678b5f2254e60229632f74cc619505e2b2d).
6262
5. Note that for each Artifact.toml, 2 things need to change: `git-tree-sha1` and `sha256`.
6363
6. Update the `const zoo_version = "/Circuit-Model-Zoo-0.1.4"` inside LogicCircuits.jl to the new zoo version. No changes needed in ProbabilisticCircuits since it uses the same constant.
6464

docs/Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ For more information about pretty URLs, check out [the documentation](https://j
2929

3030
## Setting Up LaTeX
3131

32-
Some of plotting tools we use need LaTeX to be installed. Follow the instructions from [TikzPictures.jl](https://github.com/JuliaTeX/TikzPictures.jl) to see what packages are needed. Or you can check the [ci.yml](https://github.com/Juice-jl/ProbabilisticCircuits.jl/blob/master/.github/workflows/ci.yml) which builds our documentation on github actions. If you ran into any issues might be due to old version of TexLive.
32+
Some of plotting tools we use need LaTeX to be installed. Follow the instructions from [TikzPictures.jl](https://github.com/JuliaTeX/TikzPictures.jl) to see what packages are needed. Or you can check the [ci.yml](https://github.com/Tractables/ProbabilisticCircuits.jl/blob/master/.github/workflows/ci.yml) which builds our documentation on github actions. If you ran into any issues might be due to old version of TexLive.

docs/make.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ else
6868
Documenter.HTML(
6969
# Use clean URLs, unless built as a "local" build
7070
prettyurls = !("local" in ARGS),
71-
canonical = "https://juice-jl.github.io/ProbabilisticCircuits.jl/stable/",
71+
canonical = "https://Tractables.github.io/ProbabilisticCircuits.jl/stable/",
7272
assets = ["assets/favicon.ico"],
7373
analytics = "UA-136089579-2",
7474
highlights = ["yaml"],
@@ -94,7 +94,7 @@ makedocs(
9494
# for more information.
9595
deploydocs(
9696
target = "build",
97-
repo = "github.com/Juice-jl/ProbabilisticCircuits.jl.git",
97+
repo = "github.com/Tractables/ProbabilisticCircuits.jl.git",
9898
branch = "gh-pages",
9999
devbranch = "master",
100100
devurl = "dev",

docs/src/README.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
# # Probabilistic<wbr>Circuits<wbr>.jl
88

9-
# [![Unit Tests](https://github.com/Juice-jl/ProbabilisticCircuits.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Juice-jl/ProbabilisticCircuits.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster) [![codecov](https://codecov.io/gh/Juice-jl/ProbabilisticCircuits.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/Juice-jl/ProbabilisticCircuits.jl) [![](https://img.shields.io/badge/docs-stable-green.svg)](https://juice-jl.github.io/ProbabilisticCircuits.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://juice-jl.github.io/ProbabilisticCircuits.jl/dev)
9+
# [![Unit Tests](https://github.com/Tractables/ProbabilisticCircuits.jl/workflows/Unit%20Tests/badge.svg)](https://github.com/Tractables/ProbabilisticCircuits.jl/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster) [![codecov](https://codecov.io/gh/Tractables/ProbabilisticCircuits.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/Tractables/ProbabilisticCircuits.jl) [![](https://img.shields.io/badge/docs-stable-green.svg)](https://Tractables.github.io/ProbabilisticCircuits.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://Tractables.github.io/ProbabilisticCircuits.jl/dev)
1010

11-
# This package provides functionalities for learning/constructing probabilistic circuits and using them to compute various probabilistic queries. It is part of the [Juice package](https://github.com/Juice-jl) (Julia Circuit Empanada).
11+
# This package provides functionalities for learning/constructing probabilistic circuits and using them to compute various probabilistic queries. It is part of the [Juice package](https://github.com/Tractables) (Julia Circuit Empanada).
1212

1313
# ## Testing
1414

docs/src/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ julia -e 'using Pkg; Pkg.add("ProbabilisticCircuits")'
2121
You can also install the package with the latest commits on master branch.
2222

2323
```bash
24-
julia -e 'using Pkg; Pkg.add([PackageSpec(url="https://github.com/Juice-jl/ProbabilisticCircuits.jl.git")])'
24+
julia -e 'using Pkg; Pkg.add([PackageSpec(url="https://github.com/Tractables/ProbabilisticCircuits.jl.git")])'
2525
```
2626
#### From Package mode
2727
!!! note

docs/src/usage.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ exp(circuit(true, true, true) - circuit(missing, true, true)) # Pr(rain=1|rainbo
3333
assignments, log_prob = MAP(circuit, [missing, missing, missing]; batch_size=1)
3434
print("The MAP assignment of the circuit is (rain=$(assignments[1]), rainbow=$(assignments[2]), wet=$(assignments[3])), with probability $(exp(log_prob)).")
3535

36-
# Besides the above examples, ProbabilisticCircuits.jl provides functionalities for a wide variety of queries, which are detailed in [this manual](https://juice-jl.github.io/ProbabilisticCircuits.jl/stable/manual/queries/).
36+
# Besides the above examples, ProbabilisticCircuits.jl provides functionalities for a wide variety of queries, which are detailed in [this manual](https://Tractables.github.io/ProbabilisticCircuits.jl/stable/manual/queries/).
3737

3838
# ### Building complex circuit structures
3939

0 commit comments

Comments
 (0)