These are chat archives for pybee/general

19th
Dec 2017
Patrick Cloke
@clokep
Dec 19 2017 15:56
@freakboy3742 I had looked at that (but am not very involved), I was curious if you wrote why that change was necessary at all? I didn't see it in the description, but maybe I missed it! (Don't want to steal too much of your time either, mostly just curious!)
Bagdat Bimaganbetov
@bbb1991
Dec 19 2017 18:13
Hello! I have little project that uses import third-party libraries (such as numpy). Can VOC convert thrd-party libraries into bytecode too?
Dan Yeaw
@danyeaw
Dec 19 2017 19:46
@clokep Based on @freakboy3742's previous response, his idea is to get the core of the style definition and constant definitions out of Colosseum, and into a standalone package called Travertino (named after the rock the colosseum is made from). Since Colosseum still needs a lot of work, he has created a flexbox-lite called flow. The eventual end-goal is to finish the full flex-box support in Colosseum, but that is a long term project.
Patrick Cloke
@clokep
Dec 19 2017 20:04
Right, so is the "why" just "Colosseum isn't ready yet"?
Dan Yeaw
@danyeaw
Dec 19 2017 20:09
Yes, I think so, and maybe make things a little more modular so that you don't need all of Colosseum just to get style and constant definition
Patrick Cloke
@clokep
Dec 19 2017 21:32
Makes sense. It seemed a little odd to make that it's "more" modular, but just swapping out one dependency for another.
I.e. I was surprised how much internal code had to be changed to switch!
it looks like the tests are passing
I did notice an error in building Ouroboros (if fails to clone the repo because of apparently not being able to run git), however, the and build reports as "BUILD SUCCESSFUL"
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:41
@clokep In most cases, the code changes are things that reverse a dependency order, or abstract an API so it can be swapped out. There are also a bunch of changes related to the way native widgets are built up. Previously, as an optimization, Box objects didn’t get a nativewidget representation. However, in abstracting everything, it became clear that they needed a representation so you could set their background color (can’t set the color of something that isn’t there!)
So - the motivation was a combination of “Colosseum is going to take ages to get right, and we only absolutely need about 5% of it; Others might want their own layout schemes (so lets have a proof of concept that this is possible); and some internal cleanups to make the first two points a reality.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:43
@freakboy3742 pybee/beefore#15 any thoughts there?
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:43
@bbb1991 Yes! Any pure python code can be converted to Java bytecode. The only restriction is native modules - we can’t convert those. If someone is really enthused, it might be possible in future, but it’s certainly not going to be easy.
@goanpeca Looking...
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:45
Thanks :-)
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:46
@goanpeca Hrm… that’s an interesting one.
My immediate reaction is to make it a separate check (although internally, it’s going to be almost identical code to pycodestyle)
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:48

My immediate reaction is to make it a separate check (although internally, it’s going to be almost identical code to pycodestyle)

Yep... so maybe abstarcting the common stuff... to avoid duplicating code?

Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:48
That’s the idea.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:48
Ok cool
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:48
Or making PyDocStyle a “specially configured” version of PyCodeStyle
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:48
will work on a POC
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:48
That said...
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:48
that said....
XD ?
listening :-p
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:49
Is it possible to run flake8-docstyle without running the basic pep8 style tests?
I ask for two reasons: one, to make the implementation simpler
But two, more broadly, "Are docstrings code”?
If I’ve got foobar.py, would I be surprised to see 2 different reports (3 code errors, 1 docstring error)?
When we end up getting a proper sphinx compiler, there’s going to be a “your docs don’t compile”… would it be confusing to see 2 different reports for “your docs are broken”?
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:51
Hmmm actually now that I think about this, maybe we could explore using

When we end up getting a proper sphinx compiler, there’s going to be a “your docs don’t compile”… would it be confusing to see 2 different reports for “your docs are broken”?

Well if documentation is separate and lives in a doc folder then 2 different reports make sense, cause they are different docs....

Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:52
Thats true.
But the inverse of that: does it make sense to see 2 different reports for the same file?
As for coala - I can’t remember if I looked into it. Feel free to look into it and make a proposal.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:54
if its a practical thing, maybe 1 report is more concise?

As for coala - I can’t remember if I looked into it. Feel free to look into it and make a proposal.

Its relatively new, but it defines a generic framework for many languages and there are now several different checkers, so it would be worth a try

Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:55
ggnnnnnnTHEY’RENOTBEARSS!!!!!1!!!
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:55
XD
Elias Dorneles
@eliasdorneles
Dec 19 2017 22:56
haha
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:56
Oh yeah - they’re AGPL. Which effectively rules them out.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:56
ohhh
why is that?
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:57
AGPL is commercially toxic. It’s the Free Software (tm) purist license - it’s almost impossible to use in a commercial context without giving away your source code
Which is fine if that’s your goal, and it’s entirely their own choice to do that.
But BeeWare is using BSD specifcially because it’s commercially friendly.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:58
Hmmm, but how would that affect something built with beeware projects
if this is only used for testing code on CI
is not like the app built with toga or the like require coala...
Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:58
In this case specifically - BeeKeeper and BeeFore are one of the properties that have the most immediate potential to be commercialized.
(or monetized,anyway)
Not planning to make them non-open source, or anything like that
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 22:59

BeeKeeper and BeeFore are one of the properties that have the most immediate potential to be commercialized.

Ahh ok, in that line of thought... yep that is an issue

Russell Keith-Magee
@freakboy3742
Dec 19 2017 22:59
But AGPL is a red warning light to anyone commercial, so it's a third rail you just don’t touch.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:00
Yes agreed on that context
that blows :-\
Elias Dorneles
@eliasdorneles
Dec 19 2017 23:01
i always thought that coala thing was more like a tool for developer box than a CI thing
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:01
well... its a tool for checking code, only that it is written in python in a generic way so that more languages can be plugged into it, by defining a minimal "Framework"
Elias Dorneles
@eliasdorneles
Dec 19 2017 23:01
but i guess it makes sense to integrate in CI
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:02
@eliasdorneles Sure, it is - but anything a dev can do, we can do on CI - and if it’s an automated check, you should be. Especially in our case where so many contributions come from people who dont’ do automated checks on their own.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:02
@freakboy3742 maybe you could chime in here with some thoughts?
coala/coala#137
I think it is important and given the discussion there it seems they did not put much thought on it?
We would get a lot of stuff for free if we could use coala so I bet they would be willing to relicense?
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:04
Yeah. From a quick scan (and IIRC, from meeting them in person last year), they’re definitely Free Software purists.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:04
hmmm
ok
coala currently runs under the GPLv3 license. I'm a fan of having it GPLd instead of BSDed because it prevents companies from using and extending the software without contributing their work back. (And IMO the world would be much better if companies would start to share code. Big companies slowly get that this is very efficient, from red hat via google to facebook)
yep
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:05
Yeah. Going hard on a fundamentalists position, missing the fact that letting people do what they want with code is the very freedom they’re trying to protect.
And, you’ll note that they’re not swimming in money to maintain the project as a result, so it’s not like it’s a guarantee for commercial success.
@goanpeca Anyway - I think I might have revised my position. Pull docstring checks into PyCodeStyle as a single check. That should make the implementation simpler, we’ll get one report per python file.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:06
yep, pity :-p

Anyway - I think I might have revised my position. Pull docstring checks into PyCodeStyle as a single check. That should make the implementation simpler, we’ll get one report per python file.

Sounds good

all my coding time was spent on discussion so tomorrow XD
hehe
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:07
Heh :-)
Thanks for taking a look at this. If only because it’s good to have other people with knowledge of how beekeeper/beefore works.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:08
:+1:
@freakboy3742 you should efinitely open an issue saying Koalas are not bears... https://github.com/coala/coala-bears/issues you have all the authority by the random fact of being born in Australia XD
assuming you were born there :-p
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:11
I am AU native. Not from a part where Koala are indigenous, but still.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:11
hehe
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:12
(Side note - I really don’t like Koala. They’re nasty, dirty, viscious little bastards. They sleep for 23 hours a day, and the rest of the time they’re fighting or f….. ornicating. And 80% of the wild population has Chlamydia).
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:15
I wrote a kinda similar tool
for checkong diffs and stuff, but it was not tied to git or PRs per se. If we could clean up and reestructure a base clase on beefore, we could make it a bit more generic
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:16
Heh :-)
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:16
and hopefully useful in other cases
In that tool I had the concept of a Linter class and Formatter class
At some point I asked why we did not use some code autoformatter to "not waste" time reviewing code
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:17
Exactly :-)
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:17
now you have more context of why :-p
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:17
Oh,I completely agree that automated tools > manual tools.
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:18
However, manual (or tool assisted) modification > automated modification
I’m not wild about a bot that rewrites your code inside a PR.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:19

I’m not wild about a bot that rewrites your code inside a PR.

The workflow is more like you have to run the bot locally and commit that.

Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:19
Oh, for sure.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:19
The CI checks if anything changed when running the bot remotely, and if it did it failed.
instead of telling people "You missed a space here" and then they have to change it manually ... you ran a code that makes it compliant to something.
It is less pedagogic but is more efficient I guess?
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:20
Yeah - and ideally it’s best if a robot tells them “you missed a space; maybe run xxx"
(that way it’s not a personal attack. Because robots don’t have feelings :-)
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:21
haha
So beefore is super cool and I love it, but I would prefer to just run some command as a pre commit hook and have the code style be auto-formatted
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:22
Oh, absolutely. I’d be incredibly happy if we can get to the point where we can run beefore locally
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:22
Ok great
I could integrate then stuff from ciocheck into beefore
they are pretty similar in concept
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:22
and better still, force that into a repo so that it gets run automatically before anyone commits/pushes anything.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:23

and better still, force that into a repo so that it gets run automatically before anyone commits/pushes anything.

Yeah that was my plan

but it has been super hard to convince people on other projects of doing this
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:23
Oh, I’m completely sold. Just a matter of having the tooling that works.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:23
Ok thats all I needed to hear
PRs coming soon then
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:23
\o/
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:27
also in the quest to automating release process... I worked on this https://github.com/spyder-ide/loghub/, in case you are interested :-p
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:29
Hrm… I get the idea, and I’d like to automate changelogs… but I’ve used simliar tools in the past, and my experience is that they end up needing a lot of manual editing
(mostly because commit messages are very rarely ready for external consumption)
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:29

but I’ve used simliar tools in the past, and my experience is that they end up needing a lot of manual editing

It requires being very strict and tidy when making PRs and Issues

Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:30
Yeah - which is, unfortunately, a very hard standard to keep when contributions are coming from everywhere.
I suppose we could use the merge commit messages as the opportunity to clean up...
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:30
Still before any release I scan all issues and PRs in the milestone (I use milestones to track releases) and tidy the titles up a bit so that the final generated changelog is nice.
It also requires being tidy about label usage.... bugs, enhancement, features etc...
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:31
Sure - not sure we’re quite ready for that kind of discipline
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:31
Haha
Russell Keith-Magee
@freakboy3742
Dec 19 2017 23:32
Definitely easier on a mature project - but when everything is still moving and changing rapidly, it’s a lot harder.
Gonzalo Peña-Castellanos
@goanpeca
Dec 19 2017 23:32
yeah, it somehow feels more work to a lot of people to be tidy all the time and not writing a changelog, than writing a changelog manually

Definitely easier on a mature project - but when everything is still moving and changing rapidly, it’s a lot harder.

True!

We will get there :-p