AntonPalmqvist / physically-based-api

A database of physically based values for CG artists.
https://api.physicallybased.info/
Creative Commons Zero v1.0 Universal
382 stars 15 forks source link

Unittests #17

Closed lbreede closed 1 year ago

lbreede commented 1 year ago

Added python unittests to checks the integrity of the cameras.json file. Checks for:

AntonPalmqvist commented 1 year ago

Just out of curiosity, how are you using this in practice? Is this for a studio pipeline?

lbreede commented 1 year ago

First of all, feel free to entirely throw this out the window haha. Basically, you can use GitHub Actions to have custom code run for every push and pull request. You can then write unittests that check basic things like "do we have duplicate cameras", "does the Alexa have duplicate sensor sizes", "is the list of cameras in order" etc.. It's just a quick indication of errors before a human looks over it.

AntonPalmqvist commented 1 year ago

It's definitely interesting, and I'm meaning to look into using GitHub Actions at some point. I really appreciate your effort here. Let me have a think about the needs for this project!

lbreede commented 1 year ago

As is said, this is probably not necessary at this point. It's a nice way to enforce some style guidelines and required fields. I also don't want to be too assertive, I just really love the project and always wanted to contribute to a repo I'm passionate about.

AntonPalmqvist commented 1 year ago

I really appreciate the support. It's people like you who makes projects like these even better!