-
Notifications
You must be signed in to change notification settings - Fork 77
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
Roadmap Meeting Schedule #116
Comments
Hi @bemcdonnell maybe we could schedule a meeting to go over these issues and make it recurrent every... X days or something? and we can also arrange so that they get recorded. Thoughts? |
sounds good. how/when do you care to meet? will you doodle something? I will also submit to the docket that I'm growing increasingly concerned about tooling overhead - the various CI integrations, enforcements, and conda business are all very confusing and seem to be causing issues for potential contributors. I don't have an easy answer to any of this, but that's why I bring it up. |
I have yet to contribute any code, but I'm interested to meet. |
Meeting seems like cool idea. |
I will setup a Doodle for next week (I’m away from my desk until Monday). Until I get back; let’s shoot for late next week. |
Just to riff on @samhatchett concern a little bit. I think it is necessary for the project to incur some tooling overhead in order to achieve QA goals. Both projects are currently failing regression testing for various reasons. I agree that finding the right balance is key but I don't feel that we are there yet. |
I can write a document on the wiki to explain the ideas. I think the needs are, and pardon the use of 0.) We want to have tooling to run regression tests and make sure on all platform we get the same resultsBy having all the containers and regression testing we can check for different platforms and different versions work and give the correct results 1.) We want SWMM to be cross platform
2.) We want SWMM to be cross platform and have bindings to other language(s) so that scripting is easy
3.) We want to make contributing code to SWMM easier
4.) We want to have tooling to achieve QA in a more automatic way, linting codeIt is a waste of a lot of peoples time to have to conform to a code style, in terms of use 6.) We want to have the tooling and the tests to run unit testing for every PR that is pushed on every single platformWe need to have at least 2 CI systems, one for windows, where appveyor is our only choice and another system for OSX and CircleCI. CircleCI does not offer free OSX containers, so that leaves Travis as the only choice. Travis can handle Linux as well for free, but circle CI is much faster to run, so any problem is detected a couple of minutes after every commit. This would not be the case with Travis. This requires writing tests. One way via SWIG is to add the python bidnings and use PyTest or UnitTest, which allow to write a whole test suite from python and not C, since SWIG will expose all the C code and not just a toolkit. 7.) We want to be able to distribute official releases in an easy an hopefully automatic way for all platforms and all compiler versions needed for binary compatibilityWith conda-forge, the process of making a release is opening a new PR and change the tar file, hash and version number on the recipe, and then they are automatically built and released on anaconda.org/conda-forge. We can also setup CI so that we can ourselves make the releases of exe etc, via CI, but this is not something we should do manually on someones home computer, that just does not cut it. 8.) We want to be able to distribute development, test, beta, RC candidates releases in an easy an hopefully automatic way for all platforms and all compiler versions needed for binary compatibilitySame here, the idea was to have a conda package built on every PR pushed to master or develop, that way anyone could use these Finally,
The problem is not conda or the tooling overhead, the problem is not having documentation around, "Proper" software development requires a lot of tooling, a lot of automation and a lot of documentation for both usage and development. Just my dollar... |
@goanpeca thank you for the explanation.
I might says that if you have a Python project, it must be on pypi. It is the official Python repository after all. From my little experience in a scientific context, my colleagues that use Windows use Anaconda, those that use Linux don't (I do not). I'm not against Conda, but it should not replace standard Python packaging imho.
C) How to run the tests to make sure I don't break anything |
@goanpeca Nice summary to which I would add: |
We are talking about Swmm and not PySwmm. PySwmm is and will continue to be on pypi, that does not change. Conda has a source for recipes, so when building a python package we use pypi as source, and that source does not contain binaries or dlls, cause conda will have a separate package to provide that (libswmm and pyswmm depends on libswmm). For pypi only package the wheel will contain the binaries, but the recommended way will be to use conda, not pip.
Depends on what they want to do and if they need system isolation or not, or/and if they care about being cross platform and being reproducible.
Yes, and SWMM is not a Python project, so what is the point? We can open an issue on https://github.com/OpenWaterAnalytics/PySwmm and discuss that there.
It does not replace it, it builds on top of it to handle all the cases that Pip and PyPi simply can't and opens up the space for packaging other stuff that is not python. You can't do:
And doing:
May or may not work depending on what the user has on their machine. It will not definitely run without issues if the bundled binary/library was built on a the compiler on @bemcdonnell 's computer (which is the current state of things) and if the user does not have the valid VS (version) runtime the user will need to manually install it On the other hand, running:
Will work on all machines, will download all the requirements and dependencies (VS runtime on windows, and libswmm package), and most likely will work out of the box, as all package were built using the right tools and right runtimes
There no tests on SWMM besides the regression testing. Perhaps @michaeltryby could do a step by step instruction on how to run it? tldr: Not yet possible or available
SWMM does not have any testing, no unit tests, nothing. If we plan to migrate to C++ we could eventually use GTest (Google testing framework for C and C++). We could try to use GTest for current C code in swmm, but we will need to decouple the code in a better way. If we have the SWIG bindings ready we could try to write tests in python and do that. tldr: Not yet documented in length? @michaeltryby |
@goanpeca you see it as point 5. I see it as point 0. It as the first most important thing that we should be doing right now. |
There you go... updated ;-) |
@goanpeca, swig will eliminate the need for any of us to build swmm locally. @lrntct has some nice workflows in mind and I think many of us have valuable perspectives. Pyswmm could do its auto packaging on our CI servers for the respective platform and python version once code is merged into master. This will take away all dependency libraries like VCOMPxxx.dll. Instead of building with VS on my machine as we do today; a stable version of swmm can be specified to be wrapped up with a release version of a pyswmm wheel. If we let the pyswmm CI framework manage which release version to fetch from GitHub, we will have not synchronization issues since we can assert which version of the c code to build when it’s specified in a release on GitHub. On the other hand; if these projects are pushed into their distribution channels, independently; we can have synchronization issues for sure. I’d like to assert some version of swmm with some version of pyswmm. Just want to put this project in context... most civil engineers know what computer programming is. Most programmers that I know use python instead of conda. For those who don’t understand programming very well; the simplest thing is for them to use python out of the box. Research groups and universities are different and so are developers. I foresee lots of people using this as a out of the box python package than a conda package. This is a challenging topic for sure. Moreover, i am reading so many valuable perspectives! I appreciate everyone’s time and energy toward our common goals. Let’s step away and think about this again before our CI systems are changed (perhaps with the exception of appveyor). Let’s continue this discussion toward the end of next week in a group meeting. |
@bemcdonnell I deleted your comments that talked about IPhone editing XD!
Well.. not for develop if changes are introduced in the code. Unless you meant... ? Conda packages are prebuilt binaries, so people do not build locally, they just install...
This statement is simply not true for windows users, civil engineers or not. The simplest thing is actually to install Anaconda which is a single click GUI installer instead of downloading |
With the SWIG interface, libswmm could become a C python package, isn't it? Since swmm does not depends on anything beside libc, it might be reasonably possible to create a wheel package for libswmm. If it is too much of a hassle to have it work on many platforms, then I would understand not doing it.
For the time being, a bit more information on how to run the regression tests (and maybe a small script to run them all) could be useful. At least to be sure to not break anything.
I have limited experience in multi-platform python packages with C extensions, and none with SWIG, so what I'm saying might be totally wrong. |
@goanpeca I use conda and think its great and I agree with many of your stated objectives. However, I am not convinced that Conda is the best approach for accomplishing them for swmmlib or epanetlib. For example, regression testing has been integrated with Travis over on the EPANET side. This was accomplished using cmake, swig, python setup, and some shell scripting. Just 6 python packages are required and it only takes 1 min and 30 sec to boot, install, and run. |
@goanpeca, with swig support we can issue a release here in the GitHub page.. then on the pyswmm CI servers, we can fetch the code from the release here, build it with swig, package it, and deploy to wherever. Our users would not need to generate any libraries locally. Our developers will generate libraries locally. |
We will never have synchronization issues between the two projects If the pyswmm project is packaged with one single collection of files. |
@bemcdonnell Perhaps this will make more sense to other people once we swig the swmm toolkit. |
This should not (ever) be the case. The development and release process is incorrect.
This is how it should always be. The development and release process is incorrect.
This is not related at all to the use of SWIG or the use of CONDA or the use of PIP. This is a problem of the current development ad release workflow. @michaeltryby I understand, but what I suggest are 2 different things that get mixed up in the conversation. 1.) User Distribution Channels: I suggest it be the main and recommended distribution point for any SWMM user wanting to automate stuff with PySWMM. This means making the packages with conda. Specially if they are on windows they really should be using the conda ecosystem. We want to have more users and we want the software to work in tandem with all the other amazing tools from the scientific ecosystem. Saying
2.) Development and dev channels: Since the main distribution channel I suggest is conda, the dev process could also use it and benefit from it as after it is in place. It would make it very easy for propective devs to just follow a couple of lines on the CLI and get the complete and the right development environment on any operating system, that having to install "just 6 dependencies". Bear in mind that for a lot of people python (not C or C++) is/was their first language so they will come here with that mindset after having used pyswmm and looking for ways to extend SWMM.
I will continue to argue in favor of 1, cause it is simply the best solution we have in the ecosystem that is, reproducible, cross platform, and friendly (specially on windows users!) For 2, many projects do not use conda at all on CI, and the conda recipes resort to patching to fix things, and that is fine. I would however like to keep circle-ci running the conda flow as it already very fast and would allow to make sure things remain conda friendly. I can maintain a set of instructions for Conda users and we can have another for non conda users, but I would like to see all the goals accomplished (not just the ones!) and not just some for the sake of speed on CI. Also we need to really understand that for the SWMM world (and epanet world?) to work with the Python world, there are very specific things to follow: https://wiki.python.org/moin/WindowsCompilers and on https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/pull/107/files we are not doing that. Again, I repeat the conda ecosystem is not a python thing only, there is R, Lua, Perl, many C/C++ system libraries that are already being packed this way. https://anaconda.org/conda-forge 3561 packages and growing... |
@goanpeca, could you please provide us with a list of open source projects written in C where the conda workflows that you propose are being leveraged?
I have every intention of building with all of the necessary compilers. It is way more important that we pass the regression tests today. Some of us have invested a lot of time and money into this project. We all need to be comfortable with the workflow. I'm not going to argue that the conda framework and workflow can't bring value; what I am suggesting is that some of us have a very nice workflow that we are happy with. It's portable and straightforward and reproducible with cmake. I like @samhatchett's philosophy with the epanet project. It's clean and organized thanks to the simplistic widely accepted approaches.
Do you know all the the civil engineers that I know? Without a doubt they're capable of anything! But we can't let their workflow get in the way of the work. I'm my experience; when I tell people that pyswmm is a python project, they google python and download it and follow my examples to get it working. More experienced coders will understand the value of a nice IDE like spyder and they will appreciate environments. We have entry level users and we have advanced users. I've stated an opinion here and I'm admitting it (please don't feel obligated to reply and quote me). |
@goanpeca I think Bryant was referring to your comment "We can also setup CI so that we can ourselves make the releases of exe etc, via CI, but this is not something we should do manually on someones home computer, that just does not cut it." - So are you saying different things? I am confused. Like Michael, I am convinced Conda is wonderful. Though I do not use it, even as a member of the scientific community. Maybe it's the only great package manager for windows (though i hear NuGet is great too), but we also have others for Mac (like Homebrew with over 4K packages, or MacPorts with over 20K) and for Unix there are countless package archives that work with While I understand being excited about what other people "Should" be using (and often I do try and evangelize for various causes), I usually only encounter resistance - especially when I use the "S" word. I would advocate for being packager-agnostic. Really just simplify the scope of this repo so that the religious debates can take place elsewhere and we can focus on the C/C++ code and tests. Packaging and Distribution is SUPER IMPORTANT of course, but choosing a "primary" channel and conjoining SWMM development with those concerns feels like a distraction from the things we agree on. Here is a hastily drawn figure to help illustrate the kind of project layout we've been migrating toward for EPANET. |
Hey guys, is this meeting open to the public, or by invite only? I'm based in Louisville, but would love to be a part of it. I don't know most of you, though I met @samhatchett years ago when I was a grad-student at UK. I'm interested in the direction SWMM is headed and I'd love to contribute if possible; hopefully offer some perspective on how we use SWMM for our modeling/design projects at Stantec. Thanks! |
@jrwalt4, sure - we can open it up to some others! I’ll put a doodle up on this issue when I get back. |
@samhatchett yes, that makes sense. I am in charge of conda packaging on that chart and I will take that part ;-). I can also offer additional instructions for those who might be already be using conda and conda-build. Now, all this discussion I think stems from not having clear build instructions and test instructions for contributors. We need to update the README.md to include that, which needs to include all dependencies needed with some base systems. Suggested content @samhatchett, @michaeltryby @bemcdonnell. We need something like on the I.a. Development environment (Normal Workflow)A.) WindowsInstall Dependencies
BuildingTo build SWMM then run:
Running
B.) LinuxInstall Dependencies
On Debian (.deb) based systems you can use
On Centos (.rpm) based systems you can use
Building
Running
C.) OSXInstallDependencies
If using Homebrew
Building
Running
I.b. Development environment (If using conda)A.) WindowsInstall Dependencies
Then you can create a development environment with all the dependencies, activate and build from there.
Activate the environment:
Building (with conda-build)
Running
B.) OSX and LinuxInstall Dependencies
Create environment:
Activate the environment:
Building (with conda-build)
Running
II. If you are developing for PySwmmIf you are developing for PySwmm you need to install these versions to work with how python is compiled on different platforms: A.) WindowsPython 2.7
Python 3.4
Python 3.5 and 3.6
B.) Linux.... C.) OSX.... III. Regression TestingTo execute regression tests run:
IV. Unit testsTo execute unit tests run:
|
* > > Our developers will generate libraries locally.
* > This is how it should always be... I don't understand what you are trying to clarify?
* @goanpeca<https://github.com/goanpeca> I think Bryant was referring to your comment "We can also setup CI so that we can ourselves make the releases of exe etc, via CI, but this is not something we should do manually on someones home computer, that just does not cut it." - So are you saying different things? I am confused.
As a developer for Python and EPANET, and as someone who deals with cyber security issues, I would suggest that:
* For developers, who can build themselves, not having a CI that releases binaries is no big deal
* For users who may want to use PySWMM or derived tools, having a binary that was built outside a CI environment would be a significant security concern. While it is true that a CI system might become infected, it is far more likely that it would be detected early, vs. an infection that came from a single computer. I mention this specifically because philosophically I would agree with previous statements that Users should never need to download a compiler.
I’m a developer, I’m going to either build my own DLL’s / pyd’s, but I support customers that rely on us to provide binary installers – having the distribution be part of an automated process significantly decreases risk exposure. And I admit, my customer base is perhaps different from many here since I am focused on EPANET, but since I got all the e-mails (not sure how I got on this particular thread, but oh well (-: ) I thought I’d share that security focused perspective.
…--
David Hart | e: [email protected]<mailto:[email protected]>
Sandia National Laboratories | Geoscience Research & Applications Group | Geochemistry Dept.
|
My apologies for being so pushy on this (conda) subject. I understand at the moment is not a good choice for CI or development workflow if someone has not used it before. I will be in charge of making the conda packages once we can sort out the nrtest regression tests on CI based on the work by @michaeltryby. Cheers. |
@goanpeca check out the feature-nrtest branch. nrtest is already configured to work under Travis. Just merge the branch. |
The project is getting more popular which is incredibly exciting! I think we need to have a roadmap meeting soon to talk about recent history and future of the code base. Developers welcome.
Some topics to cover:
Recent History
Au Futur
The text was updated successfully, but these errors were encountered: