Skip to content

Commit 8389c8b

Browse files
authored
Merge branch 'master' into develop-0.1.0
2 parents 76e49b0 + e105f65 commit 8389c8b

8 files changed

+367
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: 'Code Coverage : Repair Rejects Valid Code '
3+
about: This concerns bugs where valid code is rejected after being repaired
4+
title: ''
5+
labels: bug, code coverage
6+
assignees: mpourmpoulis
7+
8+
---
9+
10+
<!--In a nutshell what is going on under the hood is
11+
12+
- the plug-in tries first to parse your code Without making any modification. If The ASD module does not complain, we are good to go!
13+
- however if there are errors, it will tokenize your code and will deploy various heuristics in order to fix as many problems as possible
14+
Unfortunately, it will occasionally make Mistakes and Intervene in a way that may break some piece of syntactically correct code. If you're facing such a problem( for instance getting the pop-up message within the invalid syntax warning in a correct line), Is the correct issue type for you!
15+
16+
Please note that for the reasons explained above these bugs can be very subtle, appearing only when there is another error somewhere in the code!
17+
-->
18+
19+
20+
21+
22+
# Description
23+
24+
<!-- enter a short description of the problem And What ever information You'd like to include but does not become apparent from the examples below-->
25+
26+
27+
28+
<!-- providing the snippet of Syntactically correct code for which repair produces an invalid output Could be helpful Or you can upload to gif if you prefer instead-->
29+
30+
**Your Code**
31+
32+
33+
```python
34+
35+
```
36+
37+
<!-- Optionally providing the corrected code as output in the console (Ctr + \`l) Could also be helpful
38+
39+
**Repair Output**
40+
41+
```python
42+
43+
```
44+
-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
name: Commands Functionality Bug Report
3+
about: Report core functionality bugs like a command not running or yielding wrong
4+
result
5+
title: ''
6+
labels: bug
7+
assignees: mpourmpoulis
8+
9+
---
10+
11+
## Description
12+
13+
<!-- here you can provide your description of the bug.
14+
15+
Providing the screenshot or GIF could be helpful if things are complicated. Furthermore,there follows a small questionnaire to help you summarize information about some important aspects you may have noticed about the issue
16+
To complete you can fill the checkboxes with "x" or click them after you submit the issue.
17+
Zero,one or more answers may be applicable for each question!
18+
19+
-->
20+
21+
**General Information**
22+
<!-- which version are you using? for instance v0.1.0, v0.1.2 or develop -->
23+
24+
Plug-In Version:
25+
26+
**Queries Affected**
27+
28+
<!-- what types of queries are affected (there may be multiple) -->
29+
30+
- [ ] Argument
31+
32+
- [ ] Big Roi
33+
34+
- [ ] Sub Indexing
35+
- [ ] only dedicated Subindexing commands
36+
- [ ] also affect suffixes
37+
38+
- [ ] Operations
39+
- [ ] Paste
40+
- [ ] Delete
41+
- [ ] Swap
42+
- [ ] Edit
43+
- [ ] Prefix
44+
45+
- [ ] Collections
46+
47+
48+
**Response To Command**
49+
50+
<!-- okay what is actually happening? -->
51+
52+
- [ ] the command fails/nothing happens at all
53+
54+
- [ ] the command select/operates on a wrong result,
55+
- [ ] that did not match your positional description (e.g. grabs an ROI one line above or below the one you wanted)
56+
- [ ] did not match the type of result you are looking for(e.g. you wanted an assertion message but you got assertion condition)
57+
- [ ] or maybe the result was of the correct type and position but it was selected improperly(e.g. you asked for the parameter list of function but the last parameter was not selected)
58+
- [ ] or maybe things are working fine when trying to select a region as a whole but start breaking when you try access smaller pieces of it
59+
- [ ] or perhaps the command did find the correct result but perhaps the alternatives included regions they should not or vice versa. (for instance because the command searched the entire code instead of just the current function or vice versa)
60+
61+
- [ ] somehow the whole preserving the current state(alternatives,origin,initial_origin and so on) was messed up by the command! For instance,
62+
- [ ] track was lost of initial originand things were pasted back onto the wrong position
63+
- [ ] alternatives were changed when they were supposed not to!(for instance prefix operations are not supposed to do this)
64+
65+
66+
- [ ] the command seems to select/operates on a random result
67+
68+
- [ ] the command has some other unintended behavior
69+
70+
71+
72+
73+
**Context In Which It Appears**
74+
75+
<!--
76+
Unfortunately, bugs can sometimes appear only in a specific context making them harder to reproduce and debug. There is no need for you to scratch your head and go through over every scenario presented here but if you have noticed any of the below it could help me narrow things down!
77+
-->
78+
79+
Does the problem seem to appear or disappear only some of the time? Does there seem to be
80+
81+
- [ ] spatial context/correlation with the cursor? for instance
82+
- [ ] is it affected by adjustments to the cursor position?()
83+
- [ ] does it make a difference whether you have selected some text or not?
84+
- [ ] does the problem appear only when you're going in one direction?
85+
- [ ] does it have to only do with multiple cursors?
86+
- [ ] or perhaps when switching back-and-forth between single and multiple cursors?
87+
88+
89+
90+
- [ ] a temporal context?
91+
- [ ] does it appear only right after selection query was executed?
92+
- [ ] does it appear only if no one other selection query was executed since the last edit?
93+
- [ ] does it appear only after executing an operation(paste,delete,swap)?
94+
- [ ] does it appear when you perform manual editing between commands?
95+
96+
- [ ] correlation with a pattern in the code? Such a pattern might be structural, sometimes lexical,in some cases even some piece of incomplete code that was not handled properly. A strong indicator for such a case when introducing small changes to the code has things from working perfectly into breaking. In case you have identified(or you have any suspicion about) this pattern(or maybe patterns), does the error occure when it appears
97+
- [ ] on the target of the query? (For instance there was a bug at some point that sometimes prevented you from selecting arguments from function calls inside with statements)
98+
- [ ] on the origin of the query?
99+
- [ ] in between them perhaps?
100+
- [ ] somewhere inside to the current function/class/indentation block/...
101+
- [ ] anywhere in the code :)
102+
103+
<!-- if none of the above satisfies you can describe the contextas you wish -->
104+
105+
<!-- I did some examples(like providing gifs, code snippets, command series) where things work versus when they don't could sometimes be helpful especially when you're not really sure what is wrong. -->
106+
107+
**Error Message**
108+
109+
- [ ] error message appears in a pop-up
110+
111+
- [ ] an exception trace back is printed in the sublime console(Ctrl + \`)
112+
113+
- [ ] the command fails silently
114+
115+
<!-- If possible, sharing the error message might be helpful
116+
```
117+
error message
118+
```
119+
-->

.pylintrc

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.app
77

88
[MESSAGES CONTROL]
99
disable=all
10-
enable=E
10+
11+
12+
13+
enable=E
14+

.readthedocs.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation with MkDocs
9+
mkdocs:
10+
configuration: mkdocs.yml
11+
12+
# Optionally build your docs in additional formats such as PDF and ePub
13+
# formats: all
14+

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<!-- ![](https://img.shields.io/static/v1?label=Version&message=0.1.0&color=green) -->
66

7-
[![](https://img.shields.io/badge/documentation-here-green)](https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/doc/README.md)
7+
[![](https://img.shields.io/badge/documentation-here-green)](https://pythonvoicecodingplugin.readthedocs.io/en/latest/)
88

99
<!-- ![](https://img.shields.io/static/v1?label=Caster&message=0.5.11|0.6.11|1.0.0&color=blue) -->
1010

@@ -24,7 +24,7 @@
2424
![](https://img.shields.io/github/v/release/mpourmpoulis/PythonVoiceCodingPlugin.svg)
2525

2626
PythonVoiceCodingPlugin is a Sublime Text 3 plugin meant to enhance user experience
27-
when coding python 3 by voice. It ships with an integrated [Caster](https://github.com/dictation-toolbox/Caster) grammar bundle containing voice commands that provide you with syntactical navigation capabilities!
27+
when coding python 3 by voice. It ships with an integrated [Caster](https://github.com/dictation-toolbox/Caster) grammar bundle containing voice commands that provide you with syntactical navigation capabilities! The [documentation](https://pythonvoicecodingplugin.readthedocs.io/en/latest/) contains some 100+ examples showcasing those capabilities and for any further questions or help with troubleshooting, please let me know at my gitter [channel](https://gitter.im/PythonVoiceCodingPlugin/community)!
2828

2929

3030
In case you have never heard about voice programming before, you should definitely check out [Caster](https://caster.readthedocs.io/en/latest/), [dragonfly](https://dragonfly2.readthedocs.io/en/latest/introduction.html) and [Talon](https://talonvoice.com/).

doc/Installation.md

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
## Installation
2+
3+
As this is a two-part system, in order to install, you must
4+
5+
- install the main plugin
6+
7+
- install the corresponding [grammar](../bundles/README.md) for the version of caster you are using
8+
9+
- put the `subl` executable which enables the communication of those two into the Windows path(from 0.1.2 and above optionally)
10+
11+
12+
### Install the main plugin
13+
14+
There are currently two installation (Package Control and git) methods for performing the first task,I highly recommend using Package Control.
15+
16+
17+
#### Package Control
18+
19+
- Firstly make sure you have Package Control installed. If not, please follow the instructions [here](https://packagecontrol.io/installation)
20+
21+
- open Command Palette(Control+Shift+P)
22+
23+
- execute
24+
25+
```
26+
Package Control:Install Package
27+
```
28+
29+
And then simply
30+
31+
```
32+
PythonVoiceCodingPlugin
33+
```
34+
35+
36+
37+
##### Note for those who installed between 0.0.4 and 0.0.5
38+
39+
previously the installation of plug-in included running
40+
41+
```
42+
Package Control:Add Repository
43+
```
44+
45+
and then entering a URL to my repository
46+
47+
```
48+
https://github.com/mpourmpoulis/PythonVoiceCodingPlugin
49+
```
50+
51+
52+
which enabled you to install directly from a master branch rather than my releases and you should be seing a fake version like v2020.01.05.( and so on ) instead of v0.0.4.
53+
54+
This was only temporary solution and I recommend that you ran
55+
56+
```
57+
Package Control:Remove Repository
58+
```
59+
60+
so was only install/upgrade from releasees.
61+
62+
63+
64+
65+
For the time being be warned, that the plug-in has not been tested with portable versions of sublime!
66+
67+
68+
For any further installation questions, feel free to ask [here](https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/issues/5)
69+
70+
71+
72+
#### Git Install
73+
74+
Alternatively you can download the plugin directly from github and place it in sublime package folder
75+
76+
for windows users this should be:
77+
78+
```
79+
C:\Users\Admin\AppData\Roaming\Sublime Text 3\Packages
80+
```
81+
82+
and on Ubuntu it is :
83+
```
84+
~/.config/sublime-text-3/Packages/
85+
```
86+
87+
Currently the Master Branch ships with its dependencies so you're good to go!
88+
89+
Just in case something is wrong and you want to manually install dependencies,using your installation of python (this worked for me with 3.7.4 and 3.5.2) run from inside the plug-in folder (PythonVoiceCodingPlugin):
90+
91+
```bash
92+
python3 -m pip install --target third_party -r requirements.txt
93+
```
94+
95+
96+
### Install Grammar
97+
98+
Furthermore, in order to use the plug-in, you must also install the grammar! You can find additional information [here](https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/tree/master/bundles) if you intend to use this on Linux via [Aenea](https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/tree/master/bundles/Aenea) you will need a few extra steps but in a nutshell:
99+
100+
- Make sure you have [Caster](https://caster.readthedocs.io/en/latest/) installed
101+
102+
- Copy the grammar files to the appropriate user directory,depending on the version of caster these should be either `C:\Users\%USERNAME%\AppData\Local\caster\rules` or `C:\Users\%USERNAME%\.caster\rules
103+
`
104+
105+
- Reboot/launch Caster and if you are using 1.0 and above do not forget to enable the rule by saying `enable python voice coding plugin`
106+
107+
in order to make this process easier, under `Preferences > Package Settings > PythonVoiceCodingPlugin
108+
` you will find utilities
109+
110+
- To retrieve those grammar files and then manually copy paste them
111+
112+
![](./gif/install1.gif)
113+
114+
- or to automatically install them to the appropriate directory if you are using Caster 1.x.x
115+
116+
![](./gif/install2.gif)
117+
118+
### Subl Path
119+
120+
The communication between the main plugin and the grammar happens via the sublime command line interface through the `subl` executable. Up to and including version 0.1.1, it was expected that this executable is in your Windows path but as pointed out by LexiconCode the corresponding documentation was missing! these was a big blunder on my part and may have prevented you from using the project altogether!
121+
122+
now you can find more information about how you can add this executable to the Windows path [here](https://stackoverflow.com/questions/9440639/sublime-text-from-command-line), but in order to work around this issue without adding an additional installation step for you, release 0.1.2 implements the following scheme:
123+
124+
* If `subl` is already in the path, it will use normally
125+
126+
* Otherwise, it will try to fall back to `C:\Program Files\Sublime Text 3\subl` which is where it should be if you have installed sublime in the classical way! In such a case, no extra steps are needed on your part!
127+
128+
if sublime is installed in another directory, you must unfortunately add it to the path yourself!
129+
130+
Please note that this does not affect Linux!
131+
132+

mkdocs.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
extra_css:
2+
- https://assets.readthedocs.org/static/css/badge_only.css
3+
- https://assets.readthedocs.org/static/css/readthedocs-doc-embed.css
4+
extra_javascript:
5+
- readthedocs-data.js
6+
- https://assets.readthedocs.org/static/core/js/readthedocs-doc-embed.js
7+
- https://assets.readthedocs.org/static/javascript/readthedocs-analytics.js
8+
google_analytics: null
9+
site_name: PythonVoiceCodingPlugin
10+
site_author: mpourmpoulis
11+
site_url: https://pythonvoicecodingplugin.readthedocs.io
12+
docs_dir: doc
13+
repo_url: https://github.com/mpourmpoulis/PythonVoiceCodingPlugin
14+
edit_uri: tree/master/doc
15+
16+
theme:
17+
name: readthedocs
18+
19+
nav:
20+
- Home: README.md
21+
- Argument queries: SelectArgument.md
22+
- Big ROI queries: SelectBigROI.md
23+
- SubIndexing: SubIndexing.md
24+
- Operations: Operations.md
25+
- Collections: CollectionQueries.md

mkdocs.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
extra_css:
2+
- https://assets.readthedocs.org/static/css/badge_only.css
3+
- https://assets.readthedocs.org/static/css/readthedocs-doc-embed.css
4+
extra_javascript:
5+
- readthedocs-data.js
6+
- https://assets.readthedocs.org/static/core/js/readthedocs-doc-embed.js
7+
- https://assets.readthedocs.org/static/javascript/readthedocs-analytics.js
8+
google_analytics: null
9+
site_name: PythonVoiceCodingPlugin
10+
site_author: mpourmpoulis
11+
site_url: https://pythonvoicecodingplugin.readthedocs.io
12+
docs_dir: doc
13+
repo_url: https://github.com/mpourmpoulis/PythonVoiceCodingPlugin
14+
edit_uri: tree/master/doc
15+
16+
theme:
17+
name: readthedocs
18+
19+
nav:
20+
- User Guide: README.md
21+
- Argument queries: SelectArgument.md
22+
- Big ROI queries: SelectBigROI.md
23+
- SubIndexing: SubIndexing.md
24+
- Operations: Operations.md
25+
- Collections: CollectionQueries.md
26+
- Installation: Installation.md

0 commit comments

Comments
 (0)