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

[patch] Use ImportAlarm from pyiron_snippets #1455

Merged
merged 6 commits into from
Jun 3, 2024
Merged

Conversation

liamhuber
Copy link
Member

No description provided.

@liamhuber liamhuber changed the title [patch] Use ImportAlarm from pyiron_snippets [minor] Use ImportAlarm from pyiron_snippets May 31, 2024
@liamhuber liamhuber changed the title [minor] Use ImportAlarm from pyiron_snippets [patch] Use ImportAlarm from pyiron_snippets May 31, 2024
@liamhuber liamhuber marked this pull request as ready for review May 31, 2024 17:36
@liamhuber
Copy link
Member Author

OSX failure:

 ======================================================================
FAIL: test_with_executor_wait (flex.test_pythonfunctioncontainer.TestPythonFunctionContainer.test_with_executor_wait)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/pyiron_base/pyiron_base/tests/flex/test_pythonfunctioncontainer.py", line 86, in test_with_executor_wait
    self.assertTrue(job.server.future.done())
AssertionError: False is not true

----------------------------------------------------------------------

@liamhuber
Copy link
Member Author

I took a look at the test file and I don't see anything related to ImportAlarm there; I believe this is unrelated. I'm going to try simply re-running the test.

@liamhuber
Copy link
Member Author

I took a look at the test file and I don't see anything related to ImportAlarm there; I believe this is unrelated. I'm going to try simply re-running the test.

Yeah, that did the trick. @jan-janssen I guess there is some stochastic failure in flex.test_pythonfunctioncontainer.TestPythonFunctionContainer.test_with_executor_wait

@@ -6,7 +6,6 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
Copy link
Member

Choose a reason for hiding this comment

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

Why was this removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because I wanted to make sure this PR passes unittests. With the branch specified like that, unit tests don't run on stacked PRs.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's in the commit message: Run unittests on stacked PRs too

@@ -46,6 +45,9 @@

from pyiron_base.jobs.job.toolkit import Toolkit, BaseTools

# Expose snippets references in base API for backwards compatibility
from pyiron_snippets.import_alarm import ImportAlarm
Copy link
Member

Choose a reason for hiding this comment

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

I find this confusing - should not we do the major change and just enforce the switch to using the ImportAlarm only from pyiron_snippets?

Copy link
Member Author

Choose a reason for hiding this comment

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

I propose to leave this PR with the slightly-confusing-but-backwards-compatible redirection here, but I stacked an additional, compatibility breaking patch in #1458.

I agree that this might be slightly confusing, but I don't think it's explicitly wrong. So what I'd like to do is get go through and approve each part of the stack individually, then we can merge the whole thing in at once. The mild confusingness will thus still exist at a particular commit, but not be included in any releases.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've converted this PR to a draft until we settle on a solution for the compatibility.

Copy link
Member

@jan-janssen jan-janssen left a comment

Choose a reason for hiding this comment

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

From my perspective a major bump and fully removing the ImportAlarm from base would be the preferred solution. Or alternative if we want to be graceful we could replace the ImportAlarm class in pyiron_base with an error message to notify the user they have to upgrade.

@liamhuber
Copy link
Member Author

From my perspective a major bump and fully removing the ImportAlarm from base would be the preferred solution. Or alternative if we want to be graceful we could replace the ImportAlarm class in pyiron_base with an error message to notify the user they have to upgrade.

I'm completely comfortable with both these solutions -- @pmrv do you have a strong opinion here?

If we're going to bump the minor version for this though, let's wait and stack in the rest of the stuff that can come from snippets (Deprecator, deprecate, and deprecate_soon), and get downstream repos already depending on the snippets source (started already here)

@liamhuber liamhuber marked this pull request as draft May 31, 2024 18:14
@liamhuber
Copy link
Member Author

@liamhuber liamhuber marked this pull request as ready for review May 31, 2024 19:28
@liamhuber liamhuber marked this pull request as draft May 31, 2024 19:35
Base automatically changed from snippets_singleton to main May 31, 2024 19:37
@jan-janssen
Copy link
Member

PRs before the deprecate stuff can be removed from the API

pyiron_atomistics is save because it has an upper bound on pyiron_base. So we are just waiting for pyiron_contrib. I set this pull request to draft until things are cleaned up in pyiron_contrib.

@liamhuber
Copy link
Member Author

PRs before the deprecate stuff can be removed from the API

pyiron_atomistics is save because it has an upper bound on pyiron_base. So we are just waiting for pyiron_contrib. I set this pull request to draft until things are cleaned up in pyiron_contrib.

My comment is anyhow outdated; the changes to the API don't occur until #1458, the comments were just made before that PR existed and I thought those changes might get made here. So this PR doesn't need to be draft anymore.

@liamhuber liamhuber marked this pull request as ready for review June 1, 2024 15:09
Copy link
Member

@jan-janssen jan-janssen left a comment

Choose a reason for hiding this comment

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

Looks good to me

@liamhuber liamhuber merged commit 1d8c39c into main Jun 3, 2024
24 of 25 checks passed
@liamhuber liamhuber deleted the snippets_alarm branch June 3, 2024 18:33
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.

2 participants