Skip to content

Commit e305f7c

Browse files
authored
docs: add javadoc to docs.vortex.dev (#4229)
I've verified this locally with `make serve` Signed-off-by: Andrew Duffy <[email protected]>
1 parent 1c3c742 commit e305f7c

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed

.github/workflows/docs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,25 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v5
2020
- uses: ./.github/actions/setup-rust
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@v4
23+
with:
24+
java-version: "17"
25+
distribution: "temurin"
2126
- name: Install uv
2227
uses: spiraldb/actions/.github/actions/[email protected]
2328
with:
2429
sync: false
30+
- name: Generate Javadoc for Java projects
31+
run: |
32+
cd java
33+
./gradlew javadoc -x makeTestFiles -x shadowJar
34+
- name: Copy Javadoc to docs directory
35+
run: |
36+
mkdir -p docs/_static/vortex-jni
37+
mkdir -p docs/_static/vortex-spark
38+
cp -r java/vortex-jni/build/docs/javadoc/* docs/_static/vortex-jni/
39+
cp -r java/vortex-spark/build/docs/javadoc/* docs/_static/vortex-spark/
2540
- name: build Python and Rust docs
2641
run: |
2742
uv run --all-packages make -C docs html

docs/_static/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vortex-spark/
2+
vortex-jni/

docs/api/java/index.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Vortex Java API
2+
===============
3+
4+
The Vortex Java API provides bindings for the Vortex library, enabling Java applications to work with Vortex arrays and files.
5+
6+
The API is split into two main components:
7+
8+
* **Vortex JNI**: Core JNI bindings for Vortex functionality
9+
* **Vortex Spark**: Apache Spark integration for reading Vortex files
10+
11+
.. raw:: html
12+
13+
<div class="api-links">
14+
<h3>API Documentation</h3>
15+
<ul>
16+
<li><a href="../../_static/vortex-jni/index.html">Vortex JNI API</a> - Core Java bindings for Vortex</li>
17+
<li><a href="../../_static/vortex-spark/index.html">Vortex Spark API</a> - Apache Spark integration</li>
18+
</ul>
19+
</div>
20+
21+
Installation
22+
------------
23+
24+
The Java API can be included in your project using Gradle or Maven. Please refer to the main documentation for detailed installation instructions.
25+
26+
Usage Example
27+
-------------
28+
29+
Here's a basic example of using the Vortex Java API to read a Vortex file:
30+
31+
.. code-block:: java
32+
33+
import dev.vortex.api.File;
34+
import dev.vortex.api.Array;
35+
36+
// Open a Vortex file
37+
File vortexFile = File.open("path/to/file.vortex");
38+
39+
// Read arrays from the file
40+
Array array = vortexFile.readArray();
41+
42+
// Work with the array data
43+
System.out.println("Array length: " + array.getLength());

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ caption: API Documentation
9696
Python API <api/python/index>
9797
Rust API <https://docs.rs/vortex>
9898
C FFI API <api/c/index>
99+
Java API <api/java/index>
99100
```
100101

101102
## User Guides

0 commit comments

Comments
 (0)