Skip to content

Code Development

johnsm21 edited this page Aug 18, 2020 · 4 revisions

Hadatac Branch Structure

The Hadatac GitHub consists of three main branches: Master, LESA, and HHEAR. The Master branch is our stable release code that is updated after a sprint. The other two are project branches used to develop new features and address bugs. Developers should never merge changes directly into Master.

Projects branches are updated frequently using Github's issue/pull request system. A user wishing to make a change to the codebase must create an issue on GitHub, fork the repository, make the desired changes to a project branch and submit a pull request for review on GitHub. These steps are detailed below.

Development Process

Creating an Issue

  1. Goto: https://github.com/paulopinheiro1234/hadatac/issues
  2. Check to see if your feature or bug already has an open issue
  3. If not then create a new issue using the new issue button
  4. Add a title
  5. Leave a detailed description
  6. Assign a person to work on the issue using the gear button
    • Leave blank if your assigning it to yourself
    • If it's not you be sure to let them know
  7. Assign a label using the gear button
    • Features → enhancement
    • Bugs → bug
  8. Assign a project using the gear button
    • This corresponds to the project the issue will be merged into either LESA or HHEAR
  9. Click “Submit new issue”

Creating Issues

Creating a Fork

  1. Goto:
    • https://github.com/paulopinheiro1234/hadatac
  2. Click the "Fork" button in the top right
  3. Choose your GitHub account
  4. Go to your project folder location
    • cd project_folder_path
  5. Clone your fork
    • git clone https://github.com/<YourUsername>/hadatac.git
  6. Install HADatAc

Code Development

  1. Go to your project folder through your command line
    • cd hadatac
  2. Add Hadatac Repository
    • git remote add hadatac git://github.com/paulopinheiro1234/hadatac.git
  3. Develop tests for the new feature or bug
    • Create a Java class in project_folder/test
    • Denote test methods with @Test
  4. Make code changes
  5. List changed files
    • git status
  6. Add changed files to a commit
    • git add file1 file2
    • Do not add files specific to your configuration
  7. Commit files
    • git commit -m “Description of changes”
  8. Backup changes to Github
    • git push
  9. Run unit tests
    • sbt test
  10. Repeat steps 3-10 until complete (Feature implemented/bug fixed and tests pass)
  11. Merge development branch changes
    • git pull hadatac
  12. Check for conflicts
    • git status
  13. Resolve conflicts
  14. Repeat steps 3-14 until complete (Feature implemented/bug fixed and tests pass)

Creating a Pull Request

  1. Goto:
    • https://github.com/<YourUsername>/hadatac/pulls
  2. Click "New Pull Request"
  3. Set base using the dropdown and select the development branch
    • Should be HHEAR or LESA
  4. Set compare using the dropdown and select the branch you're developing on
  5. Click “Create pull request” button

Creating Pull Request

  1. Enter a title and detailed description
    • These will look very similar to the issue if the pull request is addressing only one issue
  2. Assign a reviewer using the gear button
    • This should never be you
    • Be sure to let them know
  3. Assign a label using the gear button
    • Features → enhancement
    • Bugs → bug
  4. Assign a project using the gear button
    • This corresponds to the project the issue will be merged into either LESA or HHEAR
  5. Select Issue addressed using the gear button

Pull Request Documentation

Reviewing a Pull Request

  1. Double-check the pull request information
    • Don’t forget the base this should be HHEAR or LESA
  2. If the pull request is ready (approved) select “Squash and merge”
    • This will convert all commits into a single commit
    • This makes exploring the git history easier to search through
  3. Enter a final description for git history
  4. Submit changes
    • This will merge changes and close all linked issues

Merging Pull Request

Data Owner Guide

  1. Installation
    1.1. Installing for Linux (Production)
    1.2. Installing for Linux (Development)
    1.3. Installing for MacOS (Development)
    1.4. Deploying with Docker (Production)
    1.5. Deploying with Docker (Development)
    1.6. Installing for Vagrant under Windows
    1.7. Upgrading
    1.8. Starting HADatAc
    1.9. Stopping HADatAc
  2. Setting Up
    2.1. Software Configuration
    2.2. Knowledge Graph Bootstrap
    2.2.1. Knowledge Graph
    2.2.2. Bootstrap without Labkey
    2.2.3. Bootstrap with Labkey
    2.3. Config Verification
  3. Using HADatAc
    3.1. Initial Page
    3.1.1. Home Button
    3.1.2. Sandbox Mode Button
    3.2. File Ingestion
    3.2.1. Ingesting Study Content
    3.2.2. Manual Submission of Files
    3.2.3. Automatic Submission of Files
    3.2.4. Data File Operations
    3.3. Manage Working Files 3.3.1. [Create Empty Semantic File from Template]
    3.3.2. SDD Editor
    3.3.3. DD Editor
    3.4. Manage Metadata
    3.4.1. Manage Instrument Infrastructure
    3.4.2. Manage Deployments 3.4.3. Manage Studies
    3.4.4. [Manage Object Collections]
    3.4.5. Manage Streams
    3.4.6. Manage Semantic Data Dictionaries
    3.4.7. Manage Indicators
    3.5. Data Search
    3.5.1. Data Faceted Search
    3.5.2. Data Spatial Search
    3.6. Metadata Browser and Search
    3.7. Knowledge Graph Browser
    3.8. API
    3.9. Data Download
  4. Software Architecture
    4.1. Software Components
    4.2. The Human-Aware Science Ontology (HAScO)
  5. Metadata Files
    5.1. Deployment Specification (DPL)
    5.2. Study Specification (STD)
    5.3. Semantic Study Design (SSD)
    5.4. Semantic Data Dictionary (SDD)
    5.5. Stream Specification (STR)
  6. Content Evolution
    6.1. Namespace List Update
    6.2. Ontology Update
    6.3. [DPL Update]
    6.4. [SSD Update]
    6.5. SDD Update
  7. Data Governance
    7.1. Access Network
    7.2. User Status, Categories and Access Permissions
    7.3. Data and Metadata Privacy
  8. HADatAc-Supported Projects
  9. Derived Products and Technologies
  10. Glossary
Clone this wiki locally