Skip to content

Commit

Permalink
Updates from the package template (#171)
Browse files Browse the repository at this point in the history
* Automatic package template update

* Update pyproject.toml

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: Cadair <[email protected]>
Co-authored-by: Stuart Mumford <[email protected]>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 30, 2024
1 parent 4f9dedb commit b79ab48
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "147c523135c0c612de0054897c87f8b4454dcd7a",
"commit": "17602ec8f8d4a4c5722bca00e255e480683f5096",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
# This should be before any formatting hooks like isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.4"
rev: "v0.6.7"
hooks:
- id: ruff
args: ["--fix"]
Expand Down
12 changes: 11 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@

import datetime

from packaging.version import Version

# -- Project information -----------------------------------------------------

# The full version, including alpha/beta/rc tags
from streamtracer import __version__

release = __version__
_version = Version(__version__)
version = release = str(_version)
# Avoid "post" appearing in version string in rendered docs
if _version.is_postrelease:
version = release = _version.base_version
# Avoid long githashes in rendered Sphinx docs
elif _version.is_devrelease:
version = release = f"{_version.base_version}.dev{_version.dev}"
is_development = _version.is_devrelease

project = "streamtracer"
author = "The SunPy Developers, David Stansby"
Expand Down
19 changes: 10 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ requires = [
]
build-backend = "maturin"

[tool.maturin]
python-source = "python"
module-name = "streamtracer._streamtracer_rust"

[project]
name = "streamtracer"
description = "Python library to calculate streamlines"
Expand Down Expand Up @@ -38,11 +34,6 @@ dependencies = [
"packaging>=21.3",
]

[project.urls]
Homepage = "https://docs.sunpy.org/projects/streamtracer"
Documentation = "https://docs.sunpy.org/projects/streamtracer"
Repository = "https://github.com/sunpy/streamtracer"

[project.optional-dependencies]
tests = [
"pytest",
Expand All @@ -53,11 +44,21 @@ tests = [
docs = [
"sphinx",
"sphinx-automodapi",
"packaging",
"jupyter-sphinx",
"sunpy-sphinx-theme",
"sphinx-changelog",
]

[project.urls]
Homepage = "https://docs.sunpy.org/projects/streamtracer"
Documentation = "https://docs.sunpy.org/projects/streamtracer"
Repository = "https://github.com/sunpy/streamtracer"

[tool.maturin]
python-source = "python"
module-name = "streamtracer._streamtracer_rust"

[tool.cibuildwheel]
before-build = "rustup show"
environment = {"PATH" = "$PATH:$HOME/.cargo/bin"}
Expand Down

0 comments on commit b79ab48

Please sign in to comment.