Skip to content

Commit

Permalink
Merge pull request #5 from JuliaQUBO/px/launch
Browse files Browse the repository at this point in the history
Merge v0.1.0 to main
  • Loading branch information
pedromxavier authored Sep 30, 2024
2 parents eef75e7 + 753666c commit 76b345f
Show file tree
Hide file tree
Showing 69 changed files with 3,558 additions and 989 deletions.
2 changes: 2 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
align_assignment = true
align_pair_arrow = true
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deployment

on:
workflow_dispatch:
push:
branches: '*'

jobs:
publish:
if: ${{ !(github.event_name == 'push') || contains(github.event.head_commit.message, '[deploy]') }}
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.10'

# - name: Last release tag + Run main script + Git tree hash + Next release tag
# run: |
# export LAST_QUBOLIB_TAG="$(gh release view | sed -nr 's/tag:\s*(v\S*)/\1/p')"
# julia "$GITHUB_WORKSPACE/deployment/script.jl"
# export GIT_TREE_HASH=$(cat $GITHUB_WORKSPACE/deployment/tree.hash)
# echo "GIT_TREE_HASH=$GIT_TREE_HASH" >> $GITHUB_ENV
# export NEXT_QUBOLIB_TAG=$(cat $GITHUB_WORKSPACE/deployment/next.tag)
# echo "TAG=$NEXT_QUBOLIB_TAG" >> $GITHUB_ENV

# - name: Compute SHA256 for the compressed tarball
# run: |
# SHA_256="$(sha256sum -z $GITHUB_WORKSPACE/dist/qubolib.tar.gz | cut -d " " -f 1)"
# echo "SHA_256=$SHA_256" >> $GITHUB_ENV

# - name: Write release title
# run: |
# TITLE="QUBOLib $TAG"
# echo "TITLE=$TITLE" >> $GITHUB_ENV

# - name: Write release notes
# run: envsubst < "$GITHUB_WORKSPACE/deployment/NOTES.md" > "$RUNNER_TEMP/NOTES.md"

# - name: Publish release
# run: >
# gh release create $TAG
# --latest
# --notes-file "$RUNNER_TEMP/NOTES.md"
# --title "$TITLE"
# --target $GITHUB_SHA
# dist/qubolib.tar.gz

# - name: Update Documentation
# run: |
# git config user.name "github-actions"
# git config user.email "[email protected]"
# git add "./*README.md"
# git commit --allow-empty -m "Update Documentation"
# git push
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ docs/site/
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml

# Distribution Files
dist/

# PythonCall
.CondaPkg
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

all: build

setup:
@julia --project -e 'import Pkg; Pkg.instantiate()'
@julia --project=scripts/build -e 'import Pkg; Pkg.develop(path=@__DIR__)'

build:
@julia --project=scripts/build ./scripts/build/build.jl

clear:
@rm -rf ./dist

run: setup
@julia --project=scripts/run/mqlib ./scripts/run/mqlib/run.jl

setup-docs:
@julia --project=docs -e 'import Pkg; Pkg.develop(path=@__DIR__); Pkg.instantiate()'

docs:
@julia --project=docs ./docs/make.jl --skip-deploy
40 changes: 23 additions & 17 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
name = "QUBOLib"
uuid = "c2d3eca2-2309-4628-88a9-9d4a554e7c47"
authors = ["pedromxavier <[email protected]>"]
name = "QUBOLib"
uuid = "c2d3eca2-2309-4628-88a9-9d4a554e7c47"
authors = ["pedromxavier <mail@pedro.ϵλ>"]
version = "0.1.0"

