Package: valens
Valens/ˈva.lens/ [ˈväːlɛns]lat.strong, vigorous, healthyFeaturesTrack your training progressDefine training routinesLog repetitions, weight, time and rating of perceived exertion (RPE) for each setMeasure your training execution using a stopwatch, timer or metronomeAssess the progress for each routine and exerciseKeep track of your body weightCalculate and log your body fat based on the 3-site or 7-site caliper methodMonitor your menstrual cycle (if you have one 😉)InstallationThe latest release can be installed fromPyPI.pip install valensThe latest development version can be installed fromTestPyPI.pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ valensDemo ModeTo get a first impression of Valens, the app can be run in demo mode.valens demoThe app can be accessed onhttp://127.0.0.1:5000/. A temporary database with random example data is used. All changes are non-persistent. Adding--publicto the command line makes the app available to other devices on your network.Configuration and RunningA configuration file must be created before running the app for the first time.valens configThe environment variableVALENS_CONFIGmust be set to theabsolutepath of the created config file.Local NetworkThe development server can be used to provide the app for your local computer or local network.VALENS_CONFIG=$PWD/config.py valens runBy default, the app is only accessible on your local computer athttp://127.0.0.1:5000/. If you trust the users in your network, you can make the server publicly available adding--publicto the command line:VALENS_CONFIG=$PWD/config.py valens run --publicPublic NetworkThe development server is not intended for production use. Please consider thedeployment optionsfor providing the app in a public network.Example Configuration: nginx and uWSGIThe following configuration binds the app to/valens./etc/uwsgi/valens.ini[uwsgi]master=trueplugins=pythonsocket=/run/uwsgi/%n.sockmanage-script-name=truemount=/valens=valens.web:appuid=httpgid=httpenv=VALENS_CONFIG=/opt/valens/config.py/etc/nginx/nginx.conf[...]http{[...]server{[...]location=/valens{rewrite^/valens/;}location/valens{try_files$uri@valens;}location@valens{includeuwsgi_params;uwsgi_passunix:/run/uwsgi/valens.sock;}}}DevelopmentThe following software is required:Python 3Poetrywithdynamic versioning pluginRust toolchaintmux (optional)Setting up the development environmentAdd the WebAssembly target to the Rust toolchain.$rustuptargetaddwasm32-unknown-unknownInstall the Rust development tools.$cargoinstall--lockedtrunkInstall the Python project and development tools.$poetryinstallRunning development serversThe current codebase can be executed by running development servers for the frontend and the backend. The development servers will automatically reload when the codebase is changed.Start both development servers at the same time (requires an active tmux session):$makerunAlternatively, start the development servers for the frontend and the backend separately:$makerun_frontend$makerun_backendAfter a successful start of the development servers, the web app can be reached onhttp://127.0.0.1:8000.Building a distribution package$makedistDeploying the applicationInstallFabric.$poetryinstall--only=deployDeploy the latest distribution package.$fab-Huser@hostdeployLicenseThis project is licensed under the terms of theAGPL-3.0license and includesthird-party software.