-
Notifications
You must be signed in to change notification settings - Fork 19
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
Implement PpafmParameters
class based on pydantic.BaseModel
#275
Conversation
@yakutovicha - after the implementation - the note on the |
@NikoOinonen, I guess I can't avoid modifying |
@yakutovicha Sure, go ahead if it is necessary. Once you are done, I will take a look and maybe make a follow up PR if something should be changed. |
7af71d7
to
490595a
Compare
490595a
to
2e55280
Compare
0c523bf
to
a7ad91d
Compare
I believe this is done. Since the change is quite intrusive, I would like several people to take a look at this PR. Please try to break it and share an example of a simulation that was working before and doesn't work now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test properly yet, but I looked through the changes. I did not see anything wrong, but I left a few comments on things that maybe could be changed.
Also, implement `from_file` class method.
04ed3ca
to
1f1e6f8
Compare
ppafm/ppafm/cli/plot_results.py Line 120 in 1f1e6f8
Seems that passing the parameters by i_zs, r_s, _ = common.parseAtoms(atoms, elem_dict, autogeom=False, PBC=parameters.PBC, parameters=parameters) (adding the last argument parameters=parameters ) would help.
|
6bfe128
to
e847f99
Compare
e847f99
to
100c68f
Compare
Thanks, done in 2242312 |
ppafm/common.py
Outdated
@@ -67,7 +67,6 @@ class PpafmParameters(pydantic.BaseModel): | |||
colorscale_kpfm: str = "seismic" | |||
ddisp: float = 0.05 | |||
aMorse: float = -1.6 | |||
tip_base: typing.List = ["None", 0.00] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to do it, cause Toml was getting crazy trying to parse an inhomogeneous array.
At the same time, the parameter is not used anywhere (checked with get grep tip_base
) and was supposed to be removed.
I did all I was planning to do, so from my side the PR is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me.
The API docs were blank because the new dependencies from #275 were missing in the ReadTheDocs build. The badge on the front page was not showing the failure. This is because the failed imports are treated as warnings instead of errors. So I also added fail_on_warning: true to the config and fixed all of the remaining warnings so that there is at least some indication that the build is failing if this happens again in the future.
This PR addresses an issue likely introduced in #275. To prevent regressions, a new example was added to the test suite to ensure this behaviour is now tested. During testing, additional issues were identified: * One issue is handling input arguments, which is fixed in this PR. * Another issue is reported separately in #321.
fixes #232
PpafmParameters
dataclass.