I wanted to add that I think the complete package ladybug_tools install is probably a good idea, particularly given that both the Honeybee and Dragonfly cores will have dependencies on Ladybug core, meaning that you will really want all of them installed together. In fact, Dragonfly will also probably have dependencies on Honeybee in the future.
Right now, there are no large files that download with the cores except for the ~20 MB pkl file that is with the Dragonfly core, which I think will be temporary until we write functions to parse the OpenStudio standards gem, which will form the new basis of our building type templates. Maybe we just leave Dragonfly out of the install PyPi package right now since the long term solution is to have the really large files and libraries living with the engines (OpenStudio, Radiance, etc).
It is also worth considering that these libraries will grow a lot over the next year or two (at least doubling / tripling in size). I think this is still small enough to justify installing them altogether but itās still something to consider.
Main reason for me to push this now is to be able to have a clean pip install of dragonfly for this Look ma' no grasshopper tutorialā¦ Iād be grateful if we include Dragonfly in the PyPi package if possible
Also, I donāt think future planned changes to the libraries should delay us packaging and deploying them (thatās what versioning is for). When a workaround to pickling is figured out for Dragonfly weāll just update it and push it to PyPi and that will be that
Whatever we do letās keep them separate. At the end of the day they are separate libraries, will have different development teams, different update cycles, etc. Dependencies are something that has its own workflows in Python packaging. That shouldnāt be a problem.
Interestingly enough I think in the near future we will breakdown libraries like honeybee to honeybee-radiance, honeybee-openstudio, honeybee-therm, etc. As soon as we start deploying the libraries to cloud and start firing up 100s of docker images, where size and speed matters, then we want to only include the libraries that are essential to that process. This also keeps the development process agile and maintainable.
Yep that all makes sense. Soā¦ Does some admin want to create a PyPi account for ladybug tools and add the username and password as well as set up Travis with secret keys as per: https://docs.travis-ci.com/user/deployment/pypi/ ? bats eyelids
Iām happy to help trial this for Dragonfly as itās not a fully released package yet and not many people are paying attention to it (if we trial dragonfly we also have to add uwg as itās a dependency)
@chris and I have talked about releasing UWG as a package. It might make more sense to do that first (no dependencies). I assume it would make it easier to then make Dragonfly a package, if we could add UWG as a official packaged dependency?
Right so I have tested a thing. Itās on a PR that should not be merged as I was an idiot and PRād a feature from my master branch which hasnāt been merged yet so new changes to master borked things.
Regardless, I have put the DevOps into ladybug-tools and set up a test semantic release system that will automatically deploy to PyPi when changes are made to master (using a specific commit message syntax). I have descrbed the changes in the PR(which I will have to remove from my master branch at some point but for now enjoy).
@SaeranVasanthakumar if this has all made some degree of sense to you then check out this PR I have left in UWG that should help set this up for the Urban Weather Generator. The PR shows the changes made and explains the couple of extra steps needed to kickstart the automation.
Iām just going to leave this image from the semantic-release repo to express the degree of automation we might have reached:
@mostapha ,
I can see there are benefits to separate PiPy packages for different insects but what you are describing to me sounds like it might create a coordination nightmare. If I have to constantly update 10 libraries just to know that an integrated daylight and energy urban model works, we are likely going to end up breaking such integrated workflows frequently. I feel that we should choose an appropriate amount of separation where it is useful and not get too over-zealous with it to the point that we limit the integrated nature of the tools. Or, at the least, if we are going to separate them, we need to make sure that there are plenty of checks on the integrated workflows and that we donāt end up having a lot of redundant code between the separate projects.
@AntoineDao ,
Of all the insects, I think Dragonfly is the least ready to be deployed to PiPy. I understand that you want to make the demo videos but, the more that I think about it, Dragonfly is going to change so much over the next year that I donāt think itās worth documenting the current state of it. I like @SaeranVasanthakumar 's suggestion of working on the UWG. Thereās still a lot that I would recommend in terms of cleaning up the uwg before deploying it (like adding Python 3 compatibility and making the process of interfacing with the UWG more streamlined). Still, that is going to be in a better state for documentation over a year before Dragonfly gets there.
I agree with @chris that separating the insects into their own packages adds a coordination overhead, however I would argue that:
This is already the case as the bugs all have their own repos and not integrations tests set up.
Creating a monolith will result in all the integration tests becoming unit tests so no real overhead is removed.
Keeping things separate will facilitate feature development because there is a clearer abstraction of utilities between packages.
CI will greatly help package deployment separately and communally by creating a dummy repo with CI built it to run integration tests and deploy the latest fully coupled versions of all the bugs to PyPi. Something a bit like this maybe?
In the long/medium run I reckon keeping things separate and going through a rigorous code boundary exercise to ensure that by design bugs donāt duplicate their code will be hugely beneficial for code maintainability, onboarding of new contributors, testability and feature development An example boundary line could be āonly ladybug creates time based data structures for all other bugsā for example.
Re: Dragonfly I agree it is the least ready for use in production, however I donāt think that would preclude deploying it to PyPi as an alpha version. So far both Dragonfly and UWG do what they say and donāt have major bugs so i would argue they are production ready under the condition that people know itās likely to change. This way you are also likely to get early feedback on the package and better understand how people would like to use it/what features they would like added. (I feel like this is a discussion for a seperate thread though so Iāll stop here! ). I am leaving the Continuous Deployment code to the dragonfly PR for now Chris so others can see it but I will remove it by the end of next week.
My main line of thought with all of this are mostly points 3, 5 and 7 from the 12 agile principles:
I just wanted to add that I am in favor of keeping insects separate for all of the reasons that @AntoineDao has listed (sorry if that was not clear earlier). I was just drawing the line at separating daylight and energy in Honeybee (all of my comments were in reference to that separation).
For Dragonfly, @AntoineDao , I would at least recommend that you hold off as I plan to address all of the issues that I have here soon, which will fundamentally refactor the core:
I would not refer to an API that is about to be refactored this significantly as an alpha and I donāt want people investing time in learning an API that is going to be significantly restructured. Maybe after these changes are made, I will be ready to accept feedback but I know that what is there right now is not correct and I need to account for all of the feedback that I have gotten from the legacy DF first. The reason why I released the legacy version quickly and as a āhackā was so that we can get feedback. For the core, this is our chance to take our time, think about it, and do it correctly.
All, I just wanted to add that @mostapha and I had a discussion about this and we will release to PiPy soon. We both like @AntoineDao 's suggestion of naming them with lbt-{package_name} since having the full name of each insect in the package name (ladybug, honeybee, etc.) will make it easier for people for search for the package. Also, having all of the libraries start with lbt- will make it easy for people to find all of the packages created by Ladybug Tools. Lastly, this system is extensible in the future if we want to subdivide packages in the future (for example, lbt-honeybee-daylight).
Along these lines, @mostapha explained to me how the integration checking between different repositories could work and I realize that many software teams have thought of this integration challenge before and there are good solutions for it. I also see why it might be worthwhile to subdivide libraries down to separate ones for energy and daylight as long as they all get packaged together and tested thoroughly for the plugins. Basically, I changed my mind on everything
The only thing that I have not changed my mind about is that I still want to make a few changes before pushing dragonfly to PiPy. I have come to realize that refactoring is not an excuse for not following the ārelease early and release oftenā mantra and many of the other libraries will get a major refactor at some point (ladybug will definitely have one in the next few months). In the case of dragonfly, though, I have a good sense of the changes to be made and I know that I can implement them fairly quickly such that a delay of a couple of weeks will mean a lot more re-usability for everyoneās code that is built using it. So we will just withhold this from the initial PiPy release and it should hopefully get released a week or two afterwards.
Just going to say this: weāve gone from an issue being posted, roughly 6 hours later a contributor picks it up, solves it and roughly 40 minutes later a new, up to date release has been made to PyPi with release notes. THIS IS SO COOL!
Just as a heads up for those who might not have been following the DevOps adventure ladybug-tools has undergone we now have the following libraries on PyPi:
Ladybug: pip install lbt-ladybug
Honeybee: pip install lbt-honeybee
UWG: pip install uwg
Dragonfly: pip install lbt-dragonfly
You can find the packages under the ladybug-toolsPyPi account.