1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-24 20:50:53 +03:00

2396 Commits

Author SHA1 Message Date
Athanasius
e51bde44ef Shutdown: re-order the top level calls
1. The updater is in a thread/DLL and we don't want that firing part way
  through shutdown, so it gets asked to stop first.
2. Then plugins, so they're out of the way and we won't have already
  stopped something they might rely on.
3. Hotkey after that to head off the user triggering something via them.
4. Now stop the programmatic input from Journal files (including
   Status.json).
5. Frontier auth handling.
6. And then anything else.
2021-01-08 15:44:06 +00:00
Ash Holland
590cd608d3 Fix logging from mangled methods where class name starts with "_"
Python's name-mangling rules are quite complex. Previously, EDMC was
incorrectly mangling names where the class name starts with one or more
underscores; if the class name starts with any underscores, they should
be removed before prepending to the identifier being mangled. If the
class name contains *only* underscores, no mangling should be performed.
2021-01-08 15:32:42 +00:00
Athanasius
5776149d5d
Merge pull request #835 from EDCD/fix/834/cease-journal-parse-on-shutdown
Bail out of Journal monitoring during shutdown
2021-01-08 15:14:09 +00:00
Athanasius
90ddd4e1e3 plugins: Log plugin names as we ask them to stop, and when we're done with them all
This should point the finger at any plugin(s) that aren't stopping
properly.  Well, at least those that are hanging *in* their
`plugin_stop()`.
2021-01-08 14:56:22 +00:00
Athanasius
81974f66ec monitor/dashboard: move away from if __debug__
This includes changing one print_exc() to logger.exception()
2021-01-08 14:56:22 +00:00
Athanasius
be18f36e54 EDMarketConnector: Bail in AppWindow.journal_entry if monitor.thread is None
monitor.thread should only be none when there's a <<JournalEvent>> to
process if we're in shutdown, in which case we do *not* want to be
processing journal events.
2021-01-08 14:56:22 +00:00
Athanasius
8a0a82fe43 monitor: Bail from get_entry() if self.thread is None
If there's no thread to have sent the message then we shouldn't care
about it as this means we're in shutdown.
2021-01-08 14:56:22 +00:00
Athanasius
95b87f5b7b monitor: Detect shutdown and bail in log reading loop
This should mean not even generating <<JournalEvent>> Tk events once
self.thread == None.
2021-01-08 14:56:22 +00:00
Athanasius
f3e87f9c24 Merge branch 'release-4.1.6-rc1' into main 2021-01-08 14:55:56 +00:00
Athanasius
bc7d6defed
Merge pull request #827 from EDCD/fix/main-push-checks
Replace python checks with jq in workflow
2021-01-05 15:22:29 +00:00
A_D
d58d831ebe
Replace python checks with jq in workflow
Also makes sure that pushes to main ARE checked
2021-01-05 17:20:21 +02:00
Athanasius
207bb9920f 4.1.6-rc1: version bump and changelog Release/4.1.6-rc1 2021-01-05 15:01:09 +00:00
A_D
525f0b05e7 Added doctest 2021-01-05 14:34:52 +00:00
A_D
416b73bc3b Modified location of state updates 2021-01-05 14:34:52 +00:00
A_D
13f7b62fe8 Added cargoJSON to state docs 2021-01-05 14:34:52 +00:00
A_D
1be723e249 Added additional doccumentation 2021-01-05 14:34:51 +00:00
A_D
b04b39fa8a Fix multiple missions with the same cargo type
A user can collect multiple missions with the same mission cargo, which
is added to the cargo.json as distinct entries. Previously we would take
the last number as the total, leading to invalid counts (and possibly
negative counts).

This adds a method to sum cargo entries based on the cargo name. It also
adds a field on status to access the original cargo JSON data.

Fixes #817
2021-01-05 14:34:51 +00:00
Athanasius
91e6583326
Merge pull request #812 from A-UNDERSCORE-D/fix/808-log-in-property-func
Added support for logging from properties
2021-01-05 14:27:59 +00:00
Athanasius
2b96004100 Merge branch 'stable' into main 2021-01-05 14:18:12 +00:00
Athanasius
c1dcd30280 PLUGINS.md: Be explicit about why plugin_prefs(...) -> Optional[tk.Frame] 2020-12-21 14:44:39 +00:00
A_D
1cb876c594
Added support for logging from properties
This is some best effort support for using logging in properties.

This works by using the (as suggested by reporter) inspect
`getattr_static` method, and failing that (as it can possibly fail),
wrapping a `getattr` in a try/catch for a RecursionError--don't want to
catch other things, probably best if that explodes on its own.

