pytrms 0.9.8__tar.gz → 0.9.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {pytrms-0.9.8 → pytrms-0.9.9}/PKG-INFO +1 -1
  2. {pytrms-0.9.8 → pytrms-0.9.9}/pyproject.toml +1 -1
  3. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/__init__.py +1 -1
  4. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/db_api.py +11 -4
  5. {pytrms-0.9.8 → pytrms-0.9.9}/LICENSE +0 -0
  6. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/_base/__init__.py +0 -0
  7. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/_base/ioniclient.py +0 -0
  8. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/_base/mqttclient.py +0 -0
  9. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/_version.py +0 -0
  10. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/__init__.py +0 -0
  11. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/dummy.py +0 -0
  12. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/ioniclient.py +0 -0
  13. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/modbus.py +0 -0
  14. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/mqtt.py +0 -0
  15. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/ssevent.py +0 -0
  16. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/compose/__init__.py +0 -0
  17. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/compose/composition.py +0 -0
  18. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/data/IoniTofPrefs.ini +0 -0
  19. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/data/ParaIDs.csv +0 -0
  20. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/helpers.py +0 -0
  21. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/instrument.py +0 -0
  22. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/measurement.py +0 -0
  23. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/peaktable.py +0 -0
  24. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/plotting/__init__.py +0 -0
  25. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/plotting/plotting.py +0 -0
  26. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/readers/__init__.py +0 -0
  27. {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/readers/ionitof_reader.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pytrms
3
- Version: 0.9.8
3
+ Version: 0.9.9
4
4
  Summary: Python bundle for proton-transfer reaction mass-spectrometry (PTR-MS).
5
5
  License: GPL-2.0
6
6
  Author: Moritz Koenemann
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pytrms"
3
- version = "0.9.8"
3
+ version = "0.9.9"
4
4
  description = "Python bundle for proton-transfer reaction mass-spectrometry (PTR-MS)."
5
5
  authors = ["Moritz Koenemann <moritz.koenemann@ionicon.com>"]
6
6
  license = "GPL-2.0"
@@ -1,4 +1,4 @@
1
- _version = '0.9.8'
1
+ _version = '0.9.9'
2
2
 
3
3
  import logging
4
4
  from functools import wraps
@@ -168,7 +168,7 @@ class IoniConnect(_IoniClientBase):
168
168
 
169
169
  def delete(self, endpoint, **kwargs):
170
170
  """Attempt to delete the object at `endpoint`."""
171
- r = self._fetch_object(endpoint, data, 'delete', **kwargs)
171
+ r = self._fetch_object(endpoint, 'delete', **kwargs)
172
172
  return _unsafe(r.status_code, r.headers.get('Location', r.request.path_url))
173
173
 
174
174
  def link(self, parent_ep, child_ep, **kwargs):
@@ -252,12 +252,19 @@ class IoniConnect(_IoniClientBase):
252
252
  return r
253
253
 
254
254
  def _make_link(self, parent_href, child_href, *, sever=False, **kwargs):
255
- verb = "LINK" if not sever else "UNLINK"
255
+ if not parent_href.startswith('/'):
256
+ parent_href = '/' + parent_href
257
+ if not child_href.startswith('/'):
258
+ child_href = '/' + child_href
259
+ if 'headers' not in kwargs:
260
+ kwargs['headers'] = {'location': child_href}
261
+ else:
262
+ kwargs['headers'].update({'location': child_href})
256
263
  if 'timeout' not in kwargs:
257
264
  # https://requests.readthedocs.io/en/latest/user/advanced/#timeouts
258
265
  kwargs['timeout'] = (6.06, 27)
259
- r = self.session.request(verb, self.url + parent_href,
260
- headers={"location": child_href}, **kwargs)
266
+ r = self.session.request("LINK" if not sever else "UNLINK",
267
+ self.url + parent_href, **kwargs)
261
268
  r.raise_for_status()
262
269
 
263
270
  return r
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes