davisusanibar commented on a change in pull request #125:
URL: https://github.com/apache/arrow-cookbook/pull/125#discussion_r788864531



##########
File path: java/requirements.txt
##########
@@ -0,0 +1,3 @@
+black

Review comment:
       Added this detail to CONTRIBUTING.rst document

##########
File path: java/CONTRIBUTING.rst
##########
@@ -0,0 +1,38 @@
+Bulding the Java Cookbook
+=========================
+
+The Java cookbook uses the Sphinx documentation system.
+
+Running ``make java`` from the cookbook root directory (the one where
+the ``README.rst`` exists) will install all necessary dependencies
+and will compile the cookbook to HTML.
+
+You will see the compiled result inside the ``build/java`` directory.
+
+Testing Java Recipes
+====================
+
+All recipes in the cookbook must be tested. The cookbook uses
+``javadoctest`` to verify the recipes.

Review comment:
       Added this detail to CONTRIBUTING.rst document

##########
File path: java/ext/javadoctest.py
##########
@@ -0,0 +1,92 @@
+import os
+import pathlib
+import subprocess
+
+from sphinx.ext.doctest import (Any, Dict, DocTestBuilder, TestcodeDirective,
+                                TestoutputDirective, doctest, sphinx)
+from sphinx.locale import __
+
+
+class JavaDocTestBuilder(DocTestBuilder):
+    """
+    Runs java test snippets in the documentation.
+    """
+
+    name = "javadoctest"
+    epilog = __(
+        "Java testing of doctests in the sources finished, look at the "
+        "results in %(outdir)s/output.txt."
+    )
+
+    def compile(
+        self, code: str, name: str, type: str, flags: Any, dont_inherit: bool
+    ) -> Any:
+        # go to project that contains all your arrow maven dependencies
+        path_arrow_project = os.path.join(pathlib.Path.cwd(), "source", "demo")
+
+        # create list of all arrow jar dependencies
+        subprocess.run(

Review comment:
       Changed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to