Part 1 slightly geeky
Goal - Updating the documentation
- Git
- Github
- Fork & Pull
- Updating documentation
Git (2005)
- Distributed Revision Control System
- Revision control, helps to keep track of history and different versions
- Distributed, everybody has full history of the repository
- Older centralized versioning systems
- Concurrent Version System (CVS) 1990
- Apache Subversion (SVN) 2000
- Linux kernel's revision control system is git (both by Linus Torvalds)
Github (2008)
- Website that hosts Git repositories
- Feautures
- Browse code
- Nicely display common formats (MarkDown, ReStructuredText, csv, json, geojson)
- Issue tracker (comments etc)
- Unlimited public repositories
- Private repositories for money (free @ bitbucket)
- Group repositiories
- Fork & pull
- The LIMS is hosted here
- The Linux kernel is also hosted there
Making changes to the documentation
- Make a Github account
- Go to the documentation
- Click on Edit on Github at the top
- Edit the file
- This will fork (copy) the repository to your own account
- You make your changes there
- The pull request will be done afterwards
- Me/Lionel will check whether the pull request is ok or not
- If the pull request is not okay, you can continue to make changes until it is
Part 2 hella geeky
Goal - Changing zhe code
- Git Basics & Command Line Interface
- LIMS technical breakdown
- Django
- Travis Continuous Integration for testing
- Sphinx Read the Docs
- LIMS on Helicoprion
- Changing zhe code
Git basics & Command Line Interface
- Fork the repository to your own account (otherwise you can only edit your own repo)
- Clone the repository (aka download it):
USERNAME=inodb
mkdir -p ~/github
cd ~/github
git clone https://github.com/$USERNAME/SCGLIMS
ls SCGLIMS/.git
Git basics & Command Line Interface
- Now you can make some changes to the files
- In this case we edit the README.rst
cd ~/github/SCGLIMS
# checkout which files have changed
git status
# stage the files that you want to commit
git add README.rst
# commit the files
git commit -m "Change Single Cell LIMS to LIMS"
# check out the log
git log
# list remote repositories
git remote -v
# push your local commits to your Github repo
git push origin master
Git basics & Command Line Interface
- Git uses branches
- each new feauture/bugfix on a different branch
- merge features to master branch once done
Git basics & Command Line Interface
$ cd ~/github/SCGLIMS
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
Git basics & Command Line Interface
- Create a new branch and switch to it
$ git checkout -b new_feature
$ git branch
master
* new_feature
Git basics & Command Line Interface
- Push the new branch up to your GitHub account
$ git remote -v
origin https://github.com/inodb/SCGLIMS (fetch)
origin https://github.com/inodb/SCGLIMS (push)
$ git push origin new_feature
To https://github.com/inodb/SCGLIMS
* [new branch] new_feature -> new_feature
$ git push origin --delete new_feature
$ git branch -D new_feature
Git basics & Command Line Interface
$ git checkout master
$ git merge new_feature
Git basics & Command Line Interface
$ git push origin --delete new_feature
$ git branch -D new_feature
Git basics & Command Line Interface
- If you are writing scripts without version control
- NOOOOOOO!!!
- Please make at least one repo
LIMS Technical breakdown
- Everything written in Python
- Uses database of choice
- PostgreSQL on Helicoprion
- SQLite local
LIMS Technical breakdown
- Travis Continuous Integration for testing
- Coveralls.io shows test code coverage
- Sphinx in docs/
- ReadTheDocs hosts the output
LIMS Technical breakdown
- Helicoprion has a PostgreSQL server
- It has a copy of the code on /local/lims
- hidden production settings
Changing zhe code
- Use your forked repo
- Follow installation instructions from the repo
- Make changes and push them to your repo
- Click on pull request from Github at your own repo
- Merging is decided by me or Lionel