Skip to content

Commit

Permalink
use hatchling and not setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
skoudoro committed Jan 30, 2023
1 parent 5e130fd commit 6ada424
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 81 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ include = */fury/*
omit =
*/setup.py
*/_version.py
*/tests/*
[report]
show_missing = True
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:match=[0-9]*)$
ref-names: $Format:%D$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ target/
tmp/
temp/

_version.py

12 changes: 12 additions & 0 deletions .pep8speaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
scanner:
diff_only: True # Only show errors caused by the patch
linter: flake8

message: # Customize the comment made by the bot
opened: # Messages when a new PR is submitted
header: "Hello @{name}, thank you for submitting the Pull Request!"
footer: "To test for issues locally, `pip install flake8` and then run `flake8 fury`."
updated: # Messages when new commits are added to the PR
header: "Hello @{name}, Thank you for updating!"
footer: "To test for issues locally, `pip install flake8` and then run `flake8 fury`."
no_errors: "Cheers! There are no style issues detected in this Pull Request. :beers: "
17 changes: 0 additions & 17 deletions MANIFEST.in

This file was deleted.

100 changes: 48 additions & 52 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
[build-system]
requires = ["setuptools>=65.4", "setuptools_scm[toml]>=7.1", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "fury"
description = "FURY - Free Unified Rendering in pYthon. A free and open-source software library for Scientific Visualization and 3D animations"
#long_description = "file: README.md"
#long_description_content_type = "text/markdown; charset=UTF-8"
readme = "file: README.md"
requires-python = ">=3.7"
license.file="file: LICENSE"
readme = "README.md"
requires-python = ">=3.8"
license.file="LICENSE"
keywords = ["Scientific Visualization", "shaders", "animation", "simulation",
"Physically based rendering", "3D", "3D rendering", "networks",
"physics engine", "physics", "simulation", "visualization"]
Expand All @@ -36,9 +34,10 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
]

Expand All @@ -48,75 +47,72 @@ dependencies = [
"vtk>=9.1.0",
"pillow>=5.4.1",
"packaging >=17.0",
"setuptools",
]

dynamic = ["version"]

[tool.setuptools]
#packages = ["fury"]
zip-safe = false
platforms = ["OS Independent", "Windows", "Mac OS-X", "Linux"]
include-package-data = true

[tool.setuptools.packages.find]
#where = ["fury"] # list of folders that contain the packages (["."] by default)
exclude = ["docs", "tests"]

#[tool.setuptools.package_data]
# When adding files here, remember to update MANIFEST.in as well,
# or else they will not be included in the distribution on PyPI!
# 'path/to/data_file',
#fury = ["fury/data/files/*", "fury/shaders/*"]

[tool.setuptools_scm]
write_to = "fury/_version.py"
[project.urls]
Documentation = "https://fury.gl"
Source = "https://github.com/fury-gl/fury"
Tracker = "https://github.com/fury-gl/fury/issues"

[project.optional-dependencies]

all = ["fury[plot, dev, doc, medical, style, test]"]
plot = ["matplotlib>=1.5.3", ]

medical = ["dipy", "nibabel"]

dev = [
"gitpython",
"twine",
]

doc = [
"matplotlib >= 1.5.3",
"numpydoc",
"sphinx >=0.3,<3",
"sphinx >=6.1.2",
"texext",
"tomli; python_version < \"3.11\"",
]

style = [
"flake8",
]
style = ["flake8", "blue", "isort", "pre-commit"]
test = [
"coverage",
"pytest !=5.3.4",
"pytest-cov",
"pytest-doctestplus",
]
all = [
"fury[plot]",
"fury[dev]",
"fury[doc]",
"fury[medical]",
"fury[style]",
"fury[test]",
]

[project.urls]
Documentation = "https://fury.gl"
Source = "https://github.com/fury-gl/fury"
Tracker = "https://github.com/fury-gl/fury/issues"


[tool.black]
line-length = 90
fast = true
[tool.hatch.build.targets.sdist]
exclude = [".git_archival.txt"]

[tool.hatch.build.targets.wheel]
packages = ["fury",]
exclude = []

[tool.hatch.version]
source = "vcs"
raw-options = { version_scheme = "release-branch-semver" }

[tool.hatch.build.hooks.vcs]
version-file = "fury/_version.py"

[tool.blue]
line_length = 99
target-version = ["py38"]
force-exclude = """
(
_version.py
)
"""

[tool.isort]
profile = "black"
line_length = 99
extend_skip = ["_version.py", "externals"]

[tool.mypy]
python_version = "3.11"
exclude = [
"/tests",
]

[tool.coverage.run]
branch = true
Expand Down
12 changes: 0 additions & 12 deletions test_platform.sh

This file was deleted.

0 comments on commit 6ada424

Please sign in to comment.