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

update example #60

Merged
merged 1 commit into from
May 8, 2023
Merged

update example #60

merged 1 commit into from
May 8, 2023

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Feb 16, 2023

I run the scripts in the example folder. Two of them failed, and they need to be updated.

I got this error when committing new changes:

[extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'

It's likely due the the isort package. I update its version to 5.12.0 and there is no more error.

@superstar54
Copy link
Member Author

@sphuber I don't know why the ci/tests failed, because the new changes will not affect the core code. I also run the test locally, all of them passed.

@ltalirz
Copy link
Member

ltalirz commented Feb 17, 2023

hi @superstar54 , thanks for the fix!

the test failures are indeed weird - either some of the data it's comparing against is coming from somewhere else or the mechanism of comparison may be flaky (perhaps dependent on order of query result / ...)?

____________________________ test_user_get_entities ____________________________

data_regression = <pytest_regressions.data_regression.DataRegressionFixture object at 0x7f1bfc190a90>

    def test_user_get_entities(data_regression):
        """Test ``User.get_entities``"""
        orm.User(email="verdi@opera.net", first_name="Giuseppe", last_name="Verdi").store()
        py_users = models.User.get_entities(order_by=["id"])
>       data_regression.check([replace_dynamic(c.dict()) for c in py_users])
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-runner/pytest-0/test_user_get_entities0/test_models/test_user_get_entities.yml
E       /tmp/pytest-of-runner/pytest-0/test_user_get_entities0/test_models/test_user_get_entities.obtained.yml
E       HTML DIFF: /tmp/pytest-of-runner/pytest-0/test_user_get_entities0/test_models/test_user_get_entities.obtained.diff.html
E       --- 
E       +++ 
E       @@ -1,8 +1,8 @@
E       -- email: tests@aiida.mail
E       -  first_name: AiiDA
E       +- email: test@aiida.local
E       +  first_name: ''
E          id: int
E       -  institution: aiidateam
E       -  last_name: Plugintest
E       +  institution: ''
E       +  last_name: ''
E        - email: verdi@opera.net
E          first_name: Giuseppe
E          id: int

If it's urgent, we can merge it as-is; otherwise let's wait until @sphuber has time to have a look

@superstar54
Copy link
Member Author

Hi @ltalirz , thanks for looking into it. Not urgent, we can wait.

@sphuber
Copy link
Contributor

sphuber commented Feb 17, 2023

Thanks @superstar54 . I will have a look at the CI soon and fix it. Then we can merge this.

The examples were incorrectly using `GET` requests to start and stop the
daemon, but this should be `POST` requests.

The Quantum ESPRESSO example is also updated to use the SSSP family that
is currently the default installed by `aiida-pseudo install sssp`.
Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

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

Thanks @superstar54 . I fixed a bunch of problems with the CI, so now all tests should pass again.

@sphuber sphuber merged commit 3f14ea2 into master May 8, 2023
11 checks passed
@sphuber sphuber deleted the fix_example branch May 8, 2023 11:18
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.

None yet

3 participants