Skip to content

Commit

Permalink
Merge pull request #46 from JuliaPlots/as/all_vector_formats
Browse files Browse the repository at this point in the history
[WIP] Refactor to use package extensions and render all vector types
  • Loading branch information
asinghvi17 authored Jun 5, 2024
2 parents 48449fe + e3cd177 commit 6e9b62b
Show file tree
Hide file tree
Showing 31 changed files with 1,993 additions and 2,218 deletions.
76 changes: 53 additions & 23 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: CI
on:
pull_request:
Expand All @@ -8,45 +7,76 @@ on:
branches:
- master
tags: '*'
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
name: Tests, Julia ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
- 'nightly'
- '1'
os:
- ubuntu-latest
- windows
- macos
arch:
- x64
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
# Cancel ongoing CI test runs if pushing to branch again before the previous tests
# have finished
- name: Cancel ongoing test runs for previous commits
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

# Do tests
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Install latex
run: sudo apt-get update && sudo apt-get install -y texlive-full texlive-luatex latexmk
- name: Install master branch of Makie et al
run: julia --project=@. -e 'using Pkg; pkg"add Makie CairoMakie MakieCore"'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: actions/upload-artifact@v3
env:
DISPLAY: ':0'
with:
prefix: xvfb-run -s '-screen 0 1024x768x24'
- uses: actions/upload-artifact@v4
if: always()
with:
name: test_images
path: test/test_images/
path: test_images/
docs:
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
- name: Install binary dependencies
run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
- uses: actions/checkout@v4
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1'
- uses: julia-actions/cache@v2
- name: Install documentation dependencies
run: |
xvfb-run -s '-screen 0 1024x768x24' julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
# Pkg.add([PackageSpec(name = "DocumenterVitepress", rev = "master"), PackageSpec(name = "Makie", rev = "master"), PackageSpec(name = "MakieCore", rev = "master"), PackageSpec(name = "CairoMakie", rev = "master")])
Pkg.instantiate()'
env:
DISPLAY: ':0'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
DISPLAY: ':0'
run: xvfb-run -s '-screen 0 1024x768x24' julia --project=docs/ docs/make.jl deploy
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
/dev/
/docs/build/
/docs/site/

/docs/Manifest.toml
test/test_images
33 changes: 24 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
name = "MakieTeX"
uuid = "6d554a22-29e7-47bd-aee5-0c5f06619414"
authors = ["Anshul Singhvi"]
version = "0.3.2"
authors = ["Anshul Singhvi <[email protected]>, and contributors"]
version = "0.4.0"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Ghostscript_jll = "61579ee1-b43e-5ca0-a5da-69d92c66a64b"
Glib_jll = "7746bdde-850d-59dc-9ae8-88ece973131d"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Perl_jll = "83958c19-0796-5285-893e-a1267f8ec499"
Poppler_jll = "9c32591e-4766-534b-9725-b71a8799265b"
Rsvg = "c4c386cf-5103-5370-be45-f3a111cca3b8"
Typst_jll = "eb4b1da6-20f6-5c66-9826-fdb8ad410d0e"
tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5"

