Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Introduction

PSDM uses Subversion (SVN) for the code management and versioning task. Currently, official LCLS code such as PSANA, PYANA, etc. is located in the Software Repository which is enabled to LCLS software development team only. For those users who would like to develop their own code, contribute to the LCLS project, and share their code with other user groups, there is a users' software repository,

Code Block
https://pswww.slac.stanford.edu/svn/userrepo   (this IS NOT a web reference, it is to be used with various "svn" commands)

In the psana environment, this address is reference!), assigned to environment variable SIT_SVN_USER.

Access to users' software repository

To see content of users' or PSDM software repository use command

svn ls -v $SIT_SVN_USER

or

svn ls -v $SIT_SVN

respectively. For example, for one of the packages one can get

No Format

> svn ls -v $SIT_SVN_USER 
      5 ofte@SLA              Jun 07  2012 ./
      5 ofte@SLA              Jun 07  2012 pyana_modules/
> svn ls -v $SIT_SVN_USER/pyana_modules/
      5 ofte@SLA              Jun 07  2012 ./
      4 ofte@SLA              Jun 07  2012 branches/
      4 ofte@SLA              Jun 07  2012 tags/
      5 ofte@SLA              Jun 07  2012 trunk/
> svn ls -v $SIT_SVN_USER/pyana_modules/trunk/
      5 ofte@SLA              Jun 07  2012 ./
      5 ofte@SLA         1188 Jun 07  2012 SConscript
      5 ofte@SLA              Jun 07  2012 doc/
      5 ofte@SLA              Jun 07  2012 src/
> svn ls -v $SIT_SVN_USER/pyana_modules/trunk/src
      5 ofte@SLA              Jun 07  2012 ./
      5 ofte@SLA          371 Jun 07  2012 img_peakfinder.cfg
      5 ofte@SLA        11373 Jun 07  2012 img_peakfinder.py

Read-only access to both repositories is provided through the web interface:

Command line interface

SVN-based command-line interface is identical for both repositories. The only difference is that the key "-u" should be added to the addpkg and psvn newpkg commands for users' repository. For example,

addpkg <package-name> -u

psvn -u newpkg <my-new-package-name>

which are explained in Typical development tasks.

Inclusion of the package in official release

Publicly available LCLS offline releases can be seen in the directory associated with $SIT_RELDIR environment variable. Inclusion in release means that the package will be compiled nightly and its modules and applications will be available by default to anyone who want to use them, with appropriate version tag. Packages from both repositories can be included in LCLS offline release system by a personal request to the release coordinator (currently Andy).

References

Up to a minor difference in two commands

Note

commands addpkg and psvn newpkg needs in key "-u"

...

Creating Your Own User Repository

For most of these commands to work (except read-access to the readonly repo) you need a SLAC "kerberos ticket".  You can see your tickets with the command "klist". You can get a ticket with the "kinit" command like this:

Code Block
kinit mySlacAccountName@SLAC.STANFORD.EDU  (the CAPS are required for SLAC.STANFORD.EDU!)

Create your local release directory and set environment:

Code Block
cd <one-of-your-directories>

newrel ana-current <my-local-release-directory-name>
cd <my-local-release-directory-name>
sit_setup

Create package sub-directory with a few files:

Code Block
newpkg <my-new-package-name>

Use the following command to create your own new package in SVN:

Code Block
psvn -u newpkg <my-new-package-name>

The package name should not include the "<>" above.  Once you have created your package you can check it out of the repository with:

Code Block
 svn co https://pswww.slac.stanford.edu/svn/userrepo/<my-new-package-name>/trunk <my-new-package-name>

If you don't have a kerberos ticket, you can get readonly access to the repository (anywhere in the world!) like this:

Code Block
svn co https://pswww.slac.stanford.edu/svn-readonly/userrepo/<my-new-package-name>/trunk <my-new-package-name>

If you are working in a psana "test release" instead of the above, you can checkout your code with:

Code Block
addpkg -u <my-new-package-name>
You can check modified code back into the repository by switching to your package directory and using the command:

 

Code Block
svn commit -m "my message describing changes"

 

Difference Between userrepo and psdmrepo

Within local release directory the difference in creation of the package in userrepo is in additional "-u" option in two commands

Code Block
psvn -u newpkg <my-new-package-name>
addpkg -u <my-new-package-name>

All other commands are the same for userrepo and psdmrepo.

 

Repository Browsing

Repositories content can be viewed using URLs as follows

userrepo

 

psdmrepo

 

pcds

 

pdsrepo