@ghickman@mastodon.social avatar

ghickman

@ghickman@mastodon.social

Python, engineering best practices, D&D chat, all things Sci-Fi/Fantasy. Hash tag farm lyfe.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

SebastianM6L, to jenkins
@SebastianM6L@mastodon.social avatar

Anyone had an issue with from django.test import Client causing a high memory usage in a docker container?

I run the tests in a pipeline using a agent in .

When this test runs:

def test_login_user(self):  
 c = Client()  
 response = c.post('/user/login/', {'email': 'test1@test.de', 'password': 'test123'})  
self.assertEqual(response.status_code, 302)  

The memory usage goes thru the roof. Literally using up all memory until it crashes.

ghickman,
@ghickman@mastodon.social avatar

@SebastianM6L Client runs a the full request stack, could a piece of middleware be causing you problems? Does the memory problem happen at import? Instantiation? When calling post()?

ghickman,
@ghickman@mastodon.social avatar

@SebastianM6L Iโ€™m on mobile atm so canโ€™t check but IIRC pytest-django is doing some config for you, setting the settings var, etc. but I didnt think there were any auto run fixtures by default ๐Ÿค” could you be using different settings between the two test runners?

bitprophet, to random
@bitprophet@social.coop avatar

Woof. Was only out and about for maybe 6h but feels like twice that long. Old friends, new friends, faces only seen in passing here on the Fedi.

Also a nice birdwatching & trainspotting (no, not that kind) session from the CC's third floor balcony.

Think I'm gonna hole up now & try recharging my metaphorical batteries for tomorrow.

ghickman,
@ghickman@mastodon.social avatar

@bitprophet @webology would yโ€™all be happy with a third wheel? Iโ€™m not auctioning and would love a chill dinner!

bitprophet, to random
@bitprophet@social.coop avatar

Super not used to actually wearing my backpack. It's been purely a convenient method of carrying stuff to and from my car for the last 5 years.

ghickman,
@ghickman@mastodon.social avatar

@bitprophet for a few years now Iโ€™ll get to day 3 of a conf and think โ€œhuh, my shoulders hurt, and there are big red marks on them, I wonder how that happenedโ€ฆ oh rightโ€

bitprophet, to random
@bitprophet@social.coop avatar

โ€œSuffer FOMO, or attend PyCon?โ€

Why choose? You can have both!

By attending, but then missing a keynote because "sleeping" and "eatingโ€ (and now, having seen some photos of the audience, โ€œthat is FAR too many people for 2020s-me first thing in the morningโ€) took priority ๐Ÿซ 

ghickman,
@ghickman@mastodon.social avatar

@bitprophet I stood outsideโ€ฆ when I eventually got there! It was a whole lot of people ๐Ÿ˜ฌ

tonybaloney, to random
@tonybaloney@fosstodon.org avatar

Beautiful run along the river in Pittsburgh and past the two stadiums ๐ŸŸ๏ธ for #PyConUS.
Will do it again on Sunday. Meet at the East Lobby entrance at 7am

ghickman,
@ghickman@mastodon.social avatar

@tonybaloney thanks for organising it!

ghickman, to random
@ghickman@mastodon.social avatar

@bitprophet rain!

SebastianM6L, to django
@SebastianM6L@mastodon.social avatar

what is the preferred way of creating data ingestion pipelines in ?

I have a few systems where I need to invest the data from an curious what ways are preferred or considered as good vs mine ๐Ÿคฃ

ghickman,
@ghickman@mastodon.social avatar

@SebastianM6L my preference is to build it up in layers:

  • optional raw data validator (depends on trust in the source)
  • parser to convert raw data to internal representation (I love attrs for the storage here)
  • serialisation layer
  • entry point layer
  • management command for local testing/cron
  • optional webhook handler

Depending on your situation these layers can be anything from modules down to single lines!

bitprophet, to random
@bitprophet@social.coop avatar

Boy howdy, I don't understand folks who willingly use a laptop all dang day when they have the opportunity to use actual peripherals.

This shit isn't just "not ergonomic", it is /anti/-ergonomic.

(Bonus points for โ€œhotel desk/chair is designed for tall peopleโ€ ๐Ÿ˜ฉ I guess I need a travel booster seat now, like a child at a family restaurant.)

(Or I need to take a page from some tweeps earlier today and simply stop bringing the laptop altogether.)

ghickman,
@ghickman@mastodon.social avatar

@bitprophet as a tall person, I can assure you hotels commit ergonomic violations against us too. Iโ€™m not sure who the desk in my room is designed for but pretty sure they need to be at least 7ft tall ๐Ÿคทโ€โ™‚๏ธ

ghickman, to random
@ghickman@mastodon.social avatar

