===============================================================
CLONE AUTOKEY AND RUN IT:
cd Desktop
git clone https://github.com/autokey/autokey.git
cd autokey
cd lib
python3 -m autokey.gtkui -c
python3 -m autokey.qtui -c
===============================================================
CLONE AUTOKEY AND RUN IT IN A VENV:
cd Desktop
git clone https://github.com/autokey/autokey.git
cd autokey
python3 -m venv venv
source venv/bin/activate
cd lib
python3 -m autokey.gtkui -c
python3 -m autokey.qtui -c
============================================================
CLONE A PULL REQUEST AND RUN IT IN A VENV:
cd Desktop
git clone https://github.com/autokey/autokey.git
cd autokey
git fetch origin pull/1004/head:pull_1004
git checkout pull_1004
python3 -m venv venv
source venv/bin/activate
pip install -r pip-requirements.txt
pip install packaging
cd lib
python3 -m autokey.gtkui -cl
===============================================================
RECURSIVELY FIND ALL FILES CONTAINING FOO IN THEIR NAME IN THE CURRENT DIRECTORY:
find -name "*foo*"
===============================================================
TEST THE DEPENDENCIES:
tox
...or...
tox -e test
===============================================================
LINT THE CODE:
You can use flake8 on the command-line by invoking it against any directory or Python module. For example:
* Lint a file: flake8 /path/to/file.py
* Lint a directory recursively: flake8 /path/to/directory
* Lint the current directory recursively: flake8
* Lint the Python files in the current directory non-recursively: flake8 *.py
* You can also use any of the command-line options on the command-line, like those in the script above, for example.
* More information on flake8: https://flake8.pycqa.org/en/latest/
The flake8 command is tethered to the Python version, so if you want to force a certain Python version, like version 3 in this example:
python3 -m flake8
There are lots of command-line options for making it accept certain line-lengths, ignore certain errors or warnings, etc.
* Accept line lengths of up to 127 characters:
flake8 --max-line-length=127 foo.py
* Accept line lengths of up to 127 characters and go up to the specified max-complexity:
flake8 --max-line-length=127 --max-complexity=10 dialogs.py
How to read the results:
* The max-complexity option sets the maximum-allowed McCabe complexity-value for a block of code. The flake8 command uses the McCabe complexity threshold. A score of 10 or less is considered pretty simple and easy to maintain, 11-20 is a somewhat-complex program, 21-50 is a very-complex program, and over 50 is so complex that it's untestable.
* All C90 class violations are reported when the user specifies flake8 --max-complexity
* All E class violations are “errors” reported by pycodestyle
* All F class violations are reported by pyflakes
* All W class violations are “warnings” reported by pycodestyle
AutoKey's linter:
* AutoKey only lints the /lib/autokey directory.
* AutoKey's linting command is:
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics --builtins=_ --max-complexity=10 --max-line-length=127 lib/autokey
Explanation of AutoKey's linter:
* --count displays the total number of errors/warnings
* --select=E9,F63,F7,F82 checks for syntax errors/warnings
* --show-source shows the line number of each error/warning
* --statistics shows the total number of each error/warning type
* --builtins=_ checks for the specified builtins being used as variables or parameters
* --max-complexity=10 sets the maximum-allowed McCabe complexity-value for a block of code to 10 (simple)
* --max-line-length=127 sets the specified maximum number of characters allowed in a line
* lib/autokey sets the specified directory that's being linted
A variation of AutoKey's linting command that doesn't specify what to test for:
flake8 --count --show-source --statistics --builtins=_ --max-complexity=10 --max-line-length=127
Get all the information:
flake8
The following line gives all information, but accepts line-lengths of up to 127 characters:
flake8 --max-line-length=127
===============================================================
<a href="https://askubuntu.com/search?q=autokey">Ask Ubuntu</a>
<a href="https://github.com/autokey/autokey">Code</a>
<a href="https://www.codetriage.com/autokey/autokey">CodeTriage</a>
<a href="https://github.com/autokey/autokey/wiki/Community">Contact us</a>
<a href="https://github.com/autokey/autokey/wiki/Community">Community</a>
<a href="https://discord.com/login?redirect_to=%2Flogin">Discord</a>
<a href="https://github.com/autokey/autokey/discussions">Discussions</a>
<a href="https://autokey.github.io/index.html">Documentation - new</a>
<a href="https://github.com/autokey/autokey.github.io">Documentation - new - repository</a>
<a href="https://autokey.github.io/autokey/index.html">Documentation - old</a>
<a href="https://github.com/autokey/autokey/tree/master/doc/scripting">Documentation - old - repository</a>
<a href="https://github.com/actions/runner-images#available-images">GitHub - available images and version information</a>
<a href="https://github.com/community/community">GitHub - community discussions</a>
<a href="https://gist.github.com/Elliria">GitHub - Elliria - gists</a>
<a href="https://github.com/Elliria">GitHub - Elliria - home</a>
<a href="https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FElliria">GitHub - Elliria - sign in</a>
<a href="https://github.com/orgs/community/discussions">GitHub - issues - report GitHub or Gist issues</a>
<a href="https://github.com/marketplace">GitHub - Marketplace - to update your actions</a>
<a href="https://github.com/autokey/autokey/discussions/770">Goals</a>
<a href="https://app.gitter.im/#/login">Gitter</a>
<a href="https://github.com/autokey/autokey/issues">Issues</a>
<a href="https://groups.google.com/forum/#!forum/autokey-users">Google Groups</a>
<a href="https://github.com/autokey/autokey/milestones">Milestones</a>
<a href="https://github.com/autokey/autokey/blob/4b87b32452cd41d2b98341db220e99cf4f9e34d6/new_features.rst#id3">New features</a>
<a href="https://github.com/autokey/autokey/pulls">Pull requests</a>
<a href="https://www.reddit.com/r/autokey/">Reddit</a>
<a href="https://github.com/autokey/autokey/releases">Releases</a>
<a href="https://stackoverflow.com/questions/tagged/autokey">Stack Overflow</a>
<a href="https://github.com/autokey/autokey/wiki">Wiki - current</a>
<a href="https://github.com/autokey/autokey-python2/wiki">Wiki - old</a>
<!-- Search FOLDER -->
<a href="https://docs.github.com/en/search-github">GitHub - how to search</a>
<a href="https://github.com/autokey/autokey/search">GitHub - search AutoKey anywhere</a>
<a href="https://github.com/search?q=repo%3Aautokey%2Fautokey&type=code">GitHub - search AutoKey code</a>
<a href="https://github.com/search?q=repo%3Aautokey%2Fautokey+&type=commits">GitHub - search AutoKey commits</a>
<a href="https://github.com/autokey/autokey/search?type=discussions">GitHub - search AutoKey discussions</a>
<a href="https://github.com/autokey/autokey/search?type=issues">GitHub - search AutoKey issues</a>
<a href="https://github.com/search?q=repo%3Aautokey%2Fautokey&type=registrypackages">GitHub - search AutoKey packages</a>
<a href="https://github.com/search?q=repo%3Aautokey%2Fautokey+&type=pullrequests">GitHub - search AutoKey pull requests</a>
<a href="https://github.com/autokey/autokey/search?type=wikis">GitHub - search AutoKey wiki</a>
<a href="https://github.com/search">GitHub - search GitHub</a>
Run GTK source code:
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=cd ~/Desktop/autokey/lib && python3 -m autokey.gtkui -c
GenericName[en_US]=
GenericName=
Icon=system-run
MimeType=
Name[en_US]=Run A GTK Clone
Name=Run A GTK Clone
Path=/home/elliria/Desktop/autokey/lib
StartupNotify=true
Terminal=false
TerminalOptions=\s--noclose
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=none
X-KDE-SubstituteUID=false
X-KDE-Username=
Run Qt source code:
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=cd ~/Desktop/autokey/lib && python3 -m autokey.qtui -c
GenericName[en_US]=
GenericName=
Icon=system-run
MimeType=
Name[en_US]=Run A Qt Clone
Name=Run A Qt Clone
Path=/home/elliria/Desktop/autokey/lib
StartupNotify=true
Terminal=false
TerminalOptions=\s--noclose
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=none
X-KDE-SubstituteUID=false
X-KDE-Username=
- Get AutoKey onto your VM.
- Pick one:
- Run GTK source code:
cd ~/Desktop/autokey; source venv/bin/activate; cd lib; python3 -m autokey.gtkui -cl
- Run Qt source code:
cd ~/Desktop/autokey; source venv/bin/activate; cd lib; python3 -m autokey.qtui -cl