Skip to content

Commit

Permalink
Merge pull request #8 from scverse-bot/template-update-theislab-ehrda…
Browse files Browse the repository at this point in the history
…ta-v0.3.1

Update template to v0.3.1
  • Loading branch information
xinyuejohn authored Mar 18, 2024
2 parents 4689415 + e0602fa commit d8f161f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 23 deletions.
7 changes: 4 additions & 3 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": "8e96abb5c3e2d5078c44713958da672711cf2a48",
"checkout": "v0.3.0",
"commit": "586b1652162ff7994b0070a034023d64289ae416",
"checkout": "v0.3.1",
"context": {
"cookiecutter": {
"project_name": "ehrdata",
Expand All @@ -13,7 +13,8 @@
"project_repo": "https://github.com/theislab/ehrdata",
"license": "Apache License Version 2.0",
"_copy_without_render": [
".github/workflows/**.yaml",
".github/workflows/build.yaml",
".github/workflows/test.yaml",
"docs/_templates/autosummary/**.rst"
],
"_render_devdocs": false,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/{{ cookiecutter.package_name }}
url: https://pypi.org/p/ehrdata
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
Expand Down
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,26 @@ default_stages:
- push
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/psf/black
rev: "24.2.0"
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
<<<<<<< ours
# 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
=======
>>>>>>> theirs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand Down
3 changes: 2 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Before making a release, you need to update the version number in the `pyproject
> Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
Once you are done, commit and push your changes and navigate to the "Releases" page of this project on GitHub.
Specify `vX.X.X` as a tag name and create a release. For more information, see [managing Github releases][]. This will automatically create a git tag and trigger a Github workflow that creates a release on PyPI.
Specify `vX.X.X` as a tag name and create a release. For more information, see [managing GitHub releases][]. This will automatically create a git tag and trigger a Github workflow that creates a release on PyPI.

## Writing documentation

Expand Down Expand Up @@ -157,3 +157,4 @@ open _build/html/index.html
[numpydoc]: https://numpydoc.readthedocs.io/en/latest/format.html
[sphinx autodoc typehints]: https://github.com/tox-dev/sphinx-autodoc-typehints
[pypi]: https://pypi.org/
[managing GitHub releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
23 changes: 13 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ dependencies = [
"seaborn",

# for debug logging (referenced from the issue template)
"session-info"
"session-info",
]

[project.optional-dependencies]
dev = [
"pre-commit",
"twine>=4.0.2"
"twine>=4.0.2",
]
doc = [
"docutils>=0.8,!=0.18.*,!=0.19.*",
Expand Down Expand Up @@ -71,12 +71,15 @@ addopts = [
"--import-mode=importlib", # allow using test files with same name
]

[tool.black]
line-length = 120

[tool.ruff]
src = ["src"]
line-length = 120
src = ["src"]
extend-include = ["*.ipynb"]

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint]
select = [
"F", # Errors detected by Pyflakes
"E", # Error detected by Pycodestyle
Expand All @@ -91,7 +94,7 @@ select = [
"RUF100", # Report unused noqa directives
]
ignore = [
# line too long -> we accept long comment lines; black gets rid of long code lines
# line too long -> we accept long comment lines; formatter gets rid of long code lines
"E501",
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
"E731",
Expand All @@ -118,10 +121,10 @@ ignore = [
"D213",
]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"docs/*" = ["I"]
"tests/*" = ["D"]
"*/__init__.py" = ["F401"]
Expand All @@ -135,5 +138,5 @@ skip = [
"docs/changelog.md",
"docs/references.bib",
"docs/references.md",
"docs/notebooks/example.ipynb"
"docs/notebooks/example.ipynb",
]

0 comments on commit d8f161f

Please sign in to comment.