## Setup ##

1. Install git-ubuntu (see README.md for directions)

2. Build package

   $ python3 setup.py build


## Check ##

Verify the packaging and other static checks that need to pass for packaging:

  $ python3 setup.py check

Verify installation requirements will be satisfied

  $ pip3 check


## Running self test of tree without building snap ##

A complete 'build and install' should be done (and will be done by c-i),
but for many changes it is acceptable to run the current code inside
an already-installed snap environment.

You can run the self test (`git-ubuntu.self-test`) using your current
working tree by executing:

    ./snap-wrappers/wrappers/git-ubuntu-self-test

That will enter into the currently-installed snap environment and
execute itself.


## Running self test with a full snap build ##

While running the test in the current-installed snap environment, as
described above, should be sufficient for most testing needs, there may
be situations needing a more extensive test.  For example, changes to
the snap build or test processes themselves.

Here is how to do a manual test using the full snap build machinery:

First, create a branch if you don't already have one, and push it to
your own git repo namespace:

  $ git checkout -b ${branch_name}
  $ git push ${LP_USERNAME} ${branch_name}

Go to the Launchpad page for the branch and create a merge proposal
targeted to lp:usd-importer, set 'main' as the Target branch and set
the Description to say "For CI build only".  Review type can be set to
'ci'.  This will ensure the regular CI runs on it, but let's the
development team know it can be ignored for review purposes.

If this fails to build, look at the Jenkin's console for the build to
see where in the snap mechanics it went wrong.  If it succeeded, you can
download and inspect the snap locally, like this:

  $ lxc exec ${container} -- rm /tmp/git-ubuntu_0+git.*_amd64.snap
  $ lxc file push ./git-ubuntu_0+git.*_amd64.snap ${container}/tmp
  $ lxc exec ${container} -- bash
  $ sudo snap install --classic --dangerous /tmp/git-ubuntu_0+git.*_amd64.snap

The snap package itself can be locally mounted directly as a filesystem,
which can be helpful for evaluating its contents.  For example, to look
at what Python modules are included:

  $ mkdir /tmp/snap
  $ sudo mount git-ubuntu_0+git.59a1e51_amd64.snap /tmp/snap/
  $ ls /tmp/snap/usr/lib/python3.6/
  $ cd ${HOME} && umount /tmp/snap && rmdir /tmp/snap
