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

No-Code Device Submission #56

Merged
merged 7 commits into from
Dec 16, 2023
Merged

No-Code Device Submission #56

merged 7 commits into from
Dec 16, 2023

Conversation

bmos
Copy link
Contributor

@bmos bmos commented Dec 15, 2023

Some users may not be comfortable editing a JSON file to contribute information about the batteries in their devices.

Thanks to GitHub Issue Forms, combined with GitHub Actions, an easy no-code submission process is possible that will allow anyone with a GitHub account to contribute to the library by filling out a form via the Issues tab.

@bmos
Copy link
Contributor Author

bmos commented Dec 16, 2023

I haven't been able to get the list sorting working, so dive in if that's important to you (fortunately that section is in python).
Otherwise this is ready to go!

@andrew-codechimp
Copy link
Owner

Thanks, I'll spend some time to understand this before releasing but really appreciate what you've done here, it will hopefully mean less malformed json to edit.

I'm rapidly coming to the conclusion that sorting isn't necessary and I'm using Find to track down devices so I may drop that requirement and avoid the pain.

@andrew-codechimp andrew-codechimp merged commit da1a5f3 into andrew-codechimp:main Dec 16, 2023
4 checks passed
@andrew-codechimp
Copy link
Owner

Thanks so much for this, I had to tweak it a little on the int for battery quantity but just put it live with a beta link on the readme.

@bmos bmos deleted the patch-1 branch December 16, 2023 13:11
@bmos
Copy link
Contributor Author

bmos commented Dec 18, 2023

Looks like it ran into an issue and had to be disabled?
It also appears to have been sorting by name automatically, so that's pretty cool!

I'm guessing the issue that made you have to disable it might have been that when multiple users submitted these relatively far-reaching PRs (re-ordering items and removing trailing whitespaces), they invalidated other PRs that were open?

If so the two potential solutions I see are:

  1. Disable the automatic sorting (which still leaves the end of line issues unless we add the new definition to the file via line editing rather than via a json parser/writer)
  2. Apply end-of-line fixes (and maybe sorting) to any manual Pull Request that touches that file (which should mean they can merge cleanly).

@bmos
Copy link
Contributor Author

bmos commented Dec 18, 2023

Anyway, happy to help however I can to get that working.

@andrew-codechimp
Copy link
Owner

Yeah, it was doing very odd PR's so I disabled it for now, as you say I think it was where there was manual PR's confusing it.

I'm going to setup a shadow repo to test this more fully as it's something I'd like to add to save some manual effort each day but at the moment I'm not getting a lot of time.

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.

2 participants