[weakdeps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"

[extensions]
MakieTeXCairoMakieExt = "CairoMakie"

[compat]
Cairo = "1.0.5"
CairoMakie = "0.11"
CairoMakie = "0.12.2"
Colors = "0.9, 0.10, 0.11, 0.12"
DocStringExtensions = "0.8, 0.9"
Ghostscript_jll = "9"
Glib_jll = "2"
LaTeXStrings = "1"
Makie = "0.20"
Poppler_jll = "21.9"
julia = "1"
Makie = "0.21.2"
Poppler_jll = "21.9, 22, 23"
Rsvg = "1"
julia = "1.9"
Typst_jll = "0"
tectonic_jll = "0"

[extras]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
WGLMakie = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"

[targets]
test = ["Test", "Downloads"]
test = ["Test", "Downloads", "CairoMakie", "GLMakie", "WGLMakie"]
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# <img src="https://user-images.githubusercontent.com/32143268/165514916-4337e55a-18ec-4831-ab0f-11ebcb679600.svg" alt="MakieTeX.jl" height="50" align = "top">

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaplots.github.io/MakieTeX.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaplots.github.io/MakieTeX.jl/dev/)
[![Build Status](https://github.com/JuliaPlots/MakieTeX.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/JuliaPlots/MakieTeX.jl/actions/workflows/CI.yml?query=branch%3Amaster)

## <a href = "https://www.latex-project.org/"><img src="https://upload.wikimedia.org/wikipedia/commons/9/92/LaTeX_logo.svg" alt="LaTeX" height="30" align = "top"></a> integration for <a href = "https://www.github.com/MakieOrg/Makie.jl"><img src="https://raw.githubusercontent.com/MakieOrg/Makie.jl/master/assets/logo.png" alt="Makie.jl" height="30" align = "top"></a>

<img src="https://user-images.githubusercontent.com/32143268/169671023-4d4c8cf7-eb3d-4ee1-8634-8b73fa38d31c.svg" height=400></img>
Expand Down Expand Up @@ -43,7 +48,7 @@ We provide a layoutable object, `LTeX`, which aims to solve this. `LTeX`s are f
An example follows:

```julia
fig = Figure(resolution = (400, 300));
fig = Figure(size = (400, 300));
tex1 = LTeX(fig[1, 1], L"\int \mathbf E \cdot d\mathbf a = \frac{Q_{encl}}{4\pi\epsilon_0}", scale=1);
tex2 = LTeX(fig[2, 1], L"\int \mathbf E \cdot d\mathbf a = \frac{Q_{encl}}{4\pi\epsilon_0}", scale=2);
fig
Expand Down
91 changes: 91 additions & 0 deletions docs/Data.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
data_config_version = 0
uuid = "c9f88755-cec1-4fc7-a16e-0de771f0bcda"
name = "microbench-graph"
plugins = ["store", "defaults", "memorise"]

[config.defaults.storage._]
checksum = "auto"

[[file-icons]]
uuid = "da0197d0-a0bd-4c7d-a3d6-54b8d28addfc"
description = "Source files for the custom icon-font used by the File-Icons package"

[[file-icons.storage]]
driver = "git"
checksum = "k12:93dff68faee99aed4240d426603a717c"
clone = true
path = "svg"
remote = "https://github.com/file-icons/icons.git"
revision = "e6e6e6ac8cb1d91867167c228c00a667f4d47101"

[[file-icons.loader]]
driver = "tar"

[[file-icons-devopicons]]
uuid = "20e42fdd-10db-44f8-8b18-205158e48afe"
description = "Heavily-optimised version of the Devicons icon-font"

[[file-icons-devopicons.storage]]
driver = "git"
checksum = "k12:96bb50765d4b99ec67e6c21ae6654f54"
clone = true
path = "svg"
remote = "https://github.com/file-icons/DevOpicons.git"
revision = "2c2bf2bdb6507b8e4bfe695c1d54d639fbfed479"

[[file-icons-devopicons.loader]]
driver = "tar"

[[file-icons-mfixx]]
uuid = "d4cd9be5-869c-4b63-a0ec-8fb172c192f2"
description = "Optimised version of the MFizz icon font"

[[file-icons-mfixx.storage]]
driver = "git"
checksum = "k12:a839aaf0f57a1a63d0ed2b5c13546850"
clone = true
path = "svg"
remote = "https://github.com/file-icons/MFixx.git"
revision = "9bc4e3734898a07d3ff1b452f90446368d6baf12"

[[file-icons-mfixx.loader]]
driver = "tar"

[[go-logo-solid]]
uuid = "09662418-cff6-4456-88ee-4a348b771eef"
description = "Solid go logo"

[[go-logo-solid.storage]]
driver = "web"
checksum = "k12:de75d60ae2c948cc904d129afb8efb37"
url = "https://raw.githubusercontent.com/file-icons/icons/master/svg/Go-Old.svg"

[[go-logo-solid.loader]]
driver = "passthrough"

[[linguist-langs]]
uuid = "6ef087f1-17ee-4d7e-93bb-8a3b49c0fc69"
description = "Linguist language data listing"

[[linguist-langs.storage]]
driver = "web"
checksum = "k12:aa2cd4d4a862c53b0fc0e53e381f798d"
url = "https://github.com/github-linguist/linguist/raw/4a807b475da9715fb20c5bbed34d0e2d97879e3a/lib/linguist/languages.yml"

[[linguist-langs.loader]]
driver = "yaml"

[[microbench]]
uuid = "acf3ac73-6fea-49c6-9612-cc056a2f49b2"
description = "Julia Microbenchmark data"

[[microbench.storage]]
driver = "web"
checksum = "k12:9d670b7cf573b71e7f9ef8773c3d278c"
url = "https://raw.githubusercontent.com/JuliaLang/Microbenchmarks/master/bin/benchmarks.csv"

[[microbench.loader]]
driver = "csv"

[microbench.loader.args]
header = ["language", "benchmark", "time"]
93 changes: 0 additions & 93 deletions docs/Manifest.toml

This file was deleted.

11 changes: 11 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataToolkit = "dc83c90b-d41d-4e55-bdb7-0fc919659999"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
KangarooTwelve = "2a5dabf5-6a39-42aa-818d-ce8a58d1b312"
MakieTeX = "6d554a22-29e7-47bd-aee5-0c5f06619414"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
SwarmMakie = "0b1c068e-6a84-4e66-8136-5c95cafa83ed"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"
Loading

0 comments on commit 6e9b62b

Please sign in to comment.