Skip to content

Commit

Permalink
use uv
Browse files Browse the repository at this point in the history
  • Loading branch information
szsdk committed Sep 24, 2024
1 parent f77826e commit 1ad44e9
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 40 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[tests]"
python -m pip install uv
uv venv
uv pip install -e .[dev]
- name: Lint with Ruff
run: |
pip install ruff
ruff check --target-version=py310 .
uv run ruff check --target-version=py310 .
continue-on-error: true
- name: Test with pytest
run: |
pytest --cov emcfile -xs .
uv run pytest --cov emcfile -xs .
- name: Generate Coverage Report
run: |
coverage report -m
uv run coverage report -m
57 changes: 24 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,34 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "emcfile"
version = "0.0.0"
authors = [{name = "Shen Zhou", email = "[email protected]"}]
description = "This package supplies basic classes about datasets and detectors used in XFEL single pariticle imaging."
license = {text="GPLv3"}
version = "0.1.0"
description = "Add your description here"
readme = "readme.md"
requires-python = ">=3.9"
dependencies = [
"h5py",
"numpy >= 1.20.0",
"scipy",
"typing_extensions"
"h5py>=3.11.0",
"numpy>=1.20",
"scipy>=1.12.0",
"typing-extensions>=4.12.2",
]

[project.optional-dependencies]
tests = [
"coverage>=5.0.3",
"psutil",
"pdoc3",
"pytest",
"pytest-cov",
"pytest-html",
"pytest-metadata",
"matplotlib"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv]
dev-dependencies = [
"pre-commit>=2.20.0",
"coverage>=5.0.3",
"mypy>=0.991",
"pytest>=7.2.0",
"pytest-cov>=4.0.0",
"pytest-html",
"ruff>=0.0.235",
"psutil",
"pdoc3",
"matplotlib",
]

[tool.setuptools]
zip-safe = false
packages = ["emcfile"]
include-package-data = true

[tool.setuptools.package-dir]
emcfile = "emcfile/"

[tool.setuptools.package-data]
emcfile = ["py.typed"]

[tool.pytest.ini_options]
log_cli = true
# False: no test names
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion emcfile/tests/test_patterns.py → tests/test_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
from scipy.sparse import coo_array, csr_array

import emcfile as ef
from emcfile.tests.utils import temp_seed

from .utils import temp_seed


def gen_dense(num_data, num_pix):
Expand Down
File renamed without changes.

0 comments on commit 1ad44e9

Please sign in to comment.