tox is not just a tool to help you test a Python project against multiple versions of Python. In this interview, Oliver and Brian just scratch the surface of this simple yet powerful automation tool.


Transcript for episode 49 of the Test & Code Podcast

This transcript starts as an auto generated transcript.
PRs welcome if you want to help fix any errors.


Welcome to Test and Code, a podcast about software development and software testing.

In this episode, I talk with Oliver Best Walter. One of the main Talks project maintainers is a simple yet powerful tool used by many Python projects. I originally thought of Talks as a way to run a test suite against multiple versions of Python.

Yes, Talks can be used for this, but it’s so much more. I learned a lot from talking with Oliver, and I hope you do, too.

Thank you to Pie PyCharm for sponsoring this episode.

Now let’s talk with Oliver.

I am so excited about the guests today.

We’ve got Oliver Best Walter, which for a long time I thought his last name was Best. Weller, and I apologize, but it’s Best Walter, which is a great name. Oliver was one of the technical reviewers for the pytest book, and I was recommended to ask him because I needed somebody to cover some of the Talks part. And he knows both PITest and Talks at least a little bit. And by that I mean better than me.

I was very grateful for that. And then at one point near the end of the making of the book, it was sometime in 2017, I was on a business trip to Munich, and I had this crazy idea that it would just contact the Munich Python User Group and say, hey, I’m going to be in town. Does anybody want to get together and talk? And they actually did. And they pulled people together at I think it was at a University and had a bunch of people. And one of those experiences where some people are coming to listen to you, but you’re not the smartest person in the room. The smartest person in the room was Oliver. And so I’m really glad that I think, well, there’s a ton of smart people there, but I think Ronnie was there, and I’m going to get it wrong. But is it fanschmitt? Is that how you pronounce Ronnie’s last name?

Ronnie fanschmitt, yeah. Okay. It’s like the German word for pan with the Fry stuff.

Okay.

Somehow.

So that was cool to meet both of them. Ronnie is also a pytest developer, and we had a great time, answered a lot of questions, and then we took the whole thing.

And I was glad Oliver was there because some of the tough questions he got to answer and he got to correct me on a few things. It was nice. And then we went out and had some drinks with a handful of the people there and was a great night. So I was glad to be able to meet Oliver in person. And now we have him here on the show. And one of the things we’re going to talk about is Talks and also just sort of introduction to Talks, but also catch up with Oliver to find out what he’s doing. So, Oliver, welcome to the show. Thank you for coming.

Hi. Brian, thanks.

You completely flawed me. Now I’m never the smartest person in the room. I always try to be not the smartest person in the room because I want to learn something.

I’m one of your fans.

I really like your show.

I didn’t get it right in the beginning. I think I found it like in 2016 when you already had quite a few episodes under your hood so I could do a little bit of binge listening and now catching up since then. So, yeah, I’m a fan of the show and I’m really pleased to be able to talk a bit about talks and other things.

I don’t know if I’m getting this right. You were one of the core contributors of Pipest and Talks or what is your relationship to those? And I guess also what do you do on a daily basis? Do you work on these or do something else?

Okay, basically my life didn’t went straight away. So I was a musician for a long time and I came to programming quite late. I mean, basically I’m programming my whole life somehow as a hobby. But I used to be a musician and then I started studying later on and I’m still at my first job here, my first tech job at Avida in Robinsburg in Germany. And yeah, they were nice enough to give me the chance to go to conferences and go to the Pytech Sprint in 2016. And that’s where the open source involvement started for me.

I fell in love with open source a long time ago in the 90s already. I was basically when I was primarily a musician, I was kind of a computer scientist groupie because I hung out with a lot of they were studying computer science, I was making music and I listened to their stories and they tried to explain to me object oriented programming and whatever, and I was just fascinated.

And then when this whole music thing went a bit, yeah, it became clear that it’s quite hard to make a living with it. And I had not a very nice skateboarding accident and couldn’t play music anymore. Then I had to rearrange my life and got more into my old hobby. Computering open source was always on my mind. And then in 2016, I’m distracting myself already. I’m trying to tell you a straight story here. So 2016, I went to that Pytez brand and I met Holger Crackle, Ronnie Punchmate, Dave Hunt, Raphael. A few of them were on your show already, actually, I think Dave Hunt, he talked about that. We dropped a dot together. That’s quite nice memory I have of that Pie test. And one thing he didn’t tell you, by the way, is you asked him which editor he’s using. He’s using Atom.

