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

mock-code: allow passing custom hash function via callback #48

Closed
ltalirz opened this issue Nov 20, 2020 · 3 comments
Closed

mock-code: allow passing custom hash function via callback #48

ltalirz opened this issue Nov 20, 2020 · 3 comments

Comments

@ltalirz
Copy link
Member

ltalirz commented Nov 20, 2020

Unfortunately, there are simulation codes whose input files are not portable (e.g. because they require the absolute path to some data directory... no idea why).

For such cases, the current hash function will not work on CI since even when the data directory is provided, the absolute path to it will differ.

One might argue that it is really the simulation code that should be rewritten here, but unfortunately that is not always an option.
For such cases, it would be useful to be able to pass a custom hash function to the mock_code_factory fixture.

@greschd
Copy link
Member

greschd commented Nov 20, 2020

I think this issue is closely related to #6 - we should probably combine the discussion.

@ltalirz
Copy link
Member Author

ltalirz commented Nov 20, 2020

Indeed - passing a callback to the standalone executable would be a bit of a pain... pickle pickle

@ltalirz
Copy link
Member Author

ltalirz commented Nov 24, 2022

This has been addressed by @chrisjsewell in a different way in #65 (alternative hasher class is implemented in the test script and loaded dynamically by the mock executable via importlib).

@ltalirz ltalirz closed this as completed Nov 24, 2022
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

No branches or pull requests

2 participants