Skip to content

Commit

Permalink
build: use setuptools-git-versioning for versioning (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
ketiltrout authored Jul 20, 2024
1 parent 5006d22 commit 0f32bc7
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 1,930 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.12"

- name: Install black
run: pip install black flake8
Expand All @@ -36,7 +36,7 @@ jobs:

strategy:
matrix:
python-version: ["3.8", "3.10"]
python-version: ["3.8", "3.12"]

runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions chimedb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""CHIME database interface."""

__path__ = __import__("pkgutil").extend_path(__path__, __name__)
10 changes: 6 additions & 4 deletions chimedb/dataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
# deprecated
from .get import get_dataset, get_state

from importlib.metadata import version, PackageNotFoundError

from ._version import get_versions
try:
__version__ = version("chimedb.data_index")
except PackageNotFoundError:
# package is not installed
pass


__version__ = get_versions()["version"]
del get_versions

__all__ = [
"Dataset",
"DatasetState",
Expand Down
1 change: 1 addition & 0 deletions chimedb/dataset/orm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Table definitions for the comet datasets and states."""

from chimedb.core.orm import base_model, JSONDictField

import peewee
Expand Down
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[build-system]
requires = ["setuptools>=61.0.0", "wheel", "setuptools-git-versioning"]
build-backed = "setuptools.build_meta"

[project]
name = "chimedb.dataset"
authors = [
{name = "Rick Nitsche for the CHIME Collaboration", email = "[email protected]"}
]
description = "CHIME dataset (comet) ORM"
requires-python = ">=3.8"
dynamic = ["readme", "version"]
license = {file = "LICENSE"}
dependencies = [
"chimedb @ git+https://github.com/chime-experiment/chimedb.git",
"click",
"peewee >= 3.10",
]

[project.scripts]
dataset_utils = "chimedb.dataset.utils:cli"

[project.optional-dependencies]
test = [
"pytest >= 7.0"
]

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

[tool.setuptools-git-versioning]
enabled = true
7 changes: 0 additions & 7 deletions setup.cfg

This file was deleted.

29 changes: 0 additions & 29 deletions setup.py

This file was deleted.

Loading

0 comments on commit 0f32bc7

Please sign in to comment.