You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "JonasJ-ap (via GitHub)" <gi...@apache.org> on 2023/03/18 05:57:11 UTC

[GitHub] [iceberg] JonasJ-ap opened a new pull request, #7136: Pyiceberg: Make Python CI collect most of the unit tests

JonasJ-ap opened a new pull request, #7136:
URL: https://github.com/apache/iceberg/pull/7136

   Closes #7135 


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on a diff in pull request #7136: Pyiceberg: Make Python CI collect most of the unit tests

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1140948167


##########
.github/workflows/python-integration.yml:
##########
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-name: "Python CI"
+name: "Python Integration"

Review Comment:
   I observe that If two CI have the same name, the following error occurs sometimes:
   ![Screen Shot 2023-03-18 at 01 58 00](https://user-images.githubusercontent.com/55990951/226088110-ec45ed00-3f7e-49ab-b904-27ae55043175.png)
   
   Probably the reason that current status of Python CI is failing....



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on a diff in pull request #7136: Python: Make Python CI collect most of the unit tests and Fix CI name conflict

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1140948167


##########
.github/workflows/python-integration.yml:
##########
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-name: "Python CI"
+name: "Python Integration"

Review Comment:
   I observe that If two CI have the same name, the following error occurs sometimes:
   ![Screen Shot 2023-03-18 at 01 58 00](https://user-images.githubusercontent.com/55990951/226088110-ec45ed00-3f7e-49ab-b904-27ae55043175.png)
   
   Probably the reason that Python CI fails(get cancelled) sometimes....



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on a diff in pull request #7136: Pyiceberg: Make Python CI collect most of the unit tests

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1140948167


##########
.github/workflows/python-integration.yml:
##########
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-name: "Python CI"
+name: "Python Integration"

Review Comment:
   If two CI have the same name, the following error occurs some time:
   ![Screen Shot 2023-03-18 at 01 58 00](https://user-images.githubusercontent.com/55990951/226088110-ec45ed00-3f7e-49ab-b904-27ae55043175.png)
   
   Probably the reason that current status of Python CI is failing....



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on a diff in pull request #7136: Pyiceberg: Make Python CI collect most of the unit tests

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1140948167


##########
.github/workflows/python-integration.yml:
##########
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-name: "Python CI"
+name: "Python Integration"

Review Comment:
   If two CI have the same name, the following error occurs some time:
   ![Screen Shot 2023-03-18 at 01 58 00](https://user-images.githubusercontent.com/55990951/226088110-ec45ed00-3f7e-49ab-b904-27ae55043175.png)
   



##########
python/tests/conftest.py:
##########
@@ -80,6 +80,12 @@
 )
 
 
+def pytest_collection_modifyitems(items: List[pytest.Item]) -> None:
+    for item in items:
+        if not any(item.iter_markers()):
+            item.add_marker("unmarked")

Review Comment:
   Added based on comment in https://github.com/apache/iceberg/pull/6392#discussion_r1049285936 to activate the marker "unmarked" in Makefile



##########
python/Makefile:
##########
@@ -27,7 +27,7 @@ lint:
 
 test:
 	poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m unmarked ${PYTEST_ARGS}
-	poetry run coverage report -m --fail-under=90
+	poetry run coverage report -m --fail-under=88

Review Comment:
   The current coverage excluding integration, s3, and adlfs tests is 88%



##########
python/tests/io/test_pyarrow.py:
##########
@@ -450,17 +450,11 @@ def test_expr_not_null_to_pyarrow(bound_reference: BoundReference[str]) -> None:
 
 
 def test_expr_is_nan_to_pyarrow(bound_double_reference: BoundReference[str]) -> None:
-    assert (
-        repr(expression_to_pyarrow(BoundIsNaN(bound_double_reference)))
-        == "<pyarrow.compute.Expression (is_null(foo, {nan_is_null=true}) and is_valid(foo))>"
-    )
+    assert repr(expression_to_pyarrow(BoundIsNaN(bound_double_reference))) == "<pyarrow.compute.Expression is_nan(foo)>"
 
 
 def test_expr_not_nan_to_pyarrow(bound_double_reference: BoundReference[str]) -> None:
-    assert (
-        repr(expression_to_pyarrow(BoundNotNaN(bound_double_reference)))
-        == "<pyarrow.compute.Expression invert((is_null(foo, {nan_is_null=true}) and is_valid(foo)))>"
-    )
+    assert repr(expression_to_pyarrow(BoundNotNaN(bound_double_reference))) == "<pyarrow.compute.Expression invert(is_nan(foo))>"

Review Comment:
   To reflect the changes made in https://github.com/apache/iceberg/pull/6398/files#diff-49144c27eab7e03926b0310aa8b513dbeb9c8d2a0d33bacf8dedbd88b4680aacR431-R435



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on a diff in pull request #7136: Pyiceberg: Make Python CI collect most of the unit tests

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1140948296


##########
python/Makefile:
##########
@@ -27,7 +27,7 @@ lint:
 
 test:
 	poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m unmarked ${PYTEST_ARGS}
-	poetry run coverage report -m --fail-under=90
+	poetry run coverage report -m --fail-under=88

Review Comment:
   The current test coverage excluding integration, s3, and adlfs tests is 88%



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on pull request #7136: Python: Make Python CI collect most of the unit tests

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#issuecomment-1476940518

   @jackye1995 Thanks for your review and suggestions. @Fokko May I ask if you have time to take a look at this PR?


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jackye1995 commented on a diff in pull request #7136: Python: Make Python CI collect most of the unit tests

Posted by "jackye1995 (via GitHub)" <gi...@apache.org>.
jackye1995 commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1142457668


##########
python/Makefile:
##########
@@ -27,7 +27,7 @@ lint:
 
 test:
 	poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m unmarked ${PYTEST_ARGS}
-	poetry run coverage report -m --fail-under=90
+	poetry run coverage report -m --fail-under=88

Review Comment:
   We definitely want to keep this 90, but it's probably more important to at least run the tests and we don't want to blindly add tests just for the sake of making it 90, I will approve the PR, but can you create an Issue tracking that so we take a deeper look at where we can add more tests?



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] Fokko commented on a diff in pull request #7136: Python: Make Python CI collect most of the unit tests and Fix CI name conflict

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1143016966


##########
python/tests/conftest.py:
##########
@@ -80,6 +80,12 @@
 )
 
 
+def pytest_collection_modifyitems(items: List[pytest.Item]) -> None:
+    for item in items:
+        if not any(item.iter_markers()):
+            item.add_marker("unmarked")

Review Comment:
   Thanks, I don't know why this got lost.



##########
python/Makefile:
##########
@@ -27,7 +27,7 @@ lint:
 
 test:
 	poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m unmarked ${PYTEST_ARGS}
-	poetry run coverage report -m --fail-under=90
+	poetry run coverage report -m --fail-under=88

Review Comment:
   @JonasJ-ap I think this only runs the tests that are marked as `unmarked` and checks the code coverage. How about adding another target in the Makefile that will run all the test of all the markers (`unmarked`, `s3`, `adlfs`, and `gcs` soon), and only add the code coverage check there. Right now we expect all the test suites to cover 90%+, which is not really needed.



##########
python/tests/io/test_pyarrow.py:
##########
@@ -450,17 +450,11 @@ def test_expr_not_null_to_pyarrow(bound_reference: BoundReference[str]) -> None:
 
 
 def test_expr_is_nan_to_pyarrow(bound_double_reference: BoundReference[str]) -> None:
-    assert (
-        repr(expression_to_pyarrow(BoundIsNaN(bound_double_reference)))
-        == "<pyarrow.compute.Expression (is_null(foo, {nan_is_null=true}) and is_valid(foo))>"
-    )
+    assert repr(expression_to_pyarrow(BoundIsNaN(bound_double_reference))) == "<pyarrow.compute.Expression is_nan(foo)>"
 
 
 def test_expr_not_nan_to_pyarrow(bound_double_reference: BoundReference[str]) -> None:
-    assert (
-        repr(expression_to_pyarrow(BoundNotNaN(bound_double_reference)))
-        == "<pyarrow.compute.Expression invert((is_null(foo, {nan_is_null=true}) and is_valid(foo)))>"
-    )
+    assert repr(expression_to_pyarrow(BoundNotNaN(bound_double_reference))) == "<pyarrow.compute.Expression invert(is_nan(foo))>"

Review Comment:
   Looks good, thanks!



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on a diff in pull request #7136: Python: Make Python CI collect most of the unit tests and Fix CI name conflict

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1143607463


##########
python/Makefile:
##########
@@ -27,7 +27,7 @@ lint:
 
 test:
 	poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m unmarked ${PYTEST_ARGS}
-	poetry run coverage report -m --fail-under=90
+	poetry run coverage report -m --fail-under=88

Review Comment:
   @Fokko Thank you for your suggestion. I added a new target called "test-coverage" to run all the unit tests and make this the only command to be run in the "Python CI" workflow. I also noticed that some tests utilizing `@pytest.mark.parametrize(...)` are marked as "parametrize", so I also included these in the "test" target.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jackye1995 merged pull request #7136: Python: Make Python CI collect most of the unit tests and Fix CI name conflict

Posted by "jackye1995 (via GitHub)" <gi...@apache.org>.
jackye1995 merged PR #7136:
URL: https://github.com/apache/iceberg/pull/7136


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on a diff in pull request #7136: Python: Make Python CI collect most of the unit tests and Fix CI name conflict

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1143607463


##########
python/Makefile:
##########
@@ -27,7 +27,7 @@ lint:
 
 test:
 	poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m unmarked ${PYTEST_ARGS}
-	poetry run coverage report -m --fail-under=90
+	poetry run coverage report -m --fail-under=88

Review Comment:
   @Fokko Thank you for your suggestion. I added a new target called "test-coverage" to run all the unit tests and make this the only command to be run in the "Python CI" workflow. I also noticed that some tests utilizing `@pytest.mark.parametrize(...)` are marked with "parametrize", so I also included these in the "test" target.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] JonasJ-ap commented on a diff in pull request #7136: Python: Make Python CI collect most of the unit tests

Posted by "JonasJ-ap (via GitHub)" <gi...@apache.org>.
JonasJ-ap commented on code in PR #7136:
URL: https://github.com/apache/iceberg/pull/7136#discussion_r1142680830


##########
python/Makefile:
##########
@@ -27,7 +27,7 @@ lint:
 
 test:
 	poetry run coverage run --source=pyiceberg/ -m pytest tests/ -m unmarked ${PYTEST_ARGS}
-	poetry run coverage report -m --fail-under=90
+	poetry run coverage report -m --fail-under=88

Review Comment:
   Good point! I created a new issue: https://github.com/apache/iceberg/issues/7149.
   
   Since the drop of test coverage is caused of exlusion of some tests related to `s3` and `adlfs`, adding them back when computing the test coverage may also be a solution. I argee that the top priority is to make these tests running  in the CI, so I will keep the threshold at 88% as a temporal solution.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org