GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
224 stars 105 forks source link

ENH add initialize method for input loader #1163

Closed beckermr closed 2 years ago

beckermr commented 2 years ago

This PR adds the initialize method for inputs.

todo:

closes #1162

beckermr commented 2 years ago

See https://github.com/LSSTDESC/seacliff/pull/4 for an example use case.

beckermr commented 2 years ago

@rmjarvis This one is ready for review!

beckermr commented 2 years ago

ok @rmjarvis I think I got everything. I added some extra notes to the doc string to help future Matt with a gotcha.

rmjarvis commented 2 years ago

Code looks fine. Just one thing I didn't notice the first time. Could you please rebase this onto main, rather than releases/2.3 and redirect the target of the merge? This is a feature addition, so it shouldn't really go on the 2.3 series.

beckermr commented 2 years ago

Will rebase but need to brush up on my git fu unless you have a quick oneliner for me. :)

rmjarvis commented 2 years ago

Instructions here: https://medium.com/@topspinj/how-to-git-rebase-into-a-forked-repo-c9f05e821c8a

rmjarvis commented 2 years ago

(I always forget how to do the upstream thing for forked repos. It's easier if you started from a branch in GalSim-developers.)

beckermr commented 2 years ago

This worked for me: https://medium.com/@gabriellamedas/git-rebase-and-git-rebase-onto-a6a3f83f9cce

TL;DR

git rebase --onto main releases/2.3 init-input

Moved all commits on init-input ahead of releases/2.3 to main.

rmjarvis commented 2 years ago

Oh, right. That rebases onto your forked main, which is fine if that's current with the upstream main.

beckermr commented 2 years ago

Awesome. FYI I cannot merge this PR so you'll have to do it once the tests pass.

beckermr commented 2 years ago

This is ready to merge!