What he didn’t tell you is that he’s using Atom with active Power mode.

Do you ever hear about that?

No, I don’t. What is that?

It’s a plugin.

And if you’re typing. Then your whole editor starts wobbling and there’s like fireworks shooting out of the letters that you type and you even have combos. Now there’s like a high score counting up. The faster you type, the more mad it gets. And I was sitting next to him while he was typing. I thought, what the hell?

Yeah. So have a look at this. It’s really activate power mode. It’s an Atom plugin.

Nice.

Yeah.

That was such a great week I had with them and I just wanted to get more involved and help because I started reviewing Talks PRS there then. And Talks was a little bit on the inactive side back then. It’s not really a very fascinating project if you think about it. It’s basically built automation and people want to do more interesting stuff. So there wasn’t like a rush of people that wanted to keep maintaining the project.

So yeah, basically I ended up maintaining it, looking at the issues, sorting out stuff, answering questions, and since then I’m more or less quite active there.

So you still work on the tax project?

Yeah. The nice thing though is that I’m not on my own anymore. I mean I was really never on my own. It was a little bit in Hibernation state in 2016, but it picked up again. I think a big difference was the move to GitHub. We moved over to GitHub.

Yeah.

And then I tried to automate everything to make releases easier and make it more accessible to new contributors. And now there’s quite a lively community around it. Again, we completely automated our release process. So basically you just have to tag a release, then the bot opens the PR and then if you greenlight that, then we have a new release and everything’s automated. So releases are picking up. And the last two releases, I didn’t even notice that they came out. So I had to do some reading today. What’s actually new so that I can give you some information.

What’s new? Yeah, that’s basically. And I asked my employer if they can sponsor basically my open source involvement because we are using it. We are dependent on toxin, pipes and all that. So we could give back a little, I thought. So I’m allowed now to use 20% of my work time at Avira to spend with open source activities.

All kinds of things, mainly talks, but basically 20% is open source of my official work time, which is great. So thank you, Avera.

That is wonderful.

I guess it doesn’t hurt to ask, right? Sometimes somebody will say yes.

Yes, I think more people should do it. Actually. I gave a Lightning talk on one Europaisant about it. I wanted to give a Lightning talk about talks, but then I realized this topic is much more important for me at the moment. So I basically talked five minutes about how people that really want to contribute to open source, they should go to their bosses and see if they can get help with that, because we have a big maintainer problem, especially toxic is part of the Python fabric infrastructure. I had a look today. We have like 15,000 projects, depending on us on GitHub, and we’re just a handful of people and there’s no money coming in or whatever to support this. This is all just because people care about it and the whole industry relies on these projects. So this is not a sustainable state of things. So I’m trying to raise awareness there a bit. Also.

You’Re also involved with helping to teach both pytest and I assume talks as well and other things.

You told me before we started recording that you’ve taught both within your company and outside of your company.

Yeah, that’s my new hobby. I really enjoyed that as well.

The nice thing is really then if you go outside your company and start teaching in other companies, you see how they do things and you learn what are their special problems and all that. So it’s really interesting. I really enjoy that.

How long have you been doing this?

Well, privately I started on some University. There were some students who were interested in Python and I was invited to give a talk about Python at Avira, and that was really fun. And then that turned basically into my first course. So I went there every week then and taught them Python for a while. And one of them actually ended up they were MBAs, they were studying for business stuff, but one of them was really so much fun. He’s now a Python developer and that was my first big feeling of I can help there. And then Mike Muller asked me, I think that was spring of last year if I would be interested to get some testing courses.

Okay.

Yeah. And the first one was at Bloomberg last year where I actually met one of the other core maintainers, Bernard Garbor. He’s really active now and he’s basically running talks now. I could just vanish from the face of the Earth and nobody would have to be worried about toxic. He’s really very active and he’s got a lot of good ideas. His first contribution was one of my favorite ones now where I first thought, who needs that? But now I’m really grateful it’s there. It’s a simple thing. You can add a description to your Tox environments, which then will be printed out if you say Tox minus AV, if you want to try that one day, for example, of the Tox source code, and it tells you all the environments and it gives you a description of what this environment is supposed to do. So it is like an instant little developer documentation for how to build, deploy, or whatever you do with talks. What those environments do that is really useful. So that was his first contribution.

