Developers‎ > ‎

Developers Blog - LANDIS-II

GitHub Basics w/ more details about downloading code

posted Jul 23, 2015, 12:56 PM by Melissa Lucash   [ updated Jul 23, 2015, 1:24 PM ]

Like Lesley, I used this document as a guide for installing TortoiseGit. Note in the pre-requisites that you should install Git for Windows before installing TortoiseGit.  I did NOT need to download the Windows Installer 4.5.

Then I used these directions to generate and save the SSH keys needed to commit code without using a password every time.  The directions worked perfectly, except for Step 3.  Right before #2 in Step 3 (Add key), I had to insert an additional command from this website:
eval $(ssh-agent)

To CLONE a local copy of a repository (i.e. download a copy of the code to your computer), you will need the repository url. This can be found online on the right-hand side of a repository's web page. Keep in mind that currently all the succession extensions are grouped together so the url to download the code is here.  Right now, you have to download the code for ALL the succession extensions to be able to modify one of them.
Like with Torroise SVN, you make a folder on your computer, then right click on it to pull up a drop-down menu.  Click on Git Clone, which will pull up a menu that will prompt you for the GitHub repository URL.
Hit OK and it should start downloading the code.

To commit your changes to the GitHub repository, click on the folder and click on Git Commit... Master.  When that's finished, click on Git Synch and click on Push to "push" your revised code back to GitHub

Remote branches with TortoiseGit

posted Jul 22, 2015, 10:51 AM by Lesley Bross

Excellent post for those coming from the SVN world.

Repository Rules from the Technical Advisory Committee

posted Jul 20, 2015, 3:49 PM by Robert Scheller   [ updated Aug 25, 2015, 8:21 AM ]

Now that we have transitioned to GitHub, we are adding guidelines for the use of the various repositories under the The LANDIS-II Foundation GitHub page.  All people with commit access to any of these code repositories  (currently on GitHub) are expected to follow these rules or risk having their permissions revoked by the Technical Advisor Committee (Robert Scheller, Brian Sturtevant, Jonathan Thompson)

Contributor Guidelines

The Technical Advisor Committee (TAC), as established by The LANDIS-II Foundation, has instituted the following rules as of July 2015. 

1. For every extension (disturbance, output, and succession), there is a single party (an individual or a team of people like a lab or research group) who is responsible for its maintenance (including source code, installers, and documentation). This party is listed as the Contact (or 'Maintainer') on the extension web site.

2. Any proposed changes to an extension must be communicated to the Contact.

3. Any actual changes to the 'trunk' of the extension (including source code, installers, and documentation) must receive written prior approval by the Contact. Note: All committers can create code branches without approval.

4. The LANDIS-II core, and its associated libraries, documentation, and installers are maintained together; they are referred to collectively as the ‘Core Framework’. For the purpose of these guidelines, the TAC is the Maintainer of the Core Framework. Any changes to the Core Framework’s trunk requires the consent of the TAC. As with extensions, all committers can create code branches without approval.

5. For libraries that are not used by the Core Framework (‘extension libraries’, e.g., the Metadata library), their Maintainers are listed in the GitHub wiki. If a Maintainer is not listed, the TAC is the Maintainer. Any actual changes to the trunk of the library (including source code, installers, and documentation) must receive written prior approval by the Maintainer. The Maintainer is responsible for communicating any proposed changes to all developers who use the library.

6.  We encourage developers to release old (tagged) versions of extensions and current versions of libraries on GitHub.  However, current versions of extensions are only to be released via the official LANDIS-II web site.

TortoiseGit Basics

posted Jul 14, 2015, 10:53 AM by Lesley Bross   [ updated Jul 14, 2015, 12:37 PM ]

The LANDIS-II repositories are moving to GitHub (thanks Marc!) because Google is shutting down their current location. I was using TortoiseSVN with google code so am learning TortoiseGit. I have been using GitHub's Windows client for another project and it has worked OK but seems to lack some of the more complex functions. So far, however, it appears that the two clients can be installed side-by-side with no consequences.

I used this document as a guide for installing TortoiseGit. Note in the pre-requisites that you should install Git for Windows before installing TortoiseGit.

I used this document as a introductory guide for using TortoiseGit. Note that after I followed the instructions in the aforementioned document, all of the installation steps had been completed. You do need to create public and private SSH keys for GitHub. You can save the public key to your user account on the GitHub web page. Save the private key to your local computer. When you clone your first repository, check the "Load Putty Key" box to supply the path to your private key for TortoiseSVN.

