• 9 Posts
  • 332 Comments
Joined 3 years ago
cake
Cake day: March 1st, 2024

help-circle








  • There is no way for xyz to be either included or excluded from a package cuz everyone should be running python -m build and checking the tarball and .whl before even considering a commit or a release.

    So although the OP chose hitch that doesn’t change the workflow of manually checking the tarball.

    I use setuptools, wreck (requirements management), and drain-swamp (choose versioning by either “tag” or “current” rather than specifying exact semantic version). What i use has no bearing on the opinion above.

    “modern” means you are a little bitch. I’m very tired of that term. A function with multiple return statements is considered “modern”. Whereas i see that as wrong. So now that “modern” word is being thrown around for packaging?! Please stop using that term. It’s a cope for not being able to code your own build backend (drain-swamp), frame stack free locals inspection (logging-strict), and requirements management (wreck)!

    Use whatever you are familiar with without peer pressuring others.




  • Similarly to how test coverage measures how much of a library’s source code is hit by its tests, type coverage measures what percentage of a library’s typables have type annotations.

    Errrr no!

    type coverage should be how much of the typing has corresponding tests. This is particularly important for stub packages. Which are focused on confirming the advertised typing accurately reflects actual typing.

    Hope they didn’t cyber squat the package name.

    Listen to Yoda, “Try? Either do or do not! No try there is.”

    The correct answer to percentage of a libraries typables having type annotations is either zero or all. This is advertised by the py.typed file. There is no middle ground.

    Wtf is wrong with pyrefly authors?



  • Tools i recommend:

    • rebuff – finds places in code to replace with better algorithms. Wanted a tool to recommend itertools and itertools-more usage, but achieve that. Chosen cuz it’s not Rust.

    • typos – fixes typos in both code and docs

    • mypy+pyright+stubtest – need all of them. pyright phones home. mypy isn’t enough it misses way too much.

    • pretty format YAML

    • cyclonedx-bom – create software bill of materials

    • pip-licenses – NOTICE.txt and licenses.json Answers question does my toolchain include virus licensed packages?

    • interrogate – Any code documentation missing? Does not enforce documentation quality.

    • wreck – sync requirements files; otherwise it’s tedious (i’m the author)


    • uv and ruff

    If it can be helped, don’t want Rust nor nodejs in my toolchain. Recommending to Python coders who are very likely not Rust or node.js experts is malpractice or unethical (call it what you may). If you had a problem with any non-Python packages would be at the mercy of non-Python communities. i’m struggling just with Python community black issue 2514 now you want us to broaden that struggle?

    And if people are too dumb or lazy to learn how requirement file hierarchies work, perhaps they shouldn’t be Python coders.

    Disclosure: author of wreck



  • The OP mentioned dealing with user input via pydantic. Which acts schema-like. strictyaml does the same for YAML config files where runtime validated against a schema.

    And here is why all the other config file formats are dodgy, why-not written by author of strictyaml (not me).

    Disclosure: Author of types-strictyaml, logging-strict, pytest-logging-strict, and sphinx-external-toc-strict. So yes i drank the kool-aid, but welcome challenges to preference for YAML config file format over others.