Commit Graph

184 Commits (28d512e54c80ef574394bbda6cf66911dc0d9a10)

Author SHA1 Message Date
Steve Penrod 5e6c1773e4
Unify the command line experience across platforms (#1784)
* Unify the command line experience across platforms

Interacting with Mycroft was slightly different on different platforms
(Mark 1, Github, Picroft), which resulted in confusion and the beginnings of a
documentation/support nightmare.  This moves several of the common commands
into a mycroft-core/bin folder instead of being build in packaging or part
of the Picroft package only.

This required a small changes to the common scripts, in addition to adding
the new scripts.  Here are details:
* dev_setup.sh
  - Stubbed out a setup wizard (TODO)
  - Jumped to latest version of pip (18.0)
  - Set execution flags for new scripts
* start-mycroft.sh
  - Allow auto-execution of dev_setup.sh
  - De-sourced the stop-mycroft.sh calls (not needed)
  - Add quotes to better handle paths with spaces
* stop-mycroft.sh
  - Return exit code to show if a service was stopped or killed
  - Extend the time to wait for a gently shutdown from 2 secs to 5
  - Changed to say "messagebus.service" instead of just "service" to be more clear (the name "service" means nothing to users, but "bus does")
* venv-activate.sh
  - Added help
  - Added -q or --quiet mode
  - Added toggled availability of 'mycroft-venv-activate' and 'mycroft-venv-deactivate' aliases.  Only one is available at any given time.

New scripts:
* mycroft-cli-client: start up the CLI
* mycroft-help: shows hints on using mycroft
* mycroft-mic-test: runs the basic record/playback, playing nicely with a running Mycroft by stopping and restarting services as appropriate
* mycroft-pip: manage the venv via pip
* mycroft-say-to: send utterances, like a user spoke them
* mycroft-speak:  speaks the given phrase using Mycroft
* mycroft-skill-testrunner: invoke the single-skill test runner

All of these scripts are easy to discover by typing "mycroft-" then
hitting the TAB key.

==== INSTALLER NOTES ====
* We no longer need to create mycroft-cli-client and mycroft-pip in the Debian packages.
* mycroft-core/bin should be added to the path

* Corrections after review

Several minor corrections, plus added wrappers for the 'msm' and 'msk'
utilities.

* Set executable flag on script files in bin/

The scripts in the bin/ folder needed to be changed to executable within
git to prevent looking dirty after dev_setup.sh has been run.

* Add executable flag to one more script
2018-09-09 16:55:01 -05:00
Matthew Scholefield f5ea525d4d Skip mimic build by default
It's much more common to skip it than build it
Now, -fm forces mimic to build in contrast to the previous -sm forcing it to skip
2018-09-05 00:58:43 -05:00
Steve Penrod 1c82945576 Move logs to /var/log/mycroft/ directory
Simplifies permissions and future log-rotations to have all logs
under a single folder instead of having to give permissions to each.
2018-08-02 23:57:13 -05:00
Steve Penrod f329051743 Move logs to /var/log in all cases
Previously, the location of the log files changed depending
on whether you were running on a Mark1/Picroft or under a
"Github" install.  Now they are always under the same directory
at /var/log/mycroft-*.log

This also updates the CLI to pull from that location always.

Additionally:
* Removed the nonfunctional 'wifi' option from start-mycroft.sh
* Made the validation for dev_setup.sh exit instead of just show
  a warning message in start-mycroft.sh
* Added code to allow dev_setup.sh to be run from different
  directories successfully
2018-08-02 21:21:30 -05:00
Julien Kassar ed556b09df Standardize shell scripts (#1711)
* Standardize shebangs
* Standardize spaces
* Standardize functions declaration
* Standardize conditional constructs
* Standardize double quotes
* Standardize command substitution
* Standardize sed command
2018-08-02 14:48:47 -05:00
jwallace00 ccf52f7ace MAXCORES bug fix in dev_setup.sh (#1684)
* Ensure number of  CORES is set to 1 at a minimum when building mimic in dev_setup.sh
2018-07-16 07:10:04 +02:00
Michael P. Scherer a46c9e5671 Fixed dev_setup.sh for dnf users for python3 update (#1615)
* Fixed dev_setup.sh for dnf users for python3 update
2018-06-12 08:33:10 +02:00
Matthew D. Scholefield aa3839b24e Don't fail in dev_setup.sh if mimic fails to check version 2018-06-01 17:19:09 -05:00
Matthew D. Scholefield 1205217e25 Re-add checking of dependencies when running start-mycroft.sh 2018-05-22 11:37:17 -05:00
Åke Forslund f91a34ba82 Install test-requirements by default 2018-05-21 15:51:08 +02:00
Åke Forslund 51c21d87ad Fix not upgraded python packages 2018-05-11 16:31:04 -05:00
Åke Forslund 8c5911ecf0 Fix code standard issues
- dev_setup.sh - replace `` with $()
- mycroft/skills/core.py remove remove redundant imports
- mycroft/tts/__init__.py remove remove redundant imports
2018-05-03 12:32:21 +02:00
Matthew D. Scholefield f7f55546f3 Check for bin/activate when deciding to install venv 2018-04-27 09:14:11 -05:00
Matthew D. Scholefield de6a8f3ade Fix venv on Ubuntu 2018-04-27 09:12:17 -05:00
Åke Forslund 0b0919e542 Fix dev_setup issues
- venv is CAN be setup in custom directory
- restore package installation
- set correct package for python3-venv
2018-04-27 08:57:48 -05:00
Åke Forslund 8673f9cbb9 Replace virtualenv with python3 venv
TODO msm
2018-04-27 08:56:47 -05:00
Åke Forslund ba8cfcab30 Update dev_setup.sh to install python3
This also adds the possibility to set the environment variable MYCROFT_VENV to separate the virtual env for python3 from the stable version.

Example:
export MYCROFT_VENV=mycroft-18.02
./dev_setup.sh
./start-mycroft.sh all
2018-04-27 08:50:46 -05:00
Åke Forslund 560e4a3fef Update python-gobject-dev to python-gobject-2-dev 2018-04-18 11:04:58 -05:00
Åke Forslund 3644bfdf08 Remove s3_cmd from dev_setup
s3_cmd is only used for packaging and shouldn't be installed in
dev_setup
2018-04-18 11:04:58 -05:00
Ceda EI 9655c65686 Change libfann to fann in Arch install. 2018-04-13 15:55:57 -05:00
Greg Cowan 1fbae064cf
Fix install script for renamed module
This fixes a problem where if "mycroft-core" was already in the
virtualenv path file, but the actual name of the module wasn't,
then the dev_setup.sh would succeed but start-mycroft.sh would
fail with "No module named mycroft.version". Now dev_setup.sh
actually checks for the $TOP variable in the virtualenv path,
instead of hardcoded "mycroft-core".

==== Fixed Issues ====
Might fix issue #1419 for some rare cases.

====  Documentation Notes ====
Slightly improves the durability of the install script.
2018-03-29 23:47:30 -04:00
Åke Forslund 6f62dc2186 Add support for installing on openSuse
- Use Zypper to install packages
- use group of current user when changing owner of /opt/mycroft
2018-03-28 15:39:03 -05:00
Åke 53919d9ea6
Merge pull request #1406 from Ceda-EI/dev
Update developer setup script for arch, adding proper install of libfann
2018-02-15 09:56:16 +01:00
Ceda EI df5e9c1708 Added --noconfirm to makepkg and pacman. 2018-02-15 13:00:15 +05:30
Matthew D. Scholefield 955ed1810f
Upgrade pip version
This should resolve dependency incompatibilities and from testing still works fine
2018-02-07 12:12:52 -06:00
Ceda EI f760928264 Added installation for libfann on archlinux by building the pkgfile. Firsts checks whether libfann is installed. If libfann is not found, clones the repository, runs makepkg -srci inside and removes it 2018-02-03 18:26:46 +05:30
Matthew D. Scholefield ed00b3d666
Add build essential to Debian dependencies
Fixes #1265
2017-12-14 10:39:20 -06:00
Matthew D. Scholefield ca3874dd30 Add g++ to native dependencies (#1150) 2017-10-26 18:58:12 -04:00
Steve Penrod fef914f771 Read default MSM skills from mycroft-skills repo
Remove the hardcoded DEFAULT_SKILLS list from MSM, instead read it
from the https://github.com/MycroftAI/mycroft-skills/DEFAULT-SKILLS
list.

Additionally, a platform-specific list will also be loaded, allowing
platforms like KDE, etc. to have different defaults.  These are also
loaded from the mycroft-skills repo from a file named like:
DEFAULT-SKILLS.platform

Also began the work to support a custom local skill folder location,
specified in the /etc/mycroft/mycroft.conf.

==== Fixed Issues ====
A failed requirements.sh run would not send an install failure
notification on the messagebus.

====  Documentation Notes ====
NONE - description of a new feature or notes on behavior changes

==== Localization Notes ====
NONE - point to new strings, language specific functions, etc.

==== Environment Notes ====
MSM now uses the 'jq' utility.  This should already be installed on
a Picroft/Mark 1, but I added it to the dev_setup.sh also.
2017-10-26 15:20:42 -07:00
penrods 8f2e5d9498 Change to Apache 2.0 license from GPLv3.0
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0.  All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.

Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors.  This cleanly
protects the project, the contributor and all who use the technology
to build upon.

Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/

This commit also removes all __author__="" from the code.  These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear.  Do you remove a name from the list if the
last line of code the wrote gets replaced?  Etc.  Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!

Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."

==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md

====  Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
2017-10-04 01:28:44 -05:00
Steve Penrod 07992b49d5 Revamping the scripts used to start/stop Mycroft
Reworking the mechanisms used to interact with Mycroft.  The old
mycroft.sh utilized the 'screen' command, but now with the CLI it
it easier to use that for viewing log files.  Plus there was
confusion between when to use start.sh and when to use mycroft.sh.

Now things are wrapped in the simple and easily discoverable scripts:
* start-mycroft.sh
* stop-mycroft.sh

The start-mycroft.sh allows you to start the background services and
to invoke the various tools (e.g. the CLI, unit tests, etc).

==== Fixed Issues ====

====  Documentation Notes ====
This will require revamp of the getting started guides, etc.
2017-09-28 01:08:20 -05:00
Åke Forslund e6c67b66b3 Add flag to allow running dev_setup.sh as root
====  Tech Notes ====
Added flag --allow-root to circumvent the requirement to run ./dev_setup
as a non-root user.
Also added help section
2017-09-27 10:49:08 -05:00
Matthew D. Scholefield 15d5295bb4 Fix dev_setup installing non-existent package 2017-09-14 18:14:46 -05:00
Matthew D. Scholefield b5cc7b91a7 Update README to no longer point to build_host_setup and fix dev_setup 2017-09-14 17:10:15 -05:00
Matthew D. Scholefield aa8606501e Move contents of build_host_setup scripts into dev_setup.sh 2017-09-14 16:48:28 -05:00
Matthew D. Scholefield 92cf04aad4 Add update notification 2017-09-05 15:46:24 -05:00
Matthew D. Scholefield dfa6fa2301 Update dependencies for Padatious and allow continuing if pip install fails
This is so that if fann is not installed locally, the user can still continue without padatious and only use adapt
2017-08-17 16:01:11 -05:00
Åke 5c369f1517 Merge branch 'dev' into feature/setup_virtenvpath 2017-08-17 10:31:48 +02:00
el-tocino 9597890885 pass cores as a parameter to install scripts 2017-08-17 16:18:01 +09:00
el-tocino 95b212800a move cores calc to mimic script 2017-08-17 16:18:01 +09:00
el-tocino 8b39d62397 Try cores based on 500mb per core build size. 2017-08-17 16:18:01 +09:00
Steve Penrod 4a82b5b4a6 Deal with case of nor pre-existing .pth file
Add support for a perfectly clean virtualenv that doesn't have a
_virtualenv_path_extensions.pth file already.
2017-08-16 23:47:28 -07:00
Steve Penrod 29ee8bb26d Changed from .pth to add2virtualenv equivalent
The mycroft-core.pth file wasn't addequate to get Python to fully
accept mycroft-core into the system path.  For example, some of
the integration tests would fail in odd ways.

So switched to using add2virtualenv, which is was fine.  But you
can't call that within the dev_setup.sh script since it is a
shell function.  So instead this code does essentially what
add2virtualenv does.
2017-08-16 02:02:39 -07:00
Steve Penrod dd2aa0900c Add mycroft-core to virtualenv path
Add the insertion of mycroft-core in the virtualenv created by
dev_setup.sh.  It becomes part of the python2.7 site-packages.
This is needed for running mycroft-core pieces directly from
the command line, after performing "workon mycroft".
2017-08-15 18:54:11 -07:00
penrods ece734b55a Prevent unneeded mimic compilation in dev_setup.sh
The code that detected existing mimic installs and asked for
confirmation before rebuilding had a few holes:
* A source install of mimic under the mycroft-core tree was missed
* Hitting "enter" or "spacebar" would be interpreted as "yes, rebuild",
  which didn't match the prompt.
2017-08-12 06:40:24 -05:00
penrods 6ed479346c Adding commit template and dev_setup.sh support
The commit template provides a developer with a structure to follow
for communicating with others on the mycroft-core project.

====  Tech Notes ====
Please use this template from here on!
2017-08-02 12:54:44 -05:00
el-tocino cfdc609586 Default to building mimic if not otherwise set. 2017-07-06 15:18:46 -05:00
Blackbaud-RyanSnedegar 13f91d3969 string comparison needed for that if statement. 2017-07-06 15:18:46 -05:00
Blackbaud-RyanSnedegar 06b77b290f allow for parameter to skip mimic as well. 2017-07-06 15:18:46 -05:00
Blackbaud-RyanSnedegar 201e0d699d Check for existing mimic installation, query to build (again). 2017-07-06 15:18:46 -05:00
el-tocino a3e04f70cf add warning about mimic compile times. 2017-06-13 14:53:16 -05:00
el-tocino 20bb8b5d5d added memory check to dev_setup 2017-06-13 14:50:44 -05:00
Augusto Monteiro 'Sparky 9e7e2c12f9 #663 - removing install msm 2017-04-14 19:41:00 -05:00
Augusto Monteiro 22eaa6dc89 Using https 2017-03-28 15:18:43 -07:00
Augusto Monteiro 93a59c57ec #527 - removing msm install from dev_setup 2017-03-28 11:20:00 -07:00
Augusto Monteiro 2b96f2dd19 #527 - Adding msm install script and renaming skill 2017-03-28 11:20:00 -07:00
Nicolas Couture 878b05298d #372 - dev_setup.sh ignores WORKON_HOME when VIRTUALENV_ROOT is unset (#376)
#372 - dev_setup.sh ignores WORKON_HOME when VIRTUALENV_ROOT is unset
- Favor using the WORKON_HOME environment variable over VIRTUALENV_ROOT
- Specifying the name of the virtualenv directory
- Postfixing VIRTUALENV_ROOT with "/mycroft"
2017-02-01 23:40:13 -03:00
Arron Atchison e3e58d3ee4 Removing sudo from dev_setup.sh 2016-12-28 12:51:13 -06:00
Arron Atchison 2252966dda Issue #423 Register Me button in wifi-setup-client now points to home.mycroft.ai (#424)
* the Register Me button now points to home.mycroft.ai

* the Register Me button now points to home.mycroft.ai
2016-12-20 23:10:26 -06:00
ParkerMc 317a01f75e Added executable bit to arch setup (#359)
* Added executable bit to arch setup

* Update to use Python 2

* Changed pip to pip2

needed when python 3 is default
2016-09-22 09:12:18 -05:00
Arron Atchison c0f933f527 I removed the install-pocketsphinx.sh script from the dev_setup again. Maybe I'll fix it later 2016-07-29 14:58:07 -05:00
Arron Atchison eacff92ace oops, made a typo in dev_setup.sh 2016-07-29 14:50:38 -05:00
Arron Atchison 1e2753c209 fixed pocketsphinx install script to run in quiet mode with the -q flag. There will be path issues unless run like . 2016-07-29 14:45:00 -05:00
Arron Atchison 0221ff4ac5 argh, removed install-pocketsphinx from dev_setup. Hoping this won't be needed again anyway 2016-07-29 14:00:59 -05:00
Arron Atchison 306d150543 addded a script for installing pocketshinx and changeing the import path in local_recognizer.py 2016-07-29 12:21:03 -05:00
Arron Atchison 62a9649680 Some modifications to dev_setup, build_host_setup, and local_recognizer.py. It seems that on debian systems we can install python-pocketsphinx for the python binding. 2016-07-29 10:27:44 -05:00
Ethan Ward bfacbe0087 Issues #259 - Move scripts out of root directory (#301) 2016-07-27 09:36:47 -05:00
Ethan Ward 3f0de9537e Revert "Issues #259 - Move scripts and config out of root directory" (#297) 2016-07-18 15:47:46 -05:00
Ethan Ward 69f3a6cd7a Issues #259 - Move scripts and config out of root directory (#285) 2016-07-18 15:44:25 -05:00
aatchison 70bcb51946 re-added mimic to dev-setup.sh 2016-06-23 10:29:11 -05:00
aatchison 66f5d81dd4 revert to compiling pocketsphinx 2016-06-21 14:00:24 -05:00
aatchison 2d4519d264 installing pocketsphinx from pip, 'casue it's radical 2016-06-20 17:31:41 -05:00
aatchison 8014f95b53 Merge branch 'master' into feature/deb-packaging 2016-06-20 15:45:42 -05:00
Matthew D. Scholefield d1486cf530 Added argument for multiple cores to make calls (#190) 2016-06-20 14:34:36 -04:00
aatchison 492fb8cc00 Merge branch 'master' into feature/deb-packaging 2016-06-13 13:16:47 -05:00
aatchison dff2573584 now pulling adapt-parser-0.2.2 from pypi.python.org 2016-06-13 12:14:33 -05:00
aatchison 20490dfe66 Merge branch 'master' into feature/deb-packaging 2016-06-13 11:18:44 -05:00
aatchison 18e52047b6 removed extra space 2016-06-13 11:00:37 -05:00
aatchison eda393a3af In one case, in dev_setup.sh, virtualenv was using python3.5, so now I'm forcing 2.7 2016-06-10 17:29:13 -05:00
Arron Atchison 243a8b9277 adding enclosrue scripts 2016-06-06 15:37:43 -05:00
Arron Atchison 89234c1629 removed mimic from dev_setup 2016-06-06 13:49:07 -05:00
Sean Fitzgerald 0adde310ed Updating scripts and docs for dev environment setup. 2016-05-23 22:48:45 -07:00
Åke Forslund b53e1be671 Install mimic in dev_setup.sh 2016-05-21 17:40:00 +02:00
Arron Atchison 6e42bb1736 In the 1970s computer users had to understand the arcane syntax of the machines they used. They programed their computers using the machine's native language and hardly gave it a thought.
The 1980s birthed a new form of interaction between computers and users.  For the first time computers became capable of understanding the most basic form of human communication - pointing and grunting.  The mouse and the GUI revolutionized computing and made computers accessible to the masses.

We have now entered a third era.  We are rapidly approaching a time when computer systems will understand human language and respond using the most natural form of human communication – speech.

This is an important development.  Some might even call it revolutionary.

Despite its importance, however, the technologies that will underpin this new method of interaction are the property of major tech firms who don't necessarily have the public's best interests at heart.

Not anymore.

Meet Mycroft – the worlds first open source natural language platform.  Mycroft understands human language and responds with speech.  It is being designed to run on anything from a phone to an automobile and will change the way we interact with open source technologies in profound ways.

Our goal here at Mycroft is to improve this technology to the point that when you interact with the software it is impossible to tell if you are talking to a human or a machine.

This initial release of the Mycroft software represents a significant effort by the Mycroft community to give the open source world access to this important technology.  We are all hoping that the software will be useful to the public and will help to usher in a new era of human machine interaction.

Our community welcomes everyone to use Mycroft, improve the software and contribute back to the project.  With your help and support we can truly make Mycroft an AI for everyone.

Joshua W Montgomery – May 17, 2016
2016-05-20 09:16:01 -05:00