Skip to content

VStar Development

dbenn edited this page Jan 19, 2021 · 28 revisions

Introduction

VStar has been made possible by the work of numerous people. This page provides information about how to contribute to VStar's development.

Java

VStar is written in the Java programming language. Java 8 or higher is required.

Apache Ant

The Apache Ant tool is used to build and package VStar from the command line.

VStar Development with GitHub and Eclipse

This 15 minute video demonstrates the use of GitHub, git, branches and Eclipse to contribute to VStar's code base:

VStar Development with GitHub and Eclipse

Eclipse Settings

Any Eclipse IDE for Java Developers version from the last few years should be fine. Version 2020-03 (4.15.0) or higher is recommended. In addition, the ANTLR 4 SDK must be installed:

and configured with the settings shown below:

Adding Issue Number to Git Comments

A GitHub issue number can be added to a git commit comment by prefixing the comment text with #N: where N is the issue number, as in this example: `git -m commit "#80: fixed the broken widget". This provides better provenance for the issue and how it relates to commits by updating the issue with the commit comment and a link to the code change.

GitHub Project

The VStar GitHub project shows the state (To Do, In Progress, Done) of tasks:

To enable this project linkage, and a simpler transition to Done, the project and pull requests must be linked to each issue:

Cloning the VStar Git Repository via command-line

One simple way to obtain the VStar git repository in the absence of Eclipse (or even in conjunction with it) is to open a shell or Terminal (Mac) with git installed (e.g. git bash under Windows) and do the following:

  • Create and/or change to a git working_copy directory. Where you put this is up to you. A good location is under your user or home directory, possibly within another directory such as Projects, e.g. /Users/david/Projects:
mkdir working_copy
cd working_copy
  • Clone the repository:
git clone https://github.com/AAVSO/VStar.git
cd VStar

However, before you do this, read the next section.

SSH Key for Git

Especially when using git from the command-line, it is desirable not to have to enter a password each time a remote repository command is issued, e.g. git pull or git push. In order to accomplish this, create a ssh key and add it to GitHub.

So, before cloning the repository in the step above, issue the following commands:

ssh-keygen -t rsa

and hit enter to accept the default ssh location.

When asked to enter a passphrase, just hit enter (empty) twice. Now reveal:

cat ~/.ssh/id_rsa.pub

Copy the multi-line public ssh key that is shown in output:

ssh-rsa ...

Navigate to https://github.com/AAVSO/VStar and then to your account settings:

Next select SSH and GPG Keys and paste the public key you copied after clicking the New SSH Key button.

Then you can clone the repository with this command:

git clone git@github.com:AAVSO/VStar.git
cd VStar