theochem / horton

HORTON: Helpful Open-source Research TOol for N-fermion systems
http://theochem.github.io/horton/
GNU General Public License v3.0
92 stars 40 forks source link

Modified naints #208

Closed crisely09 closed 7 years ago

crisely09 commented 7 years ago

I don't know if this is useful for someone else but... I added the same type of model potentials for the nuclear-electron attraction integrals, it follows the same principle and structure of the repulsion integrals.

tovrstra commented 7 years ago

This is certainly useful! Thank you for this nice contribution. There are some errors in Travis-CI. Can you fix these? Errors related to whitespace, tabs and author name/e-mail can only be fixed by rewriting commits, followed by a force-push.

crisely09 commented 7 years ago

I made the changes and change my name and email, is it enough to do (after adding the files): git commit --amend git push origin modified_naints --force ??

tovrstra commented 7 years ago

It seems that the tests were not restarted, so your push somehow did not come through. Also, git commit --amend will only fix things in the last commit, not in both.

tovrstra commented 7 years ago

These are the steps to fix things:

1) To avoid these problems in future, follow these instructions: http://theochem.github.io/horton/2.1.0b1/tech_dev_git.html#git-configuration

2) Remove whitespace from all commits in your branch, by running the following two lines in the root of the source tree. (This is a little dangerous, so no typos)

ANCESTOR_COMMIT=$(git merge-base master HEAD)
git filter-branch --tree-filter ./cleancode.sh -- ${ANCESTOR_COMMIT}..HEAD

3) Reset author and committer name and e-mail address of every commit. For example, follow the instructions here: https://www.git-tower.com/learn/git/faq/change-author-name-email. I'd recommend using the "interactive rebase method".

4) Force push your commits:

git push origin modified_naints --force

(Make sure origin is the right repository, you can check this with git remote show origin.)

tovrstra commented 7 years ago

Sorry, still failing for the same reaseon (less errors though).

crisely09 commented 7 years ago

It's weird, I used the pre-commit, and cleancode.py scripts. I also changed the author's name and merged the commits.

crisely09 commented 7 years ago

The author is changed, here the first line of the log: commit 39e9b790384674d99e0e32a201f9e1e0a99162c0 Author: Cristina E. González-Espinoza crisbeth46@gmail.com Date: Mon Feb 27 11:25:16 2017 -0500

last cleanup

commit 6e64ac1547f64e642f83e734adc70ed2a8690921 Author: Cristina E. González-Espinoza crisbeth46@gmail.com Date: Tue Feb 21 13:39:31 2017 -0500

Model Nuclear-electron attraction implemented and fully tested

Added the last piece of the gaussian potential attraction integrals

Cleanup
tovrstra commented 7 years ago

Weird. I've just restart the tests. We'll see if that helps.

tovrstra commented 7 years ago

Restarting the tests does not help because the merge commit is still under the name "Cristina Gonzalez crisbeth46@gmail.com". I guess this is based on the configuration of your github account. Can you check?

tovrstra commented 7 years ago

P.S. If you want to see how github.com generates merge commits on your behalf, you can see these commits as follows:

1) Add the line fetch = +refs/pull/*/merge:refs/remotes/origin/pr/* to the section in .git/config that also contains the following line:

   url = git://github.com/theochem/horton.git

Usually, this is the [remote "origin"] section.

2) Get all these "refs":

   git fetch origin

(You may have to replace origin by the name of the remote repo.)

3) Take a look at the merge made by github.com

   gitk origin/pr/208

You'll see that the merge commit is not made with the same settings. I believe this can be fixed in your github.com account.

crisely09 commented 7 years ago

Hmmm, yes, that is the name I had, I just changed it, should it work now?

tovrstra commented 7 years ago

Nope. Let's try to recreate the PR. I'll close this one. Can you create it again?