You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/20 13:41:56 UTC

[GitHub] [arrow] AlenkaF opened a new pull request, #13204: ARROW-16018: [Doc][Python] Run doctests on Python docstring examples (--doctest-cython)

AlenkaF opened a new pull request, #13204:
URL: https://github.com/apache/arrow/pull/13204

   Adding `--doctest-cython` functionality which will be run on the CI with a follow-up PR.
   
   This PR can be tested with `pytest --doctest-cython python/pyarrow`.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] amol- closed pull request #13204: ARROW-16018: [Doc][Python] Run doctests on Python docstring examples (--doctest-cython)

Posted by GitBox <gi...@apache.org>.
amol- closed pull request #13204: ARROW-16018: [Doc][Python] Run doctests on Python docstring examples (--doctest-cython)
URL: https://github.com/apache/arrow/pull/13204


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13204: ARROW-16018: [Doc][Python] Run doctests on Python docstring examples (--doctest-cython)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13204:
URL: https://github.com/apache/arrow/pull/13204#issuecomment-1132916903

   https://issues.apache.org/jira/browse/ARROW-16018


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #13204: ARROW-16018: [Doc][Python] Run doctests on Python docstring examples (--doctest-cython)

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on code in PR #13204:
URL: https://github.com/apache/arrow/pull/13204#discussion_r880112592


##########
python/pyarrow/_compute.pyx:
##########
@@ -2036,15 +2036,16 @@ cdef class Expression(_Weakrefable):
 
     >>> import pyarrow.compute as pc
     >>> (pc.field("a") < pc.scalar(3)) | (pc.field("b") > 7)
-    <pyarrow.compute.Expression ((a < 3:int64) or (b > 7:int64))>
+    <pyarrow.compute.Expression ((a < 3) or (b > 7))>
+    >>> import pyarrow.dataset as ds
     >>> ds.field('a') != 3

Review Comment:
   Since the line above is using `pc.field` instead of `ds.field`, can probably do that here as well (and avoid the extra import). This is from historical reasons, because this function was originally included in the datasets module, but then moved to the compute module (but it is still available in both places).



##########
python/pyarrow/array.pxi:
##########
@@ -876,19 +877,6 @@ cdef class Array(_PandasConvertible):
         -------
         diff : str
             A human-readable printout of the differences.
-
-        Examples
-        --------
-        >>> left = pa.array(["one", "two", "three"])
-        >>> right = pa.array(["two", None, "two-and-a-half", "three"])
-        >>> print(left.diff(right))
-
-        @@ -0, +0 @@
-        -"one"
-        @@ -2, +1 @@
-        +null
-        +"two-and-a-half"

Review Comment:
   I suppose doctest doesn't like the empty line in the output? In any case, as I commented elsewhere, instead of removing, you can add a doctest skip.



##########
python/pyarrow/conftest.py:
##########
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+def pytest_ignore_collect(path, config):
+    if config.option.doctest_cython:

Review Comment:
   ```suggestion
       if getattr(config.option, "doctest_cython", False):
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] AlenkaF commented on a diff in pull request #13204: ARROW-16018: [Doc][Python] Run doctests on Python docstring examples (--doctest-cython)

Posted by GitBox <gi...@apache.org>.
AlenkaF commented on code in PR #13204:
URL: https://github.com/apache/arrow/pull/13204#discussion_r880423549


##########
python/pyarrow/array.pxi:
##########
@@ -876,19 +877,6 @@ cdef class Array(_PandasConvertible):
         -------
         diff : str
             A human-readable printout of the differences.
-
-        Examples
-        --------
-        >>> left = pa.array(["one", "two", "three"])
-        >>> right = pa.array(["two", None, "two-and-a-half", "three"])
-        >>> print(left.diff(right))
-
-        @@ -0, +0 @@
-        -"one"
-        @@ -2, +1 @@
-        +null
-        +"two-and-a-half"

Review Comment:
   Yeah, I was trying to figure something out but doctest doesn't like any idea I think of 😆 
   I will add a doctest skip.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13204: ARROW-16018: [Doc][Python] Run doctests on Python docstring examples (--doctest-cython)

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13204:
URL: https://github.com/apache/arrow/pull/13204#issuecomment-1132916924

   :warning: Ticket **has not been started in JIRA**, please click 'Start Progress'.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] ursabot commented on pull request #13204: ARROW-16018: [Doc][Python] Run doctests on Python docstring examples (--doctest-cython)

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #13204:
URL: https://github.com/apache/arrow/pull/13204#issuecomment-1138851212

   Benchmark runs are scheduled for baseline = 5eaae545a4680a7dfa9d55a6848ae64b0d279970 and contender = 9a7cc522ed8cea106686a4db1eec3236e4842831. 9a7cc522ed8cea106686a4db1eec3236e4842831 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/7c69724e77c2465d891e352b740e2676...f15156f2b4f646a1b61981dcababf407/)
   [Finished :arrow_down:0.35% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/879abc2928ab4f27a979f352736d2094...52cebcdc7a5841ed862e8bf6ad6cc75d/)
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/6a5b736feb3943a9ab394cc27c8190fa...d743e53b7bb342ec89444c1df0a1346d/)
   [Finished :arrow_down:0.04% :arrow_up:0.0%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/b5c8ec7f88ac43bcac6f89acc0d72678...29d8e136f87f49ad89f22d700722753b/)
   Buildkite builds:
   [Finished] [`9a7cc522` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/830)
   [Finished] [`9a7cc522` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/829)
   [Finished] [`9a7cc522` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/819)
   [Finished] [`9a7cc522` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/833)
   [Finished] [`5eaae545` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/829)
   [Finished] [`5eaae545` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/828)
   [Finished] [`5eaae545` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/818)
   [Finished] [`5eaae545` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/832)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org