Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit479fdeb

Browse files
authored
Merge pull request#314 from bcgsc/release/v3.0.0
Release/v3.0.0
2 parentse4c67a5 +c2221fe commit479fdeb

File tree

245 files changed

+36460
-30492
lines changed

Some content is hidden

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

245 files changed

+36460
-30492
lines changed

‎.github/CONTRIBUTING.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
##Getting Started
32

43
If you are new to the project a good way to get started is by adding to the documentation, or adding unit tests where
@@ -47,7 +46,6 @@ mkdocs build
4746
The contents of the user manual can then be viewed by opening the build-docs/index.html
4847
in any available web browser (i.e. google-chrome, firefox, etc.)
4948

50-
5149
##Deploy to PyPi
5250

5351
Install deployment dependencies
@@ -68,21 +66,19 @@ Use twine to upload
6866
twine upload -r pypi dist/*
6967
```
7068

71-
7269
##Reporting a Bug
7370

7471
Please make sure to search through the issues before reporting a bug to ensure there isn't
7572
already an open issue.
7673

77-
7874
##Conventions
7975

8076
###Linting
8177

8278
Use[black](https://github.com/psf/black) with strings off and line length 100
8379

8480
```bash
85-
black mavis -S -l 100
81+
blacksrc/mavis -S -l 100
8682
```
8783

8884
###Docstrings
@@ -112,7 +108,6 @@ def some_function(some_arg: List[str]) -> None:
112108

113109
any column name which may appear in any of the intermediate or final output files must be defined in`mavis.constants.COLUMNS` as well as added to the[columns glossary](../outputs/columns)
114110

115-
116111
###Tests
117112

118113
- all new code must have unit tests in the tests subdirectory

‎.github/workflows/build.yml

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@
33

44
name:build
55

6-
on:[push, pull_request]
6+
on:
7+
push:
8+
branches:
9+
-master
10+
-develop
11+
pull_request:
712

813
jobs:
914
build:
1015
runs-on:ubuntu-latest
1116
strategy:
1217
matrix:
13-
python-version:[3.6, 3.7, 3.8]
14-
18+
python-version:["3.7", "3.8", "3.9", "3.10"]
19+
name:python-${{ matrix.python-version }}
1520
steps:
1621
-uses:actions/checkout@v2
1722
-name:install machine dependencies
@@ -22,18 +27,8 @@ jobs:
2227
python-version:${{ matrix.python-version }}
2328
-name:Install dependencies
2429
run:|
25-
python -m pip install --upgrade pip "setuptools<58" wheel
26-
pip install .[test]
27-
-name:Lint with flake8
28-
run:|
29-
pip install flake8
30-
# stop the build if there are Python syntax errors or undefined names
31-
flake8 mavis --count --select=E9,F63,F7,F82 --show-source --statistics
32-
-name:Lint with black
33-
run:|
34-
pip install black
35-
# stop the build if black needs to be run
36-
black mavis -S -l 100 --check
30+
python -m pip install --upgrade pip setuptools
31+
pip install -e .[test] # need editable to make sure the coverage reports correctly
3732
-name:install bwa
3833
run:|
3934
git clone https://github.com/lh3/bwa.git
@@ -45,20 +40,24 @@ jobs:
4540
run:|
4641
wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/blat/blat
4742
chmod a+x blat
48-
-name:run short tests with pytest
43+
-name:set up .pth file
4944
run:|
50-
export PATH=$PATH:$(pwd):$(pwd)/bwa
51-
pytest tests -v --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov mavis --cov-report term --cov-report xml --durations=10
52-
env:
53-
RUN_FULL:0
54-
if:github.event_name != 'pull_request'
45+
python tests/setup_subprocess_cov.py
5546
-name:run full tests with pytest
5647
run:|
5748
export PATH=$PATH:$(pwd):$(pwd)/bwa
58-
pytest tests -v --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov mavis --cov-report term --cov-report xml --durations=10
49+
export COVERAGE_PROCESS_START=$(pwd)/.coveragerc
50+
51+
pytest tests -v \
52+
--junitxml=junit/test-results-${{ matrix.python-version }}.xml \
53+
--cov mavis \
54+
--cov tools.convert_annotations_format \
55+
--cov-report term-missing \
56+
--cov-report xml \
57+
--durations=10 \
58+
--cov-branch
5959
env:
6060
RUN_FULL:1
61-
if:github.event_name == 'pull_request'
6261
-name:Upload pytest test results
6362
uses:actions/upload-artifact@master
6463
with:
@@ -76,3 +75,34 @@ jobs:
7675
name:codecov-umbrella
7776
fail_ci_if_error:true
7877
if:matrix.python-version == 3.8
78+
docker:
79+
runs-on:ubuntu-latest
80+
name:docker build
81+
steps:
82+
-uses:actions/checkout@v2
83+
-name:build the docker container
84+
run:|
85+
docker build --file Dockerfile --tag bcgsc/mavis:latest .
86+
-name:test the help menu
87+
run:|
88+
docker run bcgsc/mavis -h
89+
-name:Set up Python 3.7
90+
uses:actions/setup-python@v2
91+
with:
92+
python-version:3.7
93+
-name:Install workflow dependencies
94+
run:|
95+
python -m pip install --upgrade pip setuptools wheel
96+
pip install mavis_config pandas snakemake
97+
-uses:eWaterCycle/setup-singularity@v6
98+
with:
99+
singularity-version:3.6.4
100+
-name:docker2singularity
101+
run:
102+
docker run --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock --mount type=bind,source="$(pwd)",target=/output --privileged -t --rm singularityware/docker2singularity bcgsc/mavis:latest
103+
-name:Run analysis with snakemake & singularity
104+
run:|
105+
# get the SIMG filename
106+
export SNAKEMAKE_CONTAINER=$(ls *mavis*.simg)
107+
snakemake -j 2 --configfile tests/mini-tutorial.config.json --use-singularity
108+
if:always()

‎.github/workflows/publish.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ on:
88
types:[created]
99

1010
jobs:
11-
deploy:
12-
11+
pypi:
1312
runs-on:ubuntu-latest
14-
1513
steps:
1614
-uses:actions/checkout@v2
1715
-name:Set up Python
@@ -30,3 +28,15 @@ jobs:
3028
python setup.py sdist bdist_wheel install
3129
twine check dist/*
3230
twine upload dist/*
31+
docker:
32+
runs-on:ubuntu-latest
33+
steps:
34+
-uses:actions/checkout@v2
35+
-run:docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
36+
env:
37+
DOCKER_USER:${{ secrets.DOCKER_USER }}
38+
DOCKER_PASSWORD:${{ secrets.DOCKER_PASSWORD }}
39+
-run:|
40+
docker build --file Dockerfile --tag bcgsc/mavis:latest --tag bcgsc/mavis:${{ github.event.release.tag_name }} .
41+
-run:docker push bcgsc/mavis:latest
42+
-run:docker push bcgsc/mavis:${{ github.event.release.tag_name }}

‎.github/workflows/quick-tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name:quick-tests
5+
6+
on:[push]
7+
8+
jobs:
9+
build:
10+
runs-on:ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version:["3.7", "3.8", "3.9", "3.10"]
14+
name:python-${{ matrix.python-version }} quick
15+
steps:
16+
-uses:actions/checkout@v2
17+
-name:Set up Python ${{ matrix.python-version }}
18+
uses:actions/setup-python@v2
19+
with:
20+
python-version:${{ matrix.python-version }}
21+
-name:Install dependencies
22+
run:|
23+
python -m pip install --upgrade pip setuptools wheel
24+
pip install .[test]
25+
-name:Lint with flake8
26+
run:|
27+
pip install flake8
28+
# stop the build if there are Python syntax errors or undefined names
29+
flake8 src/mavis --count --select=E9,F63,F7,F82 --show-source --statistics
30+
-name:Lint with black
31+
run:|
32+
pip install black
33+
# stop the build if black needs to be run
34+
black src/mavis -S -l 100 --check
35+
-name:install bwa
36+
run:|
37+
git clone https://github.com/lh3/bwa.git
38+
cd bwa
39+
git checkout v0.7.17
40+
make
41+
cd ..
42+
-name:install blat
43+
run:|
44+
wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/blat/blat
45+
chmod a+x blat
46+
-name:run short tests with pytest
47+
run:|
48+
export PATH=$PATH:$(pwd):$(pwd)/bwa
49+
pytest tests -v \
50+
--junitxml=junit/test-results-${{ matrix.python-version }}.xml \
51+
--durations=10
52+
env:
53+
RUN_FULL:0

‎.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# python generated files
22
/.eggs
33
/coverage
4-
/venv
4+
/venv*
55
/.coverage
66
*.pyc
77
*__pycache__
@@ -15,6 +15,7 @@ junit
1515
.tox
1616
*eggs/
1717
.mypy_cache
18+
.snakemake
1819

1920
# aligners
2021
blat
@@ -32,3 +33,12 @@ junit
3233
/docs/package/mavis/*/*.md
3334
# don't ignore subpackage summary files
3435
!/docs/package/mavis/*/index.md
36+
docs/configuration/settings.md
37+
38+
.snakemake
39+
output_dir*
40+
bin
41+
dag*
42+
tutorial_data
43+
reference_inputs
44+
tmp

‎.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ python:
2020
-method:pip
2121
path:.
2222
extra_requirements:
23-
-docs
23+
-doc

‎Dockerfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
FROM python:3.7-slim-buster
2+
3+
WORKDIR /app
4+
5+
RUN apt-get update && \
6+
apt-get upgrade -y && \
7+
apt-get install -y git wget make gcc libz-dev
8+
9+
# pysam dependencies
10+
RUN apt-get install -y libncurses5-dev zlib1g-dev libbz2-dev libncursesw5-dev liblzma-dev
11+
12+
# install BWA
13+
RUN git clone https://github.com/lh3/bwa.git && \
14+
cd bwa && \
15+
git checkout v0.7.17 && \
16+
make && \
17+
cd .. && \
18+
mv bwa/bwa /usr/local/bin
19+
20+
# install minimap2
21+
RUN git clone https://github.com/lh3/minimap2.git && \
22+
cd minimap2 && \
23+
git checkout v2.24 && \
24+
make && \
25+
cd .. && \
26+
mv minimap2/minimap2.1 /usr/local/bin
27+
28+
# install blat dependencies
29+
RUN apt-get install -y libcurl4
30+
31+
# install blat
32+
RUN wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/blat/blat && \
33+
chmod a+x blat && \
34+
mv blat /usr/local/bin
35+
36+
# install wtdbg2
37+
RUN git clone https://github.com/ruanjue/wtdbg2.git && \
38+
cd wtdbg2 && \
39+
make && \
40+
cd .. && \
41+
mv wtdbg2/wtdbg2 /usr/local/bin
42+
43+
COPY setup.py setup.py
44+
COPY setup.cfg setup.cfg
45+
COPY MANIFEST.in MANIFEST.in
46+
COPY pyproject.toml pyproject.toml
47+
COPY src src
48+
COPY LICENSE LICENSE
49+
COPY README.md README.md
50+
51+
# install python package
52+
RUN pip install -U setuptools pip wheel
53+
RUN pip install .
54+
RUN which mavis
55+
ENTRYPOINT ["mavis" ]

‎MANIFEST.in

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
recursive-include docs *
2-
recursive-include tests *.py
3-
include tests/*/data/*
4-
recursive-include mavis *.py
5-
recursive-include tools *.pl *.py *.pm
6-
recursive-include tab *.py
1+
recursive-include src *.py *.json
2+
include src/mavis/py.typed
73
include README.md
84
include LICENSE
9-
prune docs/build
10-
prunedocs/source/auto
5+
prune docs
6+
prunetests

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp