Skip to content

Commit

Permalink
Merge pull request #14 from jaakkor2/docandconfupdate
Browse files Browse the repository at this point in the history
Add github workflows, add interoperability docs
  • Loading branch information
jaakkor2 authored Oct 11, 2024
2 parents de34ae5 + 97ba7ae commit 198d94c
Show file tree
Hide file tree
Showing 10 changed files with 172 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
78 changes: 78 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI
on:
push:
branches:
- master
tags: ['*']
pull_request:
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- '1.10'
- 'pre'
os:
- ubuntu-latest
arch:
- x64
- x86
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
contents: write
statuses: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- name: Configure doc environment
shell: julia --project=docs --color=yes {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- name: Run doctests
shell: julia --project=docs --color=yes {0}
run: |
using Documenter: DocMeta, doctest
using Foolio
DocMeta.setdocmeta!(JMPReader, :DocTestSetup, :(using Foolio); recursive=true)
doctest(Foolio)
16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CompatHelper
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
2 changes: 1 addition & 1 deletion .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
lookback:
default: 3
default: "3"
permissions:
actions: read
checks: read
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Manifest.toml
Manifest.toml
*.jl.*.cov
*.jl.cov
*.jl.mem
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JMPReader"
uuid = "d9f7e686-cf87-4d12-8d7a-0e9b8c9fba29"
version = "0.1.12-DEV"
authors = ["Jaakko Ruohio <[email protected]>"]
version = "0.1.11"

[deps]
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
Expand Down
3 changes: 2 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/
site/
site/
Manifest.toml
31 changes: 31 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Documenter
using JMPReader

DocMeta.setdocmeta!(JMPReader, :DocTestSetup, :(using JMPReader); recursive = true)

makedocs(
modules = [JMPReader],
authors = "Jaakko Ruohio",
sitename = "JMPReader Documentation",
format = Documenter.HTML(
prettyurls = false,
disable_git = false,
canonical = "https://jaakkor2.github.io/JMPReader.jl",
edit_link = "master",
repolink = "https://github.com/jaakkor2/JMPReader.jl"
),
warnonly = [:docs_block, :missing_docs, :cross_references],
# remotes = nothing,
pages = [
"Usage" => "index.md",
"Developer docs" => "dev.md",
"Interoperability" => "interop.md",
],
)

deploydocs(;
repo = "github.com/jaakkor2/JMPReader.jl",
devbranch = "master",
)

nothing
8 changes: 7 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# JMPReader.jl Documentation
```@meta
CurrentModule = JMPReader
```

# JMPReader

Documentation for [JMPReader](https://github.com/jaakkor2/JMPReader.jl).

[JMP](https://en.wikipedia.org/wiki/JMP_(statistical_software)) is commercial statistical software. This package provides an independent reader for `.jmp` files
implemented in Julia.
Expand Down
25 changes: 25 additions & 0 deletions docs/src/interop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Interoperability with other languages

These example show how JMPReader.jl could be used from other languages.

## R

```r
install.packages("JuliaCall")
library(JuliaCall)
julia_setup(installJulia = TRUE)
julia_install_package_if_needed("JMPReader")
julia_library("JMPReader")
df <- julia_call("readjmp", "example1.jmp")
```

## Python

With `juliacall` and `pandas` installed

```python
from juliacall import Main as jl
jl.seval("using JMPReader")
df = jl.readjmp("example1.jmp")
pt = jl.pytable(df, "pandas")
```

0 comments on commit 198d94c

Please sign in to comment.