LHR JFK ๐Ÿ›ฌ PIT

ghickman, to random
@ghickman@mastodon.social avatar

LHR JFK ๐Ÿ›ซ PIT

ghickman, to random
@ghickman@mastodon.social avatar

I really need to remember my rule about not flying through JFK.

ghickman, to random
@ghickman@mastodon.social avatar

LHR ๐Ÿ›ฌ JFK PIT

ghickman, to random
@ghickman@mastodon.social avatar

LHR ๐Ÿ›ซ JFK PIT

nanorepublica, to django
@nanorepublica@indiehackers.social avatar

๐Ÿ“ฃ Common Django Project structures - Part 3
๐Ÿ“„ A very simple setup, useful for demos or very simple prototypes
๐Ÿ”— https://softwarecrafts.co.uk/100-words/day-91
,,

ghickman,
@ghickman@mastodon.social avatar

@carlton @nanorepublica this is my preferred layout too, even for medium sites. I should write up my thoughts on Django apps at some point ๐Ÿค”

ghickman,
@ghickman@mastodon.social avatar

@carlton I knew youโ€™d say that! Soonโ€ฆ maybe. I have a feeling it might be contentious ๐Ÿ˜ฌ

hynek, to random
@hynek@mastodon.social avatar

how did we even fly before

ghickman,
@ghickman@mastodon.social avatar

@hynek is that Flighty in the Dynamic Island?

ghickman,
@ghickman@mastodon.social avatar

@hynek ooh fancy. Just been poking around in the app and their pricing structure is brilliant for filthy casuals like me!

bitprophet, to random
@bitprophet@social.coop avatar

Weather for looking decidedly not amenable to outdoor socializing. Boooo.

ghickman,
@ghickman@mastodon.social avatar

@bitprophet YOU CALL THAT RAIN

But seriously, Iโ€™ll chill with you in the rain, it probably wonโ€™t surprise you that Iโ€™m pretty used to it by now ๐Ÿ˜‚

ghickman,
@ghickman@mastodon.social avatar

@mpirnat @bitprophet the forecast volumes are looking very low too so could just be passing showers ๐Ÿคž

SebastianM6L, to django
@SebastianM6L@mastodon.social avatar

Any cracks here who can explain me why when I run my tests with the django built in manage.py test (runs unittest) I have 51 tests run.

When I run them with pytest It will only run 38 tests.

ghickman,
@ghickman@mastodon.social avatar

@SebastianM6L You'll need your test modules to be named test_*.py, and for packages to have a init.py so pytest will consider them. Good luck!

ghickman,
@ghickman@mastodon.social avatar

@SebastianM6L brilliant! May your tests run fast, and consistently then :)

sigmavirus24, to random
@sigmavirus24@hachyderm.io avatar

Why are researchers trying to enshittify commit messages with LLMs when we already have reached peak enshittification with conventional commits?

ghickman,
@ghickman@mastodon.social avatar

@sigmavirus24 LOL ๐Ÿ”ฅ

ghickman,
@ghickman@mastodon.social avatar

@sigmavirus24 oof yeah, Iโ€™m not a fan of that either. I saw conventional commits being used to help bump semver version numbers at a previous gig. It was buggy, and IMO pointless for internal software.

nanorepublica, to random
@nanorepublica@indiehackers.social avatar

I am still setting up my new laptop, I'm taking my time and also not trying to be overwhelmed by getting a proper dotfiles repo setup.

Three questions that come to mind:

  1. Any recommendations for dealing with credentials (typically some form of API key) that live in config files that I would want to live in my dotfiles repo

  2. Similarly for transferring SSH keys.

  3. What do mac users do for local files that aren't in some form of git repo (pdfs, office files, etc) Migration Assistant?

ghickman,
@ghickman@mastodon.social avatar

@nanorepublica

  1. store them in your password manager and pull via the CLI is a nice flow these days

  2. you can store them in your password manager, but I found having to unlock that multiple times a day did not bring joy, so I just scp them between machines, and donโ€™t store .ssh in my dotfiles repo

  3. scp/rsync Documents. I hear Migration Assistant is good, but designed for initial set up. It can be slow if youโ€™re on WiFi but there are tricks to speed it up if thatโ€™s going to be a problem

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • provamag3
  • rosin
  • thenastyranch
  • Durango
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • cisconetworking
  • Youngstown
  • mdbf
  • slotface
  • osvaldo12
  • GTA5RPClips
  • kavyap
  • megavids
  • InstantRegret
  • everett
  • cubers
  • vwfavf
  • normalnudes
  • tacticalgear
  • tester
  • ethstaker
  • khanakhh
  • modclub
  • Leos
  • anitta
  • JUstTest
  • All magazines