Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setuptools git versioning #16

Merged
merged 2 commits into from
Jul 20, 2024
Merged
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
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 = "dvw@phas.ubc.ca"}
]
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
Loading