generated from theislab/sc_analysis_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
585c541
commit aecc276
Showing
9 changed files
with
197 additions
and
3 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,20 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[makefile] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = tab | ||
indent_size = 4 |
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 |
---|---|---|
|
@@ -157,3 +157,5 @@ figures/ | |
|
||
# R stuff | ||
*.Rhistory | ||
|
||
.vscode/* |
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,54 @@ | ||
fail_fast: false | ||
default_language_version: | ||
python: python3 | ||
default_stages: | ||
- commit | ||
- push | ||
minimum_pre_commit_version: 2.16.0 | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: "23.1.0" | ||
hooks: | ||
- id: black-jupyter | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.13.0 | ||
hooks: | ||
- id: blacken-docs | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.0-alpha.4 | ||
hooks: | ||
- id: prettier | ||
# Newer versions of node don't work on systems that have an older version of GLIBC | ||
# (in particular Ubuntu 18.04 and Centos 7) | ||
# EOL of Centos 7 is in 2024-06, we can probably get rid of this then. | ||
# See https://github.com/scverse/cookiecutter-scverse/issues/143 and | ||
# https://github.com/jupyterlab/jupyterlab/issues/12675 | ||
language_version: "17.9.1" | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.253 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: detect-private-key | ||
- id: check-ast | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: trailing-whitespace | ||
- id: check-case-conflict | ||
- repo: local | ||
hooks: | ||
- id: forbid-to-commit | ||
name: Don't commit rej files | ||
entry: | | ||
Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates. | ||
Fix the merge conflicts manually and remove the .rej files. | ||
language: fail | ||
files: '.*\.rej$' |
Empty file.
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,114 @@ | ||
[build-system] | ||
requires = ['setuptools', 'setuptools_scm'] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
[project] | ||
name = "fancypackage" | ||
version = "0.0.0" | ||
description = "Fancy Package" | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{name = "Jane Doe"}, | ||
] | ||
maintainers = [ | ||
{name = "Jane Doe", email = "[email protected]"}, | ||
] | ||
urls.Source = "https://github.com/url/to/repo.git" | ||
urls.Home-page = "https://github.com/url/to/repo.git" | ||
dependencies = [ | ||
"anndata", | ||
"scanpy", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"pre-commit", | ||
] | ||
|
||
[tool.black] | ||
line-length = 120 | ||
include = '\.pyi?$|\.ipynb?$' | ||
exclude = ''' | ||
( | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
) | ||
''' | ||
|
||
[tool.isort] | ||
profile = "black" | ||
use_parentheses = true | ||
known_num = "networkx,numpy,pandas,scipy,sklearn,statmodels" | ||
known_plot = "matplotlib,mplscience,mpl_toolkits,seaborn" | ||
known_bio = "anndata,scanpy" | ||
sections = "FUTURE,STDLIB,THIRDPARTY,NUM,PLOT,BIO,FIRSTPARTY,LOCALFOLDER" | ||
no_lines_before = "LOCALFOLDER" | ||
balanced_wrapping = true | ||
length_sort = "0" | ||
indent = " " | ||
float_to_top = true | ||
order_by_type = false | ||
|
||
[tool.ruff] | ||
src = ["."] | ||
line-length = 119 | ||
target-version = "py38" | ||
select = [ | ||
"F", # Errors detected by Pyflakes | ||
"E", # Error detected by Pycodestyle | ||
"W", # Warning detected by Pycodestyle | ||
"D", # pydocstyle | ||
"B", # flake8-bugbear | ||
"TID", # flake8-tidy-imports | ||
"C4", # flake8-comprehensions | ||
"BLE", # flake8-blind-except | ||
"UP", # pyupgrade | ||
"RUF100", # Report unused noqa directives | ||
] | ||
ignore = [ | ||
# line too long -> we accept long comment lines; black gets rid of long code lines | ||
"E501", | ||
# 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 | ||
"E741", | ||
# Missing docstring in public package | ||
"D104", | ||
# Missing docstring in public module | ||
"D100", | ||
# Missing docstring in __init__ | ||
"D107", | ||
# Errors from function calls in argument defaults. These are fine when the result is immutable. | ||
"B008", | ||
# __magic__ methods are are often self-explanatory, allow missing docstrings | ||
"D105", | ||
# 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", | ||
## Disable one in each pair of mutually incompatible rules | ||
# We don’t want a blank line before a class docstring | ||
"D203", | ||
# We want docstrings to start immediately after the opening triple quote | ||
"D213", | ||
# Missing argument description in the docstring TODO: enable | ||
"D417", | ||
# Unable to detect undefined names | ||
"F403", | ||
# Underfined, or defined from star imports: module | ||
"F405", | ||
# Within an except clause, raise exceptions with `raise ... from err` | ||
"B904", | ||
] |
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,3 @@ | ||
from .core import DATA_DIR, FIG_DIR | ||
|
||
__all__ = ["DATA_DIR", "FIG_DIR"] |
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,3 @@ | ||
from ._constants import DATA_DIR, FIG_DIR | ||
|
||
__all__ = ["DATA_DIR", "FIG_DIR"] |
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,9 +1,7 @@ | ||
from pathlib import Path | ||
|
||
ROOT = Path(__file__).parent.resolve() | ||
ROOT = Path(__file__).parents[3].resolve() | ||
|
||
|
||
DATA_DIR = ROOT / "data" | ||
FIG_DIR = ROOT / "figures" | ||
CODE_DIR = ROOT / "src" | ||
|
Empty file.