I met him there and this year I was in culture in some Institute and there were many data scientists, they had completely different problems. I come from this build automation world. That’s basically my day job. I’m doing build and release automation. That’s how I started at Aviva and that’s what we’re doing now, still seven years later, a bit differently. And now we may coordinating things more and providing build tools and things like that. But that’s basically what I’m doing on a day to day basis. This is why Talks is for me an interesting project, but they basically don’t really care about that. They just want to do their analysis stuff and they want to run their Pandas and NumPy or whatever.

And they come from a completely different angle. And then to help them with getting their tests off the ground and automating things, that was fun. Also in the end they had GitLab, they had an internal GitLab and GitLab is really great. I think in combining the source code side of things and the CI side of things, it’s all integrated. It’s not like with GitHub and Travis for example, which are different services in GitHub. It’s all one big model and you just switch a toggle on and then you have your CI and then we got the GitLab working with Talks and all that and that was great feeling of achievement then. And they had their CI pipeline all set up and yeah, I really enjoy that kind of stuff. And I’m giving more two more courses this year.

When you say courses, are you like showing up and teaching for 4 hours or showing up every day for a week and teaching for a couple of hours or how does that look?

They’re usually three to five day courses.

I have some kind of course set up that is teaching pytest and Talks and a bit of Dev P, which is like the third major component if you want to set up a Python based automation pipeline without any commercial products, let’s say so defp is basically a private package index which you can use to upload your packages and you can host that internally in your company and then you upload your packages there and it all integrates very nicely so you can test your Dev P hosted packages with Talks. Okay, these three things, that’s a three day course where I teach these things how you say the main thing is pytest because that is the most complex project of them all.

But yeah, a bit of Talks, a bit of Devp and mainly Pi test.

And then is that a thing where people bring laptops and you’re having them work through it and helping them very hands on?

It’s not really much of a theoretician.

Okay, so you’re not just up there lecturing for 8 hours for three days.

I try not to. I might make a different impression now because I’m just talking so much so fast because I’m really excited to talk to you. Normally I’m more quiet and like working quietly on my own and not talking so much. But yeah, if I give a course, if I’m talking about something that I’m really interested in, I don’t want to really stay passionate about. But that’s basically it. But it’s such a used word already.

Then I could talk for hours. And it has been noted that when I then was in the topic of talks, that then people started to say, actually we wanted to have a break half an hour ago.

Yeah, I got carried away and in the beginning I added a little bit of a theoretical stuff part recently inspired by you, I don’t know, hatred too strong a word. But your testing pyramid, you don’t really like it.

Testing what?

The testing pyramid approach? Yeah. Oh, pyramid, sorry. Pyramid, yeah, I’m a gentleman. Sorry.

I’m talking about that a bit. And because I’m really very much on that side also that I think this pyramid, it might apply to some certain kinds of projects, but in my world, for example, I don’t adhere to that. Testing pyramid. I’m more into what you call tracer bullet tests and this overarching functional tests, system tests, these kinds of things, they are much more helpful in the real world, I think a lot of the time.

Well, I agree with that. But the more people I talk to, the more I realize that there isn’t so much of a difference as to what kinds of tests should be done. It’s more of like what are their definitions of what unit is the units at the bottom?

What is a unit for some people, and my gripe up against the pyramid is often because I don’t do this, the mockest unit test, where you isolate every single function, isolated from everything around it and just test that. That seems ridiculous to me, but very few people actually do that, as far as I can tell. And some people, when they just throw unit tests around as just the thing that a developer is working on a test to test that, and that’s a unit test, and I have no problem with that at all.

This episode of Test and Code is brought to you by PyCharm. I started using PyCharm because of the amazing automated test support, especially for pytest, but the more I use it, the more I realize how much time it saves me. And the rest of my day I can click Commit and walk through all of my changes and make sure everything is really something I want to keep. If I see a print statement that I didn’t mean to leave in the code, I just unchecked that part of the file and it isn’t committed.

Want to try out a snippet of Python? There are tabs at the bottom for quick access to the Python console, as well as to the command line, console, version, control, and even a Todo list that’s populated by Todo comments. In the project, I find myself opening other tools less and less that time saving of context switching adds up. If you value your time like I do, try PyCharm head to testandcode.com PyCharm and try the Pro version for free for four months we were going to talk about Talks and I realized we haven’t actually told people that are unfamiliar with Talks what it is.

Yeah, I’m sorry.

Okay. I’m trying to concentrate now.

The top line, I went to the Talks automation documentation site and it said at the top, and you tell me if this is really accurate.

It’s standardized testing in Python Talks aims to automate and standardized testing in Python as part of a larger vision of easing the packaging, testing, and release process of Python software. That didn’t really tell me much about what it does.

Yeah, that was there already when I joined, and it’s definitely something that I can somehow identify with, but it’s actually the scope of Talks is much larger than that, I don’t think. Slowly. Yeah, it grew out of the need. I mean, it came out of the same community that started Pi Test.

So it basically Olga Crackle who came up with Pi Test as part of the Pi Pi project. I don’t know if you’re aware of that, but Pi Test Antox grew out of the Pipe project because they needed a testing framework. And Hollywood came up with the idea, why don’t we do something that we can share among projects? And this unit test, I think it was there already, but it didn’t feel Pythonic enough and it wasn’t powerful enough. So to say or it didn’t cover what they needed and covered came out of the same problem space then that they needed to test packages with a lot of interpreters. So this was the main motivation. So what Tox is doing is simplified.

Tox is doing the same that you would do if you create a new environment for Python interpreter. Python three, six, for example, then activate it, install all your test dependencies, then install the package that you want to test and run the test for you and report the results. That is what Talks is automating on the, let’s say, simplest, most straightforward level. And it grew from there. And now you don’t need a package. You don’t even need an installable project.

Just for fun. The other day I tried to write a top seller world, because that’s the classic thing that you try to do when you learn new programming languages.

So I thought, what would that look like? If you want to do a Tox seller world and you don’t need a package, you need an empty directory. You put a and I in there. So that the main configuration for Tox is an in. Is it any or Ini?

I’ve heard it both ways.

Okay.

I don’t think it matters.

I’m always unsure. So let’s call it toxinny, because that’s how I call it. Any file that keeps has the configuration and you need a very short toxiny file, which is just say don’t build a package for me and run the command print.

You can say Python minus M, no, Python minus C print, and then run some Python code. So basically you can use Talks to just create a virtual environment for you and run some Python code directly in there. You don’t need a test framework, you don’t need a package, you don’t need anything. So Talks is basically just something that helps you create virtual environments and do stuff in it. That’s the most general thing I could describe it.

Yeah.

Now it seems like you can bypass any of the pieces you don’t want.

Yeah, that’s right.

So for instance, even if you don’t want it, if you don’t want it to create a virtual environment, it won’t.

That’s the one thing. And it’s interesting that you say that, because that’s the one thing that you can’t do. It always creates a virtual environment for you. It’s funny that you say that, because for quite a long time I’m thinking about I think I want to do that, make that optional also, because sometimes I just want to have some place. Because for me, how I see Talks is if I look into a project, if I check out some code and there’s a Talks any in the root of that project, then I know exactly where to look, how I can test, build, deploy, or whatever I have to do with the project. Right. By looking inside of that taxi or even nowadays, like I said, the Bernard’s contribution. Now I only have to say tox minus AV and it tells me all the environments. And if the maintainers were nice enough to contribute a description, then they also explained to me what this environment does.

But the one thing that you can’t do yet is run it without it creating a virtual environment for you.

Okay.

Yeah, that’s the only thing you can switch off. We have a quiet mode now, so you can say tox minus QQQ and it doesn’t say anything, it just comes back either zero or non zero and it doesn’t talk to you at all.

Okay.

That’s quite a recent addition.

The first reason why I wanted to understand it was to be able to it was for the when I was actually writing the Pipe test book, I wanted to be able to run my examples in multiple versions of Python, and I think that’s one of the primary reasons why people get into it. But afterwards, actually, that wasn’t a huge benefit. The huge benefit I saw was that when you’re creating a package, there’s a chapter that I talk about actually just the process of creating your own package. And I created a package for the book, of course, to follow along, but to get all that stuff right, to get your set up file right and your manifest and to get all those pieces right.

So that it actually is something that runs.

You have to get to the point where you’re compiling the package or building the wheel or the zip file or something and then installing it into all of that process, all that packaging process, having talks be part of testing. That is a huge benefit because that’s an easy thing to mess up.

Yeah. It makes it very comfortable, but nowadays it’s just one of the many things. But that’s still one of the most important functionalities of talks. Definitely.

