Skip to content
Snippets Groups Projects
Commit d15f2159 authored by Bert Palm's avatar Bert Palm 🎇
Browse files

setup versioneer

parent e89cdc5e
No related branches found
No related tags found
1 merge request!715setup versioneer
......@@ -5,3 +5,4 @@
*.feather filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
resources/machine_learning/data/soil_moisture_mwe.feather filter=lfs diff=lfs merge=lfs -text
saqc/_version.py export-subst
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
......@@ -24,11 +24,14 @@ package_path = os.path.abspath("..")
os.environ["PYTHONPATH"] = ":".join((package_path, os.environ.get("PYTHONPATH", "")))
# ---------- Version string --------------------------------------------------
# read the version string without importing it
vdict = {}
with open("../saqc/version.py") as f:
exec(f.read(), vdict)
version = vdict["__version__"]
# TODO: what for we need `version` and the `release` variables for ?
# import saqc for versioning, but prevent plots to pop up
# by setting mpl backend to non-interactive
import saqc.funcs
version = saqc.__version__
saqc.funcs.tools._MPL_DEFAULT_BACKEND = "Agg"
# -- Customize logging -------------------------------------------------------
......
# SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
#
# SPDX-License-Identifier: GPL-3.0-or-later
[tool.isort]
......@@ -11,3 +10,14 @@ addopts = "--strict-markers"
testpaths = "tests"
markers = "slow: marks tests as slow (deselect with '-m \"not slow\"')"
[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "saqc/_version.py"
versionfile_build = "saqc/_version.py"
tag_prefix = "v"
parentdir_prefix = "saqc-"
[build-system]
requires = ["setuptools", "versioneer[toml]==0.29"]
build-backend = "setuptools.build_meta"
\ No newline at end of file
This diff is collapsed.
#!/usr/bin/env python
# SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
#
# SPDX-License-Identifier: GPL-3.0-or-later
__version__ = "2.4.1"
from . import _version
__version__ = _version.get_versions()["version"]
# SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
#
# SPDX-License-Identifier: GPL-3.0-or-later
import os
import versioneer
from setuptools import find_packages, setup
# read the version string from saqc without importing it. See the
# link for a more detailed description of the problem and the solution
# https://stackoverflow.com/questions/2058802/how-can-i-get-the-version-defined-in-setup-py-setuptools-in-my-package
with open(os.path.join("saqc", "version.py")) as f:
vdict = {}
exec(f.read(), vdict)
version = vdict["__version__"]
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="saqc",
version=version,
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author="Bert Palm, David Schaefer, Florian Gransee, Peter Luenenschloss",
author_email="david.schaefer@ufz.de",
description="A timeseries data quality control and processing tool/framework",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment