atomec-project / atoMEC

Python-based average-atom code for simulations of high energy density phenomena such as in warm dense matter.
https://atomec-project.github.io/atoMEC/
BSD 3-Clause "New" or "Revised" License
17 stars 12 forks source link

Make postprocess folder with localization module #130

Closed timcallow closed 2 years ago

timcallow commented 2 years ago

So far, the localization module's main functionality is to compute the electron localization function (ELF).

This PR also creates a new postprocess folder and deletes the postprocess.py file in the main directory.

timcallow commented 2 years ago

@DanielKotik can you please advise on how to handle the conflicts? It looks like I could do it via the command line, but (a) first I need your review ;) and (b) I guess we wouldn't know if the checks would fail (at least I can check the python style checks locally)

DanielKotik commented 2 years ago

@DanielKotik can you please advise on how to handle the conflicts? It looks like I could do it via the command line, but (a) first I need your review ;) and (b) I guess we wouldn't know if the checks would fail (at least I can check the python style checks locally)

The problem is that in a single commit https://github.com/atomec-project/atoMEC/pull/130/commits/cca7d5d6e83ffaa0dbba272d7944a5b11beffafa you not only changed code but also simply deleted file atoMEC/postprocess.py. This is problematic. If you want to delete or rename files in the repository you have to make git aware of this like so:

git rm postprocess.py  # instead of just deleting file `postprocess.py` via a GUI or via CLI, `rm postprocess.py`
git mv foo bar         # instead of just renaming file `foo` via a GUI or via CLI, `mv foo bar`

After that, this change (together with other changes) can be commited in the usual way.

DanielKotik commented 2 years ago

@timcallow In your local fork of atoMEC, do the following:

cd atoMEC
git checkout postprocess_testing
git rebase --strategy-option=theirs develop  # conflicts will show up
git rm postprocess.py
GIT_EDITOR=true git rebase --continue
git push --force

This will resolve the issue.

timcallow commented 2 years ago

Please have a look at my comments.

Thanks for these - I often forget to check the docs, need to work on that... Just out of curiosity is there any way to automatically check the docs for errors? I guess maybe not since when I run make html it doesn't raise any kind of error message for the mistakes I made above.

For me everything looks ok now

DanielKotik commented 2 years ago

Please have a look at my comments.

Thanks for these - I often forget to check the docs, need to work on that... Just out of curiosity is there any way to automatically check the docs for errors? I guess maybe not since when I run make html it doesn't raise any kind of error message for the mistakes I made above.

For me everything looks ok now

Well, I can check if Sphinx filed some LaTeX warnings which could possibly be converted into errors so that the pipeline falls. But, missing backward slashes and other things that are syntactically no errors, can never be caught.

timcallow commented 2 years ago

Please have a look at my comments.

Thanks for these - I often forget to check the docs, need to work on that... Just out of curiosity is there any way to automatically check the docs for errors? I guess maybe not since when I run make html it doesn't raise any kind of error message for the mistakes I made above. For me everything looks ok now

Well, I can check if Sphinx filed some LaTeX warnings which could possibly be converted into errors so that the pipeline falls. But, missing backward slashes and other things that are syntactically no errors, can never be caught.

Well, in that case I guess there's not much point since it will always need a manual check regardless