JuliaAstro / FITSIO.jl

Flexible Image Transport System (FITS) file support for Julia
http://juliaastro.org/FITSIO.jl/
MIT License
55 stars 29 forks source link

High-level interface #10

Closed kbarbary closed 10 years ago

kbarbary commented 10 years ago

This is the start of a high-level interface. The idea is that one can either:

Two things to note in this PR:

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.

ziotom78 commented 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.

kbarbary commented 10 years ago

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.

kbarbary commented 10 years ago

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?

ziotom78 commented 10 years ago

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?

http://stackoverflow.com/questions/433111/how-to-make-git-mark-a-deleted-and-a-new-file-as-a-file-move

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

kbarbary commented 10 years ago

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.

ziotom78 commented 10 years ago

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.

kbarbary commented 10 years ago

:+1:

@nolta It looks like the readthedocs page is still pointing to nolta/FITSIO. Can you update it so the latest docs get built?

nolta commented 10 years ago

Sure, done.