Commit 19c4f2ed authored by Leo Pound Singer's avatar Leo Pound Singer

Revert "Switch from versioneer to setuptools_scm"

This reverts commit 1f616d9b.
parent 333caa39
gwcelery/_version.py export-subst
......@@ -12,7 +12,6 @@ __pycache__
build
dist
htmlcov
gwcelery/_version.py
# Files created by running gwcelery inside the source directory
appendonly.aof
......
......@@ -12,9 +12,6 @@ Changelog
header field, make a bullet chart to compare the log Bayes factor to a
standard table of threshold confidence levels from Kass & Raftery (1995).
- Switch from versioneer to setuptools_scm because versioneer is not
maintained.
- Enable the RAVEN alert pipeline by having the superevent manager listen
to the label RAVEN_ALERT.
......
graft doc
include *requirements.txt
include versioneer.py
include gwcelery/_version.py
......@@ -73,7 +73,7 @@ spec = importlib.util.spec_from_file_location(
'_version', '../gwcelery/_version.py')
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
parsed_version = pkg_resources.parse_version(module.version)
parsed_version = pkg_resources.parse_version(module.get_versions()['version'])
del module, spec
# The short X.Y version.
......
......@@ -2,7 +2,7 @@
from celery import Celery
from ._version import version as __version__ # noqa: F401
from ._version import get_versions
from .conf import playground
from . import email
from . import lvalert
......@@ -11,6 +11,9 @@ from . import voevent
__all__ = ('app',)
__version__ = get_versions()['version']
del get_versions
# Use redis broker, because it supports locks (and thus singleton tasks).
app = Celery(__name__, broker='redis://', autofinalize=False)
"""Celery application object."""
......
This diff is collapsed.
......@@ -97,7 +97,7 @@ def configure():
username, _, _ = auth
dsn = urlunparse(
(scheme, '{}@{}'.format(username, netloc), *rest))
version = 'gwcelery-{}'.format(_version.version)
version = 'gwcelery-{}'.format(_version.get_versions()['version'])
environment = app.conf['sentry_environment']
sentry_sdk.init(dsn, environment=environment, release=version,
before_send=before_send,
......
......@@ -236,7 +236,7 @@ def dqr_json(state, summary):
return dict(
state=state,
process_name=__name__,
process_version=_version.version,
process_version=_version.get_versions()['version'],
librarian='Geoffrey Mo (geoffrey.mo@ligo.org)',
date=time.strftime("%H:%M:%S UTC %a %d %b %Y", time.gmtime()),
hostname=socket.gethostname(),
......
......@@ -255,7 +255,7 @@ def write_to_fits(skymap, event):
gps_time=event['gpstime'],
creator='gwcelery',
origin='LIGO-VIRGO-KAGRA',
vcs_version=_version.version,
vcs_version=_version.get_versions()['version'],
history='file only for internal use')
with open(f.name, 'rb') as file:
return file.read()
......
......@@ -9,7 +9,7 @@
<div class=jumbotron>
<h1>
GWCelery
<small><a href="https://git.ligo.org/emfollow/gwcelery/tree/{% if version.local %}{{version.local[1:]}}{% else %}v{{version}}{% endif %}">{{version}}</a></small>
<small><a href="https://git.ligo.org/emfollow/gwcelery/commit/{{versions['full-revisionid']}}">{{versions.version}}</a></small>
</h1>
{% if request.remote_user %}
Welcome, {{request.remote_user}}
......
......@@ -137,7 +137,7 @@ def test_dqr_json(mock_time, mock_host, mock_user):
assert detchar.dqr_json(state, summary) == {
'state': 'pass',
'process_name': 'gwcelery.tasks.detchar',
'process_version': _version.version,
'process_version': _version.get_versions()['version'],
'librarian': 'Geoffrey Mo (geoffrey.mo@ligo.org)',
'date': '00:00:00 UTC Mon 01 Jan 2000',
'hostname': 'test_host',
......
......@@ -9,7 +9,7 @@ from ligo.gracedb.rest import HTTPError as GraceDbHTTPError
import pkg_resources
from . import app as celery_app
from ._version import version
from ._version import get_versions
from .flask import app, cache
from .tasks import first2years, gracedb, orchestrator, circulars, superevents
......@@ -21,7 +21,7 @@ def index():
'index.jinja2',
conf=celery_app.conf,
packages=pkg_resources.working_set,
version=pkg_resources.parse_version(version))
versions=get_versions())
def take_n(n, iterable):
......
import sys
import versioneer
import pkg_resources
from setuptools import setup
......@@ -9,7 +10,7 @@ def get_requirements(filename):
return [str(r) for r in pkg_resources.parse_requirements(f)]
setup_requires = ['setuptools >= 30.3.0', 'setuptools-scm']
setup_requires = ['setuptools >= 30.3.0']
if {'pytest', 'test', 'ptr'}.intersection(sys.argv):
setup_requires.append('pytest-runner')
if {'build_sphinx'}.intersection(sys.argv):
......@@ -17,4 +18,5 @@ if {'build_sphinx'}.intersection(sys.argv):
setup(install_requires=get_requirements('requirements.txt'),
setup_requires=setup_requires,
use_scm_version=dict(write_to='gwcelery/_version.py'))
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass())
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment