We're Hiring!

OMERO and Git

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

OMERO and Git

Postby icaoberg » Thu Jul 21, 2011 12:45 pm

I cloned omero using git
Code: Select all
git clone git://git.openmicroscopy.org/ome.git


There is single branch and multiple tags that reference different versions, including 4.2.1 which is the one I want to edit.

The two tags are
Code: Select all
v.4.2.1-insight
v.4.2.1-omero


How do I make sure that whatever commit I do only affects v.4.2.1-omero? Should I create a second branch and edit it?

The problem is that if I create a second branch and remove the top nodes until I reach the desired commit/tag, if I create a patch between the two branches the patch will add everything until 4.3.1.
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: OMERO and Git

Postby jmoore » Thu Jul 21, 2011 1:15 pm

After you clone, you will have one branch named "master". From that point, you want to create a new branch based on our v.4.2.1-omero tag:
Code: Select all
git checkout -b dev_4_2_1_pslid v.4.2.1-omero

If you run "git branch" you'll see "dev_4_2_1_pslid" now. Any commits you make like:
Code: Select all
git commit -m "Falcon DB" lib/falcon

will be on the branch. You can see how far you've "diverged" from v.4.2.1-omero via:
Code: Select all
git show-branch v.4.2.1-omero dev_4_2_1_pslid

To send us your patches, use:
Code: Select all
git format-patch v.4.2.1-omero..dev_4_2_1_pslid

with whatever options you'd like.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: OMERO and Git

Postby icaoberg » Mon Jul 25, 2011 5:56 pm

We originally downloaded and installed omero.server we didn't use the git branch. Now I need to commit my changes within the branch.

We added files to
Code: Select all
$OMERO_HOME/lib/python


where should I add these files in the git branch?
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: OMERO and Git

Postby jmoore » Mon Jul 25, 2011 6:17 pm

You can initially put them somewhere under OmeroPy/src, but we may want to eventually create a separate "searcher" component.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: OMERO and Git

Postby icaoberg » Mon Jul 25, 2011 8:57 pm

We also modified the file extensions.jar which resides in
Code: Select all
$OMERO_HOME/lib/server


where should this file be located within the branch?
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: OMERO and Git

Postby jmoore » Tue Jul 26, 2011 7:10 am

It's not a jar in the source code, but is the one location where external classes can be put by third parties. However, in your case, we want to see the code, so it's probably best to add the files elsewhere. If it's all search based, you might want to add a package under server/src, but again, eventually, we'll want to create a "searcher" component which can contain both the Java and the Python source.

Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: OMERO and Git

Postby icaoberg » Tue Jul 26, 2011 6:53 pm

Code: Select all
/usr0/local/omepslid/ome/components/server/src
bash-3.2$ ls
ome
bash-3.2$ cd ome
bash-3.2$ ls
api  formats  logic  security  services  tools


where within this folder we add the the source?

we were basically trying to do
Code: Select all
cp -r $SOURCE/server/extensions.jar $DESTINATION/server/extensions.jar
git add $DESTINATION/server/extensions.jar
git commit -m 'Updated extensions.jar' $DESTINATION/server/extensions.jar


where $SOURCE was our omero.server and $DESTINATION was a clean download of omero,server. The file structure within git is different, so we need to ask about the destination of most of our code.
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: OMERO and Git

Postby jmoore » Wed Jul 27, 2011 6:36 am

Hi Ivan,

Have you seen OmeroBuild yet? Most importantly is the layout of source code like:
Code: Select all
  \components
    |
    |
    |--<component-name> ................... Each component has this same basic structure.
    |    |-- build.xml                      Main scripts
    |    |-- ivy.xml                        Jar dependencies
    |    |-- src                            Source code
    |    |-- resources                      Other files of interest
    |    |-- test                           Test source code and test resources
    |    \-- target                         Output of build (deleted on clean)



My goal would be to have all your source code (the .java files, not the .jars) either:
  • in the source and resources directories of an existing component. "server" is probably ok, but if you run into any issues you can put it in "blitz".
  • in a new component like "tools/OmeroSearcher"

In the long run, I think we will want all of this in its own component, but in order to get things in more quickly, I can understand if you'd prefer to wait on that.

Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: OMERO and Git

Postby bhcho » Thu Jul 28, 2011 6:04 pm

Hi Josh,

we also have some python codes and a text file, which are called from both the bridge and OMERO.web page.
Thus we were assumiing those files are located in a specific folder (e.g., OMERO_HOME/lib/python/ ).

In this case, where do we need to copy those files?

best,
BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: OMERO and Git

Postby jmoore » Thu Jul 28, 2011 6:45 pm

Hi BK,

as above, the python files should go into the OmeroPy/src directory. I'm not sure what your text file contains, but it will most likely need to go into one of the resources/ directories, like server/resources. What's the file ending?

~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Next

Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest