Skip to content

Commit

Permalink
begin packaging init
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Jan 25, 2024
1 parent 879b817 commit 04affa5
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 6 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build_addon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# name: build addon

# on:
# push:
# tags: ["*"]
# # To build on main/master branch, uncomment the following line:
# # branches: [ main , master ]

# pull_request:
# branches: [ main, master ]

# workflow_dispatch:

# jobs:
# build:

# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3

# - run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt

# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
# cache: 'pip'

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip wheel
# pip install -r requirements.txt
# sudo apt-get update -y
# sudo apt-get install -y gettext

# - name: Code checks
# run: export SKIP=no-commit-to-branch; pre-commit run --all

# - name: building addon
# run: scons

# - uses: actions/upload-artifact@v3
# with:
# name: packaged_addon
# path: ./*.nvda-addon

# upload_release:
# runs-on: ubuntu-latest
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
# needs: ["build"]
# steps:
# - uses: actions/checkout@v3
# - name: download releases files
# uses: actions/download-artifact@v3
# - name: Display structure of downloaded files
# run: ls -R

# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# files: packaged_addon/*.nvda-addon
# fail_on_unmatched_files: true
# prerelease: ${{ contains(github.ref, '-') }}
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
temp.png
temp.png

# nvda output files for building addon

addon/doc/*.css
addon/doc/en/
*_docHandler.py
*.html
manifest.ini
*.mo
*.pot
*.py[co]
*.nvda-addon
.sconsign.dblite
/[0-9]*.[0-9]*.[0-9]*.json
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance",
"redhat.vscode-yaml",
"ms-python.flake8"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"editor.accessibilitySupport": "on",
"flake8.args": [
"--config=flake8.ini"
],
"flake8.importStrategy": "fromEnvironment",
"python.autoComplete.extraPaths": [
"../nvda/source",
"../nvda/miscDeps/python"
],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"editor.insertSpaces": false,
"python.analysis.stubPath": "${workspaceFolder}/.vscode/typings",
"python.analysis.extraPaths": [
"../nvda/source",
"../nvda/miscDeps/python"
],
// "python.defaultInterpreterPath": "${workspaceFolder}/../nvda/.venv/scripts/python.exe"
}
6 changes: 6 additions & 0 deletions .vscode/typings/__builtins__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def _(msg: str) -> str:
...


def pgettext(context: str, message: str) -> str:
...
4 changes: 2 additions & 2 deletions core/addon_communication/ipc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


mod = Module()
mutex = threading.Lock()
lock = threading.Lock()

communication_socket = None

Expand Down Expand Up @@ -56,7 +56,7 @@ def send_ipc_command(command: str):
raise ValueError(f"Invalid NVDA IPC command: '{command}'")


with mutex:
with lock:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, int(port)))
try:
Expand Down
1 change: 1 addition & 0 deletions docs/src/ATTRIBUTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [https://github.com/nvaccess/nvda/wiki/](https://github.com/nvaccess/nvda/wiki/)
- [https://github.com/nvda-es/devguides_translation/blob/master/original_docs/NVDA-Add-on-Development-Guide.md](https://github.com/nvda-es/devguides_translation/blob/master/original_docs/NVDA-Add-on-Development-Guide.md)
- [ https://addons.nvda-project.org/addons/AudioThemes.en.html](https://addons.nvda-project.org/addons/AudioThemes.en.html)
- [https://github.com/nvdaaddons/DevGuide/wiki/NVDA-Add-on-Development-Guide](https://github.com/nvdaaddons/DevGuide/wiki/NVDA-Add-on-Development-Guide)
- [https://addons.nvda-project.org/addons/phoneticPunctuation.en.html](https://addons.nvda-project.org/addons/phoneticPunctuation.en.html)
- Helpful settings
- Document Formatting: "Line Indentation Reporting" set to "Tones"
Expand Down
1 change: 1 addition & 0 deletions nvda/.addOn/addontemplate
Submodule addontemplate added at e3fa6d
2 changes: 0 additions & 2 deletions nvda/nvda.talon
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,3 @@ restart reader:

test reader add on:
user.send_ipc_command("debug")


2 changes: 1 addition & 1 deletion sight-free-settings.talon
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ settings():
# To prevent errors from accidental key presses, play a sound each time a key is pressed
user.sound_on_keypress = false

# Disable keypresses from Talon in high risk contexts that cannot afford typos
# Disable all keypresses from Talon in high risk contexts that cannot afford typos
user.disable_keypresses = false

# Speak Talon's mode (command, dictation, mixed) whenever it is changed
Expand Down

0 comments on commit 04affa5

Please sign in to comment.