Commit Graph
1548 Commits
Author SHA1 Message Date
Athanasius ae62bec63d Remove extraneous 'e '
*shakes fist at PyCharm*
2020-07-12 16:07:19 +01:00
Athanasius 690b8b0da3 Use 'main' branch for 'migrate plugins' URL 2020-07-12 15:59:40 +01:00
Athanasius 6910696172 Merge pull request #591 from EDCD/feature/589-sort-plugins-for-load
sort internal plugins before loading
2020-07-12 15:51:50 +01:00
Athanasius 076eab9e22 sort internal plugins before loading
This is already done for 'found' plugins, so let's avoid any potnetial
future surprise with the internal ones as well.

close #589
2020-07-12 15:50:49 +01:00
Athanasius 624f2a7907 Changelog and version bump for 3.99.5.0 Release/3.99.5.0 2020-07-11 21:03:48 +01:00
Athanasius c78d9241df Merge pull request #573 from A-UNDERSCORE-D/fix/477-inara-cargo-slow-update
Fixed updating inara cargo only on major events
2020-07-11 20:04:17 +01:00
A_D f43141202b Removed debug print 2020-07-11 20:55:18 +02:00
A_D 061fbddb2d Fixed wording of comment on last_update_time 2020-07-11 20:53:48 +02:00
A_D 9b82464f88 Fixed updating inara cargo only on major events
This works by checking on _any_ event the status of the cargo vs the
current stored version. If the live cargo differs from the updated
cargo, _and_ we have not sent any update in the past 45 seconds (as this
would have contained the cargo anyway), we queue an actual send to the
API.

This unfortunately isn't checked only when docked, but on the plus side
miners will be happy to have their cargo updated relatively often.

Fixes #477. Possibly not quite what they wanted, but its about as close
as this will get
2020-07-11 20:53:47 +02:00
Athanasius 96f7457ae3 Merge pull request #587 from EDCD/fix/586-EDDB-system-links
Fix/586 eddb system links
2020-07-11 19:48:19 +01:00
Athanasius 317a0f6b63 EDDB is default station provider, do station_marketid as needed
We need a better way to do provider defaults.  Heck, settings defaults period.
Let's assume we'll put in place a "standard" config file once we move to one.
2020-07-11 19:47:30 +01:00
Athanasius 6932fdc883 EDDB: Use CAPI for system_address/station_marketid only if not already set
See issue #586 - a user had incorrect system_address set, but only sometimes.

This could possibly be due to CAPI errors/lag, so only use it as the source
when the values aren't yet set.  Otherwise Journal should always have provided
the correct value in a timely manner.
2020-07-11 18:57:04 +01:00
Athanasius 0282d0c6ba Version 3.99.4.0
* config.appversion increased.
* Changelog updated.
Release/3.99.4.0
2020-07-10 12:52:36 +01:00
Athanasius ec9533d092 Updated translations: pl, pt-BR 2020-07-10 12:50:12 +01:00
Athanasius 1fd35bb119 Change URL branch 'develop' to 'main' in docs 2020-07-10 11:15:26 +01:00
Athanasius d4706a053e We now use 'main' instead of 'master' in place of 'develop'
After 4.0.0.0 we need to not have 'develop' as default branch, so change it
now, and migrate to 'main' instead of 'master' whilst we're at it.
2020-07-10 11:07:45 +01:00
Athanasius fb6e4b1d38 Merge pull request #578 from EDCD/issue/576-Remove-all-BPC-code
Remove last traces of 'BPC' output code
2020-07-10 10:26:08 +01:00
Athanasius 65086be1cd Remove last traces of 'BPC' output code
close #576
2020-07-10 10:25:08 +01:00
Athanasius accc361d54 Merge pull request #577 from EDCD/fix/575-Remove-old-anonymous
Remove all use of defunct 'anonymous' option
2020-07-10 08:40:29 +01:00
Athanasius ef3306e3f5 Remove all use of defunct 'anonymous' option
The UI for setting the 'anonymous' option was removed in
f17f5d3f25 ("PKCE OAuth2 access to cAPI").
Since then there's been no way for a user to set, or unset, this option
(and the associated custom uploaderID).  However anyone with the registry keys
still set would have had them take effect.

This commit removes the last bits of code that were making use of it.

Note that the EDDN Relay anonymises all uploaderID values, so no listener
has been seeing the 'raw' values for a long time now.

close #575
2020-07-10 08:36:13 +01:00
Athanasius cd0352d506 Merge pull request #565 from A-UNDERSCORE-D/enhancement/cleanup-companion
Cleanup companion.py
2020-07-09 16:58:22 +01:00
Athanasius 0c6f1acd59 Merge pull request #571 from EDCD/fix/display-var-errors
Pull X11 setup back out of function for 'dpy'.
2020-07-09 13:07:31 +01:00
Athanasius 94a9a9b948 Pull X11 setup back out of function for 'dpy'.
'dpy' needs to be global, and there might be other side effects.  So
just revert to this code being global.
2020-07-09 08:32:35 +01:00
A_D 1481c3d13e Added todo, removed import
Added a TODO on the incase plugins need it line, and removed the unused
sys import
2020-07-08 21:24:15 +02:00
A_D 09f5dfff23 Replaced assert False with a clearer raise
previously this would assert False, which always raises an
AssertionError, now we raise a saner ValueError
2020-07-08 18:12:15 +02:00
Athanasius 758b726878 Merge pull request #570 from A-UNDERSCORE-D/fix/display-var-errors
Fix #568 with ENV var workaround
2020-07-08 17:07:54 +01:00
A_D 2890d33d03 Address review comments
Added a missing comma to the category_map literal
Added parens around an index that does math beforehand
Clarified HTTP/JSON error CredentialsError
2020-07-08 18:05:43 +02:00
A_D be98365fb3 Fix #568 with ENV var workaround
EDMC.py would break due to an import chain that ends up in theme. Theme
does a whole bunch of work to setup our GUI for EDMarketConnector.py,
but it does this on any import, which will fail spectacularly if there
is either no DISPLAY var set or no X11 libs available on our machine at
all (as a sidenote this means it probably also breaks on a wholly
wayland install).

