#tools-and-devops

1 messages · Page 6 of 1

rapid sparrow
#

i feel like i will be able easily persuading my team adding task

#

looks very simple in working and readability... and super fitting CI and local env

#

we are still not having anything except invoking docker-compose commands in Github Actions after all

#

and just documenting docker-compose commands to README.md

rapid sparrow
tranquil slate
#

Hey, I just have a question related to how AI models are generally deployed. How I've been approaching it so far is:

  • Make model via jupyter notebook
  • load trained model into django app
  • contanerize django application
  • deploy django container to the web

Would this generally be the correct approach? From what i've been seeing online, this is usually what's done (may be missunderstanding it). In this case, would I need to even deploy the SQLite database (which is used to store training data for the model) with my app to the web? Im also looking to have some sort of dynamic training (ie, users could input new data via a web interface to train the model again), which makes me then think that a database with training data should be on a cloud as well (and hence I wouldnt use SQLite as was discussed earlier in the chat).

I think I am just generally confused on how an AI application overall would be deployed, ie do I train the model, load it into django, deploy that (no db needed), but then how would you manage retraining the model dynamically? Also in this case of dynamic retraining, if we have replica pods containing containers with the django app, would these pods sync if one of them has the model retrained (dynamically)? I would really appreciate any help/resources that are related to the same technologies

rapid sparrow
# tranquil slate Hey, I just have a question related to how AI models are generally deployed. How...

i can't find information about it, but i remember seeing that jypiter models are the first prototype, that can be rewritten to vectors/C++ to speed up their performance greatly. That is supposed to be their more mature deployment strategy.

Also i remember it is possible to tune trained model to fit better some specific date set. (and it is supposed to take much smaller time to retrain model then)

I am not an AI guy, i just did something for it during university
Also in https://www.dsicommunity.org/ u could try asking Hubt there, he is professional in this regard (Combining machine learning and DevOps) (just don't mention i send u to him 😆 )
or asking question regarding this stuff somewhere in #data-science-and-ml or in AI/machine learning communities https://github.com/mhxion/awesome-discord-communities#linux

thorn portal
# tranquil slate Hey, I just have a question related to how AI models are generally deployed. How...

i think the answer really depends on your project's scale and complexity.

low traffic, low volume of data (even GB scale is small imo)? this is perfectly fine.

running A/B test? need close-to-real-time model training? having more and more training input? then this setup will likely fall over + just have too much overhead on the developer/data scientist daily workflow.

the keyword to google here is MLOps. unless you have specific pain point that you really want to get rid of, this might be more just for general knowledge instead of something practical though. it's way too easy to over-engineer these things imo. (i am a proud victim of this)

thorn portal
tranquil slate
# thorn portal i think the answer really depends on your project's scale and complexity. low t...

I think the most complex thing in the project will be evaluating and retraining the model. Ie: a user can evaluate the model, and input new training data to re-train the model from the web interface. I assume this itself may require a different approach mainly with the database? I may just be understanding it wrong, but if its dynamically retraining, wouldnt this retraining occur on the cloud?

tranquil slate
tranquil slate
#

Just out of curiosity, would combining persistent volumes (https://kubernetes.io/docs/concepts/storage/persistent-volumes/) and stateful sets (https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) potentially enable SQlite to work for deployment? (I understand though that for larger scale applications this would probably not be feasible, but in terms of small scale). If I am understanding the docs correctly, wouldnt these ensure that the SQLite database within the django app container would be synced between pods - in turn allowing for sqlite to exist in the different replica pods and avoiding the issues detailed here: https://sqlite.org/useovernet.html ?

EDIT: Looking more into it, I may be wrong with allowing sqlite to exist in the different replica pods - in that case, wouldnt it be fine to just use a single persistent volume that has sqlite, and then let my django app pods know to use that for data read/write? (Another issue with this approach (along with the sqlite docs issue) may be that SQlite is an embedded database?)

thorn portal
# tranquil slate I think the most complex thing in the project will be evaluating and retraining ...

I may just be understanding it wrong, but if its dynamically retraining, wouldnt this retraining occur on the cloud?
that's correct, of course i am assuming you are hosting containerised django on the cloud already

in fact once your training process reach a certainly amount of complexity, you will inevitably opt for training in the cloud (unless you are happy with waiting for days, then no.) -- however it's worth noting people usually separate the process of training to another system (i.e. not your containerised django)
just remember training a model is not necessarily a one off process of training a singular model, it's highly likely that you will be training many models while searching for proper hyperparameters to use for your model, and this is not a short process.


so the question now boils down to, how fast do you train your model currently? is this going to balloon anytime soon?

if you can train it in seconds then i wouldn't bother making any drastic changes, assuming the user is happy to wait for seconds while django is potentially frozen

tranquil slate
#

its very very small scale atm

#

But in that case, I have a question in terms of after retraining. So once retraining is done, how would this new model be applied to all of the different replica pods?

#

From my understanding, the replica pods dont sync

thorn portal
#

you need a model registry and a way to signal a new model is to be used then

#

(or you can skip model registry and just retrain across all pod)

#

how come you are using k8s?

tranquil slate
#

Im taking a project course atm related to AI. There arent many fixed requirements, but one is to use K8s. Apart from that, we have the freedom in terms of architecture, structure etc for the project

tranquil slate
thorny shell
rapid sparrow
#

Better accessing from multiple pods over network available sqlite at least. Having SQLite in one pod only i think

tranquil slate
# rapid sparrow Better accessing from multiple pods over network available sqlite at least. Havi...

Ahhh so basically a single instance/pod of sqlite would run? Something like: https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/ but with SQLite instead of what they use In the guide?

rapid sparrow
#

In recreate Deployment strategy (previous pod in this strategy deleted first, before new one launched)

#

Technically, same result should be.

tranquil slate
rapid sparrow
#

Keep sqlite separated from them and accessable only over network to Django

#

I am trying to make u having stateless scalable main backend app

#

With aim for painless replacing Sqlite3 with something else later without making any architectural changes 😐

tranquil slate
#

RIGHT ok yes, it’s very clear now!

This is really great! Thank you all so much for your help! I really appreciate it!

#

It’s made these concepts, and how to approach deployment with K8s so much clearer for me!

tranquil slate
rapid sparrow
tranquil slate
#

My bad, I would be deploying django to a cluster on GKE

rapid sparrow
rapid sparrow
tranquil slate
#

Ok I see, thank u! Yes then i think maybe a persistent volume could be useful for this

strong spire
#

Hello, everyone! Does anyone here could help me with PLY in Python? I'm building a compiler, but I'm having trouble with if_statement there

rapid sparrow
#
[BaseGood]
base = br01_05_base
MarketGood = dsy_spatial_package, 1, -1, 1, 1, 0, 1, 1
MarketGood = dsy_firefly_package, 1, -1, 1, 1, 0, 1, 1
MarketGood = dsy_large_train_package, 1, -1, 1, 1, 0, 1, 1

[BaseGood]
base = br01_06_base
MarketGood = dsy_somtaaw_lf_package, 1, -1, 1, 1, 0, 1, 1
MarketGood = dsy_somtaaw_hf_package, 1, -1, 1, 1, 0, 1, 1
MarketGood = dsy_somtaaw_fr_package, 1, -1, 1, 1, 0, 1, 1
#

i have complex data to parse... is there any tool that can do it in a nice way? pithink

sharp elm
#

Is there any way to get setuptools to deal with and install entry points? Like every other build system does?
pip install . with poetry, pdm or flit produces entry points nice and easy. But vanilla setuptools + wheel does not.

[project.scripts]
mybin = "project.cli:cli"

[build-system] 
requires = [ "setuptools>=41", "wheel" ] 
build-backend = "setuptools.build_meta" 

I'd expect ~/.local/bin/mybin to get installed. Any ideas?

languid blaze
#

Does anyone know if there is a good interface and/or api for working with jenkinsfiles in Python? Groovy is giving me issues and I ain't going within 20 smoots of XML if I can help it.

rapid sparrow
# languid blaze Does anyone know if there is a good interface and/or api for working with jenkin...

the best decision in this regard is not using Jenkins and migrating to Github Actions/Gitlab CI or any other modern CI tool
you can mitigate damage from using your CI tool by writing local workflows (chained tasks) through https://taskfile.dev/. Recommending to research it and learning how to chain tasks + using defer stuff in it / supplying variables into tasks, making them reusable. And then invoking in your CI tool only end commands. Thus getting easily debugged locally workflows

languid blaze
#

In case you don't pick up the sarcasm, I'm in an enterprise environment. I use Jenkins not because I want to but because I am required to.

rapid sparrow
#

The best that it is language agnostic yaml. So... good for any project in any language.

rapid sparrow
languid blaze
#

I'll have a look, forwarding the link to the SRE chat on teams.

rapid sparrow
# languid blaze I'll have a look, forwarding the link to the SRE chat on teams.

https://github.com/darklab8/darklab_article_docker_python in this repository i have examplw btw how to use almost zero of CI cloud tools with taskfile

variables:
  IMAGE_PIPELINE_RUNNER: docker:22.06.0-beta.0-cli
  # dind
  DOCKER_HOST: tcp://dind-service:2375

stages:
  - test

.setup: &setup
  before_script:
    - apk update && apk add curl
    - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin

build-test-django:
  image: ${IMAGE_PIPELINE_RUNNER}
  stage: test
  <<: *setup
  variables:
    COMPOSE_ID: ${CI_PIPELINE_ID}_django
  script:
    - cd example_frm_django
    - task dev:test

build-test-fastapi:
  image: ${IMAGE_PIPELINE_RUNNER}
  stage: test
  variables:
    COMPOSE_ID: ${CI_PIPELINE_ID}_fastapi
  <<: *setup
  script:
    - cd example_frm_fastapi
    - task dev:test

before_script inserts into gitlab CI taskfile, sends variable i need through environment variable to taskfile, and from there its pipeline goes

equally same with github actions

name: Build

on:
  pull_request: {}
  push:
    branches: ["master"]
    
jobs:
  build-test-django:
    name: Build and test Django
    runs-on: self-hosted
    steps:
      - name: Check out source repository
        uses: actions/checkout@v2
      - uses: ./.github/actions/cleanup-docker
      - name: Install Task
        uses: arduino/setup-task@v1
      - name: Test
        run: task dev:ci_test
        env:
          COMPOSE_ID: ${{ github.run_id }}_django
        working-directory: example_frm_django

  build-test-fastapi:
    name: Build and test FastAPI
    runs-on: self-hosted
    steps:
      - name: Check out source repository
        uses: actions/checkout@v2
      - uses: ./.github/actions/cleanup-docker
      - name: Install Task
        uses: arduino/setup-task@v1
      - name: Test
        run: task dev:ci_test
        env:
          COMPOSE_ID: ${{ github.run_id }}_fastapi
        working-directory: example_frm_fastapi
rapid sparrow
# languid blaze I'll have a look, forwarding the link to the SRE chat on teams.

under the hood both invoke

  ci_test:
    cmds:
      - task: compose:ci_run
        vars:
          CMD: web pytest
          PULL_CONTAINERS: db redis
  ci_run:
    internal: true
    cmds:
      - defer: docker-compose -f {{.COMPOSE_FILE}} -p {{.COMPOSE_ID}} down --volumes --rmi local
      - task: build
      - docker-compose -p {{.COMPOSE_ID}} -f {{.COMPOSE_FILE}} pull {{.PULL_CONTAINERS}}
      - docker-compose -p {{.COMPOSE_ID}} -f {{.COMPOSE_FILE}} up -d {{.PULL_CONTAINERS}}
      - sleep 3
      - docker-compose -f {{.COMPOSE_FILE}} -p {{.COMPOSE_ID}} run {{.CMD}}
    dir: ./{{.DIR}}

my ci run of tests through docker compose


x-services:
  app_poetry: &app_poetry
    build:
      context: .
      dockerfile: Dockerfile
      target: dev
    environment:
      DJANGO_DEBUG: "true"

version: '3.8'
services:
  db:
    image: postgres:15 # 5432
    environment:
      POSTGRES_HOST_AUTH_METHOD: trust
      POSTGRES_DB: postgres
  redis:
    image: redis # 6379
  job_migrate:
    <<: *app_poetry
    command: python manage.py migrate
  web:
    <<: *app_poetry
    command: python manage.py runserver 0.0.0.0:8000
    ports:
      - "8000:8000"
    depends_on:
      - db
      - redis
      - job_migrate
#

in any result, taskfile makes sure to destroy containers and volumes and images through defer

#

build container, pull services up with databases, run tests, destroy

languid blaze
#

I can guarantee I'll be the only person on the team doing the destroy step, based on the weekly emails we get from the cybersecurity team

rapid sparrow
languid blaze
#

Given I'm dealing with people who thought it was impossible to automatically add the build date to the image tag (so we can track the every-45-days-please-rebuild-the-image rule in datadog)...

dusky cloak
#

Hi there, anyone has version of Python-Rust or Rust-Python Docker image which he could share?

subtle quarry
#

Looking for "standard" refactoring tool. Like refurb, bowler, sourcery. Standard as for example black for formatting.

rapid sparrow
#

it is disaster tool.

#

decreasing readability through making comprehensions at every step. What a fine idea

rapid sparrow
rapid sparrow
loud bear
#

How can I create a different 32 and 64 bit wheel just for windows, but for all python versions it should be the same?

tawny temple
#

I believe a wheel is always tied to both the architecture and the Python version, unless it's a -any wheel

#

It would be helpful if you described what your app is. Is it a C extension for Python, for example? How are you building it currently?

real hedge
#

Hello, Anyone know if VSCode have a reliable a static type checker plugin for Python?

real hedge
weak heath
#

I created my ecommerce website using django.now I am trying to horizontal scale by creating some containers of it.Should I use a different container for sqlite3 and media files,static file or should I create a volume ?

short peak
weak heath
#

It was a side project

#

*is

short peak
mossy sage
#

Are there anyone who can help me integrating AWS SageMaker?

weak heath
short peak
weak heath
short peak
civic grove
#

how does platorm engineering differ from devops?

heavy knot
#

yo

loud bear
#

I can save space by making a 32 bit wheel and 64 bit wheel

#

Also I really want to place it at the root dir in a vendor/ directory but the package-data doesn't seem to include the DLLs into bdist or sdist

tawny temple
#

I wonder if all you need to do is change the name of the wheel. As far as including DLLs, I had to do this for a project once and I believe I worked it out. I'll have a look tomorrow when I'm on my pc.

#

But be careful about licensing if the DLL is not yours. I got hung up on how to distribute LGPL DLLs in my wheels

rapid sparrow
#

😐 spammer. ask only in one channel your question. / or as help request post in help channel

heavy knot
#

What is the best way to learn GitHub

#

I know the commands, but it seems like I am missing best practices (when to commit changes, and when to branch off)

#

Like one of the questions I had was, is it acceptable to commit changes that are non functional?

daring skiff
#

Hello guys, quick question, can you install pip packages on a poetry environment, poetry add seems to work just fine, but are pip packages also poetry compatible?
also, how do you install a package from git with poetry?

rapid sparrow
#

it is just... wrapper around for more comfortable usage

#

automatically creating venv, installing packages to them

#

possible separation of installed packages into groups

#

pinning top level dependencies / and secondary deps

heavy knot
rapid sparrow
heavy knot
#

You mentioned me lol

#

ah alr

rapid sparrow
# heavy knot You mentioned me lol
  1. Best practices regarding GIT (yes, just learn 5 xD) https://deepsource.io/blog/git-best-practices/
  2. Learn possible workflows, and generic essentials quickly here https://www.atlassian.com/git/tutorials/comparing-workflows
  3. Learn Git to very good CLI level here in interactive tutorial https://learngitbranching.js.org/
  4. Learn git to advanced level with going through this book https://git-scm.com/book/en/v2
  5. also get familiar eventually with conventional commits https://www.conventionalcommits.org/en/v1.0.0/
    can be useful for more order in naming, which are more meaningful. Especially considering that they are easily enforceable by git hooks or CI checks
    Copying to here for clarity then
rapid sparrow
#
;Bases must follow the template and be sorted alphabetically. Ships native to the faction-owner, if not generic (civilian, border or edge worlds tech) can have rep requirement (0.5), generic ships should have negative rep requirement, which will allow anyone who can dock the base be able to buy the ship (-0.5).

rlds tech) can have rep requirem

rlds tech) can have rep requirem

how to write regex query so it would match only text of first line after ;? pithink without having ; in a match

#

(?<=;)(.*)
found xD

rapid sparrow
#

i try to catch as match only due to limitations of a tool i have

mystic void
#

; wouldn't be in the group

rapid sparrow
mystic void
#

yeah

rapid sparrow
#

well, probably i just should use function in tool at my disposal: Get me all subgroups and getting from it

#

otherwise i will be breaking mind over even more complex regex

mystic void
#

you could also do something janky like [^;]*$

rapid sparrow
#

too junky xD better using groups i guess

#

Found in my tool how to access groups in a nice way. I am good now, thanks

barren epoch
#

Hello, when i have file which is untracked and i want to update this file by pull, then my untracked code will lost? i know that i can do git stash but without stash, does it remove?

thorny shell
#

pretty sure git will say "that file would be overwritten", and will refuse to pull

#
👿1 [2022-12-02T04:38:14-0800][x] % git merge main
Updating c4e528f..14a2deb
error: The following untracked working tree files would be overwritten by merge:
    a_new_name
Please move or remove them before you merge.
Aborting
barren epoch
barren epoch
thorny shell
#

why not back up your folder, and then just try it?

barren epoch
#

what do you mean in back up?

thorny shell
#

make a copy

barren epoch
#

yes its simple but i think very bad practice, if you have 100+ file you should copy these file? i think there would be better option

thorny shell
#

the better option is to learn git

barren epoch
rapid sparrow
# barren epoch so what i meant, i added these two file in local but before push i want to pull ...

if u committed those files, it will be safe to make next operation then.
u can check in a careful mode, with git fetch stuff, and there should be command checking if u will have merge conflict in some dry-run way
but that is not really needed, since u can just go git pull and jump into solving merging problems i guess (i think this operation can be canceled too? pithink at least it is identified as rebase, which we can always rollback by git rebase --abort

barren epoch
#

it's my new local files

rapid sparrow
#

if nothing of your saved files were commited by any new author with versions newer than u have locally

#

then u will have no merging problems

#

merge conflicts arrise, only if someone committed work to same branch for files which u changed locally too. Only in this intersection merge problems appear (when u changed same files at the same time and commited results)

rapid sparrow
#

solving merging problems is pretty common operaton though, nothing really should be feared about it

barren epoch
dusky osprey
#

Hi
I'm looking for a way to **continuously **trigger a python code every time when an SQL query result is not blank.
I tried using Airflow's SqlSensor but it seems like the sensor's work is done once the condition is satisfied. I'd need to schedule more sensors over time and I can't even tell it not to schedule new sensors if one is already waiting. On the other hand I wouldn't want to schedule a dag every 10 seconds.
I know I can do a while True: time.sleep(10) if db_change_detected(): do_work() but isn't there a more elegant solution ?

thorny shell
#

I can't imagine any clean way to do this, unless the database can "publish" information about changes that it's making.

#

otherwise you've just got to "poll" (i.e., query it every 10 seconds)

#

you'd have to

  • figure out if a DELETE removed enough rows so that your query would return a blank result
  • figure out how to get the trigger to publish that information
  • figure out how to get your python program to consume that information
dusky osprey
# thorny shell you'd have to * figure out if a DELETE removed enough rows so that your query w...

my query is already designed in a way to only capture what I explicitly need (it calculates a hash and if the hash has changed, then I need to perform some actions). Long story short, I do not concern myself with "what exact change happened".
Triggers are an okay method however I only have read access to the database, so can't really create objects. I mean I could ask for one, but it's not really worth it.

thank you

heavy knot
#

so annoying that i cant speak..

silver finch
#

Also, are you aware of CDC, and does that solve your problem?

dusky osprey
dusky osprey
# silver finch What do you mean by "every time"? You want to run a query, do things, and then r...

I want every 10 seconds to run a query and check if it has results. If yes, I do_work() which lasts less than 10 seconds (let's say a second), then after 9 seconds I run the query again. No need to wait unti the previous one is finished because it will not last long. If it doesn't have results, I run it again after 10 seconds and so on indefinitely. If there are no results for a week, well then there are no results for a week.
If it breaks, I want it to restart itself,but I know how to cover that.

thorny shell
#

I wonder if all you need is ```py
import datetime
import random
import time

def run_the_query():
print("The time is now", datetime.datetime.now().isoformat())
if random.choice(range(2)):
time.sleep(random.randint(1, 3))
print(" Query is done", datetime.datetime.now().isoformat())

while True:
start_time = time.time()
run_the_query()
wait_until = start_time + 10
time.sleep(wait_until - time.time())

python3 arik.py

The time is now 2022-12-03T05:43:14.127803

Query is done 2022-12-03T05:43:14.127829

The time is now 2022-12-03T05:43:24.132650

Query is done 2022-12-03T05:43:24.132935

The time is now 2022-12-03T05:43:34.133123

Query is done 2022-12-03T05:43:37.138309

The time is now 2022-12-03T05:43:44.137469

Query is done 2022-12-03T05:43:47.142514

The time is now 2022-12-03T05:43:54.142446

Query is done 2022-12-03T05:43:55.147601

topaz aspen
#

is there a way to search open source python project code ? Sometimes I feel it would be nice if i could search the top 1000 python projects or whatever for a particular method usage or something

thorny shell
#

I wouldn't be surprised if github has a way to do that. Of course it'll only search projects that are hosted there, but many of them will be

topaz aspen
dusky osprey
# thorny shell I wonder if all you need is ```py import datetime import random import time de...

That's the most basic level of how I see this. An ideal solution would have a comprehensive user friendly UI for turning it on and off, observing the logs for errors and status updates etc. The script does that but in a less user friendly way.
I've got an idea to still use airflow's SqlSensor but have the DAG on @once` schedule and after each successful (or any) trigger (and execution of tasks) I'll start another instance of the dag. This way I'll have more user friendly control over the process anddo less code since Airflow handles auth errors, timeouts, unknownhost and etc. accordingly out of the box.

Thank you for your help.

heavy knot
#

anyone knows about apache airflow

dusky osprey
heavy knot
dusky osprey
heavy knot
#

Can we speak regarding this in pvt??

dusky osprey
tawny temple
#

Hmm maybe it won't work for you since you don't have an extension, but this command is the build_ext command.

loud bear
#

This is exactly where python packaging really sucks.. bad path handling

tawny temple
loud bear
#

Yes I tried this

#

It just doesn't get included unless its in a subdirectory with the code

#

In my repo, I want to place my code in say project/ and DLLs in vendor/ and in packaging I want to place DLLs beside code, any good way to do that?

tawny temple
#

Does manifest.in help or would it still be limited to data files within the package dir?

rapid sparrow
#

which u get in git-conventional-commits version

#

nvm, it looks like working on my tags

tawny nacelle
#

what is devops please?

thorny shell
#

DevOps is a set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. DevOps is complementary to agile software development; several DevOps aspects came from the agile way of working.

rapid sparrow
#

This book explains it

floral smelt
#

Using poetry, is there a way to not copy dev-related stuff in the containers for production? In example, I have a subfolder for tests separated from the main package but I don't want it. Thing is, my pyproject.toml is at the root of the project.

#

The structure looks like the following:

.
├── Dockerfile
├── README.md
├── docker-compose.yml
├── fastapi_crud_async
│   ├── __init__.py
│   └── main.py
├── poetry.lock
├── pyproject.toml
└── tests
    ├── __init__.py
    └── test_main.py
rapid sparrow
rapid sparrow
floral smelt
rapid sparrow
#

Copy in separate command from root

floral smelt
rapid sparrow
heavy knot
#

multi tool

proper edge
#

Hey guys. I'm trying to get good at git and have run into a little problem. Using terminal, I created a new branch, added, committed, then pushed a file. Then I made a PR. I had to do another update that was not related to the current branch so I did git checkout again for a new branch. Added, commited, then pushed another file. Then made a PR for this update. For some reason my new PR says that I've done 2 commits. Each commit from a different branch. I made sure to git add only the file I wanted so why is another branches commit showing up in my new PR?

rapid sparrow
# proper edge Hey guys. I'm trying to get good at git and have run into a little problem. Usin...

When u create branch, it creates by default copy of your current active branch

So from master u made A branch
Then based on A u made B branch
Thus commits from A became basis of B because u created B when u already added new stuff to A

U need creating new branches from master. For that u need to switch to it first.
Or u need to find how to add argument to branch creation from explicitly told branch u want, instead of using current active

proper edge
rapid sparrow
#

-b it is argument to create branch xD

So do
git checkout master/main
git checkout -b new_branch

proper edge
#

ahh ok. that would make the basis main

#

ok that makes a lot of sense. Thank you so much

rapid sparrow
#

So u would get created new branch from latest stuff in master

proper edge
#

git pull wouldn't overwrite anything i've edited locally right?

#

or stuff from other branches that ive pushed already

rapid sparrow
# proper edge git pull wouldn't overwrite anything i've edited locally right?

pithink if those local files aren't in git, then no.
If u committed all stuff on other branches then no, because u a currently in another branch master

In general(99.99999999% cases) master branch pulling never breaks anything in industrial environment because of branch workflow principles

U can get git merging conflicts only when needing to merge latest updates from master to your still developed feature branch

#

At least if u follow feature branch workflow principles. (U a forbidden directly committing to master, only pull requests can)

proper edge
#

I see ok. That's really helpful to know. Thanks once again. I appreciate you taking the time to help me understand this

rapid sparrow
proper edge
#

:o

#

Ill check that out

silver finch
wispy garnet
#

Hi! Is there a way to make an image for a prediction algorithm, but have the model file outside of the image itself. I want to update the model.joblib file and then not have to push a new version of the image.

#

in Docker, I forgot to add

rapid sparrow
pine fern
thorny shell
#

bleah

#

k8s makes my life worse, not better

pine fern
#

you can always use a managed k8s service

thorny shell
#

we do

rapid sparrow
pine fern
thorny shell
#

it's probably our own fault: we're using k8s for something where we're not getting much benefit from it, but are paying all the "costs"

pine fern
#

oof. not the right use case huh?

#

i heard debugging pods is not fun.

thorny shell
#

indeed it is not

#

also finding your damned output

#

also trying to remember the eight thousand "kubectl" subcommands ("lens" helps a lot here)

wispy garnet
rapid sparrow
wispy garnet
#

docker volume yaml?

molten furnace
#

services:
  app:
    image: nginx:alpine
    ports:
      - 80:80
    volumes:
      - /var/opt/my_website/dist:/usr/share/nginx/html:ro```
#

guys, I have a question, have you ever tried migrating requirements.txt to poetry? Or another package management

thorny shell
#

I think I did that once with pipenv

molten furnace
#

Did you migrate pipenv to poetry?

thorny shell
#

no

#

probably should have, though; pipenv is a pain in the ***

rich heart
#

Hi everyone,

I am sorry if this is the wrong thread but after 1 day python bot hasn't been that useful on this matter.
I developed a library that acts as mapper between python and GraphQL languages for clients (it transforms python classes in GraphQL objects and operations and viceversa).
Please let me know what you think about it:

repo: https://github.com/dapalex/py-graphql-mapper/

GitHub

A python-graphql mapper for GraphQL clients. Contribute to dapalex/py-graphql-mapper development by creating an account on GitHub.

wispy garnet
#

Is this correct?

#

my WORKDIR is /app so I put that

#

idk if its correct

wispy garnet
#

I just want the model.joblib file to get used, I dont want any persistent data. Can't figure out how to do this without knowing full path of the WORKDIR

rapid sparrow
wispy garnet
#

Thank you! That seems to be working now!

wispy garnet
#

I was having some problems when I started the container, but turns out sklearn was being a meanie and was not cooperating with a joblib file which was made using sklearn 1.1.2 and being used with 1.1.3 in the image..

rapid sparrow
#

very good dev friend for documented dev env setup through docker

fleet halo
#

tox 4.0.0rc3 is now out, this will soon become the stable release unless someone reports any more release blockers, help us test it with your project if you can! Thanks! https://tox.wiki/en/latest/changelog.html#v4-0-0rc3-2022-12-05 (tox 4 should be mostly backwards compatible with v3 minus some features long deprecated in v3 and now using isolated builds by default; as shiny new features I think the biggest are built-in wheel support instead of sdist for packaging, editable wheel support and fancy colors for reporting!)

mortal zodiac
#

hi

#

I use Github Desktop and want to know what the best way to pull down a PR locally to test it?

#

I don't want to fetch it into my main repository, so is there anyway to create a folder and fetch the contents there?

feral badge
#

guys i need help with github, i have a repository that doesnt have the right language. i wrote it in tyepscript and then compiled it to javascript, but the repository's language is 100% javascript while it should be 100% typescript

still sentinel
#

I am keep facing this problem from yesterday. Does anyone have idea to overcome this. I have tried all but also it's not working on my macbook pro.

thorny shell
#

i imagine you need to install some "portaudio" pacakges. Surely the pyaudio web page has instructions for this

copper plover
wooden flower
#

Hi guys I wanna be able to dynamic pass the and docker compose up the container at the same time that I wanna bash and execute airflow so on inside of the container what is the right syntax plz ??

#

Btw I’m using GitHub actions

heavy knot
#

im on a branch and forget to switch back to main and make a commit on the branch that i then push... okay i realize i messed up so i cherry-pick the commit into main and try to push that

hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes

okay so I git pull but it only works if it's configed to rebase. I dont understand why that is. why can git rebase it but not fast forward it

thorny shell
#

because you have a commit locally that isn't present remotely.

#

The commit that you cherry-picked is not present remotely on that branch (although a very similar one, the one from which you cherry-picked, is.)

stray tree
#

Choose the lib which satisfies your system requirements.

#

and install it.

still sentinel
heavy knot
#

I have a tool

#

but its in pyarmor

#

is there a way for me to unpack it?

pine fern
#

@rapid sparrow theres a conference im considering going to. one of the talks there:

#

stateful workloads

rapid sparrow
#

In the honour of k8s name origins with a hint on resistance being futile and u will be assimilated into k8s

pine fern
#

join the k8s

heavy knot
#
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lxml
#

how to fix this? python 3.11.1

thorny shell
#

first, get a help channel #❓|how-to-get-help
Then, post all the output, not just a few lines. Include what you typed that provoked it.

#

@heavy knot this

misty magnet
#

Hello everyone!
I have a question regarding pyproject.toml , setup tools and editable install.
I'm trying to understand if it is possible to define extra requirements for the editable installation.
The reason why I want to do this is because I want to have specific requirements just for development, given that editable installs are usually used specifically for development.

Now, at the moment, I'm getting away by creating an extra-options simply called dev to which I attach an extra set of requirements (pylint, pytest, and so on).

Is it possible to have these requirements installed only when the package is installed as editable?

somber falcon
#

is there any documentation anywhere about what exactly happens when you run pip install . while at the root of a python package that uses poetry (pyproject.toml + poetry.lock; build-backend = "poetry.core.masonry.api" under build-system etc.)? does it pip install directly from poetry.lock somehow?

rapid sparrow
harsh linden
#

Is the scripts section in pyproject.toml of a project managed by Poetry used for e.g. scripts that deal with putting things in PATH etc?

mellow sapphire
#

Hello guys! how can iaccess argument values like this args: a=1, b=2 ?

thorny shell
#

!d sys.argv

rancid schoonerBOT
#

sys.argv```
The list of command line arguments passed to a Python script. `argv[0]` is the script name (it is operating system dependent whether this is a full pathname or not). If the command was executed using the [`-c`](https://docs.python.org/3/using/cmdline.html#cmdoption-c) command line option to the interpreter, `argv[0]` is set to the string `'-c'`. If no script name was passed to the Python interpreter, `argv[0]` is the empty string.

To loop over the standard input, or the list of files given on the command line, see the [`fileinput`](https://docs.python.org/3/library/fileinput.html#module-fileinput "fileinput: Loop over standard input or a list of files.") module.

See also [`sys.orig_argv`](https://docs.python.org/3/library/sys.html#sys.orig_argv "sys.orig_argv").

Note

On Unix, command line arguments are passed by bytes from OS. Python decodes them with filesystem encoding and “surrogateescape” error handler. When you need original bytes, you can get it by `[os.fsencode(arg) for arg in sys.argv]`.
thorny shell
#

@mellow sapphire this

tawny temple
#

I'm not a fan of using extras for dev dependencies cause I feel like it pollutes the extras with stuff end users don't care about. This is especially true when your project gas other extras that are intended for end users

misty magnet
#

I followed with the pip install -e .[dev]

I feel like it pollutes the extras with stuff end users don't care about

That is a fair assessment.

graceful light
#

I've been researching what tool I should use for listing / tracking projects I have, as well as tracking personal stuff like my PC & related inventory of stuff and other general things
I was using GitHub's project boards for each project I was working on, and presenting it in Notion, but the GitHub integration is extremely basic and is basically just a link to a repository (doesn't work when linking to a project)

I was looking at Notion alternatives and came across Joplin, which looks to be an open-source complete alternative to Notion, and Obsidian which tries to map out relationships between different pages you have
Do you guys use anything like Notion, Joplin, or Obsidian for such things? Do you have any other recommendations?
I'm looking for something that I can host locally that I can also access on my phone or tablet remotely

tawny nacelle
#

@graceful light I hate to counter your question with a question, but will you teach me the ways of the force so I can become a Jedi like my father?

graceful light
#

I know where the line is from but I'm not getting the joke here

tawny temple
#

What about good old pencil and paper? Or does that not fit the bill for remote access?

#

I feel like that often gets overlooked. But I don't know to what extent you need to track things so it may not work well.

graceful light
#

Between my atrocious handwriting, me being a much better typist than hand writer, plus with all the notes that I take, I don't think it'd work out well

rapid sparrow
# graceful light I've been researching what tool I should use for listing / tracking projects I h...

Mind maps as a text
https://mermaid-js.github.io/mermaid/#/mindmap

Or
Fully fledged diagram drawer https://app.diagrams.net/

And both u can render from
https://www.mkdocs.org/

I just have repository with my docs, where I keep track thrrough..
https://sqlitebrowser.org/

#

Documentation in markdown of Typora is also great. Good for storage into git.
Mkdocs can combine all of it into one though, autobuilding menu / rendering mind maps / serving markdown

graceful light
#

I was thinking more along the lines of this:

  1. Task boards: either integrated/pulled from GitHub projects / repo PR's / repo issues directly, or let me make the boards with custom stages, tags, priorities, etc. (Something like Trello, Asana, FocalBoard, etc.)
  2. Create basic doc pages (like Notion, Google Docs, Markdown pages, etc.)
  3. Create databases of pages with column property types like text boxes, formulas, single-select tags, multi-select tags, hyperlinks, checkboxes, etc.
  4. Lets you create relations / references to other pages
  5. Locally hosted with data syncing, preferably open-source
  6. Works on Windows, Mac, Android, and iOS/iPad OS

Notion has most if not all of that (lacks proper GH integration or makes you pay for having more than one table get pulled from GH)
There's a few promising ones I could find on GitHub like AppFlowy and AFFiNE but they're both in extremely early alpha with very little in the way of functionality

blazing flax
#

Hey all, What's the correct syntax for specifying an exact version number within a setup.cfg? This is what I currently have but I'm guessing this is going to allow updated versions to be installed if available and that's not what I'm wanting. I've tried replacing the >= with both = and == but it doesn't seem to want to play ball, Anybody have any ideas??

install_requires = boto3>=1.26.24 pandas>=1.5.2 python-dotenv>=0.20.0 tornado>=6.2 websockets>=10.4 python_requires = >=3.11 package_dir =

hollow roost
#

in gitlab pipeline it says syntax is wrong

graceful light
# hollow roost

Not sure if you're aware but cat prints out the contents of a file
If you're just trying to print that private key (for some reason) then you'd want to do echo $DEPLOY_PRIVATE_KEY
And the same for the next line, you don't need cat there

#

You might also want to wrap that variable in quotes so it doesn't accidentally break on escape characters

hollow roost
#

ok

#

tahmks

misty magnet
graceful light
#

I mean I agree that printing the private key is most definitely not safe and unnecessary, but that's what they're doing their script
Seems they're saving the private key to a file to use for SSH stuff later and possibly printing out the key before hand to make sure it's correct as they're testing the code?

misty magnet
#

Yeah, I was thinking that. Debugging purposes.

rancid schoonerBOT
#

@rustic pawn Per Rule 6, your invite link has been removed. If you believe this was a mistake, please let staff know!

Our server rules can be found here: https://pythondiscord.com/pages/rules

loud bear
#

Is 2.0.0a7.dev13 greater than just 2.0.0a7?

rapid sparrow
loud bear
#

then its what i want

#

i just started using setuptools_scm

#

and it bumped the current 2.0.0a6 to 7

ripe cave
#

Hello, everyone, which server to choose to place the script there?

zinc oak
#

Hi everyone, I had Anaconda in my laptop and uninstall it (Anaconda creates its own virtual environmet). Now, I am facing issue in running python modules. I activated virtual environment in VScode and run a simple file there like import numpy as np. While numpy has been installed in VScode, after running the simple code (in the screenshot) again it does not recognize numpy. Any solution have in mind? Thank you

fallow smelt
#

My step #1 is to reinstall your OS from scratch.
So maybe wait for the next bit of advice.
But in that exact situation in the past, that has been my exact solution shrug

midnight roost
compact cosmos
lapis cloud
#

Hi guys, i have a certain python file that imports the module "jinja2", i keep getting the error ModuleNotFoundError even though "sys.path" includes the directory that contains the module.
any ideas?

compact cosmos
lapis cloud
midnight roost
harsh linden
#

I need to develop some programs/script for for my company which I need to distribute some remote computers with very scuffed connections. Some of them run Windows, some run Linux. The Python versions also differ. Since setting up virtual environments and catering to each computer's needs is too much, I decided to just package my scripts with PyInstaller which sounds promising. I guess I need to to use WSL when I want to bundle for Linux from Windows.

Furthermore, my company does not really use any tools for properly distributing things. So far, I was just SSHing into the computers and manually uploading my scripts. Then I adjusted the configs for that particular setup, created systemd services/timers or task schedules depending on Linux/Windows.

Are there some tools for me to automate this process, starting from the actual shipping of the files and creating the services/timers and task schedules?

harsh linden
#

Not sure if I understand correctly: Poetry and PyInstaller do completely differrent things, right? Poetry cannot bundle applications so they just run, right?

graceful light
#

Pyinstaller creates an executable for a given system (IE it makes an EXE of your app on Windows)

Poetry is a package management tool that handles creating virtual environments for your app, installing the necessary dependencies into that virtualenv (thus keeping your global environment clean), and it handles dependency conflicts (like when one package requires a specific version of another package, but the latter is not compatible with the version of Python you are using, among other conflicts)
Poetry also lets you package apps into wheels and publish them on pypi

harsh linden
#

So when I just want to make my scripts self-contained so that I don't have to bother with the in-and-outs of the target system, PyInstaller is the tool to use

graceful light
#

Correct - Pyinstaller will package the entire app into either an EXE with some misc files OR it can package everything into a single EXE
This also packages the related Python runtime needed to run your application so it is 100% portable

harsh linden
#

Is running it through WSL enough to build for Linux or do I need a proper installation of some Linux distribution to be able to actually build for Linux?

graceful light
#

It should be fine to run it through WSL

#

If your company uses GitHub then you can use GitHub Actions to deploy to the related machines
You can do a similar thing with GitLab's equivalent deployment scripts
There's also Ansible which functions similarly

harsh linden
#

If only it would 😔

graceful light
#

Yeah trust me I now the feeling, previous job used old versions of Jenkins and Ansible and both were a pain to work with

harsh linden
#

We don't even have an old version of that. We don't even have any version control at all. I just build my own local repositories whenever I write something.

rapid sparrow
# harsh linden I need to develop some programs/script for for my company which I need to distri...

Ansible can install stuff over SSH remotely in a modern way. it configures chain yaml idempotent instructions for it, and obviously works for multiple server targets at the same time.
And yeah, pyinstaller is one of choices, but mind u that essentially u will compile only for Windows Amd64 then (your current OS+Arch), and Linux Amd64 with WSL then?

It is important matching compiled OS + CPU Architecture.
That is if u have 32 bit/i386 Windows, this is another env
Windows Amd64 another env
Linux amd 64 another env
Linux arm64 is another env

#

python in general sucks for cross compiling regrefully. So Windows + WSL is the easiest choice to get two OSes for amd64 (which should be enough as all modern PC in 98% capacity usually amd64. Arm64 is macOS quirk, +Arduino-embedded stuff + some cloud specialized stuff)

#

i just developed with golang when needed cross compiling

#

it is natively capable cross compiling for... a very wide range of systems (as long as CGO is not required 😆 but even in this case it is solvable with reasonable difficulties)

harsh linden
#

Yeah, the more I read about packaging and bundling Python, the more I see that it just sucks at that

rapid sparrow
# harsh linden Yeah, the more I read about packaging and bundling Python, the more I see that i...

https://freshman.tech/snippets/go/cross-compile-go-programs/ check how easy it is for golang. Just a matter of changing ENV vars during build (when u don't use CGO. If u use CGO it is solvable nicely with 'zig cc' stuff)
total supported different cross compiling combinations out of the box https://go.dev/doc/install/source#environment

$GOOS    $GOARCH
aix    ppc64
android    386
android    amd64
android    arm
android    arm64
darwin    amd64
darwin    arm64
dragonfly    amd64
freebsd    386
freebsd    amd64
freebsd    arm
illumos    amd64
ios    arm64
js    wasm
linux    386
linux    amd64
linux    arm
linux    arm64
linux    loong64
linux    mips
linux    mipsle
linux    mips64
linux    mips64le
linux    ppc64
linux    ppc64le
linux    riscv64
linux    s390x
netbsd    386
netbsd    amd64
netbsd    arm
openbsd    386
openbsd    amd64
openbsd    arm
openbsd    arm64
plan9    386
plan9    amd64
plan9    arm
solaris    amd64
windows    386
windows    amd64
windows    arm
windows    arm64
rigid tundra
#

I hope this is the right place. Is there a way to build a 32bit exe while on a 64bit computer without going through something like vmware?

rapid sparrow
rigid tundra
#

Is there a python only way? Am I being too narrow for only wanting to use python?

#

What are the odds tho loll

rapid sparrow
rigid tundra
#

Thanks!

#

Is golang generally easy to pick up for this specific purpose?

rapid sparrow
rapid sparrow
rigid tundra
#

err building a 32bit compatible exe on a 64bit system

rapid sparrow
rigid tundra
heavy knot
#

Does anyone here use docker?

#

I want to know what should I name my Docker Account name

#

And whether it would be good to put something silly or my actual name

#

And will my account name be shared with other people

pine fern
#

@rapid sparrow

pine fern
heavy knot
#

I'm using poetry and I found isort, how do people set it up? Do people just install the vscode extension and it will use the settings in pyproject.toml?
What would be the point of installing isort through pip / etc then. Since seems that to use black formatting we do need to install it through poetry but doesn't seem to be the case for isort?

graceful light
#

isort is specifically for sorting your library imports that happen at the top of the *.py files
black is for following PEP formatting guidelines
They're related but do totally different things

#

Installing black and isort through poetry just means that they will exist in your poetr-created virtualenv. Inside that env you can call isort followed by black to pretty much do everything you'd need
As an aside, a lot of people also follow that up with flake8 to make sure there aren't any lingering issues in your code

#

I personally just use the terminal to run those commands but if the VS Code extension is easier for you then by all means use that instead

#

If you get to a point where you're developing DevOps automation, running isort then black then flake8 in that automation would be pretty standard

outer garnet
#

Hey guys, I was deploying my service on k8s, when I run the task locally (through a local celery worker) it works fine, but when I run the task in the deployed celery worker I get this error.

#

I have the same, with the same versions on python and dependencies

topaz aspen
#

I want to create something in bitbucket CI which will enable me to

  • setup a database
  • apply migrations to this database

for this i think i need two docker images, but I need those images to be able to communicate - I need the apply migrations part to be able to see the database image from the first part in order to make sure they work.

Any suggestions on how to go about this ? I'm not doing very well at googling - maybe because I don't know what the terms are

short peak
topaz aspen
#

(it's a postgres db fwiw - it's a timescale image)

short peak
topaz aspen
#

yea that's all - i don't need to network with an external db or anything for this tho

short peak
#

also consider that if you are not using "real data", data migration is not asure

topaz aspen
#

what do you mean ?

short peak
#

if the db you just setup in CI doesn't have the same data as the target database, you are just ensuring python scripts and schema changes. Sometimes data migrations also produce problems and without this "real data" you won't know ahead of time

topaz aspen
#

ah i see yea - i might add in some data at some point

#

another outcome will be to have these migrations applied then test out some API package on a database that has the migrations applied to it

#

but i can't apply migrations in ci atm ha 😬

topaz aspen
short peak
#

docker in docker is not recommended unless specific scenarios like docker development itself. Another options for these cases is blue-green deployments but definitely requiere a bit more of work to have it fully automated

topaz aspen
#

im not sure what you meant by network

short peak
#

docker network create my-awesome-django-app

topaz aspen
#

if i create different steps then they can't talk to each other - there's a way of creating a network within a ci process or something so they can all talk to each other ?

topaz aspen
short peak
#

kidding 😄

#

I don't know that 😄

topaz aspen
short peak
#

yeah, that's for the app to communicate to the db. When you create containers using the same network and a specific name, then you and access then via their names. e.g.

docker run --name my-db --network my-net db-image
docker run --name my-app --network my-net app-image
# wait until db is up
docker exec  my-app pgshell -h my-db```
#

testing CI/CD is painful though

#

that means the you need to dynamically change the db host during the CI/CD

#

I rather go directly to blue-green

topaz aspen
short peak
topaz aspen
heavy knot
graceful light
#

Aside from macro keys I don't really see how people set up automation for that within VS Code itself
Most people use the automation tools I mentioned previously

heavy knot
graceful light
#

In order of what to run first to last:
isort for sorting your top-level imports
black is for automagically fixing your formatting
flake8 and/or mypy and/or pytype for finding any errors and telling you about any remaining linting/formatting stuff that black didn't handle
typeguard for run-time type checking

#

Then on top of all that you van add unit tests that you can look more into with the pinned comments in #unit-testingbut you'll most likely be looking at pytest or the builtin unittest

heavy knot
graceful light
#

Those 4 tools are very similar but may report things differently, or some tools report things that others do not
It'd be better to look at their docs or related pypi pages

#

!pypi flake8

rancid schoonerBOT
graceful light
#

!pypi mypy

rancid schoonerBOT
graceful light
#

!pypi pytype

rancid schoonerBOT
graceful light
#

!pypi pyright

rancid schoonerBOT
pine fern
#

reduced a cold start issue from 30s to 5s. py_sun

#

wanted to get subsecond times but deploying ML models in lambda custom containers is kinda hard.

#

i hope i dont get asked to do this again. i kinda suck at it.

#

would rather just put up a sagemaker endpoint or something

pine fern
#
Amazon Web Services

Update (December 7, 2022) – Added additional information about pricing. Our customers tell me that they love AWS Lambda for many reasons. On the development side they appreciate the simple programming model and ease with which their functions can make use of other AWS services. On the operations side they benefit from the ability to […]

rigid tundra
#

Does anyone have any experience connecting to mqtt from outside of lan?

rigid tundra
# mystic void yes

How do you connect to it? I set my user and pass but it’ll say that the target machine rejects it

devout quail
#

Hello, Should I install Jenkins LTS or normal one ?

#

i wanna get started some simple stuff

lusty sky
rancid schoonerBOT
#

.github/workflows/deploy-pypi-on-windows.yml line 40

bump2version patch .\Cargo.toml .\setup.py```
`.github/workflows/deploy-pypi-on-windows.yml` line 43
```yml
#- uses: stefanzweifel/git-auto-commit-action@v4```
tawny temple
#

Are you trying to automatically bump the version number?

#

Also why are you using a force push? You really shouldn't be for the main branch

rapid sparrow
#

Today going to finish to state going more public.. although 0.3.0 version is already usable too, first development is almost finished

#

Main goal was to create CI friendly tool in addition

#

It assumes u save versions as git tags

#

It parses previous git tags and commit messages to calculate next version and changelog

#

It has part, helping u to enforce u write correctly git messages too

#

Within how u use, better to make github workflow with checkout of .git folder
And saving through git tag version of release in workflow too
And since u use fully automated CI way to release

I would recommend also using flag --build to which u add GitHub actions current commit hash or something additional stamp just to be sure for uniqueness. Not necessary but could be useful

#

P.S. force push should not be ever used to deploy releases

#

P.P.S. tool can calculate next alpha/beta/rc releases too

#

P.p.p.s. good idea to write automated GH workflow as example how it works during deployment pithink I LL do it tomorrow
I remembered to write only GH workflow for its validator run

#

P.p.p.p.s. for main functionality it does not need having installed git to work. It has inside inbuilt git (no need to have installed git in pipeline). I LL eliminate last non essential remains of external git usage tomorrow

lusty sky
lusty sky
#

if possible with bump2version

rapid sparrow
rapid sparrow
#

my solution was specifically made to be CI friendly

#

their is not, already checked code

rapid sparrow
rapid sparrow
#

What is there to check, except to unsee it

rapid sparrow
# lusty sky why?

it is bad idea to have tools autocommiting into your git repository :/

#

builds should be located somewhere outside of repo

#

main branch of commits should be used by developers only

#

it will not prevent dev workflow then

#

Anyway, here goes release of my product
https://github.com/darklab8/darklab_autogit/blob/master/README.md
CI friendly tool for automatic following of Git Conventional commit rules (standard for more descriptive commits)
Based on it, the tool generates automatically changelogs of new features and bug fixes for your product releases
and also calculates next semantic version your next product release should be having (you can choose to have alpha/beta/rc releases as option)

GitHub

Automated git conventional commits and semantic versioning - darklab_autogit/README.md at master · darklab8/darklab_autogit

lusty sky
rapid sparrow
lusty sky
#

yes exaclty

rapid sparrow
#

Fair point
UPD: Yay 😁, i got whole one star!

lusty sky
rancid schoonerBOT
#

.github/workflows/deploy-pypi-on-windows.yml line 43

#- uses: actions/checkout@master```
rapid sparrow
rancid schoonerBOT
#

.github/workflows/autotag.yml line 22

wget https://github.com/darklab8/darklab_autogit/releases/download/v0.4.0-a.2/autogit-linux-amd64```
rapid sparrow
#

It is binary file, why would it need packaging

#

It is self containing whole program without any dependencies

lusty sky
#

you probably do not understand my need

#

bump2version works for me

rapid sparrow
lusty sky
#

I just want to run a command to update code on each commit

#

from a workflow

rapid sparrow
lusty sky
rapid sparrow
#

Code should not be self committing itself

lusty sky
#

ah is it a bad idea?

lusty sky
rapid sparrow
#

Yes, it is bad idea

loud bear
#

i recently shifted to setuptools_scm

#

what files should i exclude in sdist>

#

i am excluding all git / github related files

crude furnace
#

Hi! I'm having a problem with the push command. Whenever I try to push changes from my local rep to a remote one, it gives an error saying that I have no upstream breach, but when I try adding it, it gives another error: " warning: could not find UI helper 'GitHub.UI' "

#

Idk if I did something wrong, but idk how to solve it

#

I tried to serach for an answer and I found that the problem maybe be in within the latest version of git and I should try installing the previous version

#

But i'm not sure if this is the answer so i'm asking here

meager osprey
#

Hi, I've recently seen myself needing to have multiple versions of Python for the work I'm doing, which has lead me to installing pyenv-win.

#

I've run into a small issue though.

#

I use VSCode almost exclusively, so I was trying to verify pyenv working from within VSCode.

#

However, when I try to run pyenv --version in the integrated terminal, I get the CommandNotFound exception.

#

Even weirder, if I open a Powershell terminal seperately and run the same command, I can get the pyenv version installed on my PC.

#

Is there any fix for the integrated terminal?

desert canyon
#

where does poetry put installed dependancies after i run poetry install in a directory with a poetry project in it?

#

this is the first time i'm ever running that command, and poetry seems to be doing some work downloading all the dependencies for my project, but at no point does it tell what it's doing with them nor am i able to run any scripts my project exports after running it

#

i've just been using poetry2nix so far, but i'm trying to set up a CI/CD on a windows machine and need to figure out how to do things with just poetry

#

i could probably export a requirements.txt with poetry and checkout that to the vcs, but i'd like to stick with as little intermediaries along the way as possible

#

and i'm losing my mind, cause searches like "poetry install destination" bring up questions about where does the poetry binary itself get installed to, not where the dependencies fetched from poetry install do, and the documentation doesn't mention that one either

desert canyon
#

oh, it just installs it to a virtualenv path

#

i thought it would be trying to put it somewhere like site_packages

#

but i suppose that would make less sense

rough hearth
#

@rapid sparrow sorry to bother you, i got into web scraping lately and used the book you recommended too, i can see now why u mean it's a powerful tool

unique violet
#

I am trying to do a multi-stage build with Docker so as to inject dependencies into an image, as follows:

FROM python:3.8-slim-buster AS builder
RUN apt update -y && pip3 install pipenv

WORKDIR /opt/build
COPY requirements.txt .
RUN bash -c 'PIPENV_VENV_IN_PROJECT=1 pipenv install'

FROM ...
WORKDIR /opt/app
COPY --from=builder /opt/build .
COPY ./my_project ./my_project
ENTRYPOINT . .venv/bin/activate && python3 -m my_project

For some reason, when I run with docker run -it ... I am getting an error saying that the libraries listed in my requirements.txt could not be found.

Any hint?

short peak
unique violet
rancid schoonerBOT
#

:incoming_envelope: :ok_hand: applied mute to @heavy knot until <t:1671961287:f> (10 minutes) (reason: duplicates rule: sent 4 duplicated messages in 10s).

The <@&831776746206265384> have been alerted for review.

broken crest
#

hello. I have a few questions for anyone familiar with Docker. I just need a sanity check on a process I'm thinking of using.

I have a Python package (a web app using Flask) and I want to include some built artifacts from Vite (JS/CSS/SVG/PNG, etc) in the distribution. I have a linear pipeline that is straightforward for the "package and ship" approach. It builds the frontend assets and dumps out a directory. I copy that directory into the package namespace at build time and it's included as package data. It's a single artifact to ship and I can access the assets from Python (with importlib.resources) or host them with Nginx just by extracting them from the distribution archive.

But I'm trying to set up a development environment that can autoreload off my local edits rather than running this whole pipeline. The concept I've worked out seems like it will be a horror show and I'm wondering if it's even worth pursuing. If someone's around to talk it through, I can explain a bit more. Thanks.

tawny temple
#

If you want to run the server in Docker during local development then I suppose you can if you just make a bind mount

broken crest
# tawny temple If you want to run the server in Docker during local development then I suppose ...

Thanks. I've considered a bind mount for the source directory, but want to avoid the containers modifying the contents of the mount (I could get into that, but for brevity I'll just say I've got justifiable reasons). Mounting the source directory read-only mode could work if I configure the Python and Vite builds running in containers to spit their artifacts out to another volume/mount. Unfortunately some tools like npm really want to put node_modules in-situ and wrangling it to avoid putting stuff where the source code lives is doable, but a PITA (--prefix flag could work).

#

Another option I've been thinking of is to set up a (Docker) service that watches the source directory and uses rsync or similar (when a change is triggered) to copy the source tree to a writable mount where tools can do whatever they want, but then I run into issues like rsync deleting generated things like node_modules

#

So my effort to simplify the process is complicating things greatly.

#

I'm leaning to just abandoning the entire idea of using vite build --watch and the flask dev server entirely, and using some Docker-oriented feature to run the conventional builds triggering off changes to the source directory, but I'm not sure what that would be.

#

I'm really trying to avoid inotify pong

#

So I have a number of paths that could work, but are varying degrees of hairbrained lunacy.

#

Looking for a pattern that that lacks that particular fault.

tawny temple
#

Sounds like you've thought through this quite a bit already. Those do seem like valid issues.

I think the constraint of not modifying the bind mount is very much at odds with using Docker for development.

tawny temple
tawny temple
broken crest
#

yeah, the read-only constraint is a major stumbling block and maybe I'm fighting it unreasonably.

#

I'll read up on that. I already use VSCode, so that's pretty sensible.

#

As to why I don't want it modifying my local dev code:

  • I switch between Windows and macOS and the code lives in Dropbox. That's why I don't want node_modules anywhere near those directories.
tawny temple
#

Code living in cloud storage instead of version control is a major red flag to me

broken crest
#

yes, there is a git repo and I'll commit code before swapping environments. I just don't want build artifacts being thrown in and the easiest way to stop that is read-only mount or using Docker's COPY behavior.

tawny temple
#

If you have a git repo then it's trivial to ignore build artefacts. And what would drop box be for then?

broken crest
#

Avoiding authenticating to a remote SCM in containers obviates the need to pass credentials into docker.

#

But you have a point. If a cloud storage system is creating a constraint, I could just not do that.

#

Mostly I'm prodding at this setup to see what I can give up that costs the least, heh.

#

I'm used to a bit more freedom than this.

#

I do use a git remote for the repo, and pulling from it on the workstation instead of using cloud storage is an option. I could also give up on the constraint to avoid secrets in docker and just use a proper secrets service (which Docker has).

tawny temple
#

Why would docker need to contain git credentials? The host can auth with git and clone the repo. Then the docker image build can copy from the host (I don't think this is even relevant for local dev since those containers will be getting source code from a bind mount anyway).

#

You could have the image build run the git clone, and that would require passing it credentials, but only during the build. They don't need to be saved in the image.

#

I've never tried it that way for a repo that needs auth though

broken crest
#

One value to is that you can automate releases and such with Docker. That's part of the project - trying to build my own pipeline (alternative to Jenkins or Github actions).

#

There is a need for secrets though. If I'm hosting Nginx, I'll need an SSL cert and such. So some way of getting secrets in is important.

#

Flask secret key, etc.

#

I was considering cloning my local dev repo into a volume as a bare repo which could serve as a common local filesystem remote for code in containers and my local workstation. It could even do things like stage up tags and release branches, closing them off entirely before pushing to the real remote SCM.

#

but that's more hairbrained lunacy.

#

Yes. So I'm struggling NOT to invent Frankensten.

tawny temple
#

I see, so I suppose a Docker container is the "host" and with that you'd run steps to build and deploy your application?

#

Building a pipeline service sounds like a difficult engineering problem, not one I have experience with..I would look at existing open source CI tools for guidance.

broken crest
#

The idea is that could build and host the entire thing in a single docker service - on my laptop, for example. Then ship the images/containers to run... wherever. If ever.

#

The pipeline isn't the challenging part - setting up Jenkins would be. And using a third party service for this (like Github actions) is a last resort, ideally.

#

essentially I want the following in docker:

  • The dev environment. I don't want to run code on whatever workstation I'm using (and don't want those containers touching that workstation any more than necessary). Hence the desire to run Flask and Vite in docker (and other tools that contribute assets like data files).
  • The "prod" environment. Where I can get the entire site rigged up and tested before hosting it somewhere (or only locally, if I prefer).
  • The pipeline - Takes a release branch, builds the artifact(s), installs them, runs tests, merges, cuts the tag, pushes it with the artifact. I'm comfortable with this just being a pile of bash scripts I trigger.
#

And oddly enough, the only thing that's presenting the hard problems is the dev environment. If I just fall back on making dev exactly like prod, abandon Vite and Flask dev server, this all goes away and I'm good to go.

#

But I feel like the second I introduce another dev, they're going to look at me and go "You ditched all the dev tools?"

#

Avoiding third party services (like Github actions) is mostly because I don't think I need them for what I'm trying to do and don't want to grow dependent on them. Maybe that's misguided. And I'm avoiding Jenkins because it's a behemoth and way overkill for what I need to do. And Docker would be an entirely adequate substitute anyway.

#

I realize I've built my own minefield here. But I have numerous paths out. I'm just looking for the path of least regret and clean ways others have solved a similar problem. I'm sure bundling built assets in a Python release is an age-old problem, and Docker being the best practice for this sort of thing, this ordeal must be a solved problem.

#

Thank you for taking the time to help talk it out. I'm wandering away for the moment. Will check back later.

light cedar
#

So I am currently trying to dockerize development environments of angular and spring boot applications. The main reason for this is that our clients do not, yeah I can repeat, do not want their applications to be upgraded to newer versions of java/js so we are facing developers devices with tonnnnnsss of security issues regarding old and not maintained anymore more development software. I successfully created dev environments with docker containers, the images that those containers run have the development software required for the development process so the devices do not have it installed. But the real issue with this is that the software is still required by our IDEs (vscode/eclipse (I fcking hate eclipse)) so they devs has lints/autocompletion/etc.
I found that Microsoft is testing a vscode extension to run Visual Studio Code servers on containers and allowing the IDE to connect to them (very similar on what they are doing with WSL) but Im stuck on thinking about a solution regarding Eclipse, any ideas on how to solve this?

storm phoenix
#

So i deployed a fastapi docker image on aws ecs succesfully but for some reason i cant access the public ip address, it saysthis site can't be reached.
I have tried disabling firewall, have added all traffic in security groups inbound and outbound

tawny temple
shy gazelle
#

hello

#

here would be the right place to ask for help in a bug that I have find it on PyInstaller?

#

I need to compile a script with all its dependency's in just one file to run it in zabbix

#

that which I'm trying to do was already done in the past, I can see a script that was compile that way and actually works.

#

When I run the command pyinstaller --onefile file.py.... I get the compile script but when I do run the compile script he shows me that some modules were not imported

inner matrix
#

Hello All,

Cross-posting from "programming-pedagogy. I'm trying to teach myself github best practices. I've confirmed the following as necessary topics to master:

  1. Enable MFA for the account
  2. Use branch protection rules
  3. Use a security scanner on your code.

I'm trying to learn more about #2. Specifically what I've done is I've created a github repository and pushed a project from my WSL machine. I then setup a branch protection rule with a name pattern that exactly matches "main" which is the name of my branch. I also selected "Require approvals" as set it to "1" and I've also set "Require review from Code Owners". After making this change I'm still able to push from my WSL machine as an anonymous "root" user. Therefore my questions are:

What mistake did I make?
What resources is anyone else aware of that I can use to learn github best practices?

rapid sparrow
#

A bit troublesome option since missmatch between libraries and node version can be at Dev machine, but i think it is acceptable solution

cedar heron
#

Im a beginner in Visual Studio and a beginner in Django.
I'm following a Microsoft tutorial and I'm stuck!
Haaalp! 😭😭💔💔

rapid sparrow
cedar heron
#

Hope this helps.

rapid sparrow
rapid sparrow
clever lagoon
vale wedge
#

Anyone aware of a minimal ci server that plays well with gitea?

clever lagoon
vale wedge
clever lagoon
# vale wedge I fail to see how that plays well with gitea

If you want to run your CI pipeline from a Gitea server, you can use GitLab's GitLab Runner software to host your runner. For testing, I use GitLab Runner for Linux, and it works well with my Gitea server.
It's the same product as GitLab's SaaS CI system, but self-hosted. They have a docker image for the Linux version on the GitLab GitLab Runner GitHub page. GitLab Runner is very easy to integrate with Gitea and GitLab's container registry. You just mount the gitea volume and you're done. Haven't done it in a while though.

Why do you fail to see how it plays well with a Gitea? Did you face issues with it?

vale wedge
clever lagoon
jagged badger
#

Hey guys, What's up? These days I fronted up a problem I couldn't get out with a good answer. I've searched a lot of StackOverflow questions, sites, and everything, but it all seems to give a glue answer. How can I manage/handle multiple editions (Community, Enterprise, Pro) of software in a Git Repository?
The answers I got said I should manage its editions on separate branches and keep merging back and forward between them. This answer had a lot of criticism of this method because Git was not design to have long-lived branches. Another one is to keep editions on separete directories. It's the same problem of copying code back and forward, but without the merge conflicts. I was looking for how Gitlab mantain its editions, but I didn't get any indication. It seems they have Enterprise edition as a subdirectory of Community, but I didn't understand how they build each one. Could you share your thoughts about this? Is there a right way to do this management? Thanks.

willow pagoda
# jagged badger Hey guys, What's up? These days I fronted up a problem I couldn't get out with a...

i dont have experience on managing different editions, but i do know that long-lived branches are common (e.g. your main and dev branches) so i dont see how Git could not be designed for them
as for a real example, CPython's repository uses multiple branches for the different versions they're maintaining (3.7 through 3.11), alongside a main branch where (i believe that) PRs are merged to first and backported afterwards
https://github.com/python/cpython/pulls?q=is%3Apr+is%3Aclosed

jagged badger
# willow pagoda i dont have experience on managing different editions, but i do know that long-l...

For this case Git works pretty well. It's the same code with different versions. What I mean is when I have a base code and need to change some piece of the code and add new features in the others editions. What will happen is a bunch of merge conflicts between branches of different editions. Maybe long-lived branch isn't the correct term here. I've spent a lot of time trying to figured out how to do this in a clear way. Nowadays I'm using multiple branches and it sucks. There must be a better way I haven't found it yet.

willow pagoda
# jagged badger For this case Git works pretty well. It's the same code with different versions....

i guess features are a bit more significant than patches, but with a reasonably organized codebase, maybe cherrypicking is sufficient for this? the two options im thinking of are adding all the features/patches into the base branch and cherrypicking them into their respective branches, or directly committing new edition-specific features in each branch and cherrypicking common changes from the base branch

#

and if common merge conflicts still happen, ive heard git-rerere can automatically resolve them for you after the first time

jagged badger
#

I'am really curious of how Gitlab is doing. It seems that CI/CD is doing the trick. Some kind of script running in a pipeline but I could find any script. I don't know if a bash script with grep, sed and etc don't solve hehe

somber lion
# jagged badger Hey guys, What's up? These days I fronted up a problem I couldn't get out with a...

I think for having multiple versions of the same application, it'd be better to try and keep them in the same repository, but then pick which edition you want when building. In like C++ you might use a pre-processor to strip the pro code when building the free version, but in Python you could potentially do the same sort of thing by ensuring most of the code is present in separate modules. Building the free version would deliberately exclude those modules, so they'd raise ImportError which you'd catch and then disable the button or whatever.

jagged badger
#

What tools is used in the building stage of CI/CD??

spiral bridge
#

I've got a code that needs to be able to download a group of files from some cloud storage location. Currently I'm already using Google sheets api for this program, is Google drive api the ?most suitable option or is there another better option I should use for this?

#

Also sorry if this isn't the best channel to ask, there isn't a dedicated api channel as far as I can tell

rough hearth
#

Terraform, Maven, Docker, Jenkins, and Kubernetes can work on windows and mac? or just linux

jagged badger
rapid sparrow
#

Docker is not OS cross platform technology yet. Aiming to be with WASM though

#

The rest of tech stack is even less cross platform in general

hidden narwhal
#

What are valid methods for implementing performance benchmarks/profiling as part of a CICD pipeline?

Rust has this

If I wanted to add performance checks to my CICD pipeline and monitor performance improvements/degradations for each commit, what would I do? I'm aware of profilers like cProfile and such, but I'm not sure how to get around the variance that would come with different build hardware etc. Any suggestions?

flat path
# hidden narwhal What are valid methods for implementing performance benchmarks/profiling as part...

Unless you have a dedicated server that you can tweak the hell out of (for stability), the best you can usually do is to comparative benchmarking (I just made this term up). So when CI triggers, you test the performance of some baseline revision (probably main or the latest release) and the target revision (the PR or a commit to main) and compare the two. You won't be able to measure trends across builds, but this will at least let you know whether a patch causes a performance improvement or regression.

lunar drum
hidden narwhal
# lunar drum I'm not sure I understand the scenario. If you are running performance checks in...

My understanding is informed from this article https://pythonspeed.com/articles/consistent-benchmarking-in-ci/

Which says that things like " GitHub Actions might hand you a completely different virtual machine for each workflow it runs."

Python⇒Speed

Running performance benchmarks can result in noise drowning out the signal. Learn how to get reliable performance benchmarks with Cachegrind.

lunar drum
# hidden narwhal My understanding is informed from this article https://pythonspeed.com/articles/...

Oh! That's true. In my experience, many production applications are hosted on docker or auto-scaling virtual machine clusters. The point being you wouldn't have that level of control in practice, so why worry about it in theory?

If you're in a situation like the SQLite team, where the .5% improvement/degradation in performance is critical, then yeah, I could see that now being a huge problem.

If that's the case, I think @flat path is on the right track. You could try a self hosted runner for the "benchmarking" step and run your profiler tests on that target environment.
https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners

hidden narwhal
#

Use case I'm thinking of is python code written to be called in aws lambda, so we're fighting the 15 minute lambda limit

opaque gorge
#

Gotta love windows github workflows. Spent 2 hours debugging this...

opaque gorge
digital lotus
#

I have initalized a repository on my local mahine, how do I add it to my github?

thorny shell
#

I think you have to use the github UI to create a repo, then copy the URL from that new repo into your local repo by doing something like "git remote add origin git@github.com/you/that-new-repo"

#

see where it says "skip this step" at the bottom? You gotta skip that step 🙂

#
🙂 [2022-12-31T07:33:06-0800][/tmp] % mkdir tess-ting
🙂 [2022-12-31T07:33:10-0800][/tmp] % cd tess-ting
🙂 [2022-12-31T07:33:11-0800][tess-ting] % git init
Initialized empty Git repository in /private/tmp/tess-ting/.git/
🙂 [2022-12-31T07:33:13-0800][tess-ting] % echo "Allo allo control tower? Lisbon plane taking off in 20 minutes" > the-file
🙂 [2022-12-31T07:33:43-0800][tess-ting] % git add the-file
🙂 [2022-12-31T07:33:46-0800][tess-ting] % git commit -m "My first file"
[main (root-commit) c4d639f] My first file
 1 file changed, 1 insertion(+)
 create mode 100644 the-file
🙂 [2022-12-31T07:33:52-0800][tess-ting] % git remote add origin git@github.com:offby1/tess-ting.git
🙂 [2022-12-31T07:34:26-0800][tess-ting] % git push --set-upstream origin main
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 280 bytes | 280.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:offby1/tess-ting.git
 * [new branch]      main -> main
branch 'main' set up to track 'origin/main'.
🙂 [2022-12-31T07:34:34-0800][tess-ting] % 
#

et voila

soft axle
#

Git question: I've managed to scuff up my history somehow when using PyCharm to edit a commit. How would I clean this mess up, and combine the two commits with the same commit message?

#

(this is on the main branch if that's relevant by the way, and yes I do know that committing to main is bad practice)

vale wedge
vale wedge
soft axle
vale wedge
soft axle
vale wedge
soft axle
vale wedge
soft axle
#

Okay, let's assume I've turned off all protections on the remote repository as necessary.

#

How would I actually squash the duplicated commits and the merges into just one commit?

vale wedge
#

That's part of git history editing tutorials and /or part of the ux of your ide

rapid sparrow
#

Squash joines/combines

#

Drop deletes

eternal gate
#

Is there any linter that will catch and warn/error bare exception raising? i.e. raise Exception("some error")

rapid sparrow
#

technically nothing prevents catching in libs too... but what would be the point

rapid sparrow
#

some kind of recursive "find blablabla" | exit 1"

eternal gate
eternal gate
rapid sparrow
narrow timber
#

Hey there, I hope this question is in the right place here … There is this package: https://github.com/kbr/fritzconnection One can install it via pip install fritzconnection and then run some cli commands provided by it. But, is it somehow possible to run it without installing it systemwide, just from within the project directory?

GitHub

Python-Tool to communicate with the AVM Fritz!Box. Contribute to kbr/fritzconnection development by creating an account on GitHub.

heavy knot
dreamy kernel
#

is there a difference between using the sync fork vs. deleting and reforking after a PR?

rancid raven
#

Hi guys I'm having an issue with docker, when we do multi stage builds, if i have a Dockerfile like this:

FROM base AS build
...

FROM base AS deploy
...```

Specifying the target as `deploy` does not execute `build`. I would like to execute these sequentially since build makes some files that deploy needs.
subtle quarry
#

i am looking for inspiration on how to install dataiku dss on gcp using terraform 🙂 thanks in advance 🙂

brazen forge
winter birch
#

Are there any BPMN tools in Python that can support business automation models for containers

barren matrix
#

Hey all

#

Ahm, where can I find the help section in here?

old thistle
#

How do you run a Dockerfile ? I tried googling it but it came up with docker load with a tar file? I copied a project with a Dockerfile and I assume the way to run the project is by somehow running the Dockerfile, which i don't know how to do

indigo zenith
#

If you're in a folder with a Dockerfile and eveything else it needs docker build . should do it. I usually add -t some-relevant-image-name so I'll know what the image is

#

that's just to build the image, then you'll need something like docker run --name some-relevant-container-name -d -it some-relevant-image-name to actually bring a container up

old thistle
#

Cool, thanks!

soft hound
#

(AWS) I have a process where every second Tuesday of the month I:

  1. create an EC2 from old AMI I created the month before
  2. run SSM to patch the EC2
  3. run CloudFormation that builds environment with new AMI
  4. other stuff

best way to automate steps 1,2,and 3?
in fact if I could automate step 2 to run like...at 5am or some shit, that would be dope

indigo zenith
# soft hound (AWS) I have a process where every second Tuesday of the month I: 1. create an ...
Cloud Computing

Learn how to launch an Amazon EC2 instance using Terraform with this step-by-step tutorial. Review core concepts including the Terraform AWS provider, the main.tf file and relevant commands.

rapid sparrow
#

Every second Tuesday of a month? pithink
I wonder if we can express it as Cron time

#

Clarify what u do under 4

#

Clarify if u expect automatically self destruct this raised instance after job is over

soft hound
devout lodge
#

Hi 👋
Is there a way to make this command python setup.py bdist_wheel --universal upload -r server-1 upload to multiple local pypi indices ?

devout lodge
#

Or what's the best way to mirror pypi index, so that uploads to an index gets mirrored to other indices ?

lusty forge
#

I've created a dir full of kubectl manifests, currently 4 in kube/postgres for my db, and one in kube for my Discord bot. Running sudo kubectl apply -Rf gives me: dan@ubuntu-2gb-ash-1:~/Overseer-Beta$ sudo kubectl apply -Rf kube deployment.apps/bot unchanged configmap/postgres unchanged deployment.apps/db unchanged persistentvolumeclaim/postgres-pv-claim unchanged persistentvolume/postgres-volume createdBut oddly enough this gives me two bot instances, and everything ends up stuck on Pending: dan@ubuntu-2gb-ash-1:~/Overseer-Beta$ sudo kubectl get pods NAME READY STATUS RESTARTS AGE bot-5d7d84f75d-dfxfm 0/1 Pending 0 60s db-b97b9b945-wzhrs 0/1 Pending 0 60s bot-54b8f65b47-xpbkz 0/1 Pending 0 60s

rapid sparrow
#

Solid option would be using Helm btw.
Helm automatically removes previous applied group of manifests

#

Helm is like Python package uniting multiple Kubernetes manifests

#

Together with Skaffold to simplify its applying, it is very enjoyful to use

bold elbow
#

I'm trying to package a project using hatch and I'm trying to include some json files in my package, I'm not exactly sure how to do this, I see the shared files option of the wheel builder but that sets up the assets globally for the environment, here's my project structure

pyproject.toml
src/
  gpt_assistant/
    __init__.py
    __about__.py
    main.py
    model.py
    api.py
    plugin_manager.py
assets/
  message_schema.jsonc
  response_schema.jsonc
  sample_response.json
  sample_schema.json
lusty forge
faint umbra
#

👋 has anyone worked with the PyGithub library that has some insights into how you can get a Github App working and connect to an installation of the app without having to tell it a specific repo?

ex:

integration = GithubIntegration(integration_id=GH_APPID, private_key=open(PEM_FILE).read())
installation = integration.get_installation(GH_OWNER, GH_REPO)
access = integration.get_access_token(installation.id)
g = Github(access.token)
org = g.get_organization(GH_ORG)
...

i can't seem to get to a point where i can get an object of my organization without having to specify a random repo, which seems odd. like i could just give it a random repo, but it should be installed as "any" repo on the org, so why would i have to supply it with a repo?

rapid sparrow
#

fully fledged one should start from 2 GB probably

#

1 GB can be for smaller kube versions, microk8s/k3s

#

since they work on Sqlite3, they take less ram

lusty forge
#

Aye, I'm using k3s. I seem to have found the issue, mismatched volume claim names and adding mountOptions when not supported.

#

The replication is a huge pain in the ass though, it's impossible to remove existing pods when the one you delete is instantly inserted in its place. Can this be disabled?

rapid sparrow
#

kubectl get deployments, or smth like this to see them

#

Existing deployment can be scaled to zero without deleting if desired

lusty forge
#

Ah I see, seems like kubectl delete -n namespace deployment deployment works to delete the pod.

lusty forge
#

Does K3s support local images? I ran docker image build . -t overseer-bot on Windows, and then provided this image with a pullPolicy of Never yet it says there was an error pulling it

rapid sparrow
heavy knot
#

IS this about hacking?

desert viper
#

'Error: Invalid value: File does not exist: ./app/app.py >>>> #!/bin/bash
streamlit run ./app/app.py

#

app.py is inside rootfoler inside app folder

rancid raft
lusty forge
sly sleet
soft axle
#

I've got a strange issue with Git/GitHub - how do I pass a required status check for a commit which hasn't been pushed yet?

#

I was under the impression that this would be for pull requests only

#

oh never mind, I can't read :p

#

in which case, I'll correct my question - is there a way to only enforce this rule for pull requests?

winter birch
#

Are there any python 🐍 based reporting or analytics tools and business intelligence software that are free and open source

rapid sparrow
winter birch
#

Any software framework that is available on GitHub and can be used to develop analytics and reporting tools using python 🐍 as the backend

rapid sparrow
#

It is too broad word

winter birch
#

Yes I get that

rapid sparrow
#

Provide any example or smth

winter birch
#

Maybe 🤔 I will ask again after a day or two

#

For now I have no clue either

#

Even non open source should be enough to understand what kind of tools are there

rapid sparrow
#

All right. Let's simplify it. What kind of data u have, from which u want to extract analytics

winter birch
#

I found something called Domo and Dundas

#

It’s a ERP and workflow kind of data that requires some dashboard, analytics and reports to be made

summer maple
#

Can someone help me make my selenium bot faster, I think it works just not fast enough when it sees something it needs to click.

lethal mantle
#

I hate git

rapid sparrow
#

You probably just don't know how to cook it

bleak iron
#

git is good

rapid sparrow
bleak iron
#

ya

#

@rapid sparrow btw do you have any config recommendations for vscode to make it more useful

#

i am used to pycharm and it feels like what i have set up right now doesn't give me many insights on what's wrong with my code before i run it

rapid sparrow
rapid sparrow
bleak iron
#

is there any extension that lets me know if i what i typed for a function / class use from another library matches the expected type signature?

bleak iron
#

that's basically what i want, for my editor to yell at me before i run

#

oh cool!

#

thank you 🙏 you've been very helpful

#

do you have any thoughts of vscode + neovim extension vs straight vscode for productivity?

rapid sparrow
#

Also heavily recommending pydantic models. It gives run time ensured typing checks. Perfect data carrier

bleak iron
#

our project uses pydantic, seems pretty good

rapid sparrow
bleak iron
#

there's some performance issues with pydantic for the IoT work we're doing, but for validating our pipeline in development and in prod we still use it initial data type validation for sources

rapid sparrow
bleak iron
#

this code was initially written by a bright data scientist i am working with, but we're slowly optimizing it

#

I want to change most of the code to golang, as i don't think most of it belongs in python

rapid sparrow
#

When using static typed languages like Golang, finally code architecture, Refactoring, TDD. Everything works correctly and easy in good typed language

And parallelism is so easy to use

bleak iron
#

So one particular thing I am curious about is I want to leverage some sort of structured streaming approach like in spark

#

because we have these various data sets that have different precisions and semi overlapping records that come at different times

#

that way we can emit records out as we patch the merged data set from multiple sources

#

Does this functionality exist within golang?

#

I am not sure if you know if golang has this functionality to merge streaming sets and emit a new record in an efficient way

#

The idea is basically this, you have source blue and source pink, which overlap at purple

#

You want to output a record whenever blue or pink change of the combined blue and pink data set

#

(ID, attr1, attr2), (ID, attr2, attr3) -> (ID, attr1, attr2, attr3) as an example

#

with each parts changing at different times

rapid sparrow
#

Sets do not exist in Golang though. Only maps(dictionary).
U would have to implement sets based on maps or finding set library

bleak iron
#

we use kafka as our message broker so you're not far off

rapid sparrow
bleak iron
#

at time t1 Blue provides the record {"id": 1, "attr1": "dolphin"} no combined record is created
at time t2 Pink produces the record {"id": 1, "attr1": "monkey", "attr2": "silly"} the combined record becomes {"id": 1, "attr1": "monkey", "attr2": "silly"} with time of t2
at time t3 Blue provides the record {"id": 1, "attr1": "dolphin"} the combined record becomes {"id": 1, "attr1": "dolphin", "attr2": "silly"} with time of t3

#

i guess my hesitation to move to golang is what support does it have for stream processing

rapid sparrow
bleak iron
#

As there was no previous history with Source pink emiting a record would result in unknown data for attr2

rapid sparrow
#

Ah. Attr2 is required.

bleak iron
#

Just as an example

#

It's a common pattern for our data

#

A lot of this is easy to handle with historical records, you just iterate through, but doing it in real-time without a library seems like we'd be giving up some guarantees

#

so TLDR, what do people use for stream processing in golang and what does it provide

#

I barely understand the golang ecosystem so it's hard for me to know if I should jump to it

rapid sparrow
# bleak iron i guess my hesitation to move to golang is what support does it have for stream ...

Streaming and time series databases are language agnostic, and other dbs

Just a matter of checking if library was written for language X. Usually golang is among supported for any kind of infra stuff.

Be it time series databases timescaledb, Kafka or anything else. 🤔

With stuff like that I did not work though.
Depending on amount of workload, i suspect even stuff like AWS DynamoDB can be used in your case 😐

#

Surely full support to all stuff like this should be present in Java though. It is static typed too xD and way older and library rich

rapid sparrow
bleak iron
#

Scala would support what we need, I am just not sure about introducing a FP language into a team with no FP experience

rapid sparrow
#

That is main reason I managed to persuade using it. We are deep in AWS Lambda and step functions

bleak iron
#

We're going to be migrating to Azure, though I'd prefer AWS, and golang isn't well-supported

#

Neither is Scala haha

rapid sparrow
bleak iron
#

I think FP gets a bad rep because a lot of FP devs like to write cryptic stuff

#

good news is scala supports FP and OOP, but again i'd be the only one with FP experience

#

and picking a language for spark support seems yuck imo

rapid sparrow
#

Scala i haven't seen among adopted languages for backend at all. (No infra integrations)

I think it is choice only between Java, C# .net Core and Golang today
Among backend static typed languages with ecosystem supports to databases/monitoring/logging systems

bleak iron
#

Right

#

The ideal would be Golang + AWS + some golang streaming processing library

rapid sparrow
bleak iron
#

this is a good list

#

thank you

rapid sparrow
#

Stream processing section is present there 😁

#

U a welcome

south forum
#

Hey guys,
Has anyone of you ever worked with Dryscrape?
(I get an error after installing and trying to run the "tutorial" scraper.
"in init self.driver = driver or DefaultDriver()"
"FileNotFoundError: [WinError 2]")

Or else what would be the fastest way to scrape a js website. ( selenium is way to slow)
Thanks

loud bear
#

Are single file script projects deprecated?

#

Seems unnecessary to me to make a folder and put the same code in __init__.py instrad

dusty swallow
#

deprecated by who

#

who is the authority in project setups?

loud bear
#

I vaguely remember reading something like that in setuptools docs

dusty swallow
#

oh you mean if you want to publish a package?

loud bear
#

Yes

#

If its just a single file can I just avoid the src or the code folder?

#

And put the script at project root?

dusty swallow
#

I haven't ever tried to create a single file package so I wouldn't know sorry

#

I don't see why you couldn't though

hearty torrent
#

hey, which category in this help area does selenium go into in this topical chat/help area

rapid sparrow
rancid schoonerBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

rapid sparrow
#

Ensure u use it for appropriate.. things

hearty torrent
south forum
#

hey guys

#

what could be the reason for not finding an element By Xpath.
I block till parent element found and have copied the xpath from website.
Still I get
"Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id='root']/div[6]/div[1]/div/div[4]/div[1]/div[5]/div[3]"}"

rancid schoonerBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

rapid sparrow
#

Web scraping is often against TOS, unless proven otherwise

south forum
#

ok

alpine horizon
#

The currently activated Python version 3.10.7 is not supported by the project (>=3.70). huh?

#

3.10 is bigger than 3.7,so it should be supported

rapid sparrow
alpine horizon
#

oh fucking hell

stone kestrel
#

the most satisfying feeling is when your code works on the first try

subtle quarry
stone kestrel
#

that too yep

unique sage
#

anyone use any of the sugarcrm packages, i can get none to work

midnight ember
#

Hey not sure if DevPi falls under development tools but it is my best guess: I am having some issues with configuration(I think) on the server everything works great with the global index set to:
http://localhost:3141/root/zeuspi/+simple
but on other machines I can't get pip to work. I have tried:

http://172.31.94.115:3141/root/zeuspi/+simple```
but both fail with the error
    ```ERROR: Could not find a version that satisfies the requirement six
    ERROR: No matching distribution found for six```
The package install works fine on the server so I know the upload works fine.

For authentication it is default username of root with no password since the network is isolated. Not sure if this is something wrong I have on my devpi server or the client machine any help would be great if someone has familiarity. I have checked the network path between the machines on port 3141 all looks good there.

This is an isolated private repo so no mirroring of pypi it is clean with only selected packages approved with no backup.
rapid sparrow
#

or also... missing pithink list of available dependencies unable to download

#

missmatching some global dep also can be

midnight ember
rapid sparrow
midnight ember
rapid sparrow
midnight ember
modest storm
#

hey i need help on this code i have been working on, im trying to make the output text that displays on screen a variable that is saved to a list and then is showed as a history in the output any help would be nice

#

pls dm me if needed fuller description or code to help you understand or debugg

rapid sparrow
# modest storm pls dm me if needed fuller description or code to help you understand or debugg

see #❓|how-to-get-help and https://pythondiscord.com/pages/resources/guides/asking-good-questions/ plus you can read dontasktoask.com
provide detailed information about your requests, otherwise nobody will help you.
write: What you think you were trying to achieve, then write reason why you was trying to achieve, code examples what you already tried to do (text only, screenshots are really bad). And everything should be in public channel or post in #1035199133436354600

marble ledge
soft anchor
#

git question: is there a way to sort of rebase a branch but also keep where it used to be?

soft anchor
# soft anchor git question: is there a way to sort of rebase a branch but also keep where it u...

[solved] git cherry-pick main..feat-a

* d9fb18a (HEAD -> feat-b) second commit on feat-b
* 88cef9b first commit on feat-b
| * 0c2fdfe (feat-a) second commit on feat-a
| * e4bd4e1 first commit on feat-a
|/  
* c830d66 (main) second commit on main
* 299d773 first commit on main
* 06fb063 (HEAD -> feat-b) second commit on feat-a
* 7818dd5 first commit on feat-a
* d9fb18a second commit on feat-b
* 88cef9b first commit on feat-b
| * 0c2fdfe (feat-a) second commit on feat-a
| * e4bd4e1 first commit on feat-a
|/  
* c830d66 (main) second commit on main
* 299d773 first commit on main
hardy jay
#

Can I use Selenium to automate filling out a form on a webpage?

lean bison
novel sinew
#

That being said, if there's no Javascript involved but it's a simple form, Selenium is probably an overkill

hardy jay
#

@light seal @lean bison @novel sinew Is it possible to have it run automatically? Like on a virtual machine or something? It basically just needs to go to a website, and enter in information to download a report

real hedge
#

Does python have a bulitin that will report method usages across python application?

#

I'm curious how often devs are using the std lib over external libs

tawny temple
#

There is sys.settrace but it's fairly low-level

empty rover
rapid sparrow
rough nova
#

Any one can support in python asn1tools, we used it for decoding binary streams but it takes too much time for decoding which affect on performance

steel vapor
#

Hi all - got a Python script that is using multiprocessing and taking forever on my laptop as I need more cores. Anyone know the cheapest service that I can run Python scripts online? Preferably one that runs based on CPU usage rather than hours if that's a thing?

short peak
steel vapor
rapid sparrow
# steel vapor Thanks, checking out DO now.

CPU usage instead of hours is a thing. Biggest providers have like AWS (and GCP/Azure), it is called AWS Lambda in AWS
but AWS is expensive.

Cheapest amount of Core per price is given at Hetzner (but its hourly)

iron falcon
#

Raw cores / CPUs are not always the problem... it could be other things. Did you profile your program to see where all time is spent?

short peak
#

DigitalOcean has its own version for serverless

#

though I'm not sure if serverless approach can provide flexibility to set the amount of cores

#

I found AWS documentation better than DO but I found DO pricing more predictable than AWS

steel vapor
#

I've gone from 400 items per second to 12,000 😮

blazing gyro
#

Hey guys

#

Anyone is open to work on a custom module for ansible?

rapid sparrow
novel sinew
shadow crow
#

What's a good way of making a pros-and-cons list in MkDocs Material? Is there something built-in?

heavy knot
#

Can someone help me with my requests?

#
import requests

url = "https://panel.socialheaven.xyz/api/v1/"
key = {'key':'7HUq1G5E6tVoIE5ikevj'}
action = {'action':'add'}


x = requests.post(url, json = key, add, )

print(x.text)
mystic void
astral apex
short peak
#

hey. I replied this question in telegram 😄

finite fulcrum
#

For what reason would docker compose build an image after it successfully pulled it? I defined build in the config for the service to get rid of having a separate script for it, but now in CI where it has a separate build step that publishes it with a custom tag and the run/up has that tag in the config override, compose both fully pulls it and then builds

tawny temple
glossy valley
#

Anyone here have a recommendation for semi-budget keyboards for development and gaming?

slim maple
#

and also your preferences

opaque thicket
indigo zenith
indigo zenith
# opaque thicket what is the best way to extract a list of URLs on a website, specifically on a b...

There are all kinds of existing tools that might fit your requirements, here's a really simple one: https://hackertarget.com/extract-links/

If you want something simple but customizable, a Python script with requests and re might be sufficient

finite fulcrum
tawny temple
flint ruin
#

Hello guys, i hope this is the right channel

#

I would like to connect to my jupyter lab remotely from a server like ovh or something else

#

how to do it ?

gentle solstice
#

You should use urllib.parse.urljoin

thorn portal
devout lodge
#

Anyone aware of any PyPi Cluster setups ?
We are looking to setup a HA Local PyPi Index
or a solution to upload package to multiple servers is fine

fluid token
#

Should I let my Docker related files (Dockerfile, .dockerignore) to be committed to my private GitHub repository? I think I need them since I have a GitHub "Action" set up, that builds a Docker image and uploads the image to ghcr.io on push. But I am not sure if this is the ideal way of doing it.

rapid sparrow
#

you are not supposed to commit only resulting docker image 😆

#

(they can be saved locally as docker save image)

#

docker images are supposed to be saved only to docker registries (docker hub, or AWS docker registry and etc)

fluid token
#

Ahh I see lol, thanks so much! plus1

#

One more question, I have been getting error at the "Build and Push Docker Image" step of my workflow file

#

It looks like it's failing to build the docker image, I'm not sure why that could be.
All of the steps above it seem to be functional.

#
name: Build and Push Docker Image

on:
  push:
    branches:
      - master

jobs:
  build-and-push:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Code
        uses: actions/checkout@v2

      - name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Set Owner Name to Lower Case
        run: |
          echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV}
        env:
            OWNER: ${{ github.repository_owner }}
      
      - name: Build and Push Docker Image
        uses: docker/build-push-action@v3
        with:
          context: .
          push: true
          tags: ghcr.io/${OWNER_LC}:latest
#

This is what my workflow file looks like ^^^

rapid sparrow
#

github has different syntax for how variables are written

#

{{ I.dont.remember.what }}

#

if you would have used run: to write command, u could have used shell way to insert variable, due to it being shell

but u are at the moment in pure Github Actions syntax, which has different mechanism

#

ghcr.io/${{ github.repository_owner }}:latest will work

fluid token
#

Ow that makes sense. I'll try ${{ OWNER_LC }} and see if it makes a difference, ty!
I didn't research how actions work enough and here's the effects of it heh, sorry for the trouble.

rapid sparrow
#

variables in jobs are available only as
predefined variables like example above
or it has certain mechanism like ${{ steps.url.outputs.url }} to input variables. i did not get too much how they are created in previous steps of jobs
well, or passing secrets like ${{ secrets.bla}} is possible too

fluid token
rapid sparrow
#

well, read the official docs of GH about variables 🙂 github has its quirks

fluid token
#

Ah, it really does, ty for the help! ^^

#

I should've learned how the thing works at all before diving into it :hidethepain:

gleaming forge
#

So I may or may not have accidentally disable SSH on a digitalocean droplet I'm hosting a website on. How on earth do I get back in to enable SSH again 👀

gleaming forge
#

Nevermind all good now

#

There's recovery options provided by digitalocean

gleaming forge
#

Question for those familiar with uvicorn, how do I specify a file in a different directory when doing something like bash uvicorn main:app --reload What if I wanted something more like ```bash
uvicorn "directory/subdir/main":app --reload

#

Just because I want my working directory in a specific place

rapid sparrow
rapid sparrow
gleaming forge
#

ah true didn't consider that, yeah that should work just fine

#

cheers

solemn osprey
#

How do you go about health checking scratch-based docker containers?

rapid sparrow
solemn osprey
#

Will probably do that, thanks

gleaming forge
#

Quick question. So I've got a digitalocean droplet running a webserver, having a little trouble getting my domain name to correctly serve the webpage though.
So I've got a basic config file for nginx that looks like this server{ server_name <server_ip_here>; location / { include proxy_params; proxy_pass http://127.0.0.1:8000; } }And I'm just running a little fastapi app using gunicorn and uvicorn like so```bash
gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app

On the digitalocean side of things, I've got my domain setup and it seems to be fine as seen in the image. However, when I try to access the site via the domain name instead of just the IP I get the default "Welcome to nginx!" page instead of the webpage I expect, using the IP directly works fine.
I assume this is just some nginx configuration thing I've skipped over since I'm reaching the default nginx page
rapid sparrow
gleaming forge
rapid sparrow
#

u can make it listening to different domains at the same time, and redirecting to different server configs

gleaming forge
#

Yep gotcha

#

Thank you

#

Hmmm, when I remove the server_name instruction it's just serving the default "Welcome to nginx!" page. For both just manually entering the IP and when trying to use the domain

gleaming forge
#

Yeah weirdly even if I try add my domain as well as the IP in server_name it then doesn't work with either, whereas just the IP would at least work when entering the IP in a browser

quartz grove
#

apologies if this is the wrong channel but, how can i prevent autodoc/docutils from adding the <em> in sphinx

it does not do so if i manually use Optional[:class:`int`] but that is unnecessary when it can read from the signature

gleaming forge
last hearth
#

is it possible to disable a plugged i usb storage device with python?

wraith sparrow
#

I am using PyCharm as it seemed to have the most features, is that accurate or are there another IDE with more features?

#

I also liked it as it works with github copilot

slim maple
#

If you just need an editor vscode would do

wraith sparrow
#

or are they the same thing

short peak
true vapor
short peak
true vapor
short peak
true vapor
#

devcontainers, and debugging that is

short peak
#

I didn't say harder or easier. I said click based vs. text based as a difference

alpine horizon
#

whats the best AWS product for launching a python script every once in a while?
basically smth like crontab, and its gonna run maybe once a day for a few minutes

#

and there is no need to store any state permamently (other than the script it self...)

short peak
rapid sparrow
alpine horizon
#

so the Lambda is like a "one time use" EC2?

rapid sparrow
alpine horizon
#

oh I see, thanks for exaplaining that

#

do you have any idea how much does it cost if im using say 30 minutes of CPU time a month for a Python script?

rapid sparrow
#

AWS resource calculator can be opened. Official thing at their site for calculations like this

alpine horizon
#

lemme try that, thanks bro

stable sinew
#

.

#

@heavy knot what do you think?What might be the problem with that stuff.

heavy knot
#

I have no clue. I'd repost your question here and maybe open a post in the help channel.

#

also have you tried to look up the warning you are getting?

stable sinew
#

yup it is saying that i have no github

heavy knot
#

but you just made a new repo

stable sinew
#

which isnt true because i set the mail id and also the repository from where i cloned the stuff.

heavy knot
#

hmm have you set the uername and email config in git?

stable sinew
#

yup i already configured it

heavy knot
#

Well repost and hope for the best. I might also consider trying a linux / ubuntu server.

rugged hare
#

can you show the problem again?

stable sinew
rugged hare
#

hmm, sorry, i don't know what a UI helper is for.

stable sinew
#

hmm.

#

this shitty stuff

heavy knot
#

iused a temp token on my API

heavy knot
#

someone know what i must delete to log out from steam?

knotty osprey
#

I've recently added a dependency from a private git repo and I'm not sure how to get it working with docker.

Initially, I just used the ssh URL of the repo locally in my pyproject.tom since I have a key, but I'm running into an issue where Docker doesn't have a key and can't access the repo.

What's the most secure way to clone the dependency with either the SSH or HTTPS clone link? The most obvious solution to me is to just put an access token in a secret environment variable and pull that in with the requirements file we export and use for docker deploys, but we manage dependencies with Poetry and a pyproject.toml file and I'm not sure how to use tokens from environment variables there. Poetry's docs do mention using environment variables for private PyPi repo authentication, but we don't have a repo, we're just pulling directly from the git repo.

last lion
#

i got a question, i have a github repository, created it using 'share project on github in pycharm, that repository is long gone and i dont have access to it anymore how can i commit to that repository again, because i used to commit using commit button in pycharm

rapid sparrow
charred sigil
#

Is there a way to populate the input field of a terminal with some python library? Maybe subproces? By input field I mean the where you type your commands. I want to execute a python script and have it populate the terminal with a command, BUT does not run it

rapid sparrow
alpine horizon
#

after I do poetry add smth is the package ready to use? do I need to do update or build poetry again?

rapid sparrow
ancient vapor
#

Hi guys

#

assume you subscribed for a product you can use daily for productivity purposes, do you think it's better if you receive a tip email once per day for a month or get all tips in a single email instead ?

tribal path
#

how would you commit a file without saving its contents to git? I have a repo with a few files that have private info to upload to github, but they need to be there to run the program

rapid sparrow
#

for home projects we can use more silly solutions like saving to encrypted git in public import parts 😆 git-crypt can do it. (less bothersome solution having everything in git xD not very secure though kind off though)

#

as advanced infra solution people also go to stuff like Vault (at least i hear it is kubernetes choice). Some kind of programmatic access secret storage... AWS Secret manager technically should be doing the same. Vault is just open source may be.

lethal mantle
#

vault is also not tied to aws

alpine horizon
flat lotus
#

I've seen many times that PDM is faster than poetry, according to benchmarks. Why? In my experience, this is usually related to the other tool just having less features.

But if someone here worked on either poetry or PDM: do you maybe know specifically why PDM is faster?

Note that I am heavily biased towards poetry because I've used it everywhere for the past 2-3 years so there is no need to explain to me that speed is not always the most important thing :)

alpine horizon
#

guys how can I set a windows enviroment variables from CMD ? (globally)

alpine horizon
rapid sparrow
#

echo $VAR then

short peak
#

has anyone replaced Docker with podman? can you share your experience?

golden kestrel
#

Guys how i can host my website in django on localhodst allowed only access on local?

#

I can use xamapp for to do this?

rapid sparrow
#

very cool makefiles in yaml. It works on inbuilt bash, so it will be same bash for you in windows too

alpine horizon
vapid fox
#

I mean, if they supply you with a VM, then everything's fine. What about free-tier friendliness?
@mystic void I'm mainly charmed by Azure's 200$ credit

mystic void
#

Beyond that, a VM is a VM

#

if you got the student credits, then explore and play with it. It won't hurt 🙂