Skip to content
Draft
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
15 changes: 15 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: p5rem
channels:
- conda-forge
- nodefaults

dependencies:
- cbor2
- diskcache
- numpy >=2.0.0
- pyactivestorage
- pyfive >=0.5.0
# testing
- pytest
- pytest-cov
17 changes: 16 additions & 1 deletion p5rem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
from .proxy import rDataset, rFile
from .session import Session, p5remSession

from importlib.metadata import version, PackageNotFoundError


__all__ = [
"BootstrappedProcess",
"BootstrapError",
Expand All @@ -36,4 +39,16 @@
"p5remSession",
"rDataset",
"rFile",
]
]


try:
__version__ = version("p5rem")
except PackageNotFoundError as exc:
msg = (
"p5rem package not found, please run `pip install -e .` before "
"importing the package."
)
raise PackageNotFoundError(
msg,
) from exc
19 changes: 15 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
[build-system]
requires = ["setuptools>=64", "wheel"]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bnlawrence setuptools and pip build wheels so the fairly obsolete "wheel" system backend is not needed anymore; having said that, we really don't want to distribute wheels anyway

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do folks get the c-version for their platform? Do they have to build it on install, and what happens if they don't have a compiler?

build-backend = "setuptools.build_meta:__legacy__"
requires = [
"setuptools>=80",
"setuptools_scm>=8",
]
build-backend = "setuptools.build_meta"

[project]
name = "p5rem"
version = "0.1.0"
description = "Remote HDF5 chunk serving and reduction over SSH"
readme = "README.md"
license = {text = "BSD-3-Clause"}
authors = [
{name = "Bryan Lawrence", email = "bryan.lawrence@ncas.ac.uk"}
]
dynamic = [
"readme",
"version",
]
requires-python = ">=3.10"
dependencies = [
"pyfive>=0.5.0",
Expand All @@ -31,6 +36,12 @@ dev = [
where = ["."]
include = ["p5rem*"]

[tool.setuptools_scm]
version_scheme = "release-branch-semver"

[tool.setuptools.dynamic]
readme = {file = "README.md", content-type = "text/markdown"}

[tool.pytest.ini_options]
markers = [
"integration: optional integration tests requiring external services",
Expand Down