Skip to content

Commit e9b87c4

Browse files
author
Måns Magnusson
authored
Rewrite CLI (#71)
* Updates CLI functions
1 parent 0b8dda3 commit e9b87c4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2995
-921
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ _DEVELOP/
5151
# Editors
5252
*.sublime-workspace
5353
.tm_properties
54+
.idea
5455

5556
# project files should be version controlled, unless a significant
5657
# proportion of contributors will probably not be using SublimeText

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 19.3b0
3+
rev: 20.8b1
44
hooks:
55
- id: black
6+
args: [--line-length=100]

CHANGELOG.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ About changelog [here](https://keepachangelog.com/en/1.0.0/)
66

77
Please add a new candidate release at the top after changing the latest one. Feel free to copy paste from the "squash and commit" box that gets generated when creating PRs
88

9-
## [x.x.x]
10-
### Added
11-
12-
### Fixed
13-
9+
## [3.0]
1410
### Changed
11+
- Reworks the CLI for complete API functionality
1512

1613
## [2.7.5]
1714
### Added

DEPLOYMENT.md

+35-26
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
1-
# Steps
2-
3-
When all tests done and successful and PR is approved, follow these steps:
4-
5-
1. Bump version:
6-
1. Merge branch to master
7-
1. In your local git version of this repo
8-
1. Checkout master by: `git checkout master`
9-
1. Update local branch by: `git pull origin master`
10-
1. Bumpversion according to specifications, eg. `bumpversion <patch/minor/major>`
11-
1. Push commit directly to master `git push`
12-
1. Push commit directly to master `git push --tag`
13-
1. Deploy on the appropriate server(s):
14-
1. Deploy on hasta:
15-
1. Deploy master to stage
16-
1. `ssh hasta`
17-
1. `us`
18-
1. Request stage environment `paxa` and follow instructions
19-
1. `bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-housekeeper-stage.sh master`
20-
1. Make sure that installation was successful
21-
1. `down`
22-
1. Deploy master to production
23-
1. `up`
24-
1. `bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-housekeeper-prod.sh`
25-
1. Make sure that installation was successful
26-
1. Take a screenshot and post as a comment on the PR. Screenshot should include environment and that it succeeded
1+
# Deployment guide
2+
This includes instructions for deploying Houskeeper in the Clinical Genomics :hospital: setting. General instructions for deployment is in the [development guide][development-guide]
3+
4+
## Branch model
5+
6+
Housekeeper if following the [GitHub flow][gh-flow] branching model which means that every time a PR is merged to master a new release is created.
7+
8+
## Requirements
9+
10+
- `bumpversion`, install with `pip install bumpversion`
11+
12+
## Steps
13+
14+
1. Check in the PR if the change is a minor, mayor or patch: ![Version][pr-version]
15+
1. Make sure you are on `master` (`git checkout master`) and bump version according to step 1, example: `bumpversion minor`
16+
1. Push the commit: `git push`
17+
1. Push the tag: `git push --tags`
18+
1. First deploy on stage so log into hasta and run:
19+
- `us`
20+
- `bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-housekeeper-stage.sh master`
21+
1. Deploy in productions by running the following commands:
22+
- `down`
23+
- `up`
24+
- `bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-housekeeper-prod.sh`
25+
1. Take a screen shot that includes the name of the environment and publish it as a comment on the PR: ![Deployed][confirm-deploy]
26+
1. Great job :whale2:
27+
28+
29+
30+
31+
32+
[pr-version]: docs/img/version.png
33+
[confirm-deploy]: docs/img/confirm_deploy.png
34+
[development-guide]: http://www.clinicalgenomics.se/development/publish/prod/
35+
[gh-flow]: http://www.clinicalgenomics.se/development/dev/models/#rolling-release-github-flow

Pipfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ verify_ssl = true
66
[dev-packages]
77
pytest = "*"
88
pytest-mock = "*"
9-
9+
pre-commit = "*"
1010

1111
[packages]
1212
alchy = "*"
@@ -16,6 +16,7 @@ marshmallow = "*"
1616
"ruamel.yaml" = "*"
1717
SQLAlchemy = "*"
1818
pytest-cov = "*"
19+
rich = "*"
1920

2021
[requires]
2122
python_version = "3.7"

0 commit comments

Comments
 (0)