 Okay, here we go. Happy Friday. Let's see here. Sorry, I'm a little bit behind. As you can see, we didn't start quite on time, and I still got a few more things here to set up. Why don't we just move this one over to this screen, in fact. It looks like Twitch is probably not working, I'm guessing, so I didn't check the input levels. Yeah, looks like we've got microphone levels pretty good. At least Restream seems to think that Twitch is not connected. If anybody is watching right now, and you're watching on Twitch, drop a note in the chat to let me know that's working, or if you happen to try watching on Twitch and it's not working, let me know that as well. Although if everybody's on YouTube, then maybe we don't have anybody viewing. But it seems like maybe we're not on Twitch, and I don't really think that I probably have the ability to get it going to Twitch. It looks to me like inside Restream, the connection between Twitch API and Restream, it says Twitch API not responding. My guess is either the Twitch service maybe is down generally, or some part of the Restream service, or maybe there could be a token that got invalidated, or expired, or something like that. For one reason or another, though, it seems like our Restream is not sending data out to Twitch. So if anybody is here that can hear me, if you are watching on Twitch, let me know in the chat, or if you tried to watch on Twitch and it's not working, let me know that as well. I'll drop a note in the chat that mentions the same thing too, just in case there's anybody who's trying to watch Twitch, and of course can't because it doesn't seem like it's there. Oh, Twitch is working for you. Fascinating. Okay, so I will not mention anything in the chat. That is really bizarre because it does show this Twitch API not responding on my side while on the Restream side. That is something else, isn't it? Let's see here. Let me... Yeah, sure does. It just shows live on Twitch, looking good. I think everything's fine. Interesting, I wonder what's up with Restream then. So I would say then I guess just a fair warning, like if you're trying to watch on Twitch and you have some kind of problems, maybe try YouTube because it seems like Restream thinks there might be an issue, but it also looks like there isn't potentially an issue. So not sure what's up there, but if you're trying to do that and it's not working, maybe try YouTube. If it is working and all is good, then hang out there and you should be good. So how's it going? How's it going? Hello's to Charles Burnford. How's it going? What's up, Nathan? How's it going? Over there in the YouTube chat, Dexter, Cgrover, DJ Devon. How is it going to all of you folks? Happy Friday. Thank you for tuning in. It's nice to see all of you in Discord and chat form. So let's not waste any more time since we already started late. Quick introduction for anybody that might be new. My name is Tim and I go by FOMIGuy on GitHub and Discord. This is the CircuitPython deep dive program in this program. This is a weekly stream that occurs every Friday afternoon, afternoon in U.S. time zones, Eastern, Central, Pacific. It occurs at, what is it, 5.00 p.m. Eastern, I believe, or 2.00 p.m. Pacific? I'm not good with time zones. 2.00 p.m. Pacific I'm pretty sure is right. 5.00 p.m. Eastern sounds right to me right now, but truth be told I'm a bit frazzled and I don't necessarily trust myself to convert the time zone. So 2.00 p.m. Pacific definitely is the right time. That's when this show occurs. It's the deep dive program. We're taking a look into kind of the nitty gritty details of CircuitPython. We'll either be looking inside CircuitPython Core, you know, the C code that actually, you know, is the CircuitPython project that interprets Python code and executes it, or we'll be working, you know, maybe another level or two higher with the Python libraries or some projects that are built with those libraries. So, you know, it depends. Like week to week we might be looking at different things. I tend to change it up and I tend to be the kind of person who, you know, kind of has many irons hot, so to speak, right? I'm not great with, like, seeing something all the way through from start to finish. I tend to jump and ADD takes over a bit and I'll start new things and then I'll wrap back around and finish things up and stuff like that. So from week to week we're not always working on the same thing. The common thread that ties it all together though is CircuitPython code. It is a pretty in-depth program. It's not meant to be like a beginner tutorial or anything like that. I won't necessarily be fully explaining the rationale behind everything that I'm doing. It's not that type of program but it is a chance for you to see somebody working on, you know, either libraries or CircuitPython projects or inside the core and just get a look at what goes into those types of changes and things. So that's who I am. That's what this program is. I'll take in one more quick step back. If you are new to all of this and you don't know what CircuitPython is, you can learn more at circuitpython.org. That's first and foremost. But to give you a high-level idea, CircuitPython is a implementation of Python that runs on tiny computers called microcontrollers. This is the website, circuitpython.org. If you go to the downloads page, you can see a bunch of pictures of all of these different types of microcontrollers. And so all of these little devices, they run CircuitPython, which means when you plug them into your computer, they show up as a thumb drive and you can edit a Python code file that is stored on that thumb drive and then it will execute the code that is in that file for you. That's kind of the development iteration is, you know, open CodePy, edit the code inside of it, save it, and then it automatically runs it. So that is the kind of 50,000-foot view of CircuitPython, which is the main thing that we'll be working on in this program. Again, if you want to learn more, circuitpython.org is a good place to go. We'll also join us on the Discord, which is linked down, nope, wrong way, down there, adafru.it slash discord. We're in the live broadcast chat during the stream, but there's also a CircuitPython dev chat channel, which gets activity all week long from the folks who are working on the CircuitPython project. CircuitPython is an open source project, so it is contributed to by members of the community, as well as members that work for this organization, Adafruit. They're a hardware and software company based out of New York. They sell the microcontrollers that run CircuitPython themselves. They also sell all sorts of sensors and, you know, add-ons, buttons, lights, beepers, buzzers, sensors, you know, any kind of little add-on widget that can plug into a microcontroller and interface with it. They tend to sell all of that sort of stuff as well as little breakout boards. So if you are interested in this kind of stuff and if you want to help support the project, one of the ways you can do that is by purchasing hardware from Adafruit because they are the ones who are providing the financial backing for the CircuitPython project. They're paying myself as well as the other folks who work on the project to do code, to review pull requests, to make guides, to make videos, to do streams like this. So thank you, of course, to Adafruit for doing that, and thank you to anybody who wants to purchase hardware from them, again, in order to help support that project. Thank you, Devin. Okay, 5 p.m. Eastern. We were right there. I'm glad. Timezones are not good at timezones. I would agree with that, actually, yeah. Timezones are not good at timezones. Timezones are not good at anything except confusing people in me. That's kind of my take, but this is actually from last week. I did not push that yet. I wanted to push it, and then we'll be going back to Maine. And what I'm going to do is I'm actually just going to go back to Maine and update Maine, which might take a minute, but that's okay because we actually have something different to look into first. So we'll let that start fetching. It will do its thing there in the background, and then we'll go and look at something else first, which is the screenshot utility. This was a question that Katnay asked me this afternoon over in the CircuitPython dev channel, the one I mentioned before. I had already made the stream before this. I already set up the title and stuff, so this is not included in the title, but the first thing we're going to look at today is actually related to the screenshot images that get used in the LearnGuides rather than what I had put in the title, which was about VectorIO. If there's time after that, we will dive into VectorIO. If not, then that will come next week or a different time, and I'll try to change the title after the fact, depending on what we get to. One more quick programming note just before I do dive straight in. I generally stream Saturday mornings at 10 a.m. central time. So tomorrow morning, I generally stream at that time. I will not be streaming at that time tomorrow. I won't be on at 10 a.m. tomorrow. I'm going to be heading to the local farmers market to check that out and get some yummy fruits and stuff. It's one of the last couple of weekends that they are open for the year, and I want to get a chance to go and do that. Unfortunately, the most convenient time is Saturday morning, but that kind of conflicts with 10 a.m. stream. So tomorrow morning, I'll be headed there. I won't be on at the normal time. What I will try to do is stream a bit later on in the day. However, I don't know exactly what time that will be, so I can't necessarily give you a time yet. What I'll say is if you want to watch tomorrow, well, first thing, the VODs are always on YouTube, so you can watch after the fact if you want. You don't have to catch it live. You can still see it after the fact, but what I'll say is tomorrow when I do stream, I'll drop links in this live broadcast chat that's down below me here. So if you want to know when I'm going, if you want to get a notification, that's where you can watch this live broadcast chat. I'll put the links in there when I get started, but again, it won't be at the normal time. It will be later in the day than 10 a.m. So the screenshot thing. This is a utility that basically generates these mock-up screenshots that show what the CircuitPie drive would look like if you were running a particular project. I want to say that it was in here, but maybe I am wrong. Unified Release CI? Did it get moved into that one, maybe? Size Tools, Module Example. Oh no, I don't know why this one ended up over here. Okay, so I'm not positive off the top of my head where it's at, so what we're going to do is go back a bit and find it by looking in the actions of Alarm Guide repo. Happy Code Vimber, nice. Thank you, Dexter. Happy Code Vimber to you as well. Extremely windy here watching the trees bend and leaves racing down the road, hoping they don't stop in my yard. I mulched my leaves twice this week and there is already still as of yesterday. There is already a new blanket of leaves. I have a massive tree in my front yard. It was like maybe halfway done and I ran the mower a couple of times to mulch them up and then we had a really windy day yesterday and the entire blanket of leaves that I just mulched was back. The good news is that it was really windy and then actually today it's actually been rainy and windy, which has knocked the rest of the leaves out pretty much, so one or two more times I'm hoping I'll go out and mulch again and then I'll be done with leaves for the year. Fingers crossed. But yeah, I definitely am with you there with the leaves. Kind of windy today in Florida too. I guess there's a cold stream coming down. Yeah, it's been unseasonably warm for the last probably about a week or so, frankly. It was like 70s or 80s for about the last week here, which is pretty warm for the time of year. Today was the first day where it started to get a little bit closer to the expected weather. Today it's been dim and kind of cloudy and dreary and rainy and windy all day. So I happen to know that in the actions here we should find images. This should tell us library screenshot maker. So did I just overlook it or is it different now? Yeah, I just overlooked it, okay. Yeah, sure enough right there in the list. Just looked right past it, okay. What we're trying to do on this is allow it to take images of CSVs in addition to all the file types it does today. And I think the place where we are going to start finding stuff to do with that is here. Somewhere we're going to have, yeah, we're going to have this list of file types. So it's been a little while since I worked on this code. I believe I originally created this code. I created the version that took the screenshots of the learn guide projects. And then Jeff Epler, one of the core developers, applied it to the actions. So use that screenshotting utility that I created inside the actions to make it run automatically whenever any PRs are merged or any commits are made on the learn guide repo. And then at some point, I think it was Jeff also, but I'm less sure about this one. But at some point Jeff or somebody adapted it to work with libraries as well. So it started out with learn guide projects. Now it works with libraries in addition to learn guide projects, specifically like the examples for the library. And the thing is, it's got these preloaded file types. So each of these match up to a particular icon that represents a certain type of file. Or I should say these ones up here are not. These are the triangles in the font. These ones down in here, though, like file empty, file hidden, file folder hidden, folder file empty hidden, file image, file music, file font. All of these kinds of things are icons that represent different types of files. And essentially the reason why I think it was not showing the file, the cat and he was asking about, which was a CSV file is because it's not listed in here. And because it doesn't have a map to an icon. So let's get the local version of this going. This did update. So that's nice. That's our core circuit Python. We're not quite ready for that. But we get this library screenshot stuff taken care of. Then core circuit Python will be what I look into next. So this was called what now circuit Python library screenshot maker right there. Get that open up in pie charm here. Let's go new window. I will say to just because it's been windy and stormy and rainy today. Knock on wood. Hopefully I don't jinx anything if I happen to suddenly disappear or something. There's a chance that either my power or my internet went out. I'll try to hop on my phone if that's the case and put a message in the discord. But we get suddenly cut off and I disappear. Then there's some chance that it's just the storm. I took out the power or the data or something like that. So hopefully that won't happen again. Knock on wood. But that's kind of kind of where we're at. Fair warning in case it does. I think what we'll do is just reuse the. Should we reuse the code or should we go with the blank? Maybe we go with the blank. So these are what the images look like. And it generates these images with PIL the Python imaging library. It's basically looping over all of the files that are used by a given project, whether it's a learn guide project or an example from a library repo. It loops over all the files that are used for that example or that code, whatever it is. And it generates these screenshot images that kind of look vaguely like a file explorer like Mac in the dark theme or whatever. But technically this is just like a PNG that we rendered with PIL. You know, there's just Python code that kind of makes all these different lines and pastes all the different texts and pastes all the different icons and all that stuff into it. So for CSV, I think it should be pretty darn straightforward. I think if we just go here CSV and then in this dictionary, we also go CSV and then we give it an icon, which I'll say the empty icon for now. Empty, not hidden though, just empty. Oh, also an exciting news in my world. My new desktop computer showed up today. I've got it out of the box, but I have not done anything else with it. I haven't even powered it on yet, but that will be something I'll be trying to get set up here fairly soon. So maybe a slowdown on the streams, or at least the streams working on Circuit Python stuff, because we need to get that up and running. If I can get it booting up and get OBS installed on it, one thing I might try to do is do a stream where I'm doing some more of the setup, installing PyCharm and doing some of that kind of stuff. I don't know for sure if I'm going to be able to get OBS running right out of the box or what. I'm not sure what to expect. I went with a slightly different OS this time around, so I don't know exactly what I'm getting myself into. But we may do that, but either way, there's a good chance that I'll be a bit lighter until I get kind of that thing set up and running, get my OBS profiles moved over, get all of my repos cloned, get all of my utilities installed and my IDE and all kinds of stuff. Yep, thank you. Yeah, I was pretty stoked to get it today. I'm excited to get it powered up and start. I'm halfway. I'm excited to get it powered up and start getting it loaded. I'm also slightly nervous. I'm not sure how difficult it's going to be. This one, there was some rocky roads with setting up this computer. And I went with Ubuntu this time around. The desktop has Ubuntu, whereas this computer I'm on here has PopOS. I'm hoping maybe that some of the stuff that was a little bit bumpy this past time is going to be easier on Ubuntu, but I'm not actually sure what to expect because I've never used Ubuntu as a daily driver, really. So we need to figure out how can we just run this. So the challenging bit is that this runs from actions typically, right? So it checks out this. It installs the dependencies, which in our case is like PIL, basically. It runs generate images, and it gives it the learn guide repo. And then I guess this would create the folder called generated images, which I have here, and it will generate each of these. Really what we need, though, is we need to find a project with a CSV. I should have asked Katni about that. I would enjoy watching the setup of a dev environment from scratch. Okay, yeah, I'll try to... I will try to get OBS done first and then stream what I can setting up the rest. Most likely, just fair warning. It's likely there's going to be a lot of pulling stuff off of the screen or whatever, just so I try not to leak tokens or anything like that as I'm getting stuff set up. I'll try to show what I can because if nothing else I think streaming it and talking about it while I do it will probably help me remember it in some way, anyway, correct on time, so over on YouTube. Thanks, you probably said that a while ago, but I appreciate the confirmation there. Let's see, I don't know one that has the CSV in it. I don't think he ever said anything else. I'll ask. I don't know if she's still around, though, for sure. We'll see. I'd also point people to your entire setup video for some guides, too. Yeah, that's the other thing, too, is if I stream it, there will be a video which I can look back on, which actually is really appealing to me because a lot of the stuff that I set up on this computer I tried to take decent notes about, but some of it's a bit scattered and some of it ended up not being recorded as accurately as I'd like. So a video to look back on would actually probably be super helpful, even just for myself, right? It's interesting, potentially, for other folks to watch it and see the process, but even just for me to look back, that might actually be a decent help. I kind of wish I had had a video I could look back on some of the ways I set stuff up on this one. So I think to start, why don't we just, yeah, let's start going down the road of just doing our own and see if I don't, I think Katnay over in the dev channel, but I don't know, she may be done for the day, and if so, then I don't want to be dragging her out of her weekend or anything like that, certainly. If she knows one, she'll get me back there. Otherwise, what we'll do is we'll start trying to test it by, I'll just go make a change in a project. I'll put a fake CSV file and then we'll run it. We'll look at the output and then there we should be able to have an idea if it's going to work. Write a script to set up your machine. That's probably a pretty decent idea. The only fear I have with that is so far, it seems like Linux is very kind of loosey-goosey in terms of ways to install stuff. Some stuff you install with apt, which is scriptable, no problem, that's easy. Some stuff you install by going to their website, clicking the install or the download or whatever, and then it gives you a .deb file, for instance. Other stuff you go download, it gives you a .app image file, and then other stuff you go to their website, you download it, and it just gives you the source code and then you have to either copy that somewhere or you have to make or build it or something. Then even beyond those, there's also the snap store, snap system, snap thing. I don't really know what it's called, portal maybe. It's similar to apt, but it has a GUI front end as well, so it's like this other kind of application store where you can install stuff. Some programs that I use are available in multiples of these ways, and I'm scared of scripting it because I'm scared of getting it the wrong way and then not going back and changing the script and then getting myself more confused if I try to use it again. Ultimately, I'm the solution to that though, right? It's just make sure not to go and update the script if I do make changes. Kenny says, let me check, I think I might have one nice. Yeah, I would like, the video I think will be helpful and I would like to take good notes this time is around as well if I can. Ah, okay, good call. You did a search in the Learn Guide repo. So literary clock has got a quotes.csv. Thank you for this, Seagrubber, appreciate it. So that'll work, yeah, we can find one, we can just go, we can basically, well, I don't know if my library is in the same place. Let's Learn Guide repo. Okay, so as long as we make a environment variable that points to the Learn Guide repo, then we can run our create requirement images and it should work the same as though it were in action. So from here, well, first of all, let's make a branch. Let's also probably update main. Okay, oh, our changes are the CSV, right? Yeah, okay, that's fine. Yeah, we want to check that out. So technically, what PyCharm just did for us there, it gave us a little bit of a boost or a head start or whatever because I went to check out this new branch. Well, I went to create a new branch and then I went to check out this branch, but the thing is, is I have uncommitted changes. And technically, you can't really check out a new branch if you have uncommitted changes, but what PyCharm does is it has this nice default functionality which will allow you to automatically stash your changes, which is a Git, you know, concept. You can stash your changes instead of committing them. Then it will check out the branch, then it will unstash them. And then if there are any merge issues when it tries to do that, unstash, it will let you click through and resolve them. But if there are no merge issues, then it will just unstash and you'll essentially be on the new branch, but with the changes that you had that were uncommitted. So our CSV is still here and our CSV is still here. You know, I was thinking earlier, license. Ah, okay, okay, though. Yeah, license. I was thinking earlier, license was like the only file type I could think of that we would definitely not want to show, because there's no need to copy the license to your CircuitPie drive. It's not huge, but it is non-zero and it's just going to use up space and not actually do anything. So I was thinking that's the one that we could leave out. It is interesting that it did end up in here, so at least at one point in time, I or somebody was considering adding it as a type, but because it doesn't show up in this list, I'm pretty sure that means that it's just not going to get shown, right? Because yeah, this is looping through the files. If there's a dot somewhere at the end of the file name, split off the extension. If the extension is in the list, then add the current file we're looking at into that list, which will later get iterated over and actually drawn. So if it's not in this list, then it will not get added to project files to draw, which means later on it will not get drawn. So interestingly, in this case, we have it in the map in the dictionary here, but we don't have it in the list, which means most likely, technically, this one is just kind of unused. It's not actually going to try to look it up in this unless it is also in the list up here, the showing file types. I think that's the way I think it works. Okay, so it will get loaded, but I still think it won't get used. Oops, that's the same place. So now this one is looping over project files to draw. So any files that were not in that list are not inside this loop. Therefore, we don't end up in here. We don't use this map at all. We had one more spot. The last one. This one is also looping... This one's looping project folders to draw rather than project files to draw, but it is still the same thing. Although this one is not checking file types to show. Where do we append to... Ah, okay, here we go. So we're still looping project files. Ah, but this is too deep. So here we check the extension to make sure it's in the list, and this is only if the current file was a string. This one is if the current file is a tuple, which indicates that it's actually a directory. The video will have a transcript that you can download nice. So if it's a tuple, that means it's a directory, and then the other thing is if it does not have this in it, and it does this, I feel like we should probably have this here as well, right? Except we don't have curr extension. Well, no, not quite. Not here, though. Not here. Project folders to draw. It would be when we're looping over project folders to draw, actually. Anyway, I will say this is kind of a side from the core goal here. The core goal is to get CSV working. I believe the consequences of what we found here is that the shown file types, that list of all the valid file types, I believe this is getting ignored for sub-directories. For the root directory, I think it works. For the sub-directories, I think it does not actually check the list. So therefore, a license file that was in a sub-directory would get shown in a screenshot, I think. But a license file that is in the root would not get shown. I think. So let's backbender that for a minute. Let's work on just the CSV file. And I think we're there. Really the main thing we need to know is where's the Learn Guide repo. So let's go... I mean, here we're in repo's, CircuitPython, CircuitPython library screenshot maker. So there should be... If we go up, there should be a Learn Guide repo here. So let's make a script we can use to test this. So script, we don't want to add it. We basically want to do the environment, this thing. Ours is up, and then Adafruit Learning System. And then we go Python 3, Create Requirement Images, which is in the directory we're already in. Python 3 exists, points to Python 3.8, which is fine. I don't know if it matters, but I kind of like the idea of these being on different lines. Took it a second. And my guess is we will have now a lot of these. And then there was... I don't really need that. Literary Clock. It's not called Literary Clock, though. Let's open our Learn Guide also. Maybe we don't... I'm pretty much positive. My local copy of that is out of date. So possibly that one is just a newer one that I don't actually have yet. Before we get any farther, wondering what happened to it or where it's at, let's just head over here and update main, then look for Literary Clock. Literary Clock. It just must not have been there, I think. So let's just let that run again. Back here, Runner Shell Script. It does take it a second because it's generating all these... I mean, like, hundreds? Perhaps over a thousand? I don't actually know how many it's generating. A lot, though. Let's look. Curious. 1,346 images it's generating. Pretty quick. Pretty quick, thankfully. There's Literary Clock. And we still don't have CSV, though. So it did not work. Oh! Well, no, there should be one, right? There should be one in there. Yeah, quotes, and then quotes CSV license. Okay, so yeah, not working. We should... We wanted, we were intending to have it show up in here, probably above fonts somewhere. I believe all the directories go at the bottom, you know, before lib. So above fonts, there should be a CSV. My best guess is maybe it tried to draw it, but it got overwritten by the next thing. Like, maybe it didn't draw it and then leave space for it. So it drew it once and then immediately covered it up with the next one. That could be possible. Let's take another closer look, though. So where do we use our... Where do we use that list again? And I did add CSV to this. Let's go here. The one thing that's tough is... This is running, you know, it's generating 1,300 images. If we add a print statement to try to see what's going on, it's gonna print a lot of stuff. Let's start with if cur extension equals equals CSV print cur file. And probably that's it because it doesn't look like we have the project anymore. So print it if it's CSV. Theoretically it should then be in that, which then means theoretically it should get appended to project files to draw, which means later on when we're looping here, we get the extension, we look up the current icon type to use, and then we call make line, which should draw the line for us, and then we call rows added plus 1, so that should be what's responsible for pushing it down by a line. So I think my guess about getting drawn and then overwritten, I don't think that's the case, because this should definitely be moving it down, I think. Okay, let's run it like this and see if it prints anything. So I'm just trying to print as a mistake and we'll crash your IDE. I learned that plenty working with APIs. Call too much JSON and the microcontroller. Yeah, yeah, yeah, on the microcontrollers for sure, you can't print too much JSON. That's definitely true. I will say too, on the microcontrollers, printing is actually relatively slow, all things considered. I've seen programs where it's actually a pretty tight loop, but there's a print in it and that slows it way down. What is all of this stuff? There might be stuff we don't want to show in here, actually, right? I don't understand at all where this stuff came from. Did it do that before? It didn't. Or did it? I don't know, clear. It did. Okay. It does have stuff that I don't want to show. Hopefully I didn't already do it. I don't think it's like the end of the world kind of stuff, if it did be gone too for a second, but there were some tokens and things that probably would be better off not sharing. Why is it printing all of this stuff? There's only one print in this. There is no logger. Environment? One environment. One thing I'll say is this feels like it's waiting for an argument, right? Paths, but then... I'm not actually giving it an argument here. Did we... I don't have anything else here. So the other place this gets used is on the bundle. Python library bundle. And then this one does arguments. Is that the full file? That can't be the full file, right? It can't just end with a plus right there, can it? It almost feels like it's too wide or something. Oh, I'm already... I'm scrolled over. Oh, okay, I see. Exec. Oh, okay, okay. This one is a little bit fancier. I'm actually doing a find libraries, and then I guess what's probably happening is for each library that was found, it's executing this command, and then substituting in the actual library that was found. I'm not sure about the plus at the end. That part I don't quite follow, but that's got to be what's going on this one. So this one does use the argument. Is ours here? Does not. The first file that it uses is this one, I guess. Let's see. Print. Ah, Project P. That should be not... It should be fine. Also, I mean, I don't think we're running this one directly, although this has 11 prints in it, actually. But it does not print anything before it starts printing these, which looks like just my environment. It looks like it's just dumping my environment. Does inv just do that? Does the command inv just do that? Like print your environment? How's it going, Johnny? Good evening. It does. Well, that's... Okay. This is one of the times where I feel a bit out of my depth with Linux. I'm sure the answer to this is fairly simple. Export, I don't think prints anything, right? Just with you on the other stream. Nice. Started a caravan to come over here. So, yeah, this time I ran export and it didn't print all that stuff. So I think maybe if we use export here, instead of inv, and it looks like here we're missing a slash. I don't really know why that worked before, but not now. But, I mean, it looks like we could probably just put that on there, right? And it should go back to working. That seems like it went all right. We didn't get any of our print. We didn't get that print, but we still haven't found any CSV files for some reason. Still none in there. Interesting. So there must be somewhere else that's filtering out files somehow. Okay, so we only find two usages of this, though, right? So it should be... Oh, this is turned off, actually. Got nothing. Axl Magnuson, how's it going? Magnus? Excuse me, Axl Magnus? Manson? I heard your ladder two names there smashed together, my apologies. There's a launch for a new LED controller board. Boy, that looks like it has a lot of plugs, huh? Could probably drive quite a few LEDs with that. I'm gonna go out on a limb and guess. Lots of fuses, also. That's interesting. Like that. Cool. How'd you guys find this stream? Is there a newsletter thing, or was that posted somewhere else on Discord earlier? What is up today? Today we are looking into the screenshot utility. This utility takes these screenshots? Well, I should say more correctly, this utility generates these images that look like screenshots of the files that are used by a project. And specifically, we're trying to get it to add CSV files as well. Right now, there appears to be some filtering where it's not including CSV files in the screenshot, and we're trying to make it so it does include them. How's it going, Paul Eski? I've already been streaming for an hour. Check to my usual time, 10 p.m. Change, ah, yeah, daylight savings. It took place for you already. Yeah, we have that coming up on, is it Monday or Sunday? Along with time zones, I'm actually really bad at daylight savings time also, but our daylight savings time is coming up really soon, where our clocks will be changing. Just a heads up too, by the way, Paul Eski, and anybody else who might be, have joined us sometimes since the beginning. Normally, I stream at 10 a.m. central time on Saturdays, so like tomorrow morning at 10 a.m. This week, though, I will not be streaming at that time. I'll stream a little bit later in the day, but I'm not positive of exactly what time. Gonna head to the farmers market tomorrow morning, and then come back and stream sometime later. Potentially after getting my computer set up enough to be able to stream like we were talking about earlier. But that's the plan for tomorrow. No normal 10 a.m. stream, but sometime later in the day, and I'll drop the links here in the old Discord as usual. So by the time we get to here, we actually already just have project files, right? Maybe project files just did not include the CSV. It seems like it probably got filtered out elsewhere. So this gets called here. Project files is here. If code pi is in project files, then remove code pi. If main pi is in project files, then remove that. Make libraries. Where does project files come from? Generate requirements image gets called, and it already has project files. We gotta keep chasing. Who calls this? Generate learn requirement image. Okay, so we would be calling this once for each project. Okay, I think we're getting somewhere. Project files equals get files for project. This one is over in get imports. Ah, yes, here we go. This is also checking. Well, but we already added it to that, did we? Or is this a different one? We have two copies of this list. Yeah. I wonder, and I guess I think it would be circular imports if we tried to import it from the other one. I think, right? I think we get circular imports here, right? I don't think it will work. Well, it doesn't call it out as circular imports, but it says partially initialized. Oh, it does. Actually, yeah, I was thinking. Ah, I see. So our choices are basically move that to its own file or else move it to this file and have the other one import it from here. I guess maybe that's an option because we don't, I don't think we import the other way around. So we have the one true list here. And then in this one, instead of doing this, we do that. And then to get our new one, we will update it. So we'll take this. We'll head over here. We'll paste it in place of this. So now it's got CSV. And we'll try it that way. There we go. Okay. Maps. Oh, y'all. I am one of the ones who made one of the guides with the CSV file. Earlier, I was like, what guides have CSV files? I went and asked Katnissie Grover graciously looked us up. The ones that have CSV files. One of those guides is mine. The maps. These are maps for the tile map game, which is a guide I made. So you'd think I would remember that it had comma separated, but no, I forgot. That's right though. It seemed like it went better this time though because we got our new prints and all these CSV files. We go. Yeah. Quote CSV is there. And then yeah, to show you what I'm talking about here, tile map game. There we'll have, let's see, that would be in the assets there. It's going to have map zero and map one. Although I think the way we were talking about it before, well no, actually because we found that being enforced inside this file also, I think what I said earlier is probably not true actually. Earlier I said I thought it would not filter out those types if they were in a subdirectory. I actually don't think that's true anymore. I think it would filter out those types even if they're in a subdirectory because it takes place in this file as well and I did not realize that at the time. Yeah. I think it already printed some last time. So yeah, I took CSV out of here and now if we go right back to this, ooh, like extra triples guessing myself. Is it, are we not updating? Does it actually have it in there? Because that would be weird if it put it in there and did not print, right? Like why would it be there if it didn't print? I kind of feel like PyCharm is showing us an old one. I mean it's still there. Boy, I don't know. That is weird. Let's go, let's go fresh. Let's go all those, delete. That's now gone. And so theoretically we had this one here but not in the other place. Let's see what that does. I guess our print was not, our print was not in the subdirectory. So maybe, maybe we don't print for subdirectories but we do include the line of the screenshot. Your brain works like mine. My brain, it's tough some days for sure. Elemino, okay, I'm too far. This one no longer has it which I think is expected and then the tile map, it shouldn't but might be wrong. Oh, they are still there, okay. So I was, I was actually right the first time. Subdirectories did not correctly filter out the shown file types. And I guess the reason why is because just like we were talking about before it's missing the if statement that actually does it in the loop over project folders to draw. Specifically this loop here which is the one that is looping over all the files inside of the subdirectory. This one would need to have the if statement checking the file extensions in order to filter out the unknown extensions. The extensions we don't want to show. Okay, so I was, I was right the first time. Subdirectory CSVs and any file type actually work. Root directory CSVs don't today but with this change will. One more time let it run, all of them. UGG CSV. We could also grep the the learn guide repo. I hadn't thought about that but that's another way we can find them. Okay, so we removed that from here. We imported it from the other file instead. And then in that file we updated it to have CSV in the list. The other change we made which is back in this one, nope this one is we added the icon to the map so that it knows which icon to show for that type of file. There's only two changes we made. Those both make sense to me. Is there a pre-commit? I don't remember. Yes. Okay, so let's run pre-commit. We got black format. Copyright? I see copyright. Oh my yeah. Okay. I made a shell script. My shell script doesn't have a copyright in it. Not going to check in my shell script. I wish that reuse would ignore files that are not checked in but it doesn't. So I'll add a license to this file even though I'm not going to check it in because that should make it pass. I mean it doesn't matter, right? Like I could just let it fail and I could push and it won't fail in the actions because this file is not added to the repo. So it won't get created. It won't get pushed. It won't be part of the commit. So by the time this runs in GitHub you know this file won't exist. So it would be fine up there. I could actually just let it fail local. It'd still be fine but this way I can just add that to it and now it will pass reuse. It's nice. It's always nice to get a nice get all stack of past going there on your pre-commit. Always good. Happy to see that. All right. Let's do that. Adding support for csv file type. Can you ping by roll? Can I also ping like CircuitPythonLibrarians? Well, yes. But it looks like only roles within the organization. CircuitPython organization is technically separate and therefore it does not have the library CircuitPythonLibrarians in it. We'll just leave it with Katni for now. How's it going to Shippu? Happy Friday. Thanks for tuning in. Hope you're having a nice day and everything. Scott, it's Friday. I am with you there. Today has been quite the day. I was a bit late to get started on the stream today because we had some craziness going on with work and then I got to go back and do some more stuff after I get done streaming here. Wrap it up. I am happy that we made it to the end of the week. Did we do before and after? Is that too much? I mean, I don't think so. I think it's pretty useful, right? Yeah, I think it's pretty useful. Why don't we do a before and after? We could do our after right now, right? I have to do it in that order. Yeah, thank you. Okay, Patrick. Oh, there it is. L, L, Liter, Liter, Rary, Liter, Rary. There it is. Green shot. Boom. Bang. Give it the old highlight oroni like that. But for before, we'll just go back to main and re-run the same script. Repo. Back to main. No, go back to Circuit Python main. We're on the same script. This will be the version without my changes, which means it won't do CSVs. Watching some SuperCon stuff. Oh yeah, good call out. Yeah, SuperCon is this weekend starting today, I believe, maybe, where there are festivities. Yeah, there must have been festivities on Friday, I guess, if you were watching. SuperCon, yeah, SuperCon all weekend, I think today, tomorrow, Sunday, out in Pasadena for local folks. And then, yeah, I think there's some streaming and some different stuff going on, so folks are interested in Hackaday or just people who work on cool stuff. Search around and check out what's available for SuperCon this weekend. I'm sure there will be videos and stuff after the fact as well. Started already, yep. Yep, I think today was the... I think today was the first day of the in-person festivities, although I'm not sure. My wife writes for Hackaday, I'm up on the schedule, kind of, but not, like, close as she is, obviously. Yeah, I did know that was coming up and that I believe they're starting today. And I think they go through Sunday with, like, there's talks and stuff. There will be, I think, the prize announcement or whatever. Keynote or something, right? Where they'll announce the current winners of the prize and then... I don't know which day that is, but then there's also the Packer Alley and all that stuff and different classes or individual sessions or whatever with specific speakers and stuff that'll go on as well. So this didn't update, though. This pie charm didn't update it for us. That's fine. And the prize finals with Pew Pew awesome. That is sweet, congratulations. I don't get a vote, but I don't think at least. If I do or if I did, then you got my vote because I'm definitely pro like a Python and game representation in the Hackaday prize for sure. I know, I mean, a lot of the stuff they do is like tackling real world, you know, problems as well, but I think games and entertainment and things like that are pretty important as well personally. So I think that kind of stuff is cool, too. And I'm always happy to see that stuff show up in the finalists and to do well. It's pretty sweet. And we may as well just mention which one it was. I don't think it matters too much, but just in case if anybody wants to go back and look at the actual files or something this way. It's literary clock, literary clock. Okay. I apologize, but I have got to run to the restroom real quick, and then I'll be right back. Sorry. I don't have anything for you to watch or anything, but I'll be back in just a moment. Okay. Sorry about that. We are back now. But I think we got that. Oh, nope. I already failed pre-commit, though. Python 3.11. I think we got some deja vu here. MPU 6050? I must be thinking of a different one. I thought I had seen... I think I saw a tech trick comment somewhere to somebody about this. I think so. Oh, I probably just changed the stream, didn't I? Thank you for the PR. Proved it, pre-commit. Yep. Noted on the PR, but also wanted to let you know here. Feel free to merge the PR when you have a passing. Awesome. It's on our radar to update Python to resolve the issue, but it'll be a lot of work. I'm making sure folks have cycles. I see. Okay. Okay. So it is, yeah, it's definitely a known issue. Oh, yeah. Python 3.11 was causing issues. They don't go to the 3.10 for the learn guide repo to break the log jam. I could download the 3.10 or I could leave it... I think I probably leave it for now. Feel free to merge when you have it passing. I think the only thing I could do to make it pass is change to 10 or something lower. A lot of the pilot-related failures in libraries please make whatever changes are. I needed to get it back up and running. We can do that. Can it do that? So my guess is I think the only changes that will be needed are just down to 3.10. It sounds like, right? See, Grover, I think did you just mention you tried 3... Well, you mentioned they used 3.10 on the learn guide repo. So I suspect we should be able to do the same here. Not here. That is the learn guide repo. Here. Which would be in the pre-commit config or in the actions? I don't know. Black version, reused version, pre-commit hooks version, pilot version, no Python version here. So let's check. Pre-commit here. Let's just set up Python V2. Is this where the version is coming from? Does this just grab the latest version or set up Python V2 and then it doesn't specify. There is no setuppy or like pyproject.toml. I was expecting to find something like that. Let's look at learnguide. And learnguide, I think this one doesn't do pilot, does it? I set up Python 3x, which does look newer than set up Python V2. This one's V2. This one is set up Python V4. And then it says with version 3.x. Okay. So do we need to maybe update to 4 and then also give it the with or whatever? Okay. But then that just says pre-commit and its uses, uses, uses. Whereas back over here, we have jobs and our job is update images and then within update image, we have each of these tasks, one of which is set up Python. Got around, thanks for the stream. Yep, take it easy, ask Patrick. Thanks for tuning in. Have a good night. Oh, okay. Well, these are still steps, I guess. Yeah, I guess these are still steps. It just doesn't have, it doesn't have full names. I guess name must be optional. And now the thing is, I think like running locally, this does not tell me anything, right? Like I don't think, because my local uses pre-8 right now. Okay, I did a check YAML. Mapping values are not allowed in this context. I need to learn YAML one of these days. I do not know YAML. Looks like we got an extra invention. Yeah. Whoa. That's at least valid YAML, I think. I don't think we know if it works or not until we push it and let the actions run. Could we be specifying? You know, what's weird though is why are we getting three, how does this get three 10? If it's just saying three X, does three X not give you the newest thing? Because I mean, I would assume since we just specify three X, like we would probably get the same thing we got before, right? But I would have thought. Let's view file screenshots. Let's go here. Let's go pre-commit, run, push. All right, we'll try that. The three dot X is, I must not fully understand. My thought would have been that would probably give you the same thing as just omitting it entirely. I know what I would have thought. Yeah. It still did give us three 11, actually. So it's going to fail again, I think, right? It should fail the same way. So we may need to do three 10 explicitly instead of three dot X, but that does beg the question like it's three dot X in the learn guide repo. Well, three dot X in the learn guide repo images. Maybe this, does this one not use, oh, hey, look, commit message. Those things are helpful to read, right? Let's look at that. There we go. Yeah, it is three dot 10. It's just in GitHub CI instead of images. Makes sense because that's the one that runs pre-commit. So we did, we changed the wrong one. It's still going to fail. I'll let it fail. So I'm not just pushing again. Yeah, there it is. We got the fail. Should be the same reason. Yeah. Okay. So the actual fix though, should we change the name to, we probably should change the name to check pre-commit again. I don't think I broke it, but as noted before, I don't actually like no YAML correctly. So that's three dot X. An ancient room, three dot X. Oh, equals three dot 10. That's fair. Roman numeral, Roman numeral Simvers. That'd be fun. All right, let's commit that. And yeah, try to use three dot 10 for real this time. Maybe. And we think so, but we'll see. It's yet to be seen. A little bit chilly. My jacket, which has got my gloves in it, probably just my gloves for a few minutes and see if that my hands that are cold, mostly. You're right. All version numbers with Roman numerals have people try to match them with registered regular expressions. Anxiety. Just think there probably is a regex parser for Roman numerals though, right somewhere. You can use Roman numerals for unordered lists inside HTML. I don't know how high up it will count though. I would assume it doesn't do like. Too many of the large ones that are less well known. Maybe it does though. I think anybody actually uses it in HTML, but. Is there. Is this the last one? This is the last one. It's not the new one. It is. Okay, it's it was. Well, I don't know if it was the old one or the new one. Either way, the new one also fails. Our next problem is can I import Unicode fun? Which sounds. Not very fun, I guess, right? Oh. What? No, search. Search. What are you doing? Serious right now? Search. Why would I want to open import error colon as a protocol? Making any sense right now, Chrome. Goodness, that is so bright. 11 days ago. This is a good sign. Oh, modified though. Black. My guess is then whatever the old version of black was worked under the old Python. It became an issue under the old version of black with the new version of Python. And the way to fix it is by updating to the new version of black. Interestingly though, in this little snippet here, they do a Python version three eight. Kind of cut off, I guess it could be a different task, I suppose, but it does this kind of imply that it's using three eight, which should actually match what I have, I believe. Okay, so the two routes to fix it either. Oh, both we need to update click and black fixed by black 22.3 versions before that won't work with click. 8.1.0. So we must have new click. Yeah, this would just install the latest whatever it is, which I guess is probably out of date for me, I suppose, right? PIP install. Upgrade. Click. That's fully installed. So my guess is this now won't run for me as well. Oh, I need to take those prints back out. Also, I'm surprised it didn't fail. The click should already be on the newest version and then it seems like our only. Oh, well, yeah. So what I did was run the screenshots right the screenshots also use click but that's not what failed the pre-commit the pilot. That's what failed, but it does still pass also. I don't know what's up with that installing environment for pilot. Book black. Yeah, for whatever reason when it ran black, I already have a newer black. Do you still do upgrade if it's actually a downgrade? Yes. Well, you can at least so passes though. I don't know the version of Python must come into this as well because we're also on 310 here, which would be different than what I'm on locally. So only thing I can think is that that that version is also coming into the mix here and that's why mine is not failing. Only thing I can really think to do though is put this back to whatever was which I guess is newest ish 22.10 or this said was 22.3.0. So we probably go as low as we can level integration issues make sense to 310 311 do a lot of changes. A lot of changes. Let's see does a lot to change the parser. And it made a black and pre-commit restructure restructure significantly. If I recall correctly, which is not a guarantee. I got sure you're I mean you're ahead of me. So that's good insight. Guards of this at least I haven't I tried Python 310 one day. I think I tried it on a server actually I don't remember if I tried it. My local computer if I tried it on a server I tried 310. It was not working with the project I was trying it on and I. I'm graded. Going back to 3.9 which is actually ahead of what version I am using as just my stock standard system Python right now. And 3.9 I think did work but 310 I had trouble with and this was actually true three weeks ago before 11 came out so. 11 wasn't was not in the mix yet but I know it is now. Okay this is the pre did fail again or or this is old maybe. Ah yes this is old and it passed. Which images do we make one guide images. It's interesting that it runs. It's interesting that it runs an action in this repo to create the images. But it also runs an action in the learn guide repo to generate those images. Do we use these ones somewhere. I wonder. Really bad to keep in my Python versions ordered and keep track up of one environment that's 310 so I can use a library called pymc for data science stuff and then most of my other things are on 37. I need to spend some time to migrate away from. Yeah 37 I was on 37 for quite a while this computer I think had 310 I mean 338 rather by the time that I installed it and got this one set up a couple years back. I think I started out there but before that I was on 37 for a very long time. I did not make a super far jump or some of my work projects and stuff still need some work in order to update to newer than 3.8 or possibly 3.9 might work on some of them. I mean we're still duplicating though right. Maybe this is I mean it is generating the images here but maybe it's not actually doing anything with them except linking them in this index file. No because it says get add star PNG so that would add all of the PNG is also so this is definitely generating them all and then adding them to the repo. And into this HTML file it looks like I guess we want it in both places because it should run it should run either way whether you updated the learn guide projects or you updated the screenshot utility. We would want it to run either way. I think if you update the screenshot utility then though I don't think the learn guide will get its action until the next PR or it might be one of the things that uses the cron the cron actions or whatever where they run like at a certain time of day each day. That I think it would not update itself until it actually ran again I don't think it would trigger an action. In the learn guide repo if we change the screenshot maker so I think the learn guide ones will still be out of date until it runs next which will either be when the actions run because of a PR or. When the actions run because of the cron task if there is a cron task that runs at a certain time of day. But this is passing is up to date. Has been approved they said can you set emergent once the CI is passing so we're good there. Yeah are going to merge it. I'll leave a comment though. Pretty much yeah the two things I had to change were. I found 310 and then black 22.3. I was in the action or the. Pre-commit. Oops. That's in the. Okay well trick question that's in the pre-commit action config file. You don't know right. That config YAML. 2.3.0. And then I don't think this gets released. Yeah this one. It's not on pi pi or anything so it just always gets cloned. Whenever it needs to get used from an action the action will just clone it. One of these days I'll have to learn how to make an actual like action runnable thing like it like the ones that use uses you know uses and then it's just like. Whatever repo or whatever right. This kind of thing here. I don't actually know the right way to set this up but I assume that this library screenshot maker could be set up in a way where you'd be able to do it like this. Instead of what we do today which is like. Lone it and then run it with Python. At least in the learn guide repo that's how it works. And this one it doesn't have to clone it because it already has it because this is the project that it's in but it does still just run it with Python rather than. I'm doing one of these things here whatever that's called. Future enhancement that we could make one of these days. Okay, that is in place now though that should be generating CSV files it should be passing actions whenever it does finish up. On the learn guide side I think whenever it runs next there which will either be on the next PR or on the next cron if it does cron let's take a quick look at those schedule yeah it does cron. Images. Yeah, it's either one I guess schedule cron at. I don't know 10am utc I guess maybe I don't I don't know the right. Not sure if my recollection of the format there is right I want to say it's minutes and hours. And then like days and weeks or something but I think that's 10am utc probably. Well 10am whatever the server time is which is probably utc or on push of main branch. Either of those two things could cause it to run I think. So whichever one happens first either main gets pushed to. I a PR essentially. Or the cron job takes over at 10am utc and then that should generate it and after that happens whichever one comes first I think we should then have the CSVs inside those images. Okay. I am going to wrap it up there I'm going to go and get some food in me because I'm getting pretty hungry and then I'm probably going to start. No get my computer powered up and at least try to get the most basic stuff going like get OBS installed so I can even have a chance of streaming any of the rest of the setup so. I will take off for now. Thank you for tuning in everybody I hope everyone has a nice night. Happy Friday again. Again just another reminder normally I stream at 10am central time on Saturdays but tomorrow I will not be streaming at that time sometime later in the day I will drop links in the chat but I won't be on at the normal time tomorrow. It probably be back at the normal time next week I believe although stay tuned to the Friday deep dive and I'll let you know the night before as well. So thanks again hope everybody has a good night thank you see Grover for looking that stuff up thank you to everybody who helped out in the chat and yeah hope everyone has a good night I'll see you next time.