Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • duncan.meacher/gwdatafind
  • duncanmmacleod/gwdatafind
  • computing/gwdatafind/client
3 results
Show changes
Commits on Source (20)
image: Visual Studio 2022
environment:
global:
MINICONDA: C:\Miniconda38-x64
MINIFORGE_PATH: C:\Miniforge
matrix:
- PYTHON_VERSION: 3.8
- PYTHON_VERSION: 3.9
- PYTHON_VERSION: 3.10
- PYTHON_VERSION: 3.11
- PYTHON_VERSION: 3.12
install:
- "set PATH=%MINICONDA%\\condabin;%PATH%"
- call "%MINICONDA%\\Scripts\\activate.bat"
# install fresh, up-to-date mambaforge
- curl -fsSL -o miniforge.exe https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe
- miniforge.exe /S /InstallationType=JustMe /D=%MINIFORGE_PATH%
- set "PATH=%MINIFORGE_PATH%;%MINIFORGE_PATH%\\Scripts;%PATH%"
- activate
# update conda config
- conda config --set always_yes yes
- conda config --set channel_priority strict
- conda config --add channels conda-forge
- conda config --set solver libmamba
- conda info --all
# create new environment
- appveyor-retry conda create --quiet --yes --name ci
"igwn-auth-utils>=0.1.1"
"ligo-segments>=1.0.0"
......@@ -22,7 +29,6 @@ install:
"requests"
"setuptools>=27.3"
- conda activate ci
- conda info --all
- conda list
build_script:
- python -m pip install .[test]
......
......@@ -12,12 +12,12 @@ include:
# -- macros
.buster:
image: igwn/builder:buster
.bullseye:
image: igwn/builder:bullseye
.bookworm:
image: igwn/builder:bookworm
# -- source packages --------
#
# These jobs make DSC packages
......@@ -43,15 +43,15 @@ include:
- tar -zcf ${TARBALL} gwdatafind-*/
- rm -rf gwdatafind-*/
dsc:buster:
dsc:bullseye:
extends:
- .dsc
- .buster
- .bullseye
dsc:bullseye:
dsc:bookworm:
extends:
- .dsc
- .bullseye
- .bookworm
# -- binary packages --------
#
......@@ -68,19 +68,19 @@ dsc:bullseye:
variables:
DSC: "gwdatafind_*.dsc"
deb:buster:
deb:bullseye:
extends:
- .deb
- .buster
- .bullseye
needs:
- dsc:buster
- dsc:bullseye
deb:bullseye:
deb:bookworm:
extends:
- .deb
- .bullseye
- .bookworm
needs:
- dsc:bullseye
- dsc:bookworm
# -- test -------------------
......@@ -113,19 +113,19 @@ deb:bullseye:
python3-pytest-cov
python3-requests-mock
test:buster:
test:bullseye:
extends:
- .test:debian
- .buster
- .bullseye
needs:
- deb:buster
- deb:bullseye
test:bullseye:
test:bookworm:
extends:
- .test:debian
- .bullseye
- .bookworm
needs:
- deb:bullseye
- deb:bookworm
# -- lint -------------------
#
......@@ -139,14 +139,7 @@ test:bullseye:
- .debian:lint
stage: Code quality
variables:
LINTIAN_OPTIONS: "--color always --suppress-tags new-package-should-close-itp-bug --fail-on-warnings --allow-root --pedantic"
lintian:buster:
extends:
- .lintian
- .buster
needs:
- deb:buster
LINTIAN_OPTIONS: "--color always --suppress-tags new-package-should-close-itp-bug,groff-message --fail-on warning,error --allow-root --pedantic"
lintian:bullseye:
extends:
......@@ -155,4 +148,10 @@ lintian:bullseye:
needs:
- deb:bullseye
variables:
LINTIAN_OPTIONS: "--color always --suppress-tags new-package-should-close-itp-bug,groff-message --fail-on warning --allow-root --pedantic"
lintian:bookworm:
extends:
- .lintian
- .bookworm
needs:
- deb:bookworm
......@@ -68,3 +68,13 @@ test:python3.10:
extends:
- .test:pip
image: python:3.10
test:python3.11:
extends:
- .test:pip
image: python:3.11
test:python3.12:
extends:
- .test:pip
image: python:3.12
......@@ -12,15 +12,33 @@ include:
# -- macros
.el7:
image: igwn/base:el7-testing
.el:
variables:
EPEL: "true"
.el7:
extends: .el
image: igwn/base:el7-testing
.el7-builder:
extends: .el7
image: igwn/builder:el7-testing
.el8:
extends: .el
image: igwn/base:el8-testing
variables:
EPEL: "true"
.el8-builder:
extends: .el8
image: igwn/builder:el8-testing
.el9:
extends: .el
image: igwn/base:el9-testing
.el9-builder:
extends: .el9
image: igwn/builder:el9-testing
# -- source packages --------
#
......@@ -40,12 +58,17 @@ include:
srpm:el7:
extends:
- .srpm
- .el7
- .el7-builder
srpm:el8:
extends:
- .srpm
- .el8
- .el8-builder
srpm:el9:
extends:
- .srpm
- .el9-builder
# -- binary packages --------
#
......@@ -64,17 +87,24 @@ srpm:el8:
rpm:el7:
extends:
- .rpm
- .el7
- .el7-builder
needs:
- srpm:el7
rpm:el8:
extends:
- .rpm
- .el8
- .el8-builder
needs:
- srpm:el8
rpm:el9:
extends:
- .rpm
- .el9-builder
needs:
- srpm:el9
# -- test -------------------
.test:el:
......@@ -115,6 +145,13 @@ test:el8:
needs:
- rpm:el8
test:el9:
extends:
- .test:el
- .el9
needs:
- rpm:el9
# -- lint -------------------
#
# These jobs check the code
......@@ -128,7 +165,8 @@ test:el8:
stage: Code quality
variables:
GIT_STRATEGY: fetch
RPMLINT_OPTIONS: '--info --file .rpmlintrc'
INSTALLED_RPMS: "*gwdatafind*"
RPMLINT_OPTIONS: "--info --file rpm/rpmlintrc"
rpmlint:el7:
extends:
......@@ -143,3 +181,10 @@ rpmlint:el8:
- .el8
needs:
- rpm:el8
rpmlint:el9:
extends:
- .rpmlint
- .el9
needs:
- rpm:el9
include LICENSE README.md
include gwdatafind.spec
include rpm/python-gwdatafind.spec
include debian/*
include debian/source/*
......@@ -19,7 +19,7 @@ with an actual release version.
- Bump versions and add changelog entries in OS packaging files:
- `debian/changelog`
- `gwdatafind.spec`
- `rpm/python-gwdatafind.spec`
and then commit the changes to the branch.
......
gwdatafind (1.2.0-1) unstable; urgency=low
* update for 1.2.0
-- Duncan Macleod <duncan.macleod@ligo.org> Sat, 16 Dec 2023 17:35:00 +0000
gwdatafind (1.1.3-1) unstable; urgency=low
* update for 1.1.3
......
......@@ -89,4 +89,4 @@ from .ui import *
__author__ = 'Duncan Macleod <duncan.macleod@ligo.org>'
__credits__ = 'Scott Koranda <scott.koranda@ligo.org>'
__version__ = '1.1.3'
__version__ = '1.2.0'
......@@ -63,7 +63,7 @@ def find_types_path(site=None, ext=DEFAULT_EXT):
"""Return the API path to query for datasets for one or all sites.
"""
if site:
return f"{ext}/{site[0]}.json"
return f"{ext}/{site}.json"
return f"{ext}/all.json"
......
......@@ -39,8 +39,8 @@ def test_find_observatories_path():
@pytest.mark.parametrize(("site", "result"), (
(None, "LDR/services/data/v1/gwf/all.json"),
("X1", "LDR/services/data/v1/gwf/X.json"),
("X", "LDR/services/data/v1/gwf/X.json"),
("XY", "LDR/services/data/v1/gwf/XY.json"),
))
def test_find_types_path(site, result):
assert api.find_types_path(site) == result
......
......@@ -125,7 +125,10 @@ def test_ping(mping):
)
out = StringIO()
main.ping(args, out)
assert mping.called_with(host=args.server)
mping.assert_called_with(
host=args.server,
ext=args.extension,
)
out.seek(0)
assert out.read().rstrip() == (
'LDRDataFindServer at test.datafind.com:443 is alive')
......@@ -142,7 +145,11 @@ def test_show_observatories(mfindobs):
out = StringIO()
main.show_observatories(args, out)
out.seek(0)
assert mfindobs.called_with(host=args.server, match=args.match)
mfindobs.assert_called_with(
host=args.server,
match=args.match,
ext=args.extension,
)
assert list(map(str.rstrip, out.readlines())) == ['A', 'B', 'C']
......@@ -158,8 +165,12 @@ def test_show_types(mfindtypes):
out = StringIO()
main.show_types(args, out)
out.seek(0)
assert mfindtypes.called_with(host=args.server, match=args.match,
site=args.observatory)
mfindtypes.assert_called_with(
host=args.server,
match=args.match,
site=args.observatory,
ext=args.extension,
)
assert list(map(str.rstrip, out.readlines())) == ['A', 'B', 'C']
......@@ -176,9 +187,14 @@ def test_show_times(mfindtimes):
)
out = StringIO()
main.show_times(args, out)
assert mfindtimes.called_with(host=args.server, site=args.observatory,
frametype=args.type, gpsstart=args.gpsstart,
gpsend=args.gpsend)
mfindtimes.assert_called_with(
host=args.server,
site=args.observatory,
frametype=args.type,
gpsstart=args.gpsstart,
gpsend=args.gpsend,
ext=args.extension,
)
out.seek(0)
for i, line in enumerate(out.readlines()[1:]):
seg = mfindtimes.return_value[i]
......@@ -199,9 +215,14 @@ def test_latest(mlatest):
)
out = StringIO()
main.latest(args, out)
assert mlatest.called_with(args.observatory, args.type,
urltype=args.url_type, on_missing='warn',
host=args.server)
mlatest.assert_called_with(
args.observatory,
args.type,
urltype=args.url_type,
on_missing='warn',
host=args.server,
ext=args.extension,
)
out.seek(0)
assert out.read().rstrip() == mlatest.return_value[0]
......@@ -219,8 +240,12 @@ def test_filename(mfindurl):
)
out = StringIO()
main.filename(args, out)
assert mfindurl.called_with(args.filename, urltype=args.url_type,
on_missing='warn', host=args.server)
mfindurl.assert_called_with(
args.filename,
urltype=args.url_type,
on_missing='warn',
host=args.server,
)
out.seek(0)
assert out.read().rstrip() == mfindurl.return_value[0]
......@@ -247,7 +272,7 @@ def test_show_urls(mfindurls, ext):
)
out = StringIO()
main.show_urls(args, out)
assert mfindurls.called_with(
mfindurls.assert_called_with(
args.observatory,
args.type,
args.gpsstart,
......
%define srcname gwdatafind
%define version 1.1.3
%define version 1.2.0
%define release 1
Name: python-%{srcname}
......@@ -125,6 +125,11 @@ rm -rf $RPM_BUILD_ROOT
# -- changelog
%changelog
* Sat Dec 16 2023 Duncan Macleod <duncan.macleod@ligo.org> 1.2.0-1
- update for 1.2.0
- add python3-devel to BuildRequires
- use argparse-manpage to build manuals, not help2man
* Mon Nov 21 2022 Duncan Macleod <duncan.macleod@ligo.org> 1.1.3-1
- update for 1.1.3
......
# - python -
# don't care that the gwdatafind package includes 'GWDataFind' in the name
addFilter("W: name-repeated-in-summary")
......@@ -25,6 +25,8 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Intended Audience :: Science/Research
Natural Language :: English
Topic :: Scientific/Engineering
......