TidierOrg / TidierPlots.jl

Tidier data visualization in Julia, modeled after the ggplot2 R package.
MIT License
196 stars 7 forks source link

Trouble building docs locally #78

Closed adknudson closed 2 months ago

adknudson commented 2 months ago

I'm trying to build the docs locally following the steps on the Contribute page. When running the make.jl file I get the error:

ERROR: LoadError: Unsupported mime: text/html
Stacktrace:
...

Are there new steps for building the docs since the guide was written 5 months ago? The error seems to happen when building the docs_bridge.jl file, though I'm sure it's because it's just the first place that a plot is built and attempted to be displayed.

julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8 (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 24 × AMD Ryzen 9 3900X 12-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver2)
Threads: 24 default, 0 interactive, 12 GC (on 24 virtual cores)
Environment:
  JULIA_NUM_THREADS = auto
  JULIA_EDITOR = code
adknudson commented 2 months ago

I managed to figure it out. I needed to set my Julia environment variables

ENV["GKSwstype"] = 100
ENV["JULIA_DEBUG"] = "Documenter"
ENV["DATADEPS_ALWAYS_ACCEPT"] = true

EDIT: Setting the environment variables may not be necessary. Setting the JULIA_DEBUG variable to "Documenter" does provide extra debug info while running.

as well as dev the docs project

julia --project=docs -e 'using Pkg; pkg"dev ."; Pkg.instantiate()'

From there I was able to run

julia --project=docs/ --color=yes docs/genfiles.jl
julia --project=docs/ --color=yes docs/make.jl

I think the contribute page should be updated to include this extra info. I can update the page and make another pull request.