|
| 1 | +# Contributing |
| 2 | +Thank you for taking an interest in contributing to CWL Viewer. |
| 3 | + |
| 4 | +The following is a set of guidelines for contribution and helpful |
| 5 | +tips and resources for working with the code base. |
| 6 | + |
| 7 | +## Code of Conduct |
| 8 | +This project and everyone participating in it is governed by |
| 9 | +the [CWL Project Code of Conduct](https://github.com/common-workflow-language/common-workflow-language/blob/master/CODE_OF_CONDUCT.md). |
| 10 | +By participating, you are expected to uphold this code. |
| 11 | +Please report unacceptable behavior to |
| 12 | + |
| 13 | + |
| 14 | +## Issue Contribution |
| 15 | +Issues for both bug reports and feature requests are welcome. In |
| 16 | +the case of bug reports, please try to provide a verifiable example |
| 17 | +on the production instance if this is possible. |
| 18 | + |
| 19 | +Before you submit an issue, please search the issue tracker, maybe |
| 20 | +an issue for your problem already exists and the discussion might |
| 21 | +inform you of workarounds readily available. |
| 22 | + |
| 23 | +## Code Contribution |
| 24 | + |
| 25 | +### Workflow |
| 26 | +The preferred workflow for contributing to CWL Viewer is to fork the |
| 27 | +[main repository](https://github.com/common-workflow-language/cwlviewer) on |
| 28 | +GitHub, clone, and develop on a branch. Steps: |
| 29 | + |
| 30 | +1. Fork the [project repository](https://github.com/common-workflow-language/cwlviewer) |
| 31 | + by clicking on the 'Fork' button near the top right of the page. This creates |
| 32 | + a copy of the code under your GitHub user account. For more details on |
| 33 | + how to fork a repository see [this guide](https://help.github.com/articles/fork-a-repo/). |
| 34 | + |
| 35 | +2. Clone your fork of the cwlviewer repo from your GitHub account to your local disk: |
| 36 | + |
| 37 | + ```bash |
| 38 | + $ git clone [email protected]:YourLogin/cwlviewer.git |
| 39 | + $ cd cwlviewer |
| 40 | + ``` |
| 41 | + |
| 42 | +3. Create a ``feature`` branch to hold your development changes: |
| 43 | + |
| 44 | + ```bash |
| 45 | + $ git checkout -b my-feature |
| 46 | + ``` |
| 47 | + |
| 48 | + Always use a ``feature`` branch. It's good practice to never work on the ``master`` branch! |
| 49 | + |
| 50 | +4. Develop the feature on your feature branch. Add changed files using ``git add`` and then ``git commit`` files: |
| 51 | + |
| 52 | + ```bash |
| 53 | + $ git add modified_files |
| 54 | + $ git commit |
| 55 | + ``` |
| 56 | + |
| 57 | + to record your changes in Git, then push the changes to your GitHub account with: |
| 58 | + |
| 59 | + ```bash |
| 60 | + $ git push -u origin my-feature |
| 61 | + ``` |
| 62 | + |
| 63 | +5. Follow [these instructions](https://help.github.com/articles/creating-a-pull-request-from-a-fork) |
| 64 | +to create a pull request from your fork. |
| 65 | + |
| 66 | +### Code Structure and Dependencies |
| 67 | +This project uses the [Maven standard directory layout](https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html) |
| 68 | +and is a [Model-view-controller](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) |
| 69 | +application built with [Spring Boot](https://projects.spring.io/spring-boot/). |
| 70 | + |
| 71 | +Packaging is done by feature and all Spring configuration is |
| 72 | +Java annotation based. |
| 73 | + |
| 74 | +Templates for the view use [Thymeleaf](http://www.thymeleaf.org/), |
| 75 | +which allows them to be displayed in browsers as static prototypes. |
| 76 | + |
| 77 | +MongoDB is used to store information about `Workflow` and `QueuedWorkflow` |
| 78 | +objects using [Spring Data JPA](https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/). |
| 79 | + |
| 80 | +The application also uses a triple store to keep the RDF representing |
| 81 | +workflows (gathered from [cwltool](https://github.com/common-workflow-language/cwltool)'s |
| 82 | +`--print-rdf` functionality). |
| 83 | + |
| 84 | +See [README.md](README.md) for details on running the application with dependencies. |
| 85 | +The tests can be run using the standard `mvn test` command. |
| 86 | + |
0 commit comments