membermatters / MemberMatters

An open source membership, access and payments portal for makerspaces and community groups.
https://membermatters.org
MIT License
40 stars 23 forks source link

SpaceAPI follows schema for sensor values #248

Closed rechner closed 3 months ago

rechner commented 4 months ago

Small fix to format sensor values as it is expected by the SpaceAPI schema specification.

Spot-checked with a few of the different sensor types, here is an example output which passes the SpaceAPI validator:

Space status example ```json { "space": "MemberMatters", "logo": "https://brisbanemaker.space/wp-content/uploads/2021/10/BMS-Logo-ONLY.png", "url": "https://membermatters.org", "contact": { "email": "notset@example.com", "twitter": "", "phone": "", "facebook": "" }, "spacefed": { "spacenet": false, "spacesaml": false, "spacephone": false }, "projects": [], "issue_report_channels": [ "email" ], "state": { "open": true, "message": "The space is open!", "lastchange": 1708996661.442005 }, "icon": { "open": "", "closed": "" }, "api_compatibility": [ "14" ], "sensors": { "beverage_supply": [ { "name": "cans_of_coke", "description": "", "location": "fridge", "value": 20.0, "unit": "btl" } ], "total_member_count": [ { "value": 0 } ], "people_now_present": [ { "value": 0 } ] }, "location": { "address": "123 Setme St", "lat": 0.0, "lon": 0.0 } } ```
rechner commented 4 months ago

Hey @proffalken @jabelone would it be possible to get this merged and get a release cut soon? I've got another PR open to put @pawprintprototyping into the SpaceAPI directory, but am blocked on this validation fix and am hoping to avoid deploying a fork.

Thanks 🙂

proffalken commented 4 months ago

@rechner - I don't have merge privileges I'm afraid, we need to wait for @jabelone.

I know he's got quite a lot on his plate at the moment, so I'm not sure what to suggest other than hanging on for a bit longer or deploying a fork for now and "upgrading" to the main version once this is merged.

jabelone commented 3 months ago

Thanks for your patience, I've had a significant lack of capacity due to work and other commitments. I've fixed up the docker hub auth issue but it won't let me re-run the action. I trust that this small change shouldn't break the whole build so merged it in. Will work on another release asap.

jabelone commented 2 months ago

@rechner membermatters/membermatters:v3.6.3 is now available on docker hub. Let me know how it goes! Our instance is "fixed" and passes the space api validator now. Sorry for the hassle. :)