Skip to content

Commit

Permalink
Merge pull request #36 from duncanmmacleod/setuptools-scm
Browse files Browse the repository at this point in the history
Use setuptools-scm for versioning
  • Loading branch information
duncanmmacleod committed Jan 28, 2022
2 parents 72f206c + af3325d commit 1054366
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -12,3 +12,4 @@ __pycache__/
.coverage
.pytest_cache/
/docs/api
/dqsegdb2/_version.py
21 changes: 21 additions & 0 deletions .readthedocs.yml
@@ -0,0 +1,21 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"

conda:
environment: docs/environment.yml

sphinx:
configuration: docs/conf.py

python:
install:
- method: pip
path: .
20 changes: 20 additions & 0 deletions docs/environment.yml
@@ -0,0 +1,20 @@
name: dqsegdb2
channels:
- conda-forge
dependencies:
# build
- pip
- setuptools
- setuptools-scm
- wheel
# install
- igwn-auth-utils
- ligo-segments
- requests
- safe-netrc
# docs
- numpydoc
- sphinx
- sphinx_rtd_theme
- sphinx-automodapi
- sphinx-tabs
6 changes: 5 additions & 1 deletion dqsegdb2/__init__.py
Expand Up @@ -18,6 +18,10 @@
"""A simplified Python implementation of the DQSEGDB API.
"""

__version__ = '1.0.1'
try:
from ._version import version as __version__
except ModuleNotFoundError: # development mode
__version__ = 'dev'

__author__ = 'Duncan Macleod <duncan.macleod@ligo.org>'
__credits__ = 'Ryan Fisher, Gary Hemming'
6 changes: 5 additions & 1 deletion pyproject.toml
@@ -1,10 +1,14 @@
[build-system]
requires = [
"setuptools>=30.3.0",
"setuptools>=42",
"setuptools_scm[toml]>=3.4",
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "dqsegdb2/_version.py"

[tool.pytest.ini_options]
addopts = "-r a"
filterwarnings = [
Expand Down
5 changes: 0 additions & 5 deletions requirements-docs.txt

This file was deleted.

7 changes: 7 additions & 0 deletions setup.cfg
Expand Up @@ -41,6 +41,8 @@ packages = find:
python_requires = >=3.6
setup_requires =
setuptools >= 30.3.0
setuptools_scm
wheel
install_requires =
igwn-auth-utils[requests]
ligo-segments
Expand All @@ -51,6 +53,11 @@ tests_require =

# -- extras

[coverage:run]
source = dqsegdb2
omit =
dqsegdb2/_version.py

[flake8]
exclude =
__pycache__,
Expand Down
41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

0 comments on commit 1054366

Please sign in to comment.