To CLONE a local copy of a repository, you will need the repository url. This can be found online on the right-hand side of a repository's web page. This document provides additional information about repository urls.

Saving your changes in TortoiseGit is a 2-step process. First you COMMIT your changes to your local copy. Second, you can SYNC your changes with the remote repository in GitHub. GitHub will ask you for your user name and password every time you do a sync. You can cache this information in TortoiseGit for each repository using the procedures in this document.

How to debug the core

posted Mar 30, 2015, 3:49 PM by Lesley Bross   [ updated Mar 31, 2015, 10:17 AM ]

I am trying to debug a question with Landis Core. These are the steps I had to take to get the core to run in the debugger:
1. Copy the Landis.Console-6.1.exe.config file to the build directory
2. Set the Console project as the debug project
3. Copy gdal_csharp.dll to the build directory to avoid the gdal error
4. Add the following lines to App.cs to avoid the gdal error
string path = Environment.GetEnvironmentVariable("PATH");
string newPath = "C:\\Program Files\\LANDIS-II\\GDAL\\1.9;" + path;
Environment.SetEnvironmentVariable("PATH", newPath);
5. Copy extensions.xml and installed extensions to the build directory

Updating the version number in extension documentation

posted Jan 28, 2015, 10:12 AM by Lesley Bross

LANDIS-II documentation maintains the version number in a custom Word field. The process of updating this field is not straightforward for the uninitiated and I keep forgetting how to do it. These instructions are for Word 2010

  1. Find the name of the field by right-clicking on the field and choosing 'Toggle field codes'
  2. Select the 'File' tab 
  3. Click on the 'Properties' drop down on the right-hand side and select 'Advanced Properties' 
  4. Click on the 'Custom' tab to update values for custom properties, including the field name you found in step 1

Harvest library release process - executive summary

posted Jan 16, 2015, 2:27 PM by Lesley Bross   [ updated Jul 11, 2016, 3:29 PM by Robert Scheller ]

This post summarizes a conference call with Jimm Domingo to transfer knowledge of the new Landis-II library release process:
  • The wiki contains a list of the current extension libraries.
  • The harvest libraries are the first to use the new process: Site Harvest, Biomass Harvest, and Harvest Management. Harvest Management and Biomass Harvest both depend on Site Harvest.
  • The 3 harvest libraries will be released to v1.0 within the next couple of weeks. This needs to be done in the next 2 weeks as Brian will be unavailable after that for about six weeks.
  • The library release process is on the wiki. 
  • The new process uses the NuGet package manager to manage the libraries. This option requires a configuration file in each project and some local configuration on the developer's computer. Biomass Harvest is currently configured with NuGet. Harvest Management is not. 
  • For now LANDIS-II packages will be distributed on the landis-ii feed at MyGet.org (user account and group permission required).
  • Brian expressed an interest in moving the succession libraries to the same process once it is proven.

Visual Studio 2010: Go To Definition disabled

posted Jan 7, 2015, 11:16 AM by Lesley Bross

When debugging the Base Harvest extension, I found that many of the IDE menu options were unavailable including "Go To Definition". The "solution" was to close the C# solution, delete the hidden .suo file associated with the C# solution, open the C# solution, and finally rebuild the C# solution. 

Easy way to check value of environment variables

posted Jan 7, 2015, 10:11 AM by Lesley Bross

Open an MS-DOS command prompt and type SET. This lists all the environment variables currently set and their values. Much faster than navigating through the Control Panel dialogs.

Keys to getting the debug console to work

posted Dec 17, 2014, 4:21 PM by Lesley Bross

  1. Make sure the path includes the folder for GDAL on your system. (Program.cs in the Debug console project)
  2. Create a folder at C:\Program Files\LANDIS-II\v6\bin\build to hold all of your development .dll's. This keeps development separate from your LANDIS install
  3. The compiled output of your project should be copied to the build folder. This may be difficult as writing to the folder mentioned in step 2 requires admin privileges. There are various ways to work around this. Some are built into the LANDIS SDK.
  4. All supporting .dll's should be copied into the build folder. This includes the Core files and any other extensions you may need.
  5. Extensions.xml must exist in the build folder and have any required extensions listed in it.
  6. The Debug console must also write to the build folder. The first time you build it, you'll need to copy the Landis.Console-6.1.exe.config file to the build folder and rename it Landis.Console-Debug.exe.config. This contains the required configuration settings for the Landis console.

1-10 of 54