Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: obtain fixture artifact path programmatically #137

Closed

Conversation

prabodh1194
Copy link

@prabodh1194 prabodh1194 commented Sep 12, 2024

Description

I am setting up my dev environment in RustRover IDE and wanted to run the pytest from the IDE's command runner. However, the default setup was giving me some issue related to the .zip table artifact. To work around this, I have colocated a python script with the artifact so that I can deterministically get the correct path of the corresponding zip file.

How are the changes test-covered

  • N/A
  • Automated tests (unit and/or integration tests)
  • Manual tests
    • Details are described below

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.77%. Comparing base (01ef2fc) to head (f5f50ed).
Report is 35 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #137   +/-   ##
=======================================
  Coverage   87.77%   87.77%           
=======================================
  Files          14       14           
  Lines         728      728           
=======================================
  Hits          639      639           
  Misses         89       89           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@prabodh1194 prabodh1194 changed the title obtain fixture artifact path programmatically [MINOR] obtain fixture artifact path programmatically Sep 12, 2024
@prabodh1194 prabodh1194 force-pushed the make_pytest_ide_friendly branch from 2d72224 to 681d6f8 Compare September 12, 2024 07:23
@prabodh1194 prabodh1194 changed the title [MINOR] obtain fixture artifact path programmatically test: obtain fixture artifact path programmatically Sep 12, 2024
@prabodh1194 prabodh1194 force-pushed the make_pytest_ide_friendly branch from 681d6f8 to 463dcdc Compare September 12, 2024 07:49
@prabodh1194 prabodh1194 force-pushed the make_pytest_ide_friendly branch from 463dcdc to f5f50ed Compare September 13, 2024 02:01
@prabodh1194
Copy link
Author

@KnightChess should I go ahead & add a pre-commit hook for ruff format ?

Copy link
Contributor

@KnightChess KnightChess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prabodh1194 I think the ci already has a code check

@prabodh1194
Copy link
Author

fair enough. thank you.

Copy link
Member

@xushiyan xushiyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising this. 1 comment to address on the OS compatibility.

Building on top of this, we actually want to use crates/tests the centralized place for all testing tables. We already have enums for providing the pre-generated table there. In python codebase, we just need to use pyo3 to bind the crate over so we don't need to maintain separate testing data and module in python.


def _extract_testing_table(zip_file_path, target_path) -> str:

def _extract_testing_table(zip_file_path: Path, target_path: PosixPath) -> str:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PosixPath restricted this from running on windows? we'll need to support test and build on windows too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Got it. Lemme figure out how to test this

@xushiyan
Copy link
Member

@prabodh1194 I created #141 as an extended work for this. If you're interested, feel free to pick it up.

@prabodh1194
Copy link
Author

thanks. lemme try.

@xushiyan
Copy link
Member

@prabodh1194 I created #141 as an extended work for this. If you're interested, feel free to pick it up.

We will cover this PR's intent in #141 so we can close this

@xushiyan xushiyan closed this Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants