Skip to content

Commit f1ed3f8

Browse files
committed
Adjusting README
1 parent ac8f326 commit f1ed3f8

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

graalpy/graalpy-apache-arrow-guide/README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ There is also another option `arrow-memory-netty`. You can read more about Apach
9595
<package>pandas</package> <!---->
9696
<package>pyarrow</package> <!---->
9797
</packages>
98-
<pythonHome>
99-
<includes></includes>
100-
<excludes>.*</excludes>
101-
</pythonHome>
10298
</configuration>
10399
<goals>
104100
<goal>process-graalpy-resources</goal>
@@ -212,6 +208,8 @@ Bind the Java interface to the Python module.
212208
`Main.java`
213209

214210
```java
211+
private static DataAnalysisPyModule dataAnalysisPyModule;
212+
215213
public static void initDataAnalysisPyModule(Context context) {
216214
Value value = context.eval("python", "import data_analysis; data_analysis");
217215
dataAnalysisPyModule = value.as(DataAnalysisPyModule.class);
@@ -252,6 +250,11 @@ Finally, use the setup in your main method:
252250

253251
`Main.java`
254252
```java
253+
private static final String PYTHON_URL = "https://www.graalvm.org/compatibility/module_results/python-module-testing-v241.csv";
254+
private static final String JAVASCRIPT_URL = "https://www.graalvm.org/compatibility/module_results/js-module-testing.csv";
255+
private static final Integer PASSING_RATE_COLUMN_INDEX = 3;
256+
257+
255258
public static void main(String[] args) throws IOException, InterruptedException {
256259
try (Context context = initContext();
257260
BufferAllocator allocator = new RootAllocator();
@@ -285,7 +288,27 @@ or
285288
./gradlew build
286289
```
287290

288-
To run the application:
291+
To run the application using Maven, first define `exec` plugin:
292+
293+
`pom.xml`
294+
```xml
295+
<plugin>
296+
<groupId>org.codehaus.mojo</groupId>
297+
<artifactId>exec-maven-plugin</artifactId>
298+
<version>1.2.1</version>
299+
<executions>
300+
<execution>
301+
<goals>
302+
<goal>java</goal>
303+
</goals>
304+
</execution>
305+
</executions>
306+
<configuration>
307+
<mainClass>com.example.Main</mainClass>
308+
</configuration>
309+
</plugin>
310+
```
311+
Run the application using:
289312
```bash
290313
./mvnw exec:java -Dexec.mainClass="com.example.Main"
291314
```

0 commit comments

Comments
 (0)