Closed kbarbary closed 10 years ago
Hi @kbarbary,
Having a low-level and a high-level interface is surely something extremely useful! Also, I like very much the idea of splitting the files in order to keep things organized.
Might you please fix the way you implemented the split? By removing all the text from FITSIO.jl and pasting it into src/cfitsio.jl we lose the ability to quickly navigating through the commit history of the low-level interface before this commit.
What do you think about doing git mv FITSIO.jl src/cfitsio.jl
and then creating a new FITSIO.jl
from scratch? In this way running git log src/cfitsio.jl
all the commits related to the low-level interface that were done before and after this change of yours will be shown together.
Cheers, Maurizio.
Great to hear that you like it @ziotom78.
I actually did the move by doing git mv FITSIO.jl cfitsio.jl
then created a new FITSIO.jl
, but it looks like git wasn't smart enough to keep track of it this way... I should have done a commit after just the git mv
part. I'll try to fix it.
Hmm.... harder than I thought. I went back to master and made new commits to move the file and create a new FITSIO.jl
, getting to the same place as with 365f394, but in two commits instead of one. Then I tried to git cherry-pick
the remaining 13 commits onto this new branch. However, this doesn't work -- git still thinks I'm trying to overwrite cfitsio.jl
with a completely new file.
Any advice?
On 03/06/2014 18:02, Kyle Barbary wrote:
Hmm.... harder than I thought. I went back to master and made new commits to move the file and create a new |FITSIO.jl|, getting to the same place as with 365f394 https://github.com/JuliaAstro/FITSIO.jl/commit/365f394, but in two commits instead of one. Then I tried to |git cherry-pick| the remaining 13 commits onto this new branch. However, this doesn't work -- git still thinks I'm trying to overwrite |cfitsio.jl| with a completely new file.
Any advice?
Very strange! I googled and found this link, does it help you?
Cheers, Maurizio.
Maurizio TOMASI
Dipartimento di Fisica Università degli Studi di Milano Via Celoria, 16 20133 Milano ITALY
Email: maurizio.tomasi@unimi.it Tel.: +39-02-503 17134 Skype: zio_tom78
I redid things so that there is an explicit move commit as you can see in a6b3bef .
However, git seems to still not track the history across the file move. git log src/cfitsio.jl
only goes back to the "rename" commit. Not sure what else can be done.
Thanks a lot for your effort, @kbarbary. I did a few tests and indeed it seems that Git loses track of what happened to that file before the rename. (However, running git log src/FITSIO.jl
should show the old commits.)
Given this state of things, I think it is fine to keep everything as it is and merge your request.
:+1:
@nolta It looks like the readthedocs page is still pointing to nolta/FITSIO. Can you update it so the latest docs get built?
Sure, done.
This is the start of a high-level interface. The idea is that one can either:
FITSFile
objects and functions likefits_*
that operate upon them.FITS
objects and methods that act upon them. The advantage of this interface is that it will have fewer functions to remember, hides the notion of the "current HDU", does more safety checks to protect against segfaults, and provides some introspection tools (e.g., show).Two things to note in this PR:
cfitsio.jl
andhdutypes.jl
(for lack of better names). These areinclude
d inFITSIO.jl
, which is now quite short. That is: most of what wasFITSIO.jl
is now incfitsio.jl
. I found this division into multiple files necessary for my sanity.fitsread
function as it is now fairly easy to do the same thing with the high-level interface and it is more correct (e.g., returns the actual data type instead of alwaysFloat64
).The commit messages should give a bit more detail on what else has changed.
This is somewhat a work-in-progress, but I wanted to get it back into master before i get too far along.
Closes #3.