You don’t have to deal with all that then, or you set it up once properly and then you say talks do the thing for me and it does the thing. And if you want to try from completely fresh, you say Talks minus minus Recreate or minus R, and then it throws the whole virtual environment away and starts fresh. And that’s a really useful thing to have also.

Yeah.

That’s one tip. I definitely wanted to not forget to mention that if your tax stuff behaves in any kind weird, the first thing you should do is say Talks minus Recreate and see if it catches up when you start fresh. Because let’s say weakness of not necessarily tox, but of the whole packaging universe that we live in is that dealing with dependencies and updating dependencies and dealing with change. Dependencies is hard, especially if caches come into play and all that. So sometimes Talks is not catching that some dependency changed.

And then if you say tox minus. R, it just throws everything away and starts from scratch. And then if things are still going wrong, then you can look further. Then you can start wondering what doesn’t work and start to debug the whole thing.

Good that I got that off because I thought I have to say that because that’s basically that’s the toxic version of have you tried turning it off and on again?

Well, I didn’t even know that was there because I usually if I run into that, I delete the talks directory and start up there.

Well, you can do that also. But talks minus R is like the more graceful way. Yeah. Because you can do that environment specific. You can say tox minus. R this environment and then it only recreates and runs that environment. You don’t have to throw away everything.

The other thing one of the things I like is so it does create this talks directory and then it has those environments in there. So on your command line, like, for instance, if I’ve got a handful of different environments that it’s creating and there’s a failure just in one of them, you can just use that. You don’t have to recreate it on your own. You can just go into there and activate that virtual environment and run some tests individually or look at what’s going on. That’s hugely helpful for debugging things I love.

Can I just sneak hold that thought? Because now there’s the next thing that I wanted to make sure because you said you can then activate that virtual environment. And I think you’re a fan of PyCharm nowadays.

Yes.

Is that right? Yeah. And I basically live in PyCharm. I’ve heard of it on the first conference I was in 2011, and since then I’m using it. I never looked back. And one thing that it supports now with a plug in, the plug in is called Pi VM. Manage it’s from Nokia.

You can install it through it’s, not in the JetBrains repositories, it’s in the other repositories, but you can install it quite easily. And then you have a new context menu button where you can then click on you can open the docs folder and you see little Python icons then. And you can actually just right click on whatever environment you want to activate and say activate environment.

And then this gets being set as the interpreter of your PyCharm.

You can switch back and forth very easily. So that’s the way how I activate Talks environment nowadays. And that’s the way then also how you can activate your development environment that you can create with Talks also.

Yeah, because it’s just an environment. You can run Talks through Pi. Pycharm too. And it’s integrated as well.

I think it’s integrated as well as you can because you can’t really choose direct environments. You can just say run Talks and then you have this concept of you have the N list in the global settings of Talks. You can set an end list where you then provide the environments that you want to run automatically. When you only say Talks, then it shows those environments. And that’s what PyCharm can do. So it can run the default environments, but you can’t right click what I really love so much also and why we are at Python. I hope you’re holding that thought. Whatever it was, I’m done in a second.

You can right click in any test if you have pipes and you right click into a test and then you can run that specific test because it uses the selection mechanism of pytest to choose then only that test for you and run only that test.

So that would be perfect if you could do that with toxic environments also. But I understand why it’s not that easy because of the generative possibility to generate environments. So it’s not that easy actually to find out what you want.

But yeah, it’s there. You can run the default environments. Okay.

Yeah. One of the things they added not too long ago, I think it was last year, was the ability to run an individual parameterization of a test.

Yeah. That’s also really handy.

And some of my parameterized tests are very long with huge number of parameters.

Being able to dive in and rerun one or two is nice.

Yeah.

Okay. So we talked about that it creates virtual environments that you can test your set up, but you don’t have to you don’t actually have to have anything to install. You can avoid that whole install part.

But it isn’t just for multiple Python environments. You can do you can set up these different environments configurations could be multiple versions of pytest or multiple versions of really anything. So let’s say you’re integrating with a third party package and they’ve upgraded, and you want to know, kind of, do you work with multiple versions of a particular package? You can have environments across that, and then you can have the whole thing, be a matrix and do total combinations if you’ve got all the time in the world. But at the same time. So I think that you can do is detox the version that does all of that in parallel.

Yeah.

Okay. Yeah.

