Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,424 changed files
with
42,148 additions
and
45,629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
|
||
name: Publish bleeding edge to Docker Hub | ||
|
||
"on": | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
docker-image-CI: | ||
name: Docker Image CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build and publish to Docker Hub | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: clinicalgenomics/mip | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
tags: "latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
|
||
name: Publish production release to Docker Hub | ||
|
||
"on": | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
docker-image-CI: | ||
name: Docker Image CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build and publish to Docker Hub | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: clinicalgenomics/mip | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
tags: "${{ github.event.release.tag_name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,10 @@ mip_log/ | |
**/.idea | ||
_Deparsed_XSubs.pm | ||
.gitignore | ||
**/.vscode | ||
|
||
## Carton | ||
local/ | ||
|
||
## Carmel | ||
.carmel/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Modifications to perl tidy policies for MIP development | ||
--maximum-line-length=100 | ||
--iterations=2 | ||
--backup-and-modify-in-place | ||
--backup-file-extension='/' | ||
--standard-error-output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
- id: check-merge-conflict | ||
- repo: https://github.com/perltidy/perltidy | ||
rev: '20201207' | ||
hooks: | ||
- id: perltidy | ||
types: [file] | ||
files: \.(t|pm|pl|test)$ | ||
- repo: https://github.com/adrienverge/yamllint | ||
rev: v1.25.0 | ||
hooks: | ||
- id: yamllint | ||
- repo: local | ||
hooks: | ||
- id: perlcritic | ||
name: perlcritc | ||
language: system | ||
entry: perlcritic | ||
types: [file] | ||
files: \.(t|pm|pl|test)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,46 @@ | ||
## Versioning | ||
MIP adheres to [semantic versioning](https://semver.org/). | ||
MIP adheres to [semantic versioning]. | ||
|
||
## Branching model | ||
MIP follows a gitflow [branching model](http://www.clinicalgenomics.se/development/dev/gitflow/). | ||
MIP follows a gitflow [branching model]. | ||
|
||
## Dependencies | ||
We use [Carton] to lock MIP's perl dependencies in the `cpanfile.snapshot`file. | ||
|
||
### Initializing the environment | ||
Carton will use the local directory to install modules into. You're recommended to exclude these directories from git by adding the `local/` to `.gitignore`. | ||
After installing Carton with `cpanm install Carton`, you can create/update the snapshot file by: | ||
|
||
``` | ||
carton install | ||
``` | ||
|
||
Once you've done installing all the dependencies, you can push your application directory to a remote machine (excluding local and .carton) and run the following command: | ||
|
||
``` | ||
carton install --deployment | ||
``` | ||
|
||
This will look at the cpanfile.snapshot and install the exact same versions of the dependencies into local, and now your application is ready to run. | ||
|
||
The --deployment flag makes sure that carton will only install modules and versions available in your snapshot, and won't fallback to query for CPAN Meta DB for missing modules. | ||
|
||
Another flavor of this is [Carmel]. Unlike traditional CPAN module installer, Carmel keeps the build of your dependencies in a central repository, then select the library paths to include upon runtime. | ||
|
||
## Code style | ||
MIP uses Perl::Tidy, Perl::Critic and Yamllint in order to maintain readability and a consistent code style across the repo. These tools can be installed by running mip_install_perl.sh with the `-d` option when installing MIP's perl distribution and cpan modules. | ||
|
||
Prior to opening a pull request each commit should be tested with the supplied bash script `mip-check`. Running `bash mip-check` will test the code newly edited code using perltidy, perlcritic and yamllint. | ||
MIP uses Perl::Tidy, Perl::Critic and Yamllint in order to maintain readability and a consistent code style across the repo. The repo uses [pre-commit] to ensure that commits have been formatted correctly. You can set this up yourself with setup with `pre-commit install`. | ||
Alternatively by using the `-d` flag with the mip_install_perl.sh script the extra dependencies will be installed for use with your IDE. The flag also ensures that pre-commit is installed in the develop environment and setups pre-commit to autoamtically run on commits. | ||
|
||
Each commit will be tested with these tools using pre-commit. | ||
|
||
- Perltidy will automatically check and reformat your perl code. | ||
- Perlcritic will lint the code and ensure that it follows perl best practice. | ||
- Yamllint check any yaml files that have been altered. | ||
|
||
- Perltidy will automatically check and reformat your perl code. | ||
- Perlcritic will lint the code and ensure that it follows perl best practice. | ||
- Yamllint check any yaml files that have been altered. | ||
Try to keep the number of warnings to a minimum. This ensures that your new code adheres to the style that has been agreed upon for the MIP repo. The pre-commit hooks can be disabled by using the flag `-n`, i.e. `git commit -n` | ||
|
||
Try to keep the number of warnings to a minimum. This ensures that your new code adheres to the style that has been agreed upon for the MIP repo. | ||
[branching model]: http://www.clinicalgenomics.se/development/dev/gitflow/ | ||
[Carmel]: https://metacpan.org/pod/Carmel | ||
[Carton]: https://metacpan.org/pod/Carton | ||
[semantic versioning]: https://semver.org/ | ||
[pre-commit]: https://pre-commit.com |
Oops, something went wrong.