google / cyanobyte

Machine-readable datasheets
https://cyanobyte.dev
Apache License 2.0
79 stars 31 forks source link

Validator packaging #268

Closed polfeliu closed 3 years ago

polfeliu commented 3 years ago

When I corrected the typo valdiate -> validate some thing broke. This fixes it. Also, when installing the package the validator couldn't find the spec as it's not included in the packages. This also fixes it by including it as a module. However, since the templates and spec are in a separate folder from cyanobyte, when they are installed they create a folder for each in the lib/site-packages directory. This is weird and could create name collisions. I suggest to move the spec inside the cyanobyte folder, and be part of the module. Templates could be also moved, or left there and renamed to cyanobyte-templates for example. Or removed... Is there anybody that uses the templates provided by the module? I wasn't aware they where included since I took a look on the spec thingy.

Fleker commented 3 years ago

This is weird and could create name collisions. I suggest to move the spec inside the cyanobyte folder, and be part of the module.

I like spec being a top-level folder in the repo, as it's cleaner for the project, but it might be inconsistent with Python packaging.

The same goes for templates. I'd like to keep the templates bundled inside the packaging, as it makes the quickstart easier for someone rather than having to save individual files to their computer.

Maybe if folders are renamed to cyanobyte-spec and cyanobyte-templates that would avoid the name collisions?

polfeliu commented 3 years ago

Sounds good

polfeliu commented 3 years ago

Hello @Fleker, is there any problem to pull?

Fleker commented 3 years ago

This change looks good.