MesserLab / SLiM

SLiM is a genetically explicit forward simulation software package for population genetics and evolutionary biology. It is highly flexible, with a built-in scripting language, and has a cross-platform graphical modeling environment called SLiMgui.
https://messerlab.org/slim/
GNU General Public License v3.0
160 stars 30 forks source link

tests for pop name retention #459

Closed petrelharp closed 1 month ago

petrelharp commented 1 month ago

As requested in #447. Currently this isn't very creative about what's tested; if you think of other weird scenarios we might add those.

bhaller commented 1 month ago

Awesome. I see that right now this is failing, as expected. I'll fix the problem over in #447. At that point, even if I push my (untested) fixes to the main branch, this PR is still based at the point before the fix, so it will remain red. So... then I ask you to rebase this PR, and after rebasing it will go green? Maybe I am over-thinking this, and should just optimistically merge this now and let the CI break, and then do my fix and see the CI go back to green?

petrelharp commented 1 month ago

I was imagining you'd push your changes to this branch? To do that:

git remote add peter git@github.com:petrelharp/slim
git fetch peter
git checkout -b test_pop_names peter/test_pop_names
# <do edits; commit changes>
git push --set-upstream peter

(and when you're all done go back with git checkout master)

bhaller commented 1 month ago

I was imagining you'd push your changes to this branch?...

Oh, interesting! I never knew I could push changes to someone else's PR; I mean, you're the owner of this PR, no? I guess I have permission to do that because the PR is based on a branch (master branch of the SLiM repo) that I have permissions for? Huh. Learn a new thing about git every day. :->

petrelharp commented 1 month ago

Yep - I think whether or not you can push to my fork is a configurable option, but it's on by default.

petrelharp commented 1 month ago

Otherwise, you could your own branch that's a copy of mine and then work on top of it:

git remote add peter git@github.com:petrelharp/slim
git fetch peter
git checkout -b my_pop_names peter/test_pop_names
# <do edits; commit changes>
git push --set-upstream origin
# <go open a new PR with your branch, called my_pop_names>
bhaller commented 1 month ago

Yep - I think whether or not you can push to my fork is a configurable option, but it's on by default.

Well, turns out it doesn't work at present:

bhaller@glass SLiM % git fetch peter                                    
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Never mind, I'll just let the tests go red for a bit, and merge this PR now.

petrelharp commented 1 month ago

Hm - I see you couldn't push to it because this box wasn't checked: Screenshot from 2024-07-21 07-48-47 ... I thought it would be checked by default; I guess not here?

bhaller commented 1 month ago

Hm - I see you couldn't push to it because this box wasn't checked: Screenshot from 2024-07-21 07-48-47 ... I thought it would be checked by default; I guess not here?

Huh. Where does that checkbox live? Good to know for future reference. I don't recall ever seeing it.