Skip to content
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
7 changes: 0 additions & 7 deletions .flake8

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


name: tests
permissions:
contents: read

on:
push:
Expand All @@ -16,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.13", "3.12", "3.11"]
python-version: ["3.14", "3.13", "3.12", "3.11"]
steps:
- name: Checkout
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ __pycache__
*.orig

!.github
!.run
!.editorconfig
!.flake8
!.gitignore
!.pre-commit-config.yaml
!.pre-commit-hooks.yaml
Expand Down
8 changes: 1 addition & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# pre-commit plugin configuration
# See https://pre-commit.com for more information
default_install_hook_types:
- prepare-commit-msg
- post-commit
- post-rewrite
- pre-push

repos:
- repo: https://github.com/jedie/cli-base-utilities
rev: v0.18.0
rev: v0.25.0
hooks:
- id: update-readme-history
24 changes: 24 additions & 0 deletions .run/Template Python tests.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="true" type="tests" factoryName="Unittests">
<module name="manageprojects" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="PYTHONWARNINGS" value="always" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/.venv/bin/python" />
<option name="SDK_NAME" value="Python 3 (manageprojects)" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="false" />
<option name="ADD_SOURCE_ROOTS" value="false" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="_new_pattern" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;--locals --verbose&quot;" />
<option name="_new_target" value="&quot;&quot;" />
<option name="_new_targetType" value="&quot;PATH&quot;" />
<method v="2" />
</configuration>
</component>
25 changes: 25 additions & 0 deletions .run/Unittests - __all___.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Unittests - **all**&quot;" type="tests" factoryName="Unittests">
<module name="DragonPy" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="PYTHONWARNINGS" value="always" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/.venv/bin/python" />
<option name="SDK_NAME" value="Python 3.10 (DragonPy)" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="false" />
<option name="ADD_SOURCE_ROOTS" value="false" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="RUN_TOOL" value="" />
<option name="_new_pattern" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;--locals --verbose&quot;" />
<option name="_new_target" value="&quot;&quot;" />
<option name="_new_targetType" value="&quot;PATH&quot;" />
<method v="2" />
</configuration>
</component>
27 changes: 27 additions & 0 deletions .run/cli.py --help.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="cli.py --help" type="PythonConfigurationType" factoryName="Python">
<module name="manageprojects" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="SDK_NAME" value="Python 3.10 (DragonPy)" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="false" />
<option name="ADD_SOURCE_ROOTS" value="false" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="RUN_TOOL" value="" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/cli.py" />
<option name="PARAMETERS" value="--help" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>
27 changes: 27 additions & 0 deletions .run/dev-cli.py update.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="dev-cli.py update" type="PythonConfigurationType" factoryName="Python">
<module name="manageprojects" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="SDK_NAME" value="Python 3.10 (DragonPy)" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="false" />
<option name="ADD_SOURCE_ROOTS" value="false" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="RUN_TOOL" value="" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/dev-cli.py" />
<option name="PARAMETERS" value="update" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>
1 change: 1 addition & 0 deletions PyDC/PyDC/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import sys

from PyDC.PyDC.wave2bitstream import Wave2Bitstream

from .CassetteObjects import Cassette


Expand Down
88 changes: 41 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,18 @@ usage: ./cli.py [-h] {download-roms,editor,gui,log-list,run,version}



╭─ options ─────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
╰───────────────────────────────────────────────────────────────────────────────╯
╭─ subcommands ─────────────────────────────────────────────────────────────────╮
│ {download-roms,editor,gui,log-list,run,version} │
│ download-roms │
│ Download/Test only ROM files │
│ editor Run only the BASIC editor │
│ gui <<< **start this** - Start the DragonPy tkinter starter GUI │
│ log-list List all exiting loggers and exit. │
│ run Run a machine emulation │
│ version Print version and exit │
╰───────────────────────────────────────────────────────────────────────────────╯
╭─ options ──────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
╰────────────────────────────────────────────────────────────────────────────────╯
╭─ subcommands ──────────────────────────────────────────────────────────────────╮
│ (required) │
│ • download-roms Download/Test only ROM files │
│ • editor Run only the BASIC editor │
│ • gui <<< **start this** - Start the DragonPy tkinter starter GUI │
│ • log-list List all exiting loggers and exit. │
│ • run Run a machine emulation │
│ • version Print version and exit │
╰────────────────────────────────────────────────────────────────────────────────╯
```
[comment]: <> (✂✂✂ auto generated main help end ✂✂✂)

Expand Down Expand Up @@ -177,40 +176,34 @@ The output of `./dev-cli.py --help` looks like:

[comment]: <> (✂✂✂ auto generated dev help start ✂✂✂)
```
usage: ./dev-cli.py [-h]
{check-code-style,coverage,fix-code-style,install,mypy,nox,pip-audit,publish,test,update,update-re
adme-history,update-test-snapshot-files,version}



╭─ options ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ subcommands ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ {check-code-style,coverage,fix-code-style,install,mypy,nox,pip-audit,publish,test,update,update-readme-history,upd │
│ ate-test-snapshot-files,version} │
│ check-code-style │
│ Check code style by calling darker + flake8 │
│ coverage Run tests and show coverage report. │
│ fix-code-style │
│ Fix code style of all dragonpy source code files via darker │
│ install Install requirements and 'dragonpy' via pip as editable. │
│ mypy Run Mypy (configured in pyproject.toml) │
│ nox Run nox │
│ pip-audit Run pip-audit check against current requirements files │
│ publish Build and upload this project to PyPi │
│ test Run unittests │
│ update Update "requirements*.txt" dependencies files │
│ update-readme-history │
│ Update project history base on git commits/tags in README.md Will be exited with 1 if the │
│ README.md was updated otherwise with 0. │
│ │
│ Also, callable via e.g.: │
│ python -m cli_base update-readme-history -v │
│ update-test-snapshot-files │
│ Update all test snapshot files (by remove and recreate all snapshot files) │
│ version Print version and exit │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
usage: ./dev-cli.py [-h] {coverage,install,lint,mypy,nox,pip-audit,publish,test,update,update-readme-history,update-test-snapshot-files,version}



╭─ options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ subcommands ────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ (required) │
│ • coverage Run tests and show coverage report. │
│ • install Install requirements and 'dragonpy' via pip as editable. │
│ • lint Check/fix code style by run: "ruff check --fix" │
│ • mypy Run Mypy (configured in pyproject.toml) │
│ • nox Run nox │
│ • pip-audit Run pip-audit check against current requirements files │
│ • publish Build and upload this project to PyPi │
│ • test Run unittests │
│ • update Update dependencies (uv.lock) and git pre-commit hooks │
│ • update-readme-history │
│ Update project history base on git commits/tags in README.md Will be exited with 1 if the README.md was updated │
│ otherwise with 0. │
│ │
│ Also, callable via e.g.: │
│ python -m cli_base update-readme-history -v │
│ • update-test-snapshot-files │
│ Update all test snapshot files (by remove and recreate all snapshot files) │
│ • version Print version and exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```
[comment]: <> (✂✂✂ auto generated dev help end ✂✂✂)

Expand Down Expand Up @@ -483,6 +476,7 @@ To make a new release, do this:
[comment]: <> (✂✂✂ auto generated history start ✂✂✂)

* [v0.10.0](https://github.com/jedie/DragonPy/compare/v0.9.3...v0.10.0)
* 2025-12-09 - Update via manageprojects
* 2025-07-28 - update requirements + remove obsolete requirements.txt
* 2025-04-22 - replace click with tyro
* 2025-04-22 - Migrate from pip-tools to uv
Expand Down
3 changes: 2 additions & 1 deletion dragonpy/Dragon32/MC6821_PIA.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
import logging
import queue

from MC6809.utils.humanize import byte2bit_string

from dragonpy import constants
from dragonpy.utils.bits import is_bit_set, set_bit
from MC6809.utils.humanize import byte2bit_string


log = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletion dragonpy/Dragon32/mem_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import logging

from MC6809.core.memory_info import BaseMemoryInfo

from MC6809.utils.humanize import nice_hex


Expand Down
4 changes: 3 additions & 1 deletion dragonpy/cli_app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import logging
import sys
from collections.abc import Sequence

from cli_base.autodiscover import import_all_files
from cli_base.cli_tools.version_info import print_version
Expand All @@ -29,11 +30,12 @@ def version():
sys.exit(0)


def main():
def main(args: Sequence[str] | None = None):
print_version(dragonpy)
app.cli(
prog='./cli.py',
description=constants.CLI_EPILOG,
use_underscores=False, # use hyphens instead of underscores
sort_subcommands=True,
args=args,
)
Loading