Funny that you say that, because first, just one thing about this matrix, if you want to see really wild matrixes, then look at the Jungle projects. Anything to do with Jungle, because I think they were the ones that came up with the idea also to create this generative. It’s called generative environments. I think where you basically say you have curly braces and you say Pi two, seven, Pi three, seven, Pi whatever. You have that in curly braces separated by commas, then you have a dash, which is basically the separator for separating factors. So they are called factors. You have Pi 27 and then jungle one nine, for example.

And then if you write this in curly braces and then minus jungle one nine and one, jungle one eight, jungle one seven, and you have that in curly braces, then you create all the combinations of these two factors. That’s what you were describing.

Yeah.

And if you want to see really good examples for that, look at the Jungle projects. They’re going really wild with that detox. Yeah, that is there. I knew that it exists. I never really used it much.

Okay.

Because the way we run, I’m using toxic work a lot, and we use Bamboo as a continuous integration system.

At last, in Bamboo, I don’t know if you know it. It’s basically just one of the many CI frameworks out there. It’s quite nice, but we try to be as independent as possible from that technology.

And this is basically how I stumbled over talks, because I want to run my tests locally and I want to run them on CI, and I want this to be basically the same. So if I have a problem with CI, I can debug that locally most of the time because what happens on CI is pretty much exactly the same that happens on my local machine, because all I do in my CI is, say, talks minus e the environment I want to run.

And that’s where this detox topic comes up. And in Bamboo, there’s the concept of jobs. You can create lots of jobs. It’s the same like in Trevis. Also, you have parallel jobs. So you split your environments up into different jobs and they all run in parallel and the parallelization is done by bamboo or whatever the Iframe work you use. This is why I don’t really feel the need to use Detox because the parallelization for me happens in different areas and if I need to debug one specific problem, I have that problem in one environment and I run that environment. But Detox is there.

I know that it’s there because last weekend I realized that the CI tests for Detox were broken because Tax is now moving faster and we are not so afraid to break things anymore. Also, when I joined, the main focus for me in the beginning was not to break things because I was really scared. If I break now something and I make a Tox release, then 10,000 CI bills break.

That scared me a bit. So I had big respect and I was very careful and very conservative in what PRSI accepted now is a little bit more on the daring side and we’re moving faster, which is okay. And there’s a lot of interesting stuff coming. But yeah, things break.

Yes, but when you say things break, what you really mean if I’m trying to interpret you is that if you change the API or change some behavior, there may be some dependent project that isn’t going to work. Right.

Because it yeah, some tests might break then, or maybe some thousand CI tests might break because the problem is and maybe that’s one good chance for me to mention that usually if you set up your Travis Yammer or whatever, you just say Pippin style talks and you always grab the newest version of talks and you expect it to work, which is usually not the normal approach.

Usually.

I think why Pip end exists and is so successful is because it tries to solve many problems. But one of the problems it tries to solve is this dependency management so that you have frozen dependencies once you have built it and that you can be sure that you install the same dependencies that you tested against. Yes, but everybody’s using always the newest version of Tox and expecting not things to break. So this is a bit of a mismatch and maybe I can do a bit of advertising for maybe pin your Tox version, maybe at least to the current major version or something. If it’s important for you that things don’t break. If it’s okay, then you know your stuff and you understand. Okay, that is because Tox has a problem. Now that’s also okay. I mean, I always install the new version of Tox and I’m not afraid of things breaking, but if it upsets you and your project, then maybe pin the version damn well.

You know the car maintainers.

Yeah. That’s why at the weekend IREA sorry, I’m talking too much and too fast. I know, but I have so much to say. Just the Detox thing that broke at the weekend and that was the first time that I realized, oh yeah, it’s still there.

And I realized nobody really there was one PR that was hanging around for over a Pull request. Sorry people, what is PR pull requests hanging around for over a year and yeah, so it became clear that none of the core maintainers of Talks are really using Detox themselves.

And because we have this talk staff, we have the GitHub organization and Detox is hosted in there, but the code is not changing. The last bill was done months ago and then somebody filed a buck and I thought, okay, so I fixed that back and I had some fun with Detox at the weekend and I might make a little vow to myself that I want to use it more, at least locally. So to keep it alive and ticking, I use it.

Yeah, good.

But I didn’t have a problem.

No, I use it. I didn’t see that. I don’t use it all the time, but I’m an impatient person. So when I test things, I like to test across, like you said, as if you had a continuous integration server on your laptop or something. And that’s what I use a lot of talks and Detox for is I just want to test everything on multiple all my environments, but I kind of want to get it done fast and I’m not doing anything else with laptop at the time. I’ll just have it take off and test everything in parallel and get my answer faster.

