Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Inconsistent response behavior with a 'values' array

Aperta
#204 1 commento 0 reazioni 2 assegnatari Vedi su GitHub

@pkolbeck ci sta già lavorando.

Dal 18/6/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Services and endpoints send responses differently depending on the request.

https://github.com/driplineorg/dripline-python/blob/2ff8c54e3464670c95dc9e044430a039042ca524/dripline/core/request_handler.py#L32

Calling get with a specifier, e.g. dl-agent get <service> -s <specifier> returns the value in a dictionary with the "values" key pointing to the value.
Calling get without a specifier, e.g. dl-agent get <endpoint> returns just the value (this could be a dictionary, string, float, etc).
Calling set with a specifier returns a value based on the return value of the implemented on_set.
Calling set without a specifier returns a None value.
Callng cmd (always requires a specifier) returns the value based on the return value of the function called in the implementation.

Out of all of these, only calling get with a specifier puts the return value into a 'values' array. This inconsistency in behavior does not serve a discernible purpose at the moment, and consistent behavior should be established by no longer putting values in a 'values' array.

Applying a calibration function and getting a dictionary of the form {"value_raw": <value_raw>, "value_cal": <value_cal>} would be unaffected.

Lingua principale
Python
Stelle
3
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di driplineorg/dripline-python

Tutte le issue di driplineorg/dripline-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.