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

Functional version of evcurve workflow #250

Merged
merged 13 commits into from
Apr 24, 2024
Merged

Functional version of evcurve workflow #250

merged 13 commits into from
Apr 24, 2024

Conversation

jan-janssen
Copy link
Member

No description provided.

@jan-janssen jan-janssen added the format_black Launch the pyiron/actions black formatting routine label Apr 24, 2024
@jan-janssen jan-janssen added format_black Launch the pyiron/actions black formatting routine and removed format_black Launch the pyiron/actions black formatting routine labels Apr 24, 2024

def get_strains(
vol_range: Optional[float],
num_points: Optional[int],
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't look optional

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 is either vol_range and num_points or strain_lst.

Copy link
Member

Choose a reason for hiding this comment

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

It categorically is not. The code as written does not allow vol_range and num_points to be optional. It is vol_range and num_points, or vol_range and num_points (both ignored) and strain_list.

>>> from atomistics.workflows.evcurve.helper import get_strains
>>> 
>>> get_strains(strain_lst=[1,2,3])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[6], line 3
      1 from atomistics.workflows.evcurve.helper import get_strains
----> 3 get_strains(strain_lst=[1,2,3])

TypeError: get_strains() missing 2 required positional arguments: 'vol_range' and 'num_points'

You've placed two purely positional arguments with no default and then hinted them as optional.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is now addressed in #252

tests/test_elastic_lammps_functional.py Outdated Show resolved Hide resolved
@jan-janssen jan-janssen merged commit 924acec into main Apr 24, 2024
22 checks passed
@jan-janssen jan-janssen deleted the evcurve_functional branch April 24, 2024 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_black Launch the pyiron/actions black formatting routine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants