Skip to content

Commit 2b6d595

Browse files
committed
Merge branch 'release/0.10.0'
2 parents 93b4fb8 + e2806bf commit 2b6d595

127 files changed

Lines changed: 13626 additions & 5767 deletions

File tree

Some content is hidden

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

.codeclimate.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ checks:
2121
threshold: 250
2222

2323
exclude_patterns:
24-
- ".*"
25-
- "*.md"
26-
- "*.yml"
27-
- "setup.py"
28-
- "LICENSE"
29-
- "**/*.yaml"
30-
- "**/__*"
24+
- "*"
25+
- "!genomepy/*"
3126
- "genomepy/cli.py"
32-
- "docs/*"
33-
- "paper/*"
34-
- "tests/*"

.flake8

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
[flake8]
2-
exclude = .git,build
3-
max-line-length = 88
42
extend-ignore = E203,E402,E501
53
select = C,E,F,W,B,B950

.github/workflows/docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- docs # backdoor branch to update docs
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout 🛎️
13+
uses: actions/checkout@v2.3.1
14+
15+
- uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.7
18+
19+
- name: Install dependencies 🔨
20+
run: |
21+
$CONDA/bin/conda config --add channels conda-forge
22+
$CONDA/bin/conda config --add channels bioconda
23+
$CONDA/bin/conda install mamba
24+
$CONDA/bin/mamba env update --file environment.yml --name base
25+
$CONDA/bin/mamba env update --file docs/requirements.yaml --name base
26+
$CONDA/bin/pip install .
27+
28+
- name: Build 🔧
29+
run: |
30+
$CONDA/bin/sphinx-build docs build
31+
touch build/.nojekyll
32+
33+
- name: Deploy 🚀
34+
uses: JamesIves/github-pages-deploy-action@4.1.4
35+
with:
36+
branch: gh-pages # The branch the action should deploy to.
37+
folder: build # The folder the action should deploy.
38+
clean: true

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
coverage.xml
99
cc-test-reporter
1010
Log.out
11-
genomepy/cfg/default.yaml
11+
genomepy/config/default.yaml
1212

1313
# Directories
14+
docs/_autosummary
15+
docs/_build
16+
tests/data
1417
.pytest_cache
1518
build
16-
docs/_build
1719
genomepy.egg-info
18-
tests/data
1920
dist
2021
eggs
2122
tmp

.pre-commit-config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
files: 'setup\.py|genomepy/.*|tests/.*'
2+
repos:
3+
- repo: https://github.com/myint/autoflake
4+
rev: v1.4
5+
hooks:
6+
- id: autoflake
7+
args:
8+
- --check
9+
- --recursive
10+
- --remove-all-unused-imports
11+
- --remove-duplicate-keys
12+
- --remove-unused-variables
13+
14+
- repo: https://github.com/pycqa/isort
15+
rev: 5.9.1
16+
hooks:
17+
- id: isort
18+
args:
19+
- --check
20+
- --profile=black
21+
- --conda-env=environment.yml
22+
23+
- repo: https://github.com/ambv/black
24+
rev: 21.5b2
25+
hooks:
26+
- id: black
27+
args:
28+
- --check
29+
30+
- repo: https://gitlab.com/pycqa/flake8
31+
rev: 3.9.2
32+
hooks:
33+
- id: flake8
34+
additional_dependencies:
35+
- flake8-bugbear==21.4.3

.travis.yml

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# run travis on these branches (and all PRs)
2+
branches:
3+
only:
4+
- master
5+
- develop
6+
17
# use the minimal travis environment since we test in conda
28
language: minimal
39

@@ -10,47 +16,55 @@ env:
1016
- CC_TEST_REPORTER_ID=951f438ac8a0fa93801ff0bf69922df59fe03800bf7ea8ab77a3c26cda444979
1117
jobs:
1218
- PYTHON_VERSION=3.6
13-
- PYTHON_VERSION=3.9
19+
20+
cache:
21+
directories:
22+
- $HOME/miniconda
1423

1524
before_install:
16-
# install miniconda
17-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
18-
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
19-
else
20-
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
25+
# install miniconda or use the cache
26+
- if test -e $HOME/miniconda/bin; then
27+
echo "Miniconda already installed";
28+
29+
export PATH=$HOME/miniconda/bin:$PATH;
30+
conda config --set always_yes yes;
31+
mamba env update -n genomepy -f environment.yml --prune;
32+
fi
33+
- if ! test -e $HOME/miniconda/bin; then
34+
echo "Installing miniconda";
35+
36+
CONDA_OS=$([ "$TRAVIS_OS_NAME" = "linux" ] && echo "Linux" || echo "MacOSX");
37+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-${CONDA_OS}-x86_64.sh -O miniconda.sh;
38+
chmod +x miniconda.sh;
39+
./miniconda.sh -b -p $HOME/miniconda -f;
40+
41+
export PATH=$HOME/miniconda/bin:$PATH;
42+
conda config --set always_yes yes;
43+
conda install conda-forge::mamba;
44+
mamba env create -n genomepy python=$PYTHON_VERSION -f environment.yml;
2145
fi
22-
- chmod +x miniconda.sh
23-
- ./miniconda.sh -b -p $HOME/miniconda -f
24-
- export PATH=$HOME/miniconda/bin:$PATH
25-
- conda config --set always_yes yes
26-
- conda install conda-forge::mamba
2746

