GraceDB Client merge requestshttps://git.ligo.org/computing/gracedb/client/-/merge_requests2018-09-13T18:50:23Zhttps://git.ligo.org/computing/gracedb/client/-/merge_requests/29Fix broken file upload in Python 32018-09-13T18:50:23ZTito Dal CantonFix broken file upload in Python 3Here I try to fix #11 myself. It works:
```
$ gracedb upload G7330 1219568639.528.png test
Server returned 201
```Here I try to fix #11 myself. It works:
```
$ gracedb upload G7330 1219568639.528.png test
Server returned 201
```Readiness for second OPA testTanner PrestegardTanner Prestegardhttps://git.ligo.org/computing/gracedb/client/-/merge_requests/49Requests client2020-08-06T18:59:30ZAlexander PaceRequests clientRewrite client backend using urllib3-based `requests` package.Rewrite client backend using urllib3-based `requests` package.Alexander PaceAlexander Pacehttps://git.ligo.org/computing/gracedb/client/-/merge_requests/46Drop jessie build, add buster build2022-02-01T20:54:16ZLeo P. SingerDrop jessie build, add buster buildI could be wrong, but I don't think that LSCSoft supports jessie
anymore. However, buster is the current stable Debian release, so
it's useful to add a build for that distribution.I could be wrong, but I don't think that LSCSoft supports jessie
anymore. However, buster is the current stable Debian release, so
it's useful to add a build for that distribution.https://git.ligo.org/computing/gracedb/client/-/merge_requests/45WIP: Use PEP 508 python_version specs for test_requires2022-02-02T03:05:02ZLeo P. SingerWIP: Use PEP 508 python_version specs for test_requiresThis allows us to specify requirements that depend upon the Python
version, so that the requirements can be expressed purely as
configuration and not as code.This allows us to specify requirements that depend upon the Python
version, so that the requirements can be expressed purely as
configuration and not as code.https://git.ligo.org/computing/gracedb/client/-/merge_requests/40WIP: Rewrite backend using requests package2022-11-22T18:57:35ZLeo P. SingerWIP: Rewrite backend using requests packageRewrite backend using requests package
This makes all REST API calls much faster due to connection pooling
and SSL context reuse.
General-purpose request functionality that is NOT related to the
GraceDB API itself now resides in ligo.g...Rewrite backend using requests package
This makes all REST API calls much faster due to connection pooling
and SSL context reuse.
General-purpose request functionality that is NOT related to the
GraceDB API itself now resides in ligo.gracedb.requests in a series
of mixin classes.
Fixes !10.https://git.ligo.org/computing/gracedb/client/-/merge_requests/38Remove request to priming URL2019-12-04T16:03:58ZLeo P. SingerRemove request to priming URLThe priming URL request does not seem to be required for
authentication. Removing it speeds up every GraceDB POST
request by 300-400 ms.The priming URL request does not seem to be required for
authentication. Removing it speeds up every GraceDB POST
request by 300-400 ms.https://git.ligo.org/computing/gracedb/client/-/merge_requests/26Added CI configuration2018-07-12T13:16:55ZDuncan Macleodduncan.macleod@ligo.orgAdded CI configurationThis merge adds a gitlab CI configuration for this project, which checks that the packages builds on the follow systems
- python3.6 (`setup.py sdist bdist_wheel`)
- debian8 and debian9 (`dpkg-buildpackage`)
- rhel7 (`rpmbuild`)
a...This merge adds a gitlab CI configuration for this project, which checks that the packages builds on the follow systems
- python3.6 (`setup.py sdist bdist_wheel`)
- debian8 and debian9 (`dpkg-buildpackage`)
- rhel7 (`rpmbuild`)
and then runs a basic sanity check by `pip` installing the module, and then
- check `>>> import ligo.gracedb`
- check `gracedb --help`https://git.ligo.org/computing/gracedb/client/-/merge_requests/17Removed all trailing whitespace in ligo.gracedb package2017-12-04T15:20:01ZDuncan Macleodduncan.macleod@ligo.orgRemoved all trailing whitespace in ligo.gracedb packageThis merge removes all trailing whitespace from all python files in the ligo.gracedb package, because I'm pedantic. This should have no functional impact on the code, hopefully.This merge removes all trailing whitespace from all python files in the ligo.gracedb package, because I'm pedantic. This should have no functional impact on the code, hopefully.https://git.ligo.org/computing/gracedb/client/-/merge_requests/14Refactor to respect env variables in REST API2019-10-10T19:51:00ZLeo P. SingerRefactor to respect env variables in REST APIReorganize the initialization of the `GraceDB` and `GraceDBBasic` classes
so that the command-line tool and the REST API Python module both respect
environment variables like `GRACEDB_SERVICE_URL`. As a nice side effect,
this change also...Reorganize the initialization of the `GraceDB` and `GraceDBBasic` classes
so that the command-line tool and the REST API Python module both respect
environment variables like `GRACEDB_SERVICE_URL`. As a nice side effect,
this change also removes a lot of duplicated code.
The main use case is testing GraceDB client code by setting the environment
variable `GRACEDB_SERVICE_URL=https://gracedb-test.ligo.org/api/`.
This must be addressed before we can make progress on grinch#10.https://git.ligo.org/computing/gracedb/client/-/merge_requests/10Introduce an experimental rewrite using requests module2022-11-22T19:13:16ZLeo P. SingerIntroduce an experimental rewrite using requests module*(Note: please merge !9 first.)*
This is an experimental, partial rewrite of the REST client that uses the [Python `requests` module](http://python-requests.org), which brings performance gains due to connection pooling and generally cl...*(Note: please merge !9 first.)*
This is an experimental, partial rewrite of the REST client that uses the [Python `requests` module](http://python-requests.org), which brings performance gains due to connection pooling and generally cleaner implementation. The speedup is impressive:
In [2]: old, new = rest.GraceDb(), requests.GraceDb()
In [3]: %timeit old.event('G211117')
1 loop, best of 3: 391 ms per loop
In [4]: %timeit new.event('G211117')
1 loop, best of 3: 88.5 ms per loop
In [5]: %timeit old.writeLog('T271297', 'foobar')
1 loop, best of 3: 688 ms per loop
In [6]: %timeit new.writeLog('T271297', 'foobar')
1 loop, best of 3: 286 ms per loop
In [7]: %timeit old.writeLog('T271297', 'foobar',
...: filename='bayestar.fits.gz')
1 loop, best of 3: 5.22 s per loop
In [8]: %timeit new.writeLog('T271297', 'foobar',
...: filename='bayestar.fits.gz')
1 loop, best of 3: 1.31 s per loopAlexander PaceAlexander Pacehttps://git.ligo.org/computing/gracedb/client/-/merge_requests/5Be more careful about log handler cleanup2017-01-10T20:52:40ZLeo P. SingerBe more careful about log handler cleanupFix some race conditions and corner cases in GraceDb log handler cleanup.Fix some race conditions and corner cases in GraceDb log handler cleanup.https://git.ligo.org/computing/gracedb/client/-/merge_requests/4Expect response in UTF-82017-01-10T20:22:13ZLeo P. SingerExpect response in UTF-8Marked as WIP because !3 must be merged first.
This fixes this exception:
>>> from ligo.gracedb.rest import GraceDb
>>> GraceDb().logs("G268556").json()
Traceback (most recent call last):
File "<stdin>", line 1...Marked as WIP because !3 must be merged first.
This fixes this exception:
>>> from ligo.gracedb.rest import GraceDb
>>> GraceDb().logs("G268556").json()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/lpsinger/local/lib/python2.7/site-packages/ligo/gracedb/rest.py", line 338, in <lambda>
response.json = lambda: self.load_json_or_die(response)
File "/Users/lpsinger/local/lib/python2.7/site-packages/ligo/gracedb/rest.py", line 400, in load_json_or_die
response_content = response_content.decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 219924: ordinal not in range(128)