lemonsaurus / django-simple-bulma

Django application to add the Bulma CSS framework and its extensions
MIT License
137 stars 17 forks source link

Submodule bulma instead of keeping a copy. #42

Closed lemonsaurus closed 4 years ago

lemonsaurus commented 4 years ago

Right now, we've got copies of specific versions of Bulma and Bulma-Extensions in this repo, which is license permissable but adds maintenance in that we have to manually update these files to in order to "update" to a new version.

Perhaps we could include bulma and bulma-extensions as submodules to ensure these stayed up to date, and that we did not need to manage these files ourselves?

SebastiaanZ commented 4 years ago

That sounds like a good option. If we don't, we should make sure to include the proper licensing information for Bulma and Bulma-Extensions, though. That's a requirement of the MIT license.

waykole commented 4 years ago

This will avoid the extra necessity and dependency of upgrading to new Bulma versions as well. Kindly up the priority to critical.

lemonsaurus commented 4 years ago

priority set to high. critical implies this isn't usable without it, which is misleading since new versions for Bulma are typically very minor.

please note that nobody is assigned to this yet, and that this org has many other priorities that are higher at the moment.

If you're in a hurry to see this done, you might consider submitting a pull request.

JonasUJ commented 4 years ago

I looked into this and doing it would add a lot of irrelevant files. The Bulma repo also has the source for its documentation which accounts for 76MB of it's download size, while the files we would need are only 132KB of sass. On top of that, the documentation contains filenames with characters such as ú and í that cause pip to spit out UnicodeDecodeErrors.

If someone knows a way to do a partial git submodule (i.e. only include certain subdirectories of the repo) please let me know :)

lemonsaurus commented 4 years ago

hmm, 76MB of documentation sounds suboptimal, yeah.

I'm thinking that it's not a problem if there's 76MB in this repo as long as we don't include it in the PyPI releases, so perhaps it would be possible to solve this in the build? Like, we somehow build this package but exclude all the documentation in the build process? or delete it from the dist folder after the build is complete?

JonasUJ commented 4 years ago

I haven't ever released a package on pypi, so i wouldn't know, but you do make it sound feasible. As long as it can be automated, because if someone has to dig through Bulma on every release, mistakes will eventually happen. It would also be the equivalent of what we are doing now of updating the files manually.

lemonsaurus commented 4 years ago

Our release workflow is here, if you're curious: https://github.com/python-discord/django-simple-bulma/blob/master/.github/workflows/release.yml

So building and publishing to PyPI is very easy, it just runs the setup.py to build a dist folder and then pushes that to PyPI. I suspect that there's some way to specify stuff we want to ignore inside the setup.py file itself, but I'm not well-versed enough with setuptools / distools to say exactly how that works.

If there isn't, we could include a step in the workflow that just reaches into the dist folder and deletes the stuff we don't want, so it's still solvable.