Skip to content

Commit

Permalink
Merge pull request #2 from scverse-bot/template-update-cobioda-scispy…
Browse files Browse the repository at this point in the history
…-v0.4.0

Update template to v0.4.0
  • Loading branch information
cobioda authored Dec 18, 2024
2 parents a195a02 + c7e4a02 commit 71d9e6e
Show file tree
Hide file tree
Showing 16 changed files with 185 additions and 559 deletions.
12 changes: 9 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": "6a4338030e0c83a9034d607ed66abeff83e18840",
"checkout": null,
"commit": "87a407a65408d75a949c0b54b19fd287475a56f8",
"checkout": "v0.4.0",
"context": {
"cookiecutter": {
"project_name": "scispy",
Expand All @@ -13,9 +13,15 @@
"project_repo": "https://github.com/bfxomics/scispy",
"license": "MIT License",
"_copy_without_render": [
".github/workflows/**.yaml",
".github/workflows/build.yaml",
".github/workflows/test.yaml",
"docs/_templates/autosummary/**.rst"
],
"_render_devdocs": false,
"_jinja2_env_vars": {
"lstrip_blocks": true,
"trim_blocks": true
},
"_template": "https://github.com/scverse/cookiecutter-scverse"
}
},
Expand Down
39 changes: 19 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
name: Release

on:
push:
tags:
- "*.*.*"
release:
types: [published]

# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
jobs:
release:
name: Release
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/scispy
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
- uses: actions/checkout@v4
with:
python-version: "3.10"

- name: Install hatch
run: pip install hatch

- name: Build project for distribution
run: hatch build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
filter: blob:none
fetch-depth: 0
- uses: actions/setup-python@v4
with:
password: ${{ secrets.PYPI_API_TOKEN }}
python-version: "3.x"
cache: "pip"
- run: pip install build
- run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
46 changes: 0 additions & 46 deletions .github/workflows/sync.yaml

This file was deleted.

16 changes: 12 additions & 4 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 All @@ -21,13 +23,16 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: "3.9"
- os: ubuntu-latest
python: "3.10"
- os: ubuntu-latest
python: "3.10"
python: "3.12"
- os: ubuntu-latest
python: "3.12"
pip-flags: "--pre"
name: PRE-RELEASE DEPENDENCIES

name: ${{ matrix.name }} Python ${{ matrix.python }}

env:
OS: ${{ matrix.os }}
Expand All @@ -54,6 +59,9 @@ jobs:
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: |
pytest -v --cov --color=yes
coverage run -m pytest -v --color=yes
- name: Report coverage
run: |
coverage report
- name: Upload coverage
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ __pycache__/
/.pytest_cache/
/.cache/
/data/
/node_modules/

# docs
/docs/generated/
Expand Down
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,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
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks)
@@ -6,29 +6,18 @@ default_stages:
- push
minimum_pre_commit_version: 2.16.0
repos:
- - repo: https://github.com/psf/black
- rev: "24.4.2"
- 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
- # 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
+ - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
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.6.0
hooks:
10 changes: 10 additions & 0 deletions README.md.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff a/README.md b/README.md (rejected hunks)
@@ -17,7 +17,7 @@ Please refer to the [documentation][link-docs]. In particular, the

## Installation

-You need to have Python 3.9 or newer installed on your system. If you don't have
+You need to have Python 3.10 or newer installed on your system. If you don't have
Python installed, we recommend installing [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge).

There are several alternative options to install scispy:
4 changes: 4 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Reduce the font size in data frames - See https://github.com/scverse/cookiecutter-scverse/issues/193 */
div.cell_output table.dataframe {
font-size: 0.8em;
}
21 changes: 5 additions & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configuration file for the Sphinx documentation builder.
#

# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
Expand Down Expand Up @@ -57,6 +57,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 Expand Up @@ -108,12 +109,15 @@
#
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]

html_title = project_name

html_theme_options = {
"repository_url": repository_url,
"use_repository_button": True,
"path_to_docs": "docs/",
"navigation_with_keys": False,
}

pygments_style = "default"
Expand All @@ -123,18 +127,3 @@
# you can add an exception to this list.
# ("py:class", "igraph.Graph"),
]


def setup(app):
"""App setup hook."""
app.add_config_value(
"recommonmark_config",
{
"auto_toc_tree_section": "Contents",
"enable_auto_toc_tree": True,
"enable_math": True,
"enable_inline_math": False,
"enable_eval_rst": True,
},
True,
)
16 changes: 16 additions & 0 deletions docs/conf.py.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff a/docs/conf.py b/docs/conf.py (rejected hunks)
@@ -36,10 +36,10 @@ needs_sphinx = "4.0"

html_context = {
"display_github": True, # Integrate GitHub
- "github_user": "bfxomics", # Username
- "github_repo": project_name, # Repo name
- "github_version": "main", # Version
- "conf_py_path": "/docs/", # Path in the checkout to the docs root
+ "github_user": "bfxomics",
+ "github_repo": "https://github.com/bfxomics/scispy",
+ "github_version": "main",
+ "conf_py_path": "/docs/",
}

# -- General configuration ---------------------------------------------------
Loading

0 comments on commit 71d9e6e

Please sign in to comment.