-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
venv activation #17
venv activation #17
Conversation
updated docs.
Pull Request Test Coverage Report for Build 7738986943
💛 - Coveralls |
src/jukebox/components/rfid/hardware/run_register_rfid_reader.py
Outdated
Show resolved
Hide resolved
fixed absolute path in caller scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Progressive change, but I like the idea a lot! +1
This change requires a proper update mechanism, though. Otherwise you won't be able to execute this. So maybe this is not something for v3.5
|
||
# Runner script to ensure | ||
# - correct venv activation | ||
# - independent from working directory | ||
|
||
# Change working directory to project root | ||
SOURCE=${BASH_SOURCE[0]} | ||
SCRIPT_DIR="$(dirname "$SOURCE")" | ||
PROJECT_ROOT="$SCRIPT_DIR"/../.. | ||
cd "$PROJECT_ROOT" || { echo "Could not change directory"; exit 1; } | ||
|
||
source .venv/bin/activate || { echo "ERROR: Failed to activate virtual environment for python"; exit 1; } | ||
|
||
cd src/jukebox || { echo "Could not change directory"; exit 1; } | ||
python run_configure_audio.py $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this code a few times. Could it be abstracted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not very much sadly.
If we wanted to source another script, we still need the calculation for the project root, to access it.
And after that its only the venv activation. This could be extracted if we bother, to make future changes easier, but don't know if its worth.
Yes, i would also see this for the v3.6.0 release. As you state it, i think few have a problem with the current update steps already for v3.5.0 -> MiczFlor#2211 (comment) |
Warum eigentlich englisch... ist ja ein PR auf meinem Repo :D Wenn ihr sagt das Vorgehen passt und das sollten wir weiter verfolgen, würde ich die Änderungen auf den ursprünglichen PR MiczFlor#2144 commiten, damit weitere Kommentare da getrackt werden und erhalten bleiben. |
Wie seht ihr übrigends den Punkt? Sollte man es ermöglichen die Run Skripte auch in den Unterordner zu haben? Grundsätzlich wäre das wohl erstrebenswert, um ne klare struktur zu haben, und evtl auch mehr in python skripten zu entwickeln. Wäre natürlich schon etwas aufwand, und ich bin da in python auch nicht tief drin, um das genau zu bewerten.
|
updated docs path.
Wäre sicher sauberer strukturiert, aber ich denke das könnte man auch noch später machen, falls wir jetzt noch keine Lösung dafür haben |
closed |
POC für eine mögliche Strukurierung. Bisher keinerlei Test der angepassten skripte!
Wie im Kommentar hier beschrieben MiczFlor#2144 (comment)
run*.py skripte in die fachlichen Ordner verschoben.Vorerst rückgängig gemacht/installation/components
für rfid reader und audio/tools
für rpc und sniffer./
für jukebox