Package: envswitch
A very simple GUI and CLI to manage environment variables.Project page :https://smarie.github.io/env-switcher-gui/Developer memo for QtDesignerArchitectureThis is a kind of MVC pattern wheretheViewis made of two parts: the static oneUI_MainWindow,
generated with qt designer, and the dynamic oneEnvSwitcherView.
It deals with the various widgets and popups.theModelis provided byEnvSwitcherStateand deals with the
configuration files and persistence.theController, or theApplication, is provided byEnvSwitcherAppand provides the Qt application boilerplate as
well as persistence of the application settings (recent edited
files).PyQt Code generationPrerequisite: install PyQt5, but warning: using pip to install pyqt in
anaconda root may compromise your global conda environment (see
`here <https://github.com/ContinuumIO/anaconda-issues/issues/1970>`__)* Rundesigner, save file as*.uifor example we use./ui/sprint2_dynamic.ui* Generate equivalent python file withpyuic5 ui/sprint2_dynamic.ui-oenvswitch/qt_design.pyWant to contribute ?Contributions are welcome ! Simply fork this project on github, commit
your contributions, and create pull requests.Here is a non-exhaustive list of interesting open topics:https://github.com/smarie/env-switcher-gui/issuesRunning the testsThis project usespytest.pytest-venvswitch/tests/You may need to install requirements for tests beforehand, usingpipinstall-rci_tools/requirements-test.txtPackagingPython wheelThis project usessetuptools_scmto synchronise the version number.
Therefore the following command should be used for development snapshots
as well as official releases:pythonsetup.pyegg_infobdist_wheelrotate-m.whl-k3You may need to install requirements for setup beforehand, usingpipinstall-rci_tools/requirements-setup.txtStandalone appTo build the executable distribution there is a separate setup file for
cx_freeze.The following command builds a distribution folder underbuild/containing all resources needed and an envswitch executable for you
platform.pythonsetup_cx_app.pybuildThe following command builds a .msi distribution for windows indist/pythonsetup_cx_app.pybdist_msiThe following command builds a RPM distribution for linux indist/pythonsetup_cx_app.pybdist_rpmThe following command builds a .app distribution for mac indist/pythonsetup_cx_app.pybdist_macThe following command builds a DMG disk image distribution for macpythonsetup_cx_app.pybdist_dmgGenerating the documentation pageThis project usesmkdocsto generate its documentation page.
Therefore building a local copy of the doc page may be done using:mkdocsbuildYou may need to install requirements for doc beforehand, usingpipinstall-rci_tools/requirements-doc.txtGenerating the test reportsThe following commands generate the html test report and the associated
badge. Note that in order for the test to succeed, you should create an
environment variable named ‘FOO’ beforehand, with random content.pytest--junitxml=junit.xml-venvswitch/tests/ant-fci_tools/generate-junit-html.xmlpythonci_tools/generate-junit-badge.pyPyPI Releasing memoThis project is now automatically deployed to PyPI by Travis when a tag
is created. Anyway, for manual deployment we can use:twineuploaddist/*-rpypitesttwineuploaddist/*