Skip to content

Commit

Permalink
Merge pull request #55 from dylanmcreynolds/python_versions
Browse files Browse the repository at this point in the history
Python versions
  • Loading branch information
dylanmcreynolds authored Nov 14, 2023
2 parents 8ff172b + 02fce38 commit fdf3e34
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 2,620 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version:
- "3.9"
- "3.10"
- "3.11"
fail-fast: false
steps:

Expand All @@ -33,7 +36,6 @@ jobs:
run: |
set -vxeuo pipefail
python -m pip install .[dev]
python -m pip install .[hdf5]
python -m pip list
- name: Lint with flake8
Expand All @@ -46,5 +48,6 @@ jobs:
shell: bash -l {0}
run: |
set -vxeuo pipefail
ls pyscicat
coverage run -m pytest --ignore tests_integration -v
coverage report
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ target/

.vscode/

pyscicat/_version.py
2 changes: 1 addition & 1 deletion continuous_integration/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ python -m pip install --upgrade pip setuptools wheel numpy
# Versioneer uses the most recent git tag to generate __version__, which appears
# in the published documentation.
git fetch --tags --force
python -m pip install '.'[base,h5tools]
python -m pip install '.[hdf5]'
python -m pip list
27 changes: 26 additions & 1 deletion docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,29 @@
At the command line
```
$ pip install pyscicat
```
```

## Optional installation
There are several collections of dependency that can be install along with pyscicat. Note that the following examples add single quotes around the optional dependency to make them work on `zsh`, the default shell for MacOS.

### h5py
pyscicat includes helper utilities for ingesting NeXus files. To use these, install the hdf5 option:

```
pip install '.[hdf5]'
```

### dev
If you are developing pyscicat itself, you will want to install the dev dependencies:

```
pip install '.[dev]'
```

### docs
If you are developing pyscicat documentation and want to generate it locally on your machine:

```
pip install '.[docs]'
```

61 changes: 61 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"


[project]
name = "pyscicat"
description = "a python API to communicate with the Scicat API"
readme = { file = "README.md", content-type = "text/markdown" }
authors = [
{ name = "Scicat Project Contributors", email = "dmcreynolds@lbl.gov" },
]
maintainers = [
{ name = "Scicat Project Team", email = "dmcreynolds@lbl.gov" },
]
requires-python = ">=3.9"
dependencies = [
"pydantic",
"requests"
]
classifiers= [
"Development Status :: 2 - Pre-Alpha",
"Natural Language :: English",
"Programming Language :: Python :: 3.7"
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/scicatproject/pyscicat"

[project.optional-dependencies]
hdf5 = [
"hdf5plugin",
"h5py",
]
dev = [
"codecov",
"coverage",
"flake8",
"pytest",
"sphinx",
"twine",
"black",
"requests_mock",
]
docs = [
"ipython",
"matplotlib",
"mistune <2.0.0", # temporary while sphinx sorts this out
"myst-parser",
"numpydoc",
"sphinx-click",
"sphinx-copybutton",
"sphinxcontrib.openapi",
"sphinx_rtd_theme",
]

[tool.black]
include = '\.pyi?$'
exclude = '''
Expand All @@ -17,3 +73,8 @@ exclude = '''
| tests/data
)/
'''


[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "pyscicat/_version.py"
5 changes: 1 addition & 4 deletions pyscicat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
from ._version import get_versions

__version__ = get_versions()["version"]
del get_versions
from ._version import __version__, __version_tuple__ # noqa: F401
Loading

0 comments on commit fdf3e34

Please sign in to comment.