Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpaceAPI follows schema for sensor values #248

Merged

Conversation

rechner
Copy link
Contributor

@rechner rechner commented Feb 27, 2024

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
{
    "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 rechner changed the base branch from main to dev February 27, 2024 01:45
Copy link
Contributor

@proffalken proffalken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@rechner
Copy link
Contributor Author

rechner commented Mar 7, 2024

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
Copy link
Contributor

@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 jabelone merged commit 3dd82bc into membermatters:dev Apr 8, 2024
6 of 7 checks passed
@jabelone
Copy link
Member

jabelone commented Apr 8, 2024

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
Copy link
Member

jabelone commented Apr 8, 2024

@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. :)

@rechner rechner deleted the rechner/spaceapi_schema_fix branch May 31, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants