Skip to content

Commit 5e11f0c

Browse files
authored
Merge pull request #9 from mlf-core/release/1.0.0
Release/1.0.0
2 parents 2c20598 + 4217cd3 commit 5e11f0c

File tree

2,387 files changed

+61673
-21383
lines changed

Some content is hidden

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

2,387 files changed

+61673
-21383
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[flake8]
2-
exclude = docs
2+
exclude = docs/*
33
max-line-length = 160

.github/workflows/lint.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: mlf-core linting
2+
on:
3+
push:
4+
pull_request:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
10+
mlf-core-lint:
11+
name: Run mlf-core lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
name: Check out source-code repository
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.9
21+
22+
- name: Install mlf-core
23+
run: pip install mlf-core
24+
25+
- name: Run mlf-core lint
26+
run: mlf-core lint .
27+
28+
29+
flake8:
30+
name: Run flake8
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
name: Check out source-code repository
35+
36+
- name: Setup Python
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: 3.9
40+
41+
- name: Install flake8
42+
run: pip install flake8
43+
44+
- name: Lint with flake8
45+
run: flake8 .
46+
47+
bandit:
48+
name: Run bandit
49+
runs-on: ubuntu-latest
50+
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
51+
steps:
52+
- uses: actions/checkout@v2
53+
name: Check out source-code repository
54+
55+
- name: Setup Python
56+
uses: actions/setup-python@v2
57+
with:
58+
python-version: 3.9
59+
60+
- name: Install bandit
61+
run: pip install bandit
62+
63+
- name: Run bandit
64+
run: bandit -r lcep -c .bandit.yml
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: PR to master branch from patch/release branch only
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
check_target:
10+
runs-on: ubuntu-latest
11+
name: Check Target branch
12+
steps:
13+
# PRs to the repository master branch are only ok if coming from any patch or release branch
14+
- name: Check PRs
15+
run: |
16+
{ [[ $GITHUB_HEAD_REF = *"release"* ]]; } || [[ $GITHUB_HEAD_REF == *"patch"* ]]
17+
18+
19+
# If the above check failed, post a comment on the PR explaining the failure
20+
# NOTE - this may not work if the PR is coming from a fork, due to limitations in GitHub actions secrets
21+
- name: Post PR comment
22+
if: failure()
23+
uses: mshick/add-pr-comment@v1
24+
with:
25+
message: |
26+
Hi @${{ github.event.pull_request.user.login }},
27+
28+
It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
29+
The `master` branch should always contain code from the latest release.
30+
Because of this, PRs to `master` are only allowed if they come from any ${{github.event.pull_request.head.repo.full_name}} `release` or `patch` branch.
31+
32+
You do not need to close this PR, you can change the target branch to `development` by clicking the _"Edit"_ button at the top of this page.
33+
34+
Thanks again for your contribution!
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
allow-repeats: false
37+
38+
check_version:
39+
name: No SNAPSHOT version on master branch
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Set up Python
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: '3.8'
46+
# PRs to the repository master branch are only ok if coming from any patch or release branch
47+
- name: Install mlf-core
48+
run: pip install mlf-core
49+
50+
- name: Check project version
51+
run: |
52+
PROJECTVERSION=$(mlf-core bump-version --project-version . | tail -n1)
53+
echo $PROJECTVERSION;
54+
if [[ $PROJECTVERSION == *"SNAPSHOT"* ]];then
55+
exit -1
56+
else
57+
exit 0
58+
fi
59+
60+
# If the above check failed, post a comment on the PR explaining the failure
61+
# NOTE - this may not work if the PR is coming from a fork, due to limitations in GitHub actions secrets
62+
- name: Post PR comment
63+
if: failure()
64+
uses: mshick/add-pr-comment@v1
65+
with:
66+
message: |
67+
Hi @${{ github.event.pull_request.user.login }},
68+
69+
It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
70+
A version check determined that you are using a SNAPSHOT version.
71+
The `master` branch should never have any SNAPSHOT versions, since only fully stable code should be on the `master` branch.
72+
repo-token: ${{ secrets.GITHUB_TOKEN }}
73+
allow-repeats: false
74+

.github/workflows/pr_to_master_from_patch_release_only.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/publish_docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ jobs:
2121
username: mlf-core
2222
password: '${{ secrets.MLF_CORE_SYNC_TOKEN}}'
2323
registry: ghcr.io
24-
tags: "latest,0.1.0-SNAPSHOT"
24+
tags: "latest,1.0.0"
2525

.github/workflows/publish_docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Documentation
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
name: Check out source-code repository
13+
14+
- name: Setup Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.8
18+
19+
- name: Install pip
20+
run: |
21+
python -m pip install --upgrade pip
22+
23+
- name: Install doc dependencies
24+
run: |
25+
pip install -r docs/requirements.txt
26+
27+
- name: Build docs
28+
run: |
29+
cd docs
30+
make html
31+
32+
- name: Deploy
33+
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'}}
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./docs/_build/html
38+

.github/workflows/run_bandit.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/run_flake8_linting.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/run_mlf_core_lint.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
token: '${{ secrets.MLF_CORE_SYNC_TOKEN }}'
3232

3333
- name: Sync project
34-
run: mlf-core sync . ${{ secrets.MLF_CORE_SYNC_TOKEN }} zethson
34+
run: mlf-core --verbose sync . ${{ secrets.MLF_CORE_SYNC_TOKEN }} zethson

.github/workflows/train_cpu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ jobs:
1818
with:
1919
dockerfile: Dockerfile
2020
repository: ghcr.io/mlf-core/lcep
21-
tags: 0.1.0-SNAPSHOT
21+
tags: 1.0.0
2222
push: false
2323

2424
- name: Setup Python
2525
uses: actions/setup-python@v1
2626
with:
27-
python-version: ${{ matrix.python }}
27+
python-version: ${{ matrix.python }}
2828

2929
- name: Install mlflow
3030
run: pip install mlflow
3131

3232
- name: Train on the CPU
33-
run: mlflow run . -P training-data='/data/train.tsv' -P test-data='/data/test.tsv'
33+
run: mlflow run . -P max_epochs=2 -P training-data='/data/train.tsv' -P test-data='/data/test.tsv'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,6 @@ dmypy.json
130130

131131
# Jetbrains IDE
132132
.idea/
133+
134+
# visual studio code
135+
.vscode

.mlf_core.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ domain: mlflow
22
language: xgboost
33
project_slug: lcep
44
project_slug_no_hyphen: lcep
5-
template_version: '1.3.0 # <<MLF-CORE_NO_BUMP>>'
5+
template_version: '1.3.2 # <<MLF-CORE_NO_BUMP>>'
66
template_handle: mlflow-xgboost
77
github_username: mlf-core
88
creator_github_username: zethson
@@ -15,5 +15,5 @@ email: [email protected]
1515
project_name: lcep
1616
project_short_description: Classifying cancerous liver samples from gene expression
1717
data.
18-
version: 0.1.0-SNAPSHOT
18+
version: 1.0.0
1919
license: MIT

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Development Lead
66
----------------
77

88
* Lukas Heumos <[email protected]>
9+
* Steffen Lemke <[email protected]>
910

1011
Contributors
1112
------------

CHANGELOG.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@ Changelog
55
This project adheres to `Semantic Versioning <https://semver.org/>`_.
66

77

8-
0.1.0-SNAPSHOT (2020-11-11)
9-
---------------------------------------------
8+
1.0.0 (2021-03-11)
9+
------------------
10+
11+
**Added**
12+
13+
* Added new train and test dataset based on TCGA-LIHC & GTEx (liver)
14+
* Added optimized hyperparameters to the model
15+
16+
**Fixed**
17+
18+
**Dependencies**
19+
20+
**Deprecated**
21+
22+
23+
0.1.0 (2021-03-11)
24+
------------------
1025

1126
**Added**
1227

0 commit comments

Comments
 (0)