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

Deprecate workdir path getter in favour of job.files #1319

Merged
merged 17 commits into from
Feb 14, 2024
Merged

Conversation

pmrv
Copy link
Contributor

@pmrv pmrv commented Feb 13, 2024

See corresponding PR in base.

@pmrv pmrv requested a review from jan-janssen February 13, 2024 16:42
@coveralls
Copy link

coveralls commented Feb 13, 2024

Pull Request Test Coverage Report for Build 7901694464

Details

  • 0 of 11 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 93.148%

Totals Coverage Status
Change from base Build 7898937283: -0.002%
Covered Lines: 14151
Relevant Lines: 15192

💛 - Coveralls

@jan-janssen
Copy link
Member

======================================================================
ERROR: test_run_complete (vasp.test_vasp.TestVasp)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pyiron_atomistics/pyiron_atomistics/tests/vasp/test_vasp.py", line 405, in test_run_complete
    self.assertRaises(FileNotFoundError, job.restart_from_wave_functions, "wave_restart")
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/unittest/case.py", line 739, in assertRaises
    return context.handle('assertRaises', args, kwargs)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/unittest/case.py", line 201, in handle
    callable_obj(*args, **kwargs)
  File "/home/runner/work/pyiron_atomistics/pyiron_atomistics/pyiron_atomistics/vasp/base.py", line 1739, in restart_from_wave_functions
    new_ham.restart_file_list.append(self.files["WAVECAR"])
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/site-packages/pyiron_base/jobs/job/extension/files.py", line 98, in __getitem__
    raise KeyError(item)
KeyError: 'WAVECAR'

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

@jan-janssen
Copy link
Member

======================================================================
FAIL: test_run_complete (vasp.test_vasp.TestVasp.test_run_complete)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\pyiron_atomistics\pyiron_atomistics\tests\vasp\test_vasp.py", line 367, in test_run_complete
    self.assertTrue(
AssertionError: False is not true

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

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.

I like the dot-notation more than the edge brackets, but that is just because it is a little shorter.

pyiron_atomistics/lammps/base.py Outdated Show resolved Hide resolved
pyiron_atomistics/vasp/base.py Outdated Show resolved Hide resolved
pyiron_atomistics/vasp/base.py Outdated Show resolved Hide resolved
pyiron_atomistics/vasp/base.py Outdated Show resolved Hide resolved
Comment on lines 1633 to 1634
if "CHGCAR" not in self.files.list():
raise FileNotFoundError("The CHGCAR has to be available in the working directory: " + self.working_directory)
Copy link
Member

Choose a reason for hiding this comment

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

While these separate checks are a bit annoying, if we do not do this it raises either a KeyError or an AttributeError both is not exactly what we want. We could think about changing this in pyiron_base.

Copy link
Member

Choose a reason for hiding this comment

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

I implemented a suggestion in #1322 but this requires another pyiron_base release.

@jan-janssen jan-janssen added the format_black reformat the code using the black standard label Feb 14, 2024
@jan-janssen
Copy link
Member

Waiting for conda-forge/pyiron_base-feedstock#197

@jan-janssen jan-janssen reopened this Feb 14, 2024
@jan-janssen
Copy link
Member

@pmrv As the tests are passing now, I guess this is ready to be merged.

@jan-janssen jan-janssen merged commit b1b7165 into main Feb 14, 2024
31 of 45 checks passed
@jan-janssen jan-janssen deleted the depworkdir branch February 14, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_black reformat the code using the black standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants