Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huge Refactor/Renovation #43

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/applet_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Applet Request
description: Do you think we're missing a built in Applet?
title: "[APPLET REQ]: "
title: ""
labels: ["Applets"]
body:
- type: markdown
Expand Down
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug Report
description: Report an issue with Squishy
title: "[BUG]: "
title: ""
labels: ["Bug"]
body:
- type: markdown
Expand All @@ -15,9 +15,7 @@ body:
attributes:
label: Which part of Squishy shows this problem
options:
- GUI
- CLI
- REPL
- Gateware Library
- Python Library
- Applet
Expand Down
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature Request
description: Have a feature you'd like? Let us know.
title: "[FEATURE]: "
title: ""
labels: ["Feature"]
body:
- type: markdown
Expand All @@ -16,9 +16,7 @@ body:
attributes:
label: Which part of Squishy does this feature generally fit into?
options:
- GUI
- CLI
- REPL
- Gateware Library
- Python Library
- Applet
Expand Down
85 changes: 0 additions & 85 deletions .github/ISSUE_TEMPLATE/rfc.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: 'Test Squishy (Python ${{ matrix.python-version }})'
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13.0-rc.2', 'pypy3.10-v7.3.16']
python-version: ['3.11', '3.12', '3.13', '3.14.0-alpha.1']
fail-fast: true

steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

- name: 'Run Tests'
timeout-minutes: 15 # Python 3.12 and 3.13 seem to just hang on testing ~sometimes~
continue-on-error: ${{ matrix.python-version == '3.12' || matrix.python-version == '3.13.0-rc.2' }}
continue-on-error: ${{ matrix.python-version == '3.12' || matrix.python-version == '3.13' }}
shell: bash
run: |
nox -s test
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
name: 'Test Squishy (Python ${{ matrix.python-version }})'
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13.0-rc.2', 'pypy3.10-v7.3.16']
python-version: ['3.11', '3.12', '3.13', '3.14.0-alpha.1']
steps:
- name: 'Setup Python'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: 'Initialize Environment'
shell: bash
env:
Expand Down Expand Up @@ -47,7 +48,7 @@ jobs:
- name: 'Run Tests'
shell: bash
timeout-minutes: 15 # Python 3.12 and 3.13 seem to just hang on testing ~sometimes~
continue-on-error: ${{ matrix.python-version == '3.12' || matrix.python-version == '3.13.0-rc.2' }}
continue-on-error: ${{ matrix.python-version == '3.12' || matrix.python-version == '3.13' }}
run: |
nox -s test -- --coverage

Expand Down
9 changes: 0 additions & 9 deletions contrib/.mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ warn_return_any = True
[mypy-construct.*]
ignore_missing_imports = True

[mypy-PySide2.*]
ignore_missing_imports = True

[mypy-PySide6.*]
ignore_missing_imports = True

[mypy-luna.*]
ignore_missing_imports = True

[mypy-rich.*]
ignore_missing_imports = True

Expand Down
90 changes: 20 additions & 70 deletions contrib/scsidump
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@

import sys

from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, Namespace
from pathlib import Path
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from pathlib import Path

try:
from squishy import __version__
except ImportError:
sys.path.insert(0, '/pool/abyss/Projects/squishy/squishy')

from squishy import __version__
from squishy import __version__

from squishy.gateware import AVAILABLE_PLATFORMS
from squishy.device import SquishyDevice

def _setup_extcap_parser(parser: ArgumentParser):
parser.add_argument(
Expand Down Expand Up @@ -67,70 +70,16 @@ def _setup_extcap_parser(parser: ArgumentParser):


APPLET_OPTIONS = {
'platform': {
'type': str,
'required': True,
'default': 'rev2',
'help': 'Squishy Hardware Platform',
'extcap_type': 'selector',
'extcap_name': 'Hardware Platform',
'values': ('rev1', 'rev2'),
'group': 'Hardware Options',
},
'scsi-did': {
'type': int,
'required': True,
'default': 7,
'range': (0, 7),
'help': 'SCSI ID',
'extcap_type': 'integer',
'extcap_name': 'SCSI ID',
'group': 'SCSI Options'
},
'scsi-arbitrating': {
'type': bool,
'help': 'Enable SCSI Bus arbitration',
'extcap_type': 'boolean',
'extcap_name': 'Bus Arbitration',
'group': 'SCSI Options'
},

'skip-cache': {
'type': bool,
'help': 'Skip cache lookup for built gateware',
'extcap_type': 'boolean',
'extcap_name': 'Skip Cache',
'group': 'Gateware Options'
},
'use-router2': {
'type': bool,
'help': 'Use nextpnr\'s router2',
'extcap_type': 'boolean',
'extcap_name': 'Use router2',
'group': 'Gateware Options'
},
'tmg-ripup': {
'type': bool,
'help': 'Use the timing-driven ripup router',
'extcap_type': 'boolean',
'extcap_name': 'Use the timing-driven ripup router',
'group': 'Gateware Options'
},
'pnr-seed': {
'type': int,
'help': 'nextpnr seed',
'defualt': 0,
'extcap_type': 'integer',
'extcap_name': 'PNR seed',
'group': 'Gateware Options'
},
'no-abc9': {
'type': bool,
'help': 'Disable ABC9',
'extcap_type': 'boolean',
'extcap_name': 'Disable ABC9',
'group': 'Gateware Options'
}
# 'platform': {
# 'type': str,
# 'required': True,
# 'default': list(AVAILABLE_PLATFORMS.keys())[-1],
# 'help': 'Squishy Hardware Platform',
# 'extcap_type': 'selector',
# 'extcap_name': 'Hardware Platform',
# 'values': (rev for rev in list(AVAILABLE_PLATFORMS.keys())),
# 'group': 'Hardware Options',
# }
}


Expand All @@ -150,7 +99,9 @@ def _setup_parser(parser: ArgumentParser):

def extcap_list_interfaces():
print(f'extcap {{version={__version__}}}{{help=https://docs.scsi.moe/extra.html#scsidump}}')
print('interface {value=scsidump}{display=Squishy SCSI Bus capture}')

for (sn, rev, _) in SquishyDevice.enumerate():
print(f'interface {{value={sn}}}{{display=Squishy rev{rev[0]}: SCSI Bus capture}}')

def extcap_list_dlts():
print('dlt {number=147}{name=squishy}{display=SCSI}')
Expand Down Expand Up @@ -181,7 +132,7 @@ def extcap_list_config():
extcap_arg_value += '{default=true}'
print(extcap_arg_value)

# print('arg {number=0}{call=--meow}{display=Meow}{type=boolean}{tooltip=Meow Meow Meow}')


def main() -> int:
parser = ArgumentParser(
Expand Down Expand Up @@ -209,7 +160,6 @@ def main() -> int:
extcap_list_config()



return 0


Expand Down
Loading
Loading