[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JSONSchema = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JSONSchema = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
QUBOTools = "60eb5b62-0a39-4ddc-84c5-97d2adff9319"
SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
PseudoBooleanOptimization = "c8fa9a04-bc42-452d-8558-dc51757be744"
QUBOTools = "60eb5b62-0a39-4ddc-84c5-97d2adff9319"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
QUBOTools = "0.9"
QUBOTools = "0.10"
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# QUBOLib.jl
QUBO Instances for benchmarking

<div align="center">
<a href="/docs/src/assets/">
<img src="/docs/src/assets/logo.svg" width=400px alt="ToQUBO.jl" />
</a>
<br>
</div>

## Introduction

Expand Down
6 changes: 5 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterDiagrams = "a106ebf2-4182-4cba-90d4-44cd3cc36e85"
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
QUBOLib = "c2d3eca2-2309-4628-88a9-9d4a554e7c47"

[compat]
Documenter = "~0.27"
Documenter = "1"
DocumenterDiagrams = "1"
36 changes: 27 additions & 9 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,29 +1,47 @@
using Documenter
using DocumenterDiagrams
using DocumenterInterLinks

using QUBOLib

# Set up to run docstrings with jldoctest
DocMeta.setdocmeta!(QUBOLib, :DocTestSetup, :(using QUBOLib); recursive = true)

links = InterLinks(
"QUBOTools" => "https://juliaqubo.github.io/QUBOTools.jl/dev/objects.inv",
)

makedocs(;
modules = [QUBOLib],
doctest = true,
clean = true,
format = Documenter.HTML(
modules = [QUBOLib],
doctest = true,
clean = true,
warnonly = [:missing_docs],
format = Documenter.HTML(
assets = ["assets/extra_styles.css", "assets/favicon.ico"],
mathengine = Documenter.KaTeX(),
sidebar_sitename = false,
),
sitename = "QUBOLib.jl",
authors = "Pedro Maciel Xavier and David E. Bernal Neira",
pages = [
"Home" => "index.md",
"API" => "api.md",
pages = [
"Home" => "index.md",
"API" => "api.md",
"Manual" => [
"Introduction" => "manual/0-intro.md",
"Basic Usage" => "manual/1-basic.md",
"Advanced Usage" => "manual/2-advanced.md",
],
# "Booklet" => [
# "Introduction" => "booklet/0-intro.md",
# "Library Design" => "booklet/1-design.md",
# ],
],
workdir = @__DIR__,
plugins = [links],
workdir = @__DIR__,
)

if "--skip-deploy" ARGS
@warn "Skipping deployment"
else
deploydocs(repo = raw"github.com/pedromxavier/QUBOLib.jl.git", push_preview = true)
deploydocs(repo = raw"github.com/JuliaQUBO/QUBOLib.jl.git", push_preview = true)
end
67 changes: 63 additions & 4 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,73 @@
# API

## List items
## Actions

## Path Routing

```@docs
QUBOLib.library_path
QUBOLib.database_path
QUBOLib.archive_path
```

```@docs
QUBOLib.root_path
QUBOLib.dist_path
QUBOLib.build_path
QUBOLib.cache_path
```

## Library Index

```@docs
QUBOLib.LibraryIndex
```

```@docs
QUBOLib.list_collections
QUBOLib.list_instances
QUBOLib.database
QUBOLib.archive
```

## Load instances
## Data Access

```@docs
QUBOLib.access
```

```@docs
QUBOLib.load_collection
QUBOLib.load_instance
QUBOLib.load_solution
```

## Data Management

```@docs
QUBOLib.add_collection!
QUBOLib.add_instance!
QUBOLib.add_solution!
QUBOLib.add_solver!
```

```@docs
QUBOLib.remove_collection!
QUBOLib.remove_instance!
QUBOLib.remove_solution!
QUBOLib.remove_solver!
```

## Instance Synthesis

```@docs
QUBOLib.Synthesis.AbstractProblem
QUBOLib.Synthesis.generate
```

### Problem Types

```@docs
QUBOLib.Synthesis.NAE3SAT
QUBOLib.Synthesis.XORSAT
QUBOLib.Synthesis.Wishart
QUBOLib.Synthesis.SherringtonKirkpatrick
```
Loading

0 comments on commit 76b345f

Please sign in to comment.