diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a709c7dc..c1713fd7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -59,7 +59,7 @@ jobs: # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 17841159..d49d970d 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -28,7 +28,7 @@ jobs: # based on. - name: Checkout head commits # https://github.com/actions/checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 #with: #ref: ${{github.head.sha}} #repository: ${{github.event.pull_request.head.repo.full_name}} @@ -53,7 +53,7 @@ jobs: # Get Python set up #################################################################### - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version-file: '.python-version' cache: 'pip' # caching pip dependencies diff --git a/.github/workflows/push-checks.yml b/.github/workflows/push-checks.yml index 3e83fbfb..51c9d47b 100644 --- a/.github/workflows/push-checks.yml +++ b/.github/workflows/push-checks.yml @@ -22,11 +22,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: cache: 'pip' # caching pip dependencies python-version-file: '.python-version' diff --git a/.github/workflows/submodule-update.yml b/.github/workflows/submodule-update.yml index 74213c29..5dbba221 100644 --- a/.github/workflows/submodule-update.yml +++ b/.github/workflows/submodule-update.yml @@ -24,7 +24,7 @@ jobs: OWNER: 'EDCD' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: ref: '${{ env.CHECKOUT_BRANCH }}' submodules: true @@ -60,7 +60,7 @@ jobs: - name: Create pull request against target branch if: steps.check_for_changes.outputs.changes == 'true' - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: github-token: "${{ secrets.GITHUB_TOKEN }}" script: | diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index a44a20cd..1d43c3c7 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -15,7 +15,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: Setting global variables - uses: actions/github-script@v7 + uses: actions/github-script@v8 id: var with: script: | @@ -27,7 +27,7 @@ jobs: name: Linux environment build steps runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: true - name: Create .gitversion @@ -78,7 +78,7 @@ jobs: shell: powershell steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: true @@ -101,7 +101,7 @@ jobs: # presumably due to a Windows CL length limit. exclusions: 'EDMarketConnector/EDMarketConnector-release-*.* EDMarketConnector/.editorconfig EDMarketConnector/.flake8 EDMarketConnector/.git* EDMarketConnector/.mypy.ini EDMarketConnector/.pre-commit-config.yaml EDMarketConnector/build.py EDMarketConnector/*.manifest EDMarketConnector/coriolis-data/ EDMarketConnector/img/ EDMarketConnector/pyproject.toml EDMarketConnector/scripts/ EDMarketConnector/tests/' - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version-file: '.python-version' architecture: "x86" @@ -155,7 +155,7 @@ jobs: steps: - name: Download binary - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: Built files path: ./ diff --git a/ChangeLog.md b/ChangeLog.md index 03d5a062..b30b82b7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,24 @@ This is the master changelog for Elite Dangerous Market Connector. Entries are in the source (not distributed with the Windows installer) for the currently used version. --- +Release 5.13.2 +=== +This release contains an update to a series of behind-the-scenes tools, as well as adding Corsair, Cobra Mk V, +Type-11, and Panther CLipper Mk II information. + +**Changes and Enhancements** +* Adds Missing Ship Information +* Updates Dependencies +* Minor Logic Improvements for Journal Monitoring + +**Plugin Developers** +* nb.Entry is deprecated, and is slated for removal in 6.0 or later. Please migrate to nb.EntryMenu +* nb.ColoredButton is deprecated, and is slated for removal in 6.0 or later. Please migrate to tk.Button +* Calling internal translations with `_()` is deprecated, and is slated for removal in 6.0 or later. Please migrate to importing `translations` and calling `translations.translate` or `translations.tl` directly +* `Translations` as the translate system singleton is deprecated, and is slated for removal in 6.0 or later. Please migrate to the `translations` singleton +* `help_open_log_folder()` is deprecated, and is slated for removal in 6.0 or later. Please migrate to open_folder() +* `update_feed` is deprecated, and is slated for removal in 6.0 or later. Please migrate to `get_update_feed()` + Release 5.13.1 === This release fixes a bug with 5.13.0 that could cause the program to fail to launch if a non-English locale diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 1b45225a..92f34a48 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -2248,7 +2248,7 @@ sys.path: {sys.path}''' msg = tk.messagebox.askyesno( title=title, message=message, detail=detail, icon=tkinter.messagebox.ERROR, type=tkinter.messagebox.YESNO, parent=root - ) + ) # type: ignore if msg: webbrowser.open( "https://github.com/EDCD/EDMarketConnector/issues/new?" diff --git a/companion.py b/companion.py index 0f16e237..384dcdd5 100644 --- a/companion.py +++ b/companion.py @@ -705,7 +705,7 @@ class Session: self.credentials = credentials self.state = Session.STATE_INIT - self.auth = Auth(self.credentials['cmdr']) + self.auth = Auth(self.credentials['cmdr']) # type: ignore access_token = self.auth.refresh() if access_token: diff --git a/config/__init__.py b/config/__init__.py index 68153322..2c1d35fc 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -52,9 +52,9 @@ appcmdname = 'EDMC' # # Major.Minor.Patch(-prerelease)(+buildmetadata) # NB: Do *not* import this, use the functions appversion() and appversion_nobuild() -_static_appversion = '5.13.1' +_static_appversion = '5.13.2' _cached_version: semantic_version.Version | None = None -copyright = '© 2015-2019 Jonathan Harris, 2020-2024 EDCD' +copyright = '© 2015-2019 Jonathan Harris, 2020-2025 EDCD' update_interval = 8*60*60 # 8 Hours diff --git a/coriolis-data b/coriolis-data index c59e4b79..51ec5c2d 160000 --- a/coriolis-data +++ b/coriolis-data @@ -1 +1 @@ -Subproject commit c59e4b79dc48d581f9c5936d66a7f8bf533e8e6c +Subproject commit 51ec5c2d13033b6d0a7e59f6a90f9432bee32e71 diff --git a/dashboard.py b/dashboard.py index cae2cc96..60d5316f 100644 --- a/dashboard.py +++ b/dashboard.py @@ -123,12 +123,12 @@ class Dashboard(FileSystemEventHandler): if self.observer: logger.debug('Calling self.observer.stop()') - self.observer.stop() + self.observer.stop() # type: ignore logger.debug('Done') if self.observer: logger.debug('Joining self.observer...') - self.observer.join() + self.observer.join() # type: ignore logger.debug('Done') self.observer = None # type: ignore diff --git a/edmc_data.py b/edmc_data.py index 1f68dd77..f29795f4 100644 --- a/edmc_data.py +++ b/edmc_data.py @@ -479,7 +479,8 @@ ship_name_map = { 'belugaliner': 'Beluga Liner', 'cobramkiii': 'Cobra MkIII', 'cobramkiv': 'Cobra MkIV', - 'cobramkv': 'Cobra MkV', + 'cobramkv': 'Cobra Mk V', + 'corsair': 'Corsair', 'clipper': 'Panther Clipper', 'cutter': 'Imperial Cutter', 'diamondback': 'Diamondback Scout', @@ -501,9 +502,11 @@ ship_name_map = { 'independent_fighter': 'Taipan Fighter', 'krait_mkii': 'Krait MkII', 'krait_light': 'Krait Phantom', + 'lakonminer': 'Type-11 Prospector', 'mamba': 'Mamba', 'mandalay': 'Mandalay', 'orca': 'Orca', + 'panthermkii': 'Panther Clipper Mk II', 'python': 'Python', 'python_nx': 'Python Mk II', 'scout': 'Taipan Fighter', diff --git a/modules.json b/modules.json index f736bcff..ac67abd1 100644 --- a/modules.json +++ b/modules.json @@ -119,6 +119,21 @@ "cobramkv_armour_reactive": { "mass": 27 }, + "corsair_armour_grade1": { + "mass": 0 + }, + "corsair_armour_grade2": { + "mass": 32 + }, + "corsair_armour_grade3": { + "mass": 63 + }, + "corsair_armour_mirrored": { + "mass": 63 + }, + "corsair_armour_reactive": { + "mass": 63 + }, "cutter_armour_grade1": { "mass": 0 }, @@ -671,6 +686,9 @@ "hpt_mininglaser_turret_small": { "mass": 2 }, + "hpt_miningtoolv2_fixed_large": { + "mass": 8 + }, "hpt_missing_hardpoint": { "mass": 0 }, @@ -2289,6 +2307,12 @@ "fuelmul": 0.012, "fuelpower": 2.9 }, + "int_largecargorack_size7_class1": { + "mass": 0 + }, + "int_largecargorack_size8_class1": { + "mass": 0 + }, "int_lifesupport_size1_class1": { "mass": 1.3 }, @@ -2503,6 +2527,9 @@ "int_multidronecontrol_mining_size3_class3": { "mass": 10 }, + "int_multidronecontrol_miningv2_size5_class5": { + "mass": 64 + }, "int_multidronecontrol_operations_size3_class3": { "mass": 10 }, @@ -3427,6 +3454,21 @@ "krait_mkii_armour_reactive": { "mass": 67 }, + "lakonminer_armour_grade1": { + "mass": 0 + }, + "lakonminer_armour_grade2": { + "mass": 32 + }, + "lakonminer_armour_grade3": { + "mass": 63 + }, + "lakonminer_armour_mirrored": { + "mass": 63 + }, + "lakonminer_armour_reactive": { + "mass": 63 + }, "mamba_armour_grade1": { "mass": 0 }, @@ -3472,6 +3514,21 @@ "orca_armour_reactive": { "mass": 87 }, + "panthermkii_armour_grade1": { + "mass": 0 + }, + "panthermkii_armour_grade2": { + "mass": 75 + }, + "panthermkii_armour_grade3": { + "mass": 150 + }, + "panthermkii_armour_mirrored": { + "mass": 150 + }, + "panthermkii_armour_reactive": { + "mass": 150 + }, "python_armour_grade1": { "mass": 0 }, diff --git a/monitor.py b/monitor.py index 32e58c78..91cf3375 100644 --- a/monitor.py +++ b/monitor.py @@ -722,7 +722,7 @@ class EDLogs(FileSystemEventHandler): cap = module['Item'].split('size') cap = cap[1].split('_') cap = 2 ** int(cap[0]) - ship = ship_name_map[entry["Ship"]] + ship = ship_name_map.get(entry["Ship"], entry["Ship"]) fuel = {'Main': cap, 'Reserve': ships[ship]['reserveFuelCapacity']} data_dict.update({"FuelCapacity": fuel}) data_dict.update({ diff --git a/plugins/eddn.py b/plugins/eddn.py index 9bfab900..39ecf147 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -223,22 +223,24 @@ class EDDNSender: def convert_legacy_file(self): """Convert a legacy file's contents into the sqlite3 db.""" + # DEPRECATED: Legacy files no longer used as of 5.6.0. Will remove in 6.0 or later. filename = config.app_dir_path / 'replay.jsonl' + if not filename.exists(): + return + logger.info("Converting legacy `replay.jsonl` to `eddn_queue-v1.db`") try: - with open(filename, 'r+', buffering=1) as replay_file: - logger.info("Converting legacy `replay.jsonl` to `eddn_queue-v1.db`") + with filename.open('r', encoding='utf-8') as replay_file: for line in replay_file: cmdr, msg = json.loads(line) self.add_message(cmdr, msg) - - except FileNotFoundError: + except Exception as e: + logger.exception("Failed to convert legacy file: %s", e) return - - logger.info("Conversion to `eddn_queue-v1.db` complete, removing `replay.jsonl`") - # Best effort at removing the file/contents - with open(filename, 'w') as replay_file: - replay_file.truncate() - os.unlink(filename) + logger.info("Conversion complete, removing `replay.jsonl`") + try: + filename.unlink() + except Exception as e: + logger.warning("Could not delete legacy file: %s", e) def close(self) -> None: """Clean up any resources.""" diff --git a/prefs.py b/prefs.py index 51525bd4..762d9a27 100644 --- a/prefs.py +++ b/prefs.py @@ -209,7 +209,7 @@ if sys.platform == 'win32': config_home: The home directory path Returns: Localized path as string - """ + """ # noqa: D205, D407 if not path: return path diff --git a/requirements-dev.txt b/requirements-dev.txt index 8b20b4d5..ef9c84c0 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ # We can't rely on just picking this up from either the base (not venv), # or venv-init-time version. Specify here so that dependabot will prod us # about new versions. -setuptools==78.1.1 +setuptools==80.9.0 # Static analysis tools flake8==7.2.0 @@ -14,11 +14,11 @@ flake8-noqa==1.4.0 flake8-polyfill==1.0.2 flake8-use-fstring==1.4 -mypy==1.15.0 -pep8-naming==0.14.1 -safety==3.4.0 +mypy==1.18.2 +pep8-naming==0.15.1 +safety==3.6.2 types-requests==2.32.0.20250328 -types-setuptools==80.0.0.20250429 +types-setuptools==80.9.0.20250529 # Code formatting tools autopep8==2.3.2 @@ -34,9 +34,9 @@ mistune==3.1.3 py2exe==0.13.0.2; sys_platform == 'win32' # Testing -pytest==8.3.5 +pytest==8.4.2 pytest-cov==6.1.1 # Pytest code coverage support -coverage[toml]==7.8.0 # pytest-cov dep. This is here to ensure that it includes TOML support for pyproject.toml configs +coverage[toml]==7.11.0 # pytest-cov dep. This is here to ensure that it includes TOML support for pyproject.toml configs coverage-conditional-plugin==0.9.0 diff --git a/requirements.txt b/requirements.txt index af15fd94..05a05733 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -requests==2.32.4 -pillow==11.2.1 +requests==2.32.5 +pillow==12.0.0 watchdog==6.0.0 simplesystray==0.1.0; sys_platform == 'win32' semantic-version==2.10.0 # For manipulating folder permissions and the like. pywin32==310; sys_platform == 'win32' -psutil==6.1.1 +psutil==7.1.0 diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 362d54bc..19a5efb6 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -28,7 +28,7 @@ def get_arg(call: ast.Call) -> str: arg = call.args[0] if isinstance(arg, ast.Constant): - return arg.value + return str(arg.value) if isinstance(arg, ast.Name): return f"VARIABLE! CHECK CODE! {arg.id}" return f"Unknown! {type(arg)=} {ast.dump(arg)} ||| {ast.unparse(arg)}" diff --git a/ships.json b/ships.json index 7b2fd62a..c62c6210 100644 --- a/ships.json +++ b/ships.json @@ -39,10 +39,14 @@ "hullMass": 210, "reserveFuelCapacity": 0.51 }, - "Cobra MkV": { + "Cobra Mk V": { "hullMass": 150, "reserveFuelCapacity": 0.49 }, + "Corsair": { + "hullMass": 265, + "reserveFuelCapacity": 0.41 + }, "Diamondback Explorer": { "hullMass": 260, "reserveFuelCapacity": 0.52 @@ -123,6 +127,10 @@ "hullMass": 290, "reserveFuelCapacity": 0.79 }, + "Panther Clipper Mk II": { + "hullMass": 1200, + "reserveFuelCapacity": 1.11 + }, "Python": { "hullMass": 350, "reserveFuelCapacity": 0.83 @@ -139,6 +147,10 @@ "hullMass": 1200, "reserveFuelCapacity": 0.77 }, + "Type-11 Prospector": { + "hullMass": 320, + "reserveFuelCapacity": 0.6 + }, "Type-6 Transporter": { "hullMass": 155, "reserveFuelCapacity": 0.39 diff --git a/theme.py b/theme.py index 2f00731e..99ccb158 100644 --- a/theme.py +++ b/theme.py @@ -222,7 +222,7 @@ class _Theme: widget = event.widget if widget and widget['state'] != tk.DISABLED: try: - widget.configure(state=tk.ACTIVE) + widget.configure(state=tk.ACTIVE) # type: ignore except Exception: logger.exception(f'Failure setting widget active: {widget=}') @@ -239,7 +239,7 @@ class _Theme: widget = event.widget if widget and widget['state'] != tk.DISABLED: try: - widget.configure(state=tk.NORMAL) + widget.configure(state=tk.NORMAL) # type: ignore except Exception: logger.exception(f'Failure setting widget normal: {widget=}')