Difference between revisions of "AIRLab Repository"

From AIRWiki
Jump to: navigation, search
m (Undo revision 16159 by GiulioFontana (talk))
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[https://svn.ws.dei.polimi.it/airlab/ AIRLab] is a repository containing all the software, hardware projects, thesis, and so on, developed in AIRLab.
+
[https://svn.ws.dei.polimi.it/airlab/ https://svn.ws.dei.polimi.it/airlab/] is a repository containing all the software, hardware projects, thesis, and so on, developed in AIRLab. You can get to it via any web browser, but you have to be a '''registered user''' to access it and be able to modify its contents. See [[AIRLab Repository#Becoming a user|below]] to know how you can become a user.
  
 
== Who & What ==
 
== Who & What ==
Line 7: Line 7:
 
* Code (C/C++, Java, Matlab, ...)
 
* Code (C/C++, Java, Matlab, ...)
 
* Hardware projects (such as CAD drawings of mechanical parts, schematics, layouts, ...)
 
* Hardware projects (such as CAD drawings of mechanical parts, schematics, layouts, ...)
* Thesis source (tex, bibliography, pictures, ...)
+
* Thesis source files (tex, bibliography, pictures, ...)
  
The only exception consists in large data, such as big movies, datasets, and so on.
+
The only exception consists in large data, such as large videos, datasets, and so on.
  
== Becoming a member ==
+
== Becoming a user ==
AIRLab is based on [http://subversion.tigris.org/ Subversion]; you can find some help in configuring Subversion in the [[Configuring Subversion]] page. The repository URL is ''<nowiki>https://svn.ws.dei.polimi.it/airlab/</nowiki>''.
+
AIRLab is based on [http://subversion.apache.org/ svn]; you can find some help in configuring Subversion in the [[Configuring Subversion]] page. The repository URL is ''<nowiki>https://svn.ws.dei.polimi.it/airlab/</nowiki>''.
  
 
Students who need to work with AIRLab repository should fill the form at https://acme.ws.dei.polimi.it/request_account.plp with their info and put their supervisor in the "DEI responsible" field.  They should then ask their supervisor to confirm their account (supervisors, here are [[DEI Subversion Administration#Let users create their own accounts|the instructions for you]]).
 
Students who need to work with AIRLab repository should fill the form at https://acme.ws.dei.polimi.it/request_account.plp with their info and put their supervisor in the "DEI responsible" field.  They should then ask their supervisor to confirm their account (supervisors, here are [[DEI Subversion Administration#Let users create their own accounts|the instructions for you]]).
Line 19: Line 19:
 
This is a very brief overview of the directory hierarchy of the repository. The root may contain other directories beside the ones listed. Ignore them, if you don't know what they're about.
 
This is a very brief overview of the directory hierarchy of the repository. The root may contain other directories beside the ones listed. Ignore them, if you don't know what they're about.
  
* '''Thesis''': contains the thesis (text, code, and all the stuff listed above)
+
* '''Thesis''': contains the theses (text, code, and all the stuff listed above). This is the place where students put their work.
** <student id>-<NameSurname> is the directory you must put your stuff in. You must create this directory.
+
** <SurnameName>-<student id> is the directory you must put your stuff in. You must create this directory.
 +
*** README is a '''required''' plain text file that lists the content of the directory, with a brief description.
  
* '''Projects''': contains bigger projects, usually carried on independently from BSc/MSc thesis.
+
* '''Projects''': contains bigger projects, usually carried on independently from BSc/MSc theses. Don't modify its contents unless told otherwise by your Advisor.
  
== Rules ==
+
* '''Courses''': contains material associated to teaching. Its contents must not be altered by students (however, they can read them).
  
The project depends on the collaborative effort of people; these rules are not strict laws enforced by the AirBAT police, but guidelines to make an effective use of the tools. In summary, you can break them, but you have to have a good reason to do that :-).  If you think that some policy could be made better, please tell your advisor or co-advisor.
+
* '''Development''': contains readily available and well-documented software elements. Don't modify its contents unless told otherwise by your Advisor. '''WARNING:''' usage is subject to special rules, described by page [[Repository HOWTO]].
  
'''Please note that this section has been written by Bernardo Dal Seno, but no one has said that any rule is bad yet'''
+
Note: you must adhere to the exact format while naming your personal directory. The format is:
 +
<pre><Surname and name, in CamelCase http://en.wikipedia.org/wiki/CamelCase>-<6 digits student id></pre>
 +
Please avoid middle names and '''spaces'''.
  
Subversion should be used only for source files; so, no executables, object files (.o, .obj), archives (e.g., .jar, .zip) and other binary files.  The reason for the repository is to keep track of versions and share your work with other people; computer-generated files are no good for this.  
+
Example: ''BottazziGiuseppe-123456''
 +
 
 +
To create the new directory, you can use a command like this one
 +
 
 +
<pre>svn mkdir -m "Adding new directory for Bottazzi Giuseppe" https://svn.ws.dei.polimi.it/airlab/Thesis/BottazziGiuseppe-123456</pre>
 +
 
 +
or use one of the GUI clients cited [[AIRLab_Repository#How_to_use_AIRLab|below]].
 +
 
 +
== Rules ==
  
Makefiles or project files are definitely source files, as they contain directions for the compiler.  So please add them to the repository. If you are in doubt about which files are used, try to copy the files on another machine and see which files are needed in order to correctly edit and compile the project. See [[#Project Files|the Project Files section below]] for some known files.
+
Beside what is stated above, please consider that:
 +
* Binaries are built from source (don't commit binaries to the repository, unless it is strictly necessary). Exception: compiled latex code.
 +
* Makefiles (and IDE project files) are part of the source code.
 +
* Building instructions, if needed, must be written in a file called BUILDING.
 +
* External libraries (OpenCV, ecc ecc) are '''NOT''' part of your code. Just list the libraries needed in a file called BUILDING. If the library needs some specific building switches, don't forget to list them in the file.
 +
* Gerber files used for PCB production are different from layout files. Commit them.
 +
* All the required and useful informations must be reported in a file called README.
  
If your project needs some external file or library, don't add it to the repository, but say so in a README and put a link to where to find the library.  The repository remains cleaner, it is clearer what is your contribution, and it is easier to upgrade to a new version of the external library.
+
Additionally, the contents of the Development directory (and all of its subdirectories) are subject to [[Repository HOWTO | '''special (and very strict) rules''']].
  
If you want to share binaries, e.g., the executable of the latest version of your project, the best place is probably your project page on this Wiki.
+
On your personal wiki page please state your directory and list the content of your repository.
  
Versioned and unversioned files can live side-by-side in the local copy on your PC. That means, for example, that you can compile source files in your local copy, just avoid adding whole directories if they contain binary files; Subversion commands are recursive by default, so add individual files instead.
+
== How to use the AIRLab repository ==
Using the local copy as your working space and checking in frequently (e.g., every day) is the most effective way to exploit the power of version control systems.  Don't be afraid to mistakes; everything in the repository history can be retrieved, so irreparable losses are not possible.  Whatever you don't check in, though, can be lost.  Check in frequently! (or should I tell you how some people have lost 1-month worth of work?)
+
  
For the '''bci''' hierarchy, where a '''common''' directory exists, some additional care is needed before committing: you don't want to commit a broken function that you have not yet debugged, as your fellows working on a different project could be hurt (or ''you'' may be hurt, if they revert your changes). You have two options: either you postpone committing until you have finished debugging (but you lose the advantages of the version control system), or you use [http://en.wikipedia.org/wiki/Branching_%28software%29 branching].  For branching, do a copy with the Subversion copy command (''svn cp'' from the command line) from the '''common''' directory to your own, and use the copy until you are finished changing. After the debugging is complete, you do a final commit, and then you can import your changes with the ''merge'' command; don't just overwrite the old copy in '''common''', unless you are sure nobody changed it after the branching.
+
The repository can be used in many different ways with many different tools.
 +
* Command line client ([http://subversion.apache.org/ svn]) (You can find a summary of most commands [[Using Subversion|here]])
 +
* GUI clients ([http://rapidsvn.tigris.org/ RapidSVN], [http://kdesvn.alwins-world.de/wiki kdesvn])
 +
* IDE (eclipse with [http://www.eclipse.org/subversive/ subversive] plugin, for example)
  
====Project Files====
+
For a kickstart guide, you can read [http://svnbook.red-bean.com/ Version Control with Subversion].
Here the project files used by some IDEs are reported.  Please help to make the list longer and more accurate. (The parts in ''italic'' are supposed to be substituted by actual names.)
+
;Eclipse (Java projects)
+
:''project_dir'' / .classpath
+
:''project_dir'' / .project
+
;Borland C++
+
:''project_dir'' / ''project_name''.bdsproj
+
  
 
== Administration ==
 
== Administration ==
Instructions for administration tasks can be found here: [[DEI Subversion Administration]].
+
Instructions for administration tasks (not for students!) can be found here: [[DEI Subversion Administration]].

Latest revision as of 14:12, 5 April 2013

https://svn.ws.dei.polimi.it/airlab/ is a repository containing all the software, hardware projects, thesis, and so on, developed in AIRLab. You can get to it via any web browser, but you have to be a registered user to access it and be able to modify its contents. See below to know how you can become a user.

Who & What

The repository is particularly addressed to students: they must deposit all the material produced for their thesis on the repository. This includes:

  • Code (C/C++, Java, Matlab, ...)
  • Hardware projects (such as CAD drawings of mechanical parts, schematics, layouts, ...)
  • Thesis source files (tex, bibliography, pictures, ...)

The only exception consists in large data, such as large videos, datasets, and so on.

Becoming a user

AIRLab is based on svn; you can find some help in configuring Subversion in the Configuring Subversion page. The repository URL is https://svn.ws.dei.polimi.it/airlab/.

Students who need to work with AIRLab repository should fill the form at https://acme.ws.dei.polimi.it/request_account.plp with their info and put their supervisor in the "DEI responsible" field. They should then ask their supervisor to confirm their account (supervisors, here are the instructions for you).

Structure

This is a very brief overview of the directory hierarchy of the repository. The root may contain other directories beside the ones listed. Ignore them, if you don't know what they're about.

  • Thesis: contains the theses (text, code, and all the stuff listed above). This is the place where students put their work.
    • <SurnameName>-<student id> is the directory you must put your stuff in. You must create this directory.
      • README is a required plain text file that lists the content of the directory, with a brief description.
  • Projects: contains bigger projects, usually carried on independently from BSc/MSc theses. Don't modify its contents unless told otherwise by your Advisor.
  • Courses: contains material associated to teaching. Its contents must not be altered by students (however, they can read them).
  • Development: contains readily available and well-documented software elements. Don't modify its contents unless told otherwise by your Advisor. WARNING: usage is subject to special rules, described by page Repository HOWTO.

Note: you must adhere to the exact format while naming your personal directory. The format is:

<Surname and name, in CamelCase http://en.wikipedia.org/wiki/CamelCase>-<6 digits student id>

Please avoid middle names and spaces.

Example: BottazziGiuseppe-123456

To create the new directory, you can use a command like this one

svn mkdir -m "Adding new directory for Bottazzi Giuseppe" https://svn.ws.dei.polimi.it/airlab/Thesis/BottazziGiuseppe-123456

or use one of the GUI clients cited below.

Rules

Beside what is stated above, please consider that:

  • Binaries are built from source (don't commit binaries to the repository, unless it is strictly necessary). Exception: compiled latex code.
  • Makefiles (and IDE project files) are part of the source code.
  • Building instructions, if needed, must be written in a file called BUILDING.
  • External libraries (OpenCV, ecc ecc) are NOT part of your code. Just list the libraries needed in a file called BUILDING. If the library needs some specific building switches, don't forget to list them in the file.
  • Gerber files used for PCB production are different from layout files. Commit them.
  • All the required and useful informations must be reported in a file called README.

Additionally, the contents of the Development directory (and all of its subdirectories) are subject to special (and very strict) rules.

On your personal wiki page please state your directory and list the content of your repository.

How to use the AIRLab repository

The repository can be used in many different ways with many different tools.

For a kickstart guide, you can read Version Control with Subversion.

Administration

Instructions for administration tasks (not for students!) can be found here: DEI Subversion Administration.