From there as the `property` object will not have location information,
we rebuild as best we can to an approximation of what the path would be.
With a healthy dash of defensive programming "Just in case".

I don't think that this will have any adverse effects to other logging
methods, as all the new code should only be touched if we hit a property
object.

Closes #808
2020-12-21 12:39:45 +02:00
Athanasius
a65d77a67e PLUGINS.md: Make the disctinction between "ShutDown" and "Shutdown" clear 2020-12-18 12:32:45 +00:00
Athanasius
4883c1606b Merge branch 'releases' into stable 2020-12-15 20:12:50 +00:00
Athanasius
819bb27997 4.1.5: appcast file update Release/4.1.5 2020-12-15 20:02:24 +00:00
Athanasius
741d62c072 Release 4.1.5: Config.py version bump 2020-12-15 19:57:24 +00:00
Athanasius
95becbc49c 4.1.5 Changelog: The '??:??' logging thing, bug linking & preamble. 2020-12-15 19:45:17 +00:00
Athanasius
a68f5d6e84 Initial changelog for 4.1.5. 2020-12-15 19:39:23 +00:00
Athanasius
104963ceb1
Merge pull request #803 from EDCD/fix/catch-logging-inspect-failure
EDMCLogging: Catch inspect.getframeinfo(frame) not working
2020-12-15 19:37:55 +00:00
Athanasius
286647869b EDMCLogging: Comment out a 'testing' raise() call 2020-12-15 19:35:51 +00:00
Athanasius
f885c2b769 EDMCLogging: Catch inspect.getframeinfo(frame) not working
Maybe with this we'll see something 'here' or later to give a clue as to
why this doesn't work on at least two systems.
2020-12-15 15:08:36 +00:00
Athanasius
d903d80410 Make 'Shutting down...' text translatable. 2020-12-15 14:49:22 +00:00
Athanasius
3057551bff
Merge pull request #802 from EDCD/docs/plugins-python-version
PLUGINS.md: Point to current Python version information in Releasing.md
2020-12-12 14:03:02 +00:00
Athanasius
a181379669 PLUGINS.md: Point to current Python version information in Releasing.md 2020-12-12 14:02:11 +00:00
Athanasius
b5f98d7ced
Merge pull request #796 from A-UNDERSCORE-D/docs/windows-build-action
Added docs for windows build action
2020-12-08 18:20:18 +00:00
A_D
2b038a551b
Fixed github capitialization 2020-12-08 20:17:12 +02:00
A_D
f468227a6c
Renamed to Automatic builds in link 2020-12-08 20:12:09 +02:00
A_D
20f95460c4
Fixed actions link in release docs 2020-12-08 20:09:36 +02:00
A_D
77d9eb293e
Fixed a few style errors 2020-12-08 20:07:12 +02:00
A_D
3a980ef16a
Added docs for windows build action 2020-12-08 19:59:41 +02:00
Athanasius
cabf7289cb
Merge pull request #794 from EDCD/fix/actions-windows-build-name
Add name to windows build action
2020-12-08 17:42:27 +00:00
A_D
bd74aaf0aa
Add name to windows build action
This should make it show up with a more sane name
2020-12-08 19:36:26 +02:00
Athanasius
7737766a58
Merge pull request #792 from A-UNDERSCORE-D/actions/only-msi
Remove Appcast generation, only upload msi installer
2020-12-08 16:55:16 +00:00
A_D
3a0da6dadc
Added missing newline 2020-12-08 18:53:23 +02:00
A_D
033a3bb4da
Removed appcast, only upload msi installer 2020-12-08 18:51:00 +02:00
Athanasius
85a1a8efce
Merge pull request #789 from A-UNDERSCORE-D/github-actions-build
Build automatically with github actions
2020-12-08 16:40:24 +00:00
A_D
87afa69f53
Removed py2exe setup 2020-12-08 18:37:33 +02:00
A_D
fa3335d59a
Added windows build 2020-12-08 18:37:32 +02:00
Athanasius
ec93dec8a7
Merge pull request #791 from EDCD/enhancement/main-for-4.1.5
Cherry-pick in some key commits for upcoming 4.1.5
2020-12-08 16:33:01 +00:00
Athanasius
5cc4a6e80b EDMarketConnector: Add detailed logging to shutdown sequence 2020-12-08 16:14:06 +00:00
Athanasius
3ff9bdcc88 Fix Python 3.8 syntax use in backport to 4.1.x/Python 3.7 2020-12-08 16:08:30 +00:00