Skip to content

Commit

Permalink
Update template to v0.2.22 (#449)
Browse files Browse the repository at this point in the history
* Update template to v0.2.22

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix merge conflicts

* update pre-commit

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: scverse-bot <None>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Gregor Sturm <gregor.sturm@boehringer-ingelheim.com>
  • Loading branch information
3 people authored Aug 16, 2023
1 parent a0c199d commit 7d94860
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "6a4338030e0c83a9034d607ed66abeff83e18840",
"checkout": null,
"commit": "605f95714130c960bce12eab98a4e023e8932249",
"checkout": "v0.2.22",
"context": {
"cookiecutter": {
"project_name": "scirpy",
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 5 1,15 * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
hooks:
- id: blacken-docs
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
rev: v3.0.1
hooks:
- id: prettier
# Newer versions of node don't work on systems that have an older version of GLIBC
Expand All @@ -26,7 +26,7 @@ repos:
language_version: "17.9.1"
exclude: '^\.conda'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.281
rev: v0.0.284
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -40,6 +40,9 @@ repos:
args: [--fix=lf]
- id: trailing-whitespace
- id: check-case-conflict
# Check that there are no merge conflicts (could be generated by template sync)
- id: check-merge-conflict
args: [--assume-in-merge]
- repo: local
hooks:
- id: forbid-to-commit
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"sphinx_autodoc_typehints",
"sphinx.ext.mathjax",
"IPython.sphinxext.ipython_console_highlighting",
"sphinxext.opengraph",
*[p.stem for p in (HERE / "extensions").glob("*.py")],
]

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dev = [
"pre-commit"
]
doc = [
"docutils>=0.8,!=0.18.*,!=0.19.*",
'sphinx>=4',
"sphinx-book-theme>=1.0.0",
"myst-nb",
Expand All @@ -57,6 +58,7 @@ doc = [
'ipykernel',
'ipython',
"sphinx-copybutton",
"sphinxext-opengraph",
'leidenalg',
'myst_nb',
'jupytext',
Expand Down Expand Up @@ -109,12 +111,10 @@ norecursedirs = [ '.*', 'build', 'dist', '*.egg', 'data', '__pycache__']

[tool.black]
line-length = 120
target-version = ["py39"]

[tool.ruff]
src = ["src"]
line-length = 120
target-version = "py39"
select = [
"F", # Errors detected by Pyflakes
"E", # Error detected by Pycodestyle
Expand Down
17 changes: 4 additions & 13 deletions src/scirpy/io/_tracerlib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,26 +368,17 @@ def get_summary(self):
if not self.has_D_segment:
V_segment = self.summary[0]
J_segment = self.summary[1]
segments_string = "V segment:\t{V_segment}\n" "J segment:\t{J_segment}\n".format(
V_segment=V_segment, J_segment=J_segment
)
segments_string = f"V segment:\t{V_segment}\n" f"J segment:\t{J_segment}\n"
else:
V_segment = self.summary[0]
D_segment = self.summary[1]
J_segment = self.summary[2]
segments_string = "V segment:\t{V_segment}\nD segment:\t{D_segment}\n" "J segment:\t{J_segment}\n".format(
V_segment=V_segment, D_segment=D_segment, J_segment=J_segment
)
segments_string = f"V segment:\t{V_segment}\nD segment:\t{D_segment}\n" f"J segment:\t{J_segment}\n"
summary_string += segments_string
summary_string += f"ID:\t{self.identifier}\n"
summary_string += (
"TPM:\t{TPM}\nProductive:\t{productive}\nStop codon:"
"\t{stop_codon}\nIn frame:\t{in_frame}\n".format(
TPM=self.TPM,
productive=self.productive,
stop_codon=self.stop_codon,
in_frame=self.in_frame,
)
f"TPM:\t{self.TPM}\nProductive:\t{self.productive}\nStop codon:"
f"\t{self.stop_codon}\nIn frame:\t{self.in_frame}\n"
)

# lowercase CDR3 sequences if non-productive
Expand Down
4 changes: 2 additions & 2 deletions src/scirpy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ def deprecated(message):
def deprecated_decorator(func):
def deprecated_func(*args, **kwargs):
warnings.warn(
"{} is a deprecated function and will be removed in a "
"future version of scirpy. {}".format(func.__name__, message),
f"{func.__name__} is a deprecated function and will be removed in a "
f"future version of scirpy. {message}",
category=FutureWarning,
stacklevel=2,
)
Expand Down

0 comments on commit 7d94860

Please sign in to comment.