1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 23:37:14 +03:00

Merge branch 'develop' into enhancement/2186/remove-darwin

This commit is contained in:
David Sangrey 2024-04-05 17:17:51 -04:00 committed by GitHub
commit ccb103242c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 98 additions and 12 deletions

View File

@ -155,7 +155,7 @@ jobs:
run: sha256sum EDMarketConnector_Installer_*.exe EDMarketConnector-release-*.{zip,tar.gz} > ./hashes.sum
- name: Create Draft Release
uses: "softprops/action-gh-release@v1"
uses: "softprops/action-gh-release@v2"
with:
token: "${{secrets.GITHUB_TOKEN}}"
draft: true

View File

@ -778,4 +778,7 @@
"Ships" = "Ships";
/* update.py: Update Available Text; In files: update.py:229; */
"{NEWVER} is available" = "{NEWVER} is available";
"{NEWVER} is available" = "{NEWVER} is available";
/* myNotebook.py: Can't Paste Images or Files in Text; */
"Cannot paste non-text content." = "Cannot paste non-text content.";

View File

@ -131,7 +131,6 @@ def build() -> None:
"distutils",
"_markerlib",
"optparse",
"PIL",
"simplejson",
"unittest",
"doctest",

View File

@ -5,6 +5,8 @@ Copyright (c) EDCD, All Rights Reserved
Licensed under the GNU General Public License.
See LICENSE file.
"""
from __future__ import annotations
import os
import pathlib
import sys

View File

@ -54,6 +54,8 @@ if sys.platform == 'win32':
GetWindowText = ctypes.windll.user32.GetWindowTextW
GetWindowText.argtypes = [HWND, LPWSTR, ctypes.c_int]
GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
GetWindowTextLength.argtypes = [ctypes.wintypes.HWND]
GetWindowTextLength.restype = ctypes.c_int
GetProcessHandleFromHwnd = ctypes.windll.oleacc.GetProcessHandleFromHwnd

View File

@ -11,7 +11,12 @@ from __future__ import annotations
import sys
import tkinter as tk
from tkinter import ttk
from tkinter import ttk, messagebox
from typing import TYPE_CHECKING
from PIL import ImageGrab
if TYPE_CHECKING:
def _(x: str) -> str: return x
if sys.platform == 'win32':
PAGEFG = 'SystemWindowText'

View File

@ -1889,6 +1889,74 @@ class EDDN:
return None
def export_journal_dockingdenied(
self, cmdr: str, is_beta: bool, entry: Mapping[str, Any]
) -> str | None:
"""
Send a DockingDenied to EDDN on the correct schema.
:param cmdr: the commander under which this upload is made
:param is_beta: whether or not we are in beta mode
:param entry: the journal entry to send
Example:
{
"timestamp":"2022-06-10T10:09:41Z",
"event":"DockingDenied",
"Reason":"RestrictedAccess",
"MarketID":3706117376,
"StationName":"V7G-T1G",
"StationType":"FleetCarrier"
}
"""
#######################################################################
# Elisions
#######################################################################
# In case Frontier ever add any
entry = filter_localised(entry)
msg = {
'$schemaRef': f'https://eddn.edcd.io/schemas/dockingdenied/1{"/test" if is_beta else ""}',
'message': entry
}
this.eddn.send_message(cmdr, msg)
return None
def export_journal_dockinggranted(
self, cmdr: str, is_beta: bool, entry: Mapping[str, Any]
) -> str | None:
"""
Send a DockingDenied to EDDN on the correct schema.
:param cmdr: the commander under which this upload is made
:param is_beta: whether or not we are in beta mode
:param entry: the journal entry to send
Example:
{
"timestamp":"2023-10-01T14:56:34Z",
"event":"DockingGranted",
"LandingPad":41,
"MarketID":3227312896,
"StationName":"Evans Horizons",
"StationType":"Coriolis"
}
"""
#######################################################################
# Elisions
#######################################################################
# In case Frontier ever add any
entry = filter_localised(entry)
msg = {
'$schemaRef': f'https://eddn.edcd.io/schemas/dockinggranted/1{"/test" if is_beta else ""}',
'message': entry
}
this.eddn.send_message(cmdr, msg)
return None
def canonicalise(self, item: str) -> str:
"""
Canonicalise the given commodity name.
@ -2336,6 +2404,12 @@ def journal_entry( # noqa: C901, CCR001
if event_name == 'fcmaterials':
return this.eddn.export_journal_fcmaterials(cmdr, is_beta, entry)
if event_name == "dockingdenied":
return this.eddn.export_journal_dockingdenied(cmdr, is_beta, entry)
if event_name == "dockinggranted":
return this.eddn.export_journal_dockinggranted(cmdr, is_beta, entry)
if event_name == 'approachsettlement':
# An `ApproachSettlement` can appear *before* `Location` if you
# logged at one. We won't have necessary augmentation data

View File

@ -5,7 +5,7 @@ wheel
# 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==69.1.1
setuptools==69.2.0
# Static analysis tools
flake8==7.0.0
@ -18,14 +18,14 @@ flake8-noqa==1.4.0
flake8-polyfill==1.0.2
flake8-use-fstring==1.4
mypy==1.8.0
mypy==1.9.0
pep8-naming==0.13.3
safety==2.3.5
types-requests==2.31.0.20240125
safety==3.0.1
types-requests==2.31.0.20240311
types-pkg-resources==0.1.3
# Code formatting tools
autopep8==2.0.4
autopep8==2.1.0
# Git pre-commit checking
pre-commit==3.6.2
@ -38,9 +38,9 @@ grip==4.6.2
py2exe==0.13.0.1; sys_platform == 'win32'
# Testing
pytest==8.0.2
pytest==8.1.1
pytest-cov==4.1.0 # Pytest code coverage support
coverage[toml]==7.4.1 # pytest-cov dep. This is here to ensure that it includes TOML support for pyproject.toml configs
coverage[toml]==7.4.4 # pytest-cov dep. This is here to ensure that it includes TOML support for pyproject.toml configs
coverage-conditional-plugin==0.9.0
# For manipulating folder permissions and the like.
pywin32==306; sys_platform == 'win32'

View File

@ -1,5 +1,6 @@
certifi==2023.11.17
certifi==2024.2.2
requests==2.31.0
pillow==10.2.0
# requests depends on this now ?
charset-normalizer==2.1.1