2847
install:
29-
- mamba env create -n genomepy python=$PYTHON_VERSION -f environment.yml
3048
- source activate genomepy
3149
- python setup.py develop
3250
- python setup.py build
3351

3452
before_script:
3553
# install codeclimate test coverage
36-
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
37-
# wget -O cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64;
38-
# chmod +x ./cc-test-reporter;
39-
# ./cc-test-reporter before-build;
40-
# fi
4154
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
4255
wget -O cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64;
4356
chmod +x ./cc-test-reporter;
4457
./cc-test-reporter before-build;
4558
fi
4659

4760
script:
48-
- black --check setup.py genomepy/ tests/
49-
- flake8 setup.py genomepy/ tests/
50-
- pytest -vv --disable-pytest-warnings tests/*
61+
- pytest -vv --disable-pytest-warnings
5162
--reruns 1 --reruns-delay 10
5263
--cov=genomepy --cov-config=tests/.coveragerc --cov-report=xml
5364

65+
before_cache:
66+
- conda clean --all
67+
5468
after_script:
5569
# send the coverage data to Code Climate
5670
- if [ -f ./cc-test-reporter ]; then

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,53 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [0.10.0] - 2021-07-30
10+
11+
### Added
12+
- Annotation class, containing
13+
- regex filter (`genomepy.Annotation.filter_regex()`)
14+
- sanitize functions (`genomepy.Annotation.sanitize()`)
15+
- option to skip filtering and/or matching the annotation to the genome (also on CLI)
16+
- gene name remapping to various formats (`genomepy.Annotation.map_genes()`)
17+
- using MyGene.info. Can be queried separately (`genomepy.annotation.query_mygene()`)
18+
- contig name remapping to other provider formats (`genomepy.Annotation.map_locations()`)
19+
- get the annotations, or gene locations, as dataframes (`genomepy.Annotation.gtf`, `bed` or `gene_coords()` respectively)
20+
- get the gene names as a list (`genomepy.Annotation.genes("gtf")` or `genomepy.Annotation.genes("bed")`)
21+
- `genomepy install` now attempts to install the NCBI assembly report
22+
- NCBI provider also indexes the NCBI `genbank_historical` summary
23+
- `genomepy search` now shows if the genome has an annotation
24+
- this slows down the results a bit
25+
- to compensate, results are now shown as soon as they are found
26+
- for UCSC, availability of any of the 4 annotations is shown
27+
- `genomepy annotation` shows the first line(s) of each gene annotation.gtf
28+
- for developers:
29+
- pre-commit-hooks for linting
30+
- formatting/linting script `tests/format.sh` (optional argument `lint`)
31+
- isort & autoflake formatters
32+
33+
### Changed
34+
- provider module split per provider
35+
- ProviderBase overhauled, now called Provider
36+
- regex filtering separated from `Provider.download_genome`
37+
- utils module split into utils, files and online
38+
- now using loguru for pretty logging
39+
- accession `search` improved
40+
- now finds GCA and GCF accessions
41+
- now ignores patch levels
42+
- `genomepy install` automatic provider selection refactored
43+
- `Provider.online_providers` returns a generator (faster!)
44+
- `genomepy install` uses a combined filter function (faster!)
45+
- `genomepy install` only zips annotation files if the genome is zipped (with the bgzip flag) (faster!)
46+
- NCBI provider should be parsed faster (faster!)
47+
- new dependency: pandas
48+
- tests no longer format code
49+
50+
### Fixed
51+
- broken URLs should keep genomepy occupied for less long (check_url will immediately return on "Not Found" errors 404/450) (faster!)
52+
- the `Genome` class now passes arguments to the parent `Fasta` class
53+
- the `Genome` class now regenerates the sizes and gaps files similarly to the `Fasta` class and its index (when the genome is younger) (faster!)
54+
- somewhat more pythonic tests
55+
956
## [0.9.3] - 2021-02-03
1057

1158
### Changed
@@ -286,6 +333,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
286333
- Added `-r` and `--match/--no-match` option to select sequences by regex.
287334

288335
[Unreleased]: https://github.com/vanheeringen-lab/genomepy/compare/master...develop
336+
[0.10.0]: https://github.com/vanheeringen-lab/genomepy/compare/0.9.3...0.10.0
289337
[0.9.3]: https://github.com/vanheeringen-lab/genomepy/compare/0.9.2...0.9.3
290338
[0.9.2]: https://github.com/vanheeringen-lab/genomepy/compare/0.9.1...0.9.2
291339
[0.9.1]: https://github.com/vanheeringen-lab/genomepy/compare/0.9.0...0.9.1

0 commit comments

Comments
 (0)