So that gives me some extra motivation to keep the project alive.

Well, not just for me.

Why not?

We had some fun with it and we added actually then at the weekend, Twitter is really handy for these things.

If I have some problems, I moan to Twitter shouting into the void, and then sometimes the void answers and says, hey, have you tried this?

Because I was moaning about the Detox is broken and we’re actually not building it. So maybe I’m thinking about scheduling something and I never did that with Travis. I just knew it must be possible and then I can’t pronounce his name and I won’t try. He’s working at Red Hat is one of the InCable contributors, I think. Okay, he came up with a Pull request then doing nightly bills against the current master from Tox, so that next time when Tox is accidentally breaking some dependency and Detox because they are quite intermingled, then we will realize right away, oh, nice.

Yeah.

But I hope there’s some kind of paralyzation Bernard mentioned that might actually grow out of Tox core at some point so that we might not need Detox anymore.

At some point I want to ask them something. Wacky. No, I want to ask you, is there a use model that you’ve seen of people using talks that surprised you or some clever thing that you didn’t realize that it would be used for that.

Actually, a lot of the time when I started to read the GitHub issues, I was permanently amazed by the stuff that people use for and the problems they’re facing.

I’m not really remember any details, but basically I think when you start to use a tool and you’re deep into some kind of topic, whatever it is, and using that tool for that, you’re bound to do weird things with it that maybe the other 95% of the users think, why are you doing that?

You know what I mean? I don’t have a really good example now. I wish I could come up with something, but a lot of the time I read, why do you want to do that?

Basically, I’m really happy tox user. I don’t need it for any weird stuff. I think, although I do everything with it.

Well, that’s the part that I think surprised me. So I’ll jump in with the thing that I think is interesting is seeing both within.

When I started to try to learn more about talks, one of the things I did is I read the talks, any files. You can go to a lot of open source projects and look at their talks, any file and see what they’re doing. So I looked at the talks, any file for talks and for Pi test and for other projects.

And one of the things that I notice is this use of basically what I often use make files for just things like distribution, like when you’re ready to push your package up to Pip, there’s people using talks for that. You can set up little jobs, you can use it as a make replacement.

Yeah, but that’s normal.

Maybe. I think like you said, this vision standardized testing in Python, that is not really taking it far enough.

But I tried to come up with tech lines. I think one thing I think we actually let me have a quick look, just let me do some clicking because I think I changed the tagline of our talks. Github command line driven CI front end and development task automation tool.

I don’t know, does that sound like I like it?

It doesn’t really roll off the tongue, but it describes it well.

Yeah, that’s the best thing I can come up with. And yeah, you use it or I use it or one can and should use it, I think for every task that is part of development. So if you need to build documentation, you can have a tox environment for that. If you need to set up a developer environment, then you have a toxin van for that. If you have to push your stuff to wherever, then you have an environment for that. And if you have proper descriptions for it, you have the one place where you can look and see. Okay, how does this project tick? How does it build its documentation? How does it do its releases? It’s all there well, what is it? Fantastic.

It’s the bookkeeping and the busy work stuff, and it’s tied to the project because you’re going to have different things that you have to do for different projects or do them a little bit differently. And so having that all together is great. Better than having a whole bunch of different scripts that you have to remember which ones or where it’s good.

The one thing I want to bring up because I was confused by it, maybe I’m the only person that was confused by it is I don’t like to actually put anything in my global system environment.

I don’t like to Pip install anything into the site. Python I use virtual environments for everything, but when I’m using Talks, is it okay to have created a virtual environment and then install Talks into there and run Talks? That creates virtual environments from a virtual environment?

Yeah, sure, it sounds weird and it seems a bit scary, but if you think about it, a virtual environment is not really that virtual. A virtual environment is a copy of your Python interpreter with a few SIM links back into the original interpreter.

But basically it’s just a copy of your interpreter and activating virtual environment sets a few environment variables, but it’s not absolutely necessary to activate a virtual environment. To work with it, you need the absolute path to the Python interpreter in that virtual environment, and then you can use that interpreter to run stuff that is installed in that one thing I recommend if you don’t want to.

