* Added app dependencies resolving using `required_apps`
* Simplified workflow + docstring to explain what's goin on xD
* Get rid of redundant restart_bench kwarg from get_app
Why bother creating a bench well in advance? If someone wants to install
your app, they should be able to with a single command.
For instance, you can run simply `bench get healthcare` in any directory and bench will be setup automatically
* Less messier way of setting up and managing pre-fetched app meta
* Added support to fetch apps using the GitHub org/repo pattern
* Can be used to get apps and easily handle dependencies through version
identifiers
* chore: typo
* chore: update project description
* feat: command to install dev-requirements.txt
Often applications have development or test specific requirements which
are not required in production.
- Add new command `bench setup dev-requirements`
- installs all `dev-requirements.txt` in app's root folder.
* refactor: remove duplicate function
* refactor: use `log` instead of print
* refactor: merge dev-requirement command
* feat: install dev-dependencies in get-app if dev
When developer mode is enabled install all dev dependencies too while
doing `get-app`
* fix: warn about --dev not supporting node
* feat: set default version for easy install to v13
* fix: python version based version picking fixed and reverted changes to node version in installation script
* fix: revert test version
Co-authored-by: gavin <gavin18d@gmail.com>
These changes are valid only for Py3.6+ and will remove bench CLI
support for Python 3.5 and lesser.
* Converted to f-strings using flynt
* Manual conversion of failed cases
* Simplification of logic
If an unshallow clone has to be updated, the only way to update it
without a reset will require an unshallow. This is because there may be
uncommitted or committed changes in any of the apps, although unfavoured
should be handled safely. The only way to update such repos is via the
user configured settings..or a ff only merge.
Biggest bottleneck is in the validation stage which checks if the app is
installed on any existing sites on the bench. instead of triggering
multiple list-apps for each sites, do one for all.
Due to "WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly."
bench will attempt to read name and version from setup.cfg before trying
to access setup.py for details
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* chore: added deepsource config
* chore: updated travis config
* chore: updated travis config
* chore: updated travis tests for 2.7, 3.6, 3.7, 3.8
* chore: quiet installs and sudo easy install
* fix(tests): add mariadb versioning
* fix(travis): print compat for pyhton 3
* fix: drop deprecated function usage
* chore(tests): update test_init
* tests: update branch to use version-12 for testing and use git module
* chore: quieten git command outputs on branch switch
* fix: execute 'setup production' via cli
* style: sort imports
* chore: update mariadb variables in .travis.yml
* chore: seperate jobs for easy install and production setup
* chore: use exec_cmd to log command output
* chore: pin tests to ubuntu trusty
* chore: use playbooks to install mariadb
* chore: mariadb fixes in travis
* chore: pin dist to ubuntu 18.04
* chore: setup envs according by type of test
* chore: ignore auto backup, procfile, assets build
* chore: change app frammeclient to frappe_theme
* test: try travis_wait
* tests: update and restructure tests
* tests: restructure flow of setUp, tearDown
* fix: python class inheritence fix
* chore: use local frappe repo instead of remote pull
* tests: skip assets during get-app
* fix(tests): remove reinstalling app after get_app called
* fix(tests): updated test_install_app
* fix: broken remove_app
tests: broken tests
* tests: no backup while dropping new_sites
* tests: added certain tests and py obj fixes
* tests: seperate basic and production setup tests
* tests: update travis, remove basic setup
* chore: move from function calls to exec_cmd
* chore: tests fixes
* chore: removed sudo from basic setup runs
* chore: use "sudo" for setting up sudoers
* fix: allow get_app from local folder
* fix: use gitpython to switch branch instead of exec_cmd
* chore: use test to check for file existing
* chore: restructure bench tests
* fix: fetch app repo before checking for version upgrade during
switch_branch
* fix: gitpython error in usage
* fix: boolean return value of file_exists
* fix: dont decode file contents
* fix: bench names and close open files
* chore: update bench config multiple benches
* chore: check where production fails
* chore: mention python version for init
* chore: remove node production test in CI
* fix: compatibility and permissions fixes
* chore: setup sudoers after prod setup
* fix: set remote upstream after local clone
* fix: disable production via cli
* chore(tests): fix upstream link
* chore: split tests and remove unused imports
* renme build_asset_files tp skip_asset
* add overwrite flag
* move building assets to postprocessing
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
* renamed method pull_all_apps to pull_apps
* allow specifying a list of applications to be updated with:
bench update --pull --apps frappe,erpnext
* if no applications are specified, all apps present inside apps.txt
will be pulled
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
bench update assumes that erpnext is an installed app in the bench. This is a wrong assumption. This work around checks for the intersection of installed apps with the list ['frappe', 'erpnext'] and only attempts to get the current branch of apps that occur in the intersection. This way, if erpnext is not installed (very likely for those using frappe only to build their own apps) there wont be an error when get_current_branch is called for erpnext. The need to perform the kind of check being performed in validate_branch is a strong case for considering apps being able to add "bench update" hooks in their hooks.py
See this topic https://discuss.erpnext.com/t/bench-update-error-no-such-file-or-directory-apps-erpnext/56932?u=chude_osiegbu
* if a directory for the application already exists, provide user with 2
options:
* ask to remove the directory and reclone (overwrite)
* ask if the user wants to reinstall the application
* separate get_app_name from get_app
* move building assets and postprocessing to install_app method
* make formatting changes to the code for flake8
* use reload_module from six instead of builtins
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
"bench remove-app <app>" exits with TypeError on python3.7
converting the subprocess output to string fixes this issue.
Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>