This fixes the issue by adding a check for an environment variable on
import of theme. This can and WILL break if the env var is set and
EDMarketConnector.py is used, but if you do that its your own fault.
2020-07-08 17:55:54 +02:00
A_D dcb9853b68 Removed python2 specific code
This entire branch is py3 only, and even with this code the actual file
isn't py2 compatible syntax wise
2020-07-07 21:52:30 +02:00
Athanasius 3476956d85 Merge branch 'beta' into develop
This brings in the 3.99.3.0 changes.
2020-07-07 20:02:04 +01:00
Athanasius c71e7b7286 Changelog.md: 3.99.3.0 Release/3.99.3.0 2020-07-07 19:48:55 +01:00
Athanasius dc13a143a3 Update Swedish translation 2020-07-07 19:47:53 +01:00
Athanasius de55ff7ce0 Increase appversion to 3.99.3.0 2020-07-07 19:43:02 +01:00
Athanasius 3ff77c3c54 EDMC.py: import re, fix version compare and report
* I neglected to `import re` when I changed the Journal file name check.
* `map` isn't comparable in Python 3.7, need to `list()` it as well.
* Just print the full `appversion`.  The old code was assuming that none of
  A, B, C, D in A.B.C.D would be two or more digits.

close #566
2020-07-07 19:02:06 +01:00
Athanasius cda7d9d3f4 Merge pull request #567 from Athanasius/fix/566-cli-params
EDMC.py: import re, fix version compare and report
2020-07-07 19:01:18 +01:00
Athanasius 41984e86a2 EDMC.py: import re, fix version compare and report
* I neglected to `import re` when I changed the Journal file name check.
* `map` isn't comparable in Python 3.7, need to `list()` it as well.
* Just print the full `appversion`.  The old code was assuming that none of
  A, B, C, D in A.B.C.D would be two or more digits.

close #566
2020-07-07 19:00:06 +01:00
A_D 0b6ef97f41 Made dict copy clearer
While `dict(somedict)` does the same thing as `somedict.copy()`, the
.copy is clearer as to intent
2020-07-07 18:46:23 +02:00
A_D 4aa8e2ca0e Added variable for re-used accesses
The last starport ID and name was repeatedly accessed out of a dict,
making lines longer and harder to parse
2020-07-07 18:42:16 +02:00
A_D e739923083 Moved User Agent to constant
This is one of those things that really should be a constant anyway
2020-07-07 18:37:05 +02:00
A_D 5c4c9fd3a7 Added error messages to exceptions where possible
Adds messages to exceptions where they may be useful and I could figure
out what they should be
2020-07-07 18:30:29 +02:00
A_D 34b963620a Removed bare except clauses
Bare except clauses are a fantastic way to find your HTTP requests
eating your ^C. I replaced all bare excepts with Exception if I could
not find a list of exceptions that could be thrown.
2020-07-07 18:21:48 +02:00
A_D 9363b1457d Simplified if ladder
Removed a large if ladder with a simpler construct that does the same
thing
2020-07-07 16:59:03 +02:00
A_D 31e0758ee4 Replaced x in $list construct with x in $tuple
Tuples are smaller and immutable, therefore using a tuple is cleaner.
2020-07-07 15:52:45 +02:00
A_D 7260dff9a2 Replaced modulo formatting with .format calls
Modulo formatting is py2 (and C printf) style, its arcane and incredibly
hard to read for large formats.

I used keyed .formats where there were more than a few format specifiers
2020-07-07 15:52:44 +02:00
A_D 765dc0bcf3 Replaced oneline ifs with multiline ifs
Oneline ifs are in general a bad idea in whitespace significant
languages, this replaces them with their multi-line equivalents
2020-07-07 15:52:44 +02:00
A_D 56d4d13d4d Fixed line spacing and comment length
This adds newlines after blocks and in other logical places to assist
with reading the code. Additionally, comments that were too long to
remain inline within a 120 character limit have been moved above the
line they reference.
2020-07-07 15:52:43 +02:00
Athanasius 98227b7af0 Merge pull request #562 from A-UNDERSCORE-D/enhancement/cleanup
Cleanup commodity.py (PEP8, code simplification)
2020-07-07 14:26:41 +01:00
Athanasius 273e121736 PLUGINS.md: Installation instructions on wiki 2020-07-06 18:22:02 +01:00
Athanasius d50d141a8e README.md: Missing ) on disclaimer 2020-07-06 18:13:56 +01:00
Athanasius 2426d9381f README.md: Update forum URLs for disclaimer.
* The old-forum format URL didn't work, managed to find the post and
   get the current URL.
 * Added link to when Journal files were announced.
2020-07-06 18:09:34 +01:00