Sorry, that’s a trick that I didn’t realize at first. So when I first set up Jenkins to use, I set up a test environment. So I had the Jenkins job that would create a virtual environment, install a bunch of stuff into it, and then run the tests. But I had like within the little box within Jenkins have it activate the environment. You don’t have to do that. If the only thing you’re doing with the environment is installing dependencies or running pipes, you can do that without activating it. You just call the right executables within the environment, right?

Yeah. Just need the absolute path.

There’s tricky corners to everything. So where you need the activation is if you are running stuff in subprocesses, sometimes it might not pick up.

If you don’t write your scripts, being aware that the virtual environment might not be activated, then you might run into trouble. So there’s always a little caveat. But normally if you know the absolute path to your virtual environment interpreter, you can run stuff directly like that. So that’s what I recommend. Sometimes if you want to install Talks into a virtual environment and be able to you could do it like that. You could install it in a virtual environment and have an alias to that path and use that. But you can also use almost every Linux distribution now has it in their package.

Ubuntu, for example, it used to be Python minus tox you can say up to install Python minus talks, and then you have a reasonable new talks as part of your system. Python.

Yeah.

I mean, there’s tons of ways to get talks. There used to be a bootstrap way to get talks, which was made explicitly for Jenkins, I think, but that was broken already when I joined and nobody ever bothered to repair it. So that you basically can have a Jenkins server and that Jenkins server bootstraps talks before it then runs your environment.

Nobody seems to miss it, really. I mean, just get talk somehow.

Yeah. We just do a virtual environment and then Pip and Stall talks.

Yeah, perfectly. Okay.

We do a local store within our Jenkins. We have all of the package. Of course, we’ve got a cash package environment so that we don’t pull out from the Internet all the time, but it speeds it up a little bit. But anyway, like you said, Talks itself is a relatively well, actually, I’ve never looked at the source code, but the model and the idea around it doesn’t take that long to get your head around what it’s doing. But the things people are doing with it and the gotcha that people might run into and stuff and the crazy things, there’s a lot there. And I guess I’m opening it up to listeners. Now, if we flew by something or didn’t talk about something that you really wanted to talk about wanting us to talk about, that’s the case with really any topic within software development anymore anyway, but reach out and say, hey, I really wanted you to cover this use model or that use model, and then maybe we can come back and talk about something like that.

Yeah, I think so much fun. I’d love to come back if there’s interest.

Yeah.

Like I said, like I said, there’s so much stuff we could talk about with this.

So talks is at how do I look finding more information about talks?

You just search for talks or something, right?

It’s not the first one. If you Google Talks, the top list is often something else.

Right.

Let’s see what happens if I go for talks. Talks duplicate and behalf. Yeah. That’s a German company that is building I don’t even know how you call them in English. Those are the plastic things that hold screws in the wall.

Okay.

They’re called Dubil.

That’s a really famous German company. And they are tox there. Yeah. So if you look for tox Python. I mean, the best starting point is obviously Talks, read the docsio. Oh, yes, that’s where our documentation is hosted. And then if you have concrete questions, stack overflow has a talk stack and I lurk there. So if somebody asks an interesting question, me or somebody else who is into talks might answer it.

Then there’s Twitter. I’m on Twitter. I really like having conversations there about programming or talks or testing and remind me of your Twitter name.

O BestWater. Okay.

It’s my login handle. It’s basically everywhere.

So if somebody wanted to hire you to do a training, how would they get a hold of you for that?

Yeah, Twitter. Why not?

I have an email address also. That is very easy to guess. I have a website Oliver bestwalter de I wish I would have the discipline to block regularly but I wrote exactly one blog article when I started with talks and created that whole website and went really mad with lecture. It’s a really great static website generator. It’s actually a website generator generator because you can go really crazy with that so I spent all the time to set that up and then I wrote one blog article and a little about and that’s it. But that’s it there and you can reach me through there. You can reach me through Twitter.

Yeah, you’re pretty good about answering questions on Twitter. If I’ve got something you’re pretty responsive.

I appreciate that and I wish we had more time but we’ve kind of gone long so just thanks a ton for coming on the show. This was a lot of fun.

Well, thank you. Yeah, I’ve had a lot of fun. It’s really nice chatting to you. It’s really enjoyed.

Thanks again to PyCharm for sponsoring this episode visit testandcode.com PyCharm to get the discount code for four months of free PyCharm professional.

That link is also in the show notes which are at testandcode.com 49.

Also thanks to Patreon supporters your enduring the show helps keep me going.

That’s all for this episode. Now go test something.