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

Make DirectoryObject recognize various init variables #216

Closed
wants to merge 1 commit into from

Conversation

samwaseda
Copy link
Member

@samwaseda samwaseda commented Feb 20, 2024

I think it's straightforward enough, but this PR is to make DirectoryObject recognise str, Path and DirectoryObject for the directory instantiation.

I guess this is the first one to be merged. Sorry for going back and forth all the time!

Copy link

Binder 👈 Launch a binder notebook on branch pyiron/pyiron_workflow/file_directory_of_directory_object

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.03% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (7fcae5f) 3065 2659 86.75%
Head commit (6c1c6f0) 3071 (+6) 2665 (+6) 86.78% (+0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#216) 8 8 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7970400900

Details

  • 0 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 91.207%

Files with Coverage Reduction New Missed Lines %
snippets/files.py 4 93.59%
Totals Coverage Status
Change from base Build 7939797536: 0.02%
Covered Lines: 5705
Relevant Lines: 6255

💛 - Coveralls

@samwaseda
Copy link
Member Author

@liamhuber I made this project to make a better overview. Hopefully it helps a bit.

Copy link
Member

@liamhuber liamhuber left a comment

Choose a reason for hiding this comment

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

Missing a test case, but otherwise lgtm

@@ -10,6 +10,12 @@ def setUp(cls):
def tearDown(cls):
cls.directory.delete()

def test_directory_instantiation(self):
Copy link
Member

Choose a reason for hiding this comment

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

Missing the case of instantiation by string

@samwaseda
Copy link
Member Author

Since the distinction won't be needed if DirectoryObject is derived from Path, I close this PR.

@samwaseda samwaseda closed this Feb 21, 2024
@liamhuber liamhuber deleted the file_directory_of_directory_object branch September 7, 2024 19:27
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.

3 participants