Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update template to v0.3.1 #219

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "spatialdata-plot",
Expand All @@ -13,7 +13,8 @@
"project_repo": "https://github.com/scverse/spatialdata-plot",
"license": "BSD 3-Clause License",
"_copy_without_render": [
".github/workflows/**.yaml",
".github/workflows/build.yaml",
".github/workflows/test.yaml",
"docs/_templates/autosummary/**.rst"
],
"_render_devdocs": false,
Expand Down
60 changes: 0 additions & 60 deletions .flake8

This file was deleted.

36 changes: 17 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@ on:
release:
types: [published]

# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
jobs:
release:
# requires that you have put your twine API key in your
# github secrets (see readme for details)
name: Upload release to PyPI
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
environment:
name: pypi
url: https://pypi.org/p/spatialdata_plot
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
2 changes: 1 addition & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ no_warn_no_return = True

show_error_codes = True
show_column_numbers = True
error_summary = True
error_summary = True
35 changes: 25 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,11 @@ default_stages:
- commit
- push
minimum_pre_commit_version: 2.16.0
ci:
skip: []
repos:
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
Expand All @@ -30,4 +20,29 @@ repos:
rev: v0.3.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:
- 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
# 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
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$'
18 changes: 2 additions & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"sphinx.ext.mathjax",
"IPython.sphinxext.ipython_console_highlighting",
"sphinx_design",
"sphinxext.opengraph",
*[p.stem for p in (HERE / "extensions").glob("*.py")],
]

Expand Down Expand Up @@ -130,6 +131,7 @@
html_theme = "sphinx_book_theme"
# html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
html_css_files = ["css/custom.css"]
html_title = project_name
html_logo = "_static/img/spatialdata_horizontal.png"

Expand All @@ -145,19 +147,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,
)
app.add_css_file("css/custom.css")
44 changes: 0 additions & 44 deletions docs/conf.py.rej

This file was deleted.

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
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

api.md
changelog.md
template_usage.md
contributing.md
references.md
```
9 changes: 0 additions & 9 deletions docs/index.md.rej

This file was deleted.

4 changes: 1 addition & 3 deletions docs/notebooks/preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@
"tags": []
},
"outputs": [],
"source": [
"import spatialdata_plot"
]
"source": []
},
{
"cell_type": "markdown",
Expand Down
Loading
Loading