Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BEAST HackDay Code Dev Model (27 Nov 2017)

Karl Gordon
November 27, 2017

BEAST HackDay Code Dev Model (27 Nov 2017)

Karl Gordon

November 27, 2017
Tweet

More Decks by Karl Gordon

Other Decks in Research

Transcript

  1. BEAST Code Dev Karl D. Gordon Space Telescope Sci. Inst.

    Baltimore, MD, USA BEAST hack day 27 Nov 2017 STScI
  2. BEAST Structure • Physicsmodel – Stellar and dust extinction model

    • Observationmodel – Photometry – Noise model • Fitting – fit_metrics (chisqr, prob, etc.) – Fast 1D pdfs – Grid trimming (for speed) • Misc – Plotting – Tests – Tools – examples
  3. Github • Social coding • Provides an easy to use

    user interface to git – Git = version control for tracking changes • Manage develoment via issues • Fork-Pull model
  4. Issues • Centralized location for code management • Allows for

    anyone anywhere to keep up-to-date • Anyone can raise an issue • Anyone can comment on an issue • All BEAST work should be tracked via an issue – Avoids multiple people working on the same thing • Issues assigned to specific people – Others can contact and coordindate
  5. Fork-Pull Model • Everyone forks the master respository • When

    updated code/docs/etc ready, issue a pull request to master repository – Identify the issue(s) this pull request addresses • Review and discussion of pull request • Pull request apporved → code merged
  6. Work needed • Goto Issues on github • All work

    this week needs an issue – Gets us into the habit – Central organization – Allows remote participation – Keeps track of work • Major Areas – Code, cleanup and enhancements – Documentation, more and setup with readthedocs – Testing, more and setup with travis – Build, setup and test – Logo?
  7. How to Fork • https://help.github.com/articles/fork-a-repo/ • On github, got to

    the master BEAST repository – Find the fork button – Makes a copy of the repository in your github area
  8. Clone the fork to you computer (& setup sync to

    master) • In your github area, find the clone button • On command line in the directory you want the copy – git clone [email protected]:YOURGITNAME/beast.git • Configure your clone version to sync with master BEAST version – In the github master BEAST respository – Find the clone button – Goto the directory with your clone version – git remote add upstream [email protected]:karllark/beast.git
  9. Clone the fork to you computer (& setup sync to

    master) • In your github area, find the clone button • On command line in the directory you want the copy – git clone [email protected]:YOURGITNAME/beast.git • Configure your clone version to sync with master BEAST version – In the github master BEAST respository – Find the clone button – Goto the directory with your clone version – git remote add upstream [email protected]:karllark/beast.git
  10. Clone the fork to you computer (& setup sync to

    master) • In your github area, find the clone button • On command line in the directory you want the copy – git clone [email protected]:YOURGITNAME/beast.git • Configure your clone version to sync with master BEAST version – In the github master BEAST respository – Find the clone button – Goto the directory with your clone version – git remote add upstream [email protected]:karllark/beast.git
  11. Syncing your fork • https://help.github.com/articles/syncing-a-fork/ • Get updated files from

    the BEAST master – Do this when when appropriate (starting new branch, etc) • In directory of clone on your computer – git fetch upstream – git checkout master – git merge upstream/master • Differences between your fork (master) and the BEAST master (upstream/master) may be: – Automatically merged – May need manual work to merge
  12. Branch your fork • https://github.com/Kunena/Kunena-Forum/wiki/Create -a-new-branch-with-git-and-manage-branches • Branches make it

    easy to manage work – Can have multiple branches and switch between them – New branch for a new issue • In directory of clone on your computer – git checkout -b new_branch_name – git push origin branch_name → send to github – git branch → show branches on computer – git checkout branch_name → switch to that branch
  13. Pull request to BEAST master • Goto github • Use

    'ci_regression' branch for an example