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

Misc FileBrowser features #1392

Merged
merged 8 commits into from
Mar 26, 2024
Merged

Misc FileBrowser features #1392

merged 8 commits into from
Mar 26, 2024

Conversation

pmrv
Copy link
Contributor

@pmrv pmrv commented Mar 22, 2024

  • support sub directories
  • support iteration over file content

@jan-janssen I've removed the str sub classing again, because it pollutes the tab completion a bit and didn't seem to be used anywhere anymore, but I don't have too strong feelings.

@pmrv pmrv requested a review from jan-janssen March 22, 2024 17:18
@pmrv pmrv self-assigned this Mar 22, 2024
@pmrv pmrv marked this pull request as draft March 22, 2024 17:27
@pmrv pmrv removed the request for review from jan-janssen March 22, 2024 17:27
@jan-janssen jan-janssen added the format_black reformat the code using the black standard label Mar 25, 2024
@pmrv pmrv marked this pull request as ready for review March 25, 2024 12:47
@@ -100,9 +100,9 @@ def test_job_files(self):
self.assertTrue(file in dir(job.files))
output_file_path = os.path.abspath(os.path.join(__file__, "..", "test_executablecontainer", "job_output_files_hdf5", "job_output_files", "error.out"))
if os.name != "nt":
self.assertEqual(job.files.error_out, output_file_path)
self.assertEqual(str(job.files.error_out), output_file_path)
Copy link
Member

Choose a reason for hiding this comment

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

This makes it very confusing for the user. For example when we take a look at the NFDI example we want to be able to access the path of the files directly: https://github.com/BAMresearch/NFDI4IngScientificWorkflowRequirements/blob/main/exemplary_workflow/pyiron/workflow.py#L34

Copy link
Member

Choose a reason for hiding this comment

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

We can fix this by supporting the File object as input for restart_files and convert it to a string there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

input_file_lst=[gmsh.files.square_msh.path] would be an option. I don't think it would be very confusing, just extra typing. I've tried to look through the places where restart_file_lst/dict are used and we could force a conversion there somewhere, but I'd be afraid I'll miss places. I'll revert the commits that remove it sub class if you don't see an easy path in between as well.

Copy link
Member

Choose a reason for hiding this comment

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

I provided a suggestion in #1397

@jan-janssen
Copy link
Member

@pmrv Should we merge this and then release a pyiron_base=0.7.12 before we start with the to_dict() and from_dict() functions and the changes to the database #1396 for pyiron_base=0.8.0?

@pmrv
Copy link
Contributor Author

pmrv commented Mar 26, 2024

Can do once were back from lunch.

@pmrv
Copy link
Contributor Author

pmrv commented Mar 26, 2024

======================================================================
FAIL: test_with_executor_wait (flex.test_pythonfunctioncontainer.TestPythonFunctionContainer.test_with_executor_wait)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/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

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

@pmrv pmrv merged commit aab13a9 into main Mar 26, 2024
25 checks passed
@pmrv pmrv deleted the fb branch March 26, 2024 12:34
@jan-janssen
Copy link
Member

@pmrv Is there any other pull request you would like to merge in 0.7.12 otherwise I am going to release it now and then start merging the to_dict() pull requests as well as the database changes.

@pmrv
Copy link
Contributor Author

pmrv commented Mar 26, 2024

@pmrv Is there any other pull request you would like to merge in 0.7.12 otherwise I am going to release it now and then start merging the to_dict() pull requests as well as the database changes.

No, all fine with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request format_black reformat the code using the black standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants