Skip to content

Commit

Permalink
Update template to v0.3.0 (#124)
Browse files Browse the repository at this point in the history
Co-authored-by: scverse-bot <None>
Co-authored-by: Philipp A <flying-sheep@web.de>
  • Loading branch information
scverse-bot and flying-sheep authored Nov 28, 2023
1 parent 354bdc3 commit fa100dd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 38 deletions.
9 changes: 7 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": "23a9eaaf101dc9b6d31976f32f7345e1b209b071",
"checkout": "v0.2.21",
"commit": "8e96abb5c3e2d5078c44713958da672711cf2a48",
"checkout": "v0.3.0",
"context": {
"cookiecutter": {
"project_name": "scverse-tutorials",
Expand All @@ -16,6 +16,11 @@
".github/workflows/**.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/{{ cookiecutter.package_name }}
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
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;
}
19 changes: 3 additions & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,20 @@
#
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,
"repository_branch": "main",
"path_to_docs": "docs/",
"navigation_with_keys": False,
"use_repository_button": True,
"launch_buttons": {
"binderhub_url": "https://mybinder.org",
# "colab_url": "https://colab.research.google.com",
},
"navigation_with_keys": False,
}

pygments_style = "default"
Expand All @@ -128,18 +130,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,
)

0 comments on commit fa100dd

Please sign in to comment.