-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into codyheiser/main
- Loading branch information
Showing
75 changed files
with
2,823 additions
and
1,582 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,8 @@ | ||
[bumpversion] | ||
current_version = 0.0.1 | ||
tag = True | ||
commit = False | ||
|
||
[bumpversion:file:./pyproject.toml] | ||
search = version = "{current_version}" | ||
replace = version = "{new_version}" |
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,17 @@ | ||
# Based on pydata/xarray | ||
codecov: | ||
require_ci_to_pass: no | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: | ||
# Require 1% coverage, i.e., always succeed | ||
target: 1 | ||
patch: false | ||
changes: false | ||
|
||
comment: | ||
layout: diff, flags, files | ||
behavior: once | ||
require_base: no |
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,19 @@ | ||
{ | ||
"template": "https://github.com/scverse/cookiecutter-scverse", | ||
"commit": "f5efdc5d14da023ef86a932b6bc583c7b243d2c9", | ||
"context": { | ||
"cookiecutter": { | ||
"project_name": "infercnvpy", | ||
"package_name": "infercnvpy", | ||
"project_description": "Infer copy number variation (CNV) from scRNA-seq data. Plays nicely with Scanpy. ", | ||
"author_full_name": "Gregor Sturm", | ||
"author_email": "mail@gregor-sturm.de", | ||
"github_user": "grst", | ||
"project_repo": "https://github.com/icbi-lab/infercnvpy", | ||
"license": "BSD 3-Clause License", | ||
"_copy_without_render": [".github/workflows/**.yaml"], | ||
"_template": "https://github.com/scverse/cookiecutter-scverse" | ||
} | ||
}, | ||
"directory": null | ||
} |
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,15 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
max_line_length = 88 | ||
|
||
[*.py] | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
|
||
[Makefile] | ||
indent_style = tab |
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,56 @@ | ||
# Can't yet be moved to the pyproject.toml due to https://github.com/PyCQA/flake8/issues/234 | ||
[flake8] | ||
max-line-length = 120 | ||
ignore = | ||
# line break before a binary operator -> black does not adhere to PEP8 | ||
W503 | ||
# line break occured after a binary operator -> black does not adhere to PEP8 | ||
W504 | ||
# line too long -> we accept long comment lines; black gets rid of long code lines | ||
E501 | ||
# whitespace before : -> black does not adhere to PEP8 | ||
E203 | ||
# missing whitespace after ,', ';', or ':' -> black does not adhere to PEP8 | ||
E231 | ||
# continuation line over-indented for hanging indent -> black does not adhere to PEP8 | ||
E126 | ||
# E266 too many leading '#' for block comment -> this is fine for indicating sections | ||
E262 | ||
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient | ||
E731 | ||
# allow I, O, l as variable names -> I is the identity matrix, i, j, k, l is reasonable indexing notation | ||
E741 | ||
# Missing docstring in public package | ||
D104 | ||
# ... imported but unused | ||
F401 | ||
# Missing docstring in public module | ||
D100 | ||
# Missing docstring in __init__ | ||
D107 | ||
# Do not perform function calls in argument defaults. | ||
B008 | ||
# line break before binary operator | ||
W503 | ||
# Missing docstring in magic method | ||
D105 | ||
# whitespace before ':' | ||
E203 | ||
# format string does contain unindexed parameters | ||
P101 | ||
# first line should end with a period [Bug: doesn't work with single-line docstrings] | ||
D400 | ||
# First line should be in imperative mood; try rephrasing | ||
D401 | ||
# undefined RST roles | ||
RST304 | ||
# RST definition list ends without a blank linke; unexpected unindent | ||
RST203 | ||
# ignore false positive warnings due to *args, **kwargs | ||
RST210 | ||
|
||
|
||
exclude = .git,__pycache__,build,docs/_build,dist | ||
per-file-ignores = | ||
tests/*: D | ||
*/__init__.py: F401 |
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
name: Check Build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- name: Install build dependencies | ||
run: python -m pip install --upgrade pip wheel twine build | ||
- name: Build package | ||
run: python -m build | ||
- name: Check package | ||
run: twine check --strict dist/*.whl |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,43 @@ | ||
name: Sync Template | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 2 * * *" # every night at 2:00 | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: python -m pip install --upgrade cruft | ||
- name: Find Latest Tag | ||
uses: oprypin/find-latest-tag@v1.1.0 | ||
id: get-latest-tag | ||
with: | ||
repository: scverse/cookiecutter-scverse | ||
releases-only: false | ||
sort-tags: true | ||
regex: '^v\d+\.\d+\.\d+$' # vX.X.X | ||
- name: Sync | ||
run: | | ||
cruft update --checkout ${{ steps.get-latest-tag.outputs.tag }} --skip-apply-ask --project-dir . | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
commit-message: Automated template update from cookiecutter-scverse | ||
branch: template-update | ||
title: Automated template update from cookiecutter-scverse | ||
body: | | ||
A new version of the scverse cookiecutter template got released. This PR | ||
adds all new changes to your repository and helps to to stay in sync with the latest | ||
best-practice template maintained by the scverse team. | ||
If a merge conflict arised, a `.rej` file with the rejected patch is generated. You'll need to | ||
manually merge these changes. | ||
For more information about the template sync, please refer to the [template documentation](TODO). |
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,77 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -e {0} # -e to fail on error | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.8", "3.10"] | ||
os: [ubuntu-latest] | ||
r: ["release"] | ||
|
||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python }} | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.r }} | ||
use-public-rspm: true | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache-dir | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Restore pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache-dir.outputs.dir }} | ||
key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }} | ||
restore-keys: | | ||
pip-${{ runner.os }}-${{ env.pythonLocation }}- | ||
- name: Install test dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
pip install codecov | ||
- name: Install dependencies | ||
run: | | ||
pip install ".[dev,test,copykat]" | ||
- name: Install R dependencies | ||
run: | | ||
install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch)) | ||
# TODO: use copykat version from february, latest version seens to have a bug... | ||
pak::pkg_install(c('stringr', 'navinlabcode/copykat@674e331cf12ce14b62eaf6459f7c84a82fc4c775')) | ||
shell: Rscript {0} | ||
|
||
- name: Test | ||
env: | ||
MPLBACKEND: agg | ||
PLATFORM: ${{ matrix.os }} | ||
DISPLAY: :42 | ||
run: | | ||
pytest -v --cov --color=yes | ||
- name: Upload coverage | ||
env: | ||
CODECOV_NAME: ${{ matrix.python }}-${{ matrix.os }} | ||
run: | | ||
codecov --required --flags=unittests |
Oops, something went wrong.