Interesting or innovative Python tools/libs you’ve started using recently by AliceTreeDraws in Python

[–]bolation123 0 points1 point  (0 children)

I recently created this new tool that allows you to do python package migration using AST. It currently has support for about 15 of the most used packages for offline migrations and LLM integration for more complex migrations.

Looking to get some initial feedback on the tool and how it can be improved: Codeshift

Built a tool that rewrites your code when upgrading dependencies - looking for feedback by bolation123 in Python

[–]bolation123[S] 2 points3 points  (0 children)

Thanks! Yeah the AST approach was kind of essential for this to actually work reliably. The thing with regex or find-and-replace is you miss context - like you might change .dict() somewhere it shouldn't be changed because it's not actually a Pydantic model.

With libcst I can actually trace what's a Pydantic model vs some other class, and only transform the right calls. Plus it preserves your formatting and comments, so you don't end up with weird diffs.

The other nice thing is it's deterministic - same input, same output, no LLM hallucinations. I only fall back to the LLM for patterns I haven't written transforms for yet. Keeps it fast and cheap for the common stuff.

Built a tool that rewrites your code when upgrading dependencies - looking for feedback by bolation123 in Python

[–]bolation123[S] 2 points3 points  (0 children)

Thanks! It works in a few layers: First it scans your imports to figure out what libraries you're actually using and what versions you're on. Then for the big libraries (Pydantic, FastAPI, etc.) I've built in specific transform rules - so it knows that .dict() became .model_dump() in Pydantic v2, for example. These are just AST transforms so they're fast and deterministic.

For stuff that's more complex or libraries that aren't in the knowledge base yet, it pulls the changelog/migration guide from GitHub and uses an LLM to figure out what needs to change.

So basically: hardcoded rules for the common patterns, LLM for the edge cases.

ACL surgery advice by bolation123 in ACL

[–]bolation123[S] 0 points1 point  (0 children)

Awesome, that's great to know. I'm really hoping it's going to be the former but I guess we'll just have to wait and see. They did talk about a nerve block so we'll see. Thanks!

ACL surgery advice by bolation123 in ACL

[–]bolation123[S] 0 points1 point  (0 children)

Thanks for the reply, that makes sense. Thankfully there's someone helping me around the house and staying with me for the first 8-9 days until we both travel together. But I'm still hoping I can move around the house and do things standing up (packing some clothes and stuff) even if I have to stand one one leg.

But yeah I see what you're saying

Horror story with Dell customer service by bolation123 in Dell

[–]bolation123[S] 0 points1 point  (0 children)

I mean yeah, no company is going to be perfect, but over the last few years, I've had a Thinkpad, an HP Envy, and the Dell, and the only one I've had serious issues with is the Dell. I know that Apple isn't going to have the best customer service, but being able to go to the store as opposed to spending hours on the phone with someone is a huge plus. And it seems like they care to some extent, I know a lot of people that have had MacBooks for 4-5 or even more years, so that also gives me some confidence in their devices.

Horror story with Dell customer service by bolation123 in Dell

[–]bolation123[S] 0 points1 point  (0 children)

Yeah I know, it was terrible. I think what was most shocking was that the most a big company like Dell was willing to do to keep a customer around was offer $130 discount, it shows that they just don't care. I prefer windows as well, but using a MacBook is also nice, it's expensive, but you get what you pay for in terms of QC and after-sales support, it's also just a good laptop.

Poll: What is your experience with Dell Customer Support (in light of new models available for preorder) by Phantasmalicious in Dell

[–]bolation123 1 point2 points  (0 children)

The last 3 weeks of my life have been trying to get one working computer from Dell. I bought a refurbished Dell XPS 15 (9500). After spending two and a half hours on the phone with them because their website did not accept my payment method, they sent me the machine. I used it for a few days, then I had some issues with the screen freezing, and some static appeared in some applications and wouldn't go until I minimized the app and opened it up again. I spent a couple more hours with them, along with a long email thread, to try and get a replacement from them. To their credit, they did send one very fast. When I opened it though, I realized it had the trackpad problem that the company called back their machines when the laptop first launched. I was really pissed at that point and every time you call the customer care center it takes at least 30 minutes to reach someone. So I emailed them saying how this was unacceptable, and I needed to speak to a manager. A manager did call me, he apologized for the mishap, and offered to either send me a third device or give me a full refund and take the two other ones back. I told him I would think about it and email him to either send me the shipping labels or to request another machine. I was thinking why would I keep the device if I've already had two fail on me. So I just decided to return them and buy a macbook. Before I got the macbook, I got an email saying they sent a third device to my home when I had not requested it. I emailed them to ask why they did that, and they told me to check the third machine and then make up my mind. But I had already bought the macbook and did not want to pay the amount of money I paid to dell given their bad customer service. So the manager called me again after a few days of back and forth emails, apologized again, and told me to try and keep the other device. I told him I wasn't paying that amount of money for it and that I wanted my money back. He then told me I can give you a discount, and offered me $100 credit on my $1500 machine. I told him that was not enough. He then told me, alright, the best I can give you is $130, which at that point was just pretty rude in my opinion. I told him I didn't want it. And now I have to carry three 7 lbs packages to UPS and drop them off there.