* Changes in get_app fix path/cwd issues and order of resolving deps: py
-> dev py -> yarn
* Pass verbosity in setup_app_dependencies via get_app
* Say hi to new utils: get_available_folder_name, get_traceback
* apps.txt wasn't being synced in time so the build was failing, this
changes that
* Apps archived on the same day weren't being numbered properly...it
went from _1 to _1_2 and so forth. This is fixed to show _1, _2 and so
on
There was this bug that said `bench.utils.bench` doesn't have attribute
VERSION or whatever bench/__init__ was supposed to have. Now
bench/utils/__init__ had an `import bench` statement that was supposed
to ask for the top level module...but conflicted with the utils.bench
namespace. Changed the line in utils to `from bench import PROJECT_NAME,
VERSION` and it just works now...oh well
Other changes made were an attempt to cleanup and simplify the multi
level dotted path calls
* Instead of sys.exit, raise ValidationError
* Let's not handle BaseException, just Exception
* Use ValidationError instead of invalid syntax raise str
Using the `-m` flag, we can use any process manager instead of the
standard honcho. For instance, you've installed overmind on your machine
and are married to it, just run `bench start -m overmind` :P
Rename --frappe-branch flag to --version, both are allowed though. Cause
of rename: Makes more sense as version rather than frappe_branch. This
is because you can pass any git reference instead of just branches, including
version tags.
New methods added in Bench class:
* excluded_apps property
* shallow_clone property
* apps property - check if frappe app & sort
* sync: Sync the apps.txt file from the installed set of Frappe apps
* build: Build bench assets
* reload: Reload the Frappe processes - supervisor restart
New methods added in BenchApps class:
* add/append: Adding an App object to this, installs the app on the
Bench
* remove: Removing an App from here, uninstalls and archives the app
Methods available in the App class:
* get: Clone remote/local repos into set bench
* remove: Uninstall from env & move app into `archived/apps` folder.
Changed location from `archived_apps`
* install: Install app's Frappe, Python & Node dependencies on set bench
* uninstall: Uninstall Python package of the Frappe App. Does nothing
else...just a `pip uninstall`
* Although the utils refactor was done in such a way that there was no
need of changing import paths, a cleanup was due.
* Got rid of duplicated utils
* Remove unused imports
* Cleaner APIs - got rid of redundant and repeated checks
* Easier understanding on what's called where? ;) hopefully
* Separation of utils to avoid confusion
* Remove redundant utils
* Use newer standard library APIs
A year (longer) ago, I added color to bench manually. I hadn't explored
much of click back then. Had to figure out when we had to and we didnt
have to colour stuff. At times the chars would just be ignored and
rather printed to the terminal which was awkward...anyway, here,
goodbyetoallthat :cheers: (hopefully)
This was long time due. Removing software that won't be compatible with
this version of Bench is a no-brainer. Sorry for not posting this in
advance but the world has been moving too fast.
Use `pip install frappe-bench --only-binary='all'` to install the latest
supported version for your machine :D
Goals:
- Commonify bench operations in a way that intuitive
- Get rid of the multiple duplicate functions because it's so hard to
understand flow in the codebase ;)
- Eliminate the need to guess, re-guess and pass bench info in each
function that needs to do literally anything
- Increase my happiness index because I just realised that I'm the top
contributor of this project and I'd like to make it my own.
- Adopt the principles of Least Surprise & The Principle of The Bigger Smile (of DHH) [inspired by ruby & ror]
Changes:
- The bench module has Bench and the action classes that can be accessed
through the bench object
- Used the Bench class to access properties like sites, apps & run (to execute commands in context) to reduce effort and clutter
- Style improvements & minor changes included
* 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