Skip to content

Commit 82f74c5

Browse files
committed
Fixes #17 this is 1.0.2
1 parent d6899a9 commit 82f74c5

8 files changed

Lines changed: 1245 additions & 1549 deletions

File tree

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Version 1.0.2 Update (2025-02-16)
2+
=================================
3+
* This responds to `GitHub Issue #17
4+
<https://github.com/ASCOMInitiative/AlpycaDevice/issues/17>`_ to correct
5+
the handling of missing Alpaca ``ClientID`` and ``ClientTransactionID`` HTTP
6+
parameters, making them optional with a default value of 0.
7+
18
Version 1.0.1 Update (2025-02-05)
29
=================================
310
* This responds to `GitHub Issue #16

Current ConformU Protocol.txt

Lines changed: 1059 additions & 1379 deletions
Large diffs are not rendered by default.

Current ConformU Validation.txt

Lines changed: 156 additions & 155 deletions
Large diffs are not rendered by default.

RBD-Notes.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,8 @@ along with rst-check, leaving rstcheck as the linter. Good enough.
247247
05-Feb-2025
248248
-----------
249249
* 1.0.1 Regenerated templates for the Id thing and for Fix #16 for property Connected on_put() and a typo. 1.0.1.
250+
251+
16-Feb-2025
252+
-----------
253+
* Fix ClientID and ClientTransactionID in shr.py per GitHub #17. Release 1.0.2
254+

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# AlpycaDevice - Python Alpaca Device Driver SDK
22

3-
## Version 1.0.1, February 5, 2025 (ASCOM Platform 7)
3+
## Version 1.0.2, February 17, 2025 (ASCOM Platform 7)
44

55
<img align="right" width="210" height="166" hspace="20" vspace="20" src="https://ascom-standards.org/alpyca/readme-assets/AlpacaLogo210.png">
66

77
This project is a lightweight Python framework for a device
88
driver that supports the Alpaca protocol and ASCOM Standards as of Platform 7. It implements a basic Rotator device with a simple simulation for Conform tests. **Templates for all ASCOM device types are provided**.
99
The "boiler plate" logic remains the same for any device.
1010

11-
## [AlpycaDevice SDK 1.0.1 Documentation](https://ascom-standards.org/alpycadevice/)
11+
## [AlpycaDevice SDK 1.0.2 Documentation](https://ascom-standards.org/alpycadevice/)
1212

1313
[![AlpycaDevice Video](https://raw.githubusercontent.com/BobDenny/AlpycaDevice/master/docs/source/vthumb.png)](https://www.youtube.com/watch?v=soGb0j4iOt4 "AlpycaDevice Video")
1414

device/shr.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
# 16-Feb-2024 rbd 0.6 For Platform 7, common DeviceState property.
6161
# New StateValue object, and enhance PropertyResponse to
6262
# serialize objects into JSON (the StateValue objects).
63+
# 16-Feb-2025 rbd 1.0.2 Issue #17 Correct handling of ClientID and
64+
# ClientTransactionID. Add missing keywords to some Falcon
65+
# HTTPBadRequest exceptions to prevent deprecation warnings.
6366

6467
from threading import Lock
6568
from exceptions import Success
@@ -187,21 +190,21 @@ def _check_request(self, req: Request, devnum: int): # Raise on failure
187190
if devnum > self.maxdev:
188191
msg = f'Device number {str(devnum)} does not exist. Maximum device number is {self.maxdev}.'
189192
logger.error(msg)
190-
raise HTTPBadRequest(_bad_title, msg)
191-
test: str = get_request_field('ClientID', req, True) # Caseless
192-
if test is None:
193-
msg = 'Request has missing Alpaca ClientID value'
194-
logger.error(msg)
195-
raise HTTPBadRequest(_bad_title, msg)
193+
raise HTTPBadRequest(title=_bad_title, description=msg)
194+
test: str = get_request_field('ClientID', req, True, '0') # Caseless, default = 0 if missing
196195
if not self._pos_or_zero(test):
197196
msg = f'Request has bad Alpaca ClientID value {test}'
198197
logger.error(msg)
199-
raise HTTPBadRequest(_bad_title, msg)
200-
test: str = get_request_field('ClientTransactionID', req, True)
198+
raise HTTPBadRequest(title=_bad_title, description=msg)
199+
if test == '0':
200+
req.params['ClientID'] = '0' # In case it's missing
201+
test: str = get_request_field('ClientTransactionID', req, True, '0') # Caseless, default = 0 if missing
201202
if not self._pos_or_zero(test):
202203
msg = f'Request has bad Alpaca ClientTransactionID value {test}'
203204
logger.error(msg)
204-
raise HTTPBadRequest(_bad_title, msg)
205+
raise HTTPBadRequest(title=_bad_title, description=msg)
206+
if test == '0':
207+
req.params['ClientTransactionID'] = '0' # In case it's missing
205208

206209
#
207210
# params contains {'devnum': n } from the URI template matcher

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class Desc_Sig_Space(DocutilsInlineNode):
3434
author = 'Bob Denny'
3535

3636
# The full version, including alpha/beta/rc tags
37-
version = '1.0.1'
38-
release = '1.0.1'
37+
version = '1.0.2'
38+
release = '1.0.2'
3939

4040
# -- General configuration ---------------------------------------------------
4141
#
@@ -125,7 +125,7 @@ class Desc_Sig_Space(DocutilsInlineNode):
125125
rinoh_documents = [dict(doc='index', # top-level file (index.rst)
126126
target='alpyca', # output file (alpyca.pdf)
127127
title='Alpyca Device',
128-
subtitle='Release 1.0.1',
128+
subtitle='Release 1.0.2',
129129
author='Robert B. Denny <rdenny@dc3.com>',
130130
logo='alpaca1000.png',
131131
template='alpyca.rtt')]

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ conforming Alpaca device with a minimum of "just in time learning".
2525
**Start Here:** :doc:`/quickstart` then look through :doc:`/introduction`.
2626

2727
.. Note::
28-
This is the 1.0.1 (February 5, 2025) updated production version. This
28+
This is the 1.0.2 (February 20, 2025) updated production version. This
2929
contains the additions to the interfaces for Platform 7.
3030
See |plat7changes|. For Release Notes on this SDK see the
3131
|changes| on the |github|.

0 commit comments

Comments
 (0)