Commit Graph
1719 Commits
Author SHA1 Message Date
A_D 5b736cab36 Create Enhancement issue template
closes #599
2020-08-27 12:10:10 +01:00
A_D dbcb4bb4fc clarified docs 2020-08-27 12:10:10 +01:00
A_D 1733aeae5a Replaced write out checks with guard clauses
Guard clauses reduce indentation and help when reading code as they
remove a variable and indentation level that the reader would otherwise
need to keep track of
2020-08-27 12:10:09 +01:00
A_D 8268bfe5da Removed repeated int(key)
With the previous formatting changes there is no reason to leave key as
possibly a string anywhere, as it was already being converted to an int
everywhere anyway
2020-08-27 12:10:09 +01:00
A_D 6a917acde0 Move file backup code to a method
It was repeated in various places and increased noise
2020-08-27 12:10:09 +01:00
A_D 3a2e159b1e Refactor __main__ logic
Most of this is just de-pyramiding the code, removing else clauses that
are unneeded (or making the if such that the else is not needed).
Rationale is simple, every level of indentation adds more that the
reader needs to keep track of.
2020-08-27 12:10:09 +01:00
A_D fe3a6c11f4 replace list literals with tuples
Tuples ensure that this isnt changed at runtime
2020-08-27 12:10:09 +01:00
A_D ed9c1c6774 Replace AssertionErrors with ValueError
AssertionError comes from `assert`s, using it for this doesn't make sense as we're complaining about values
2020-08-27 12:10:09 +01:00
A_D fd3a4852f2 replace modulo formatting with .format 2020-08-27 12:10:09 +01:00
A_D 02d205fbee removed oneline statements 2020-08-27 12:10:09 +01:00
A_D a7cf83d1e5 shortened line 2020-08-27 12:10:09 +01:00
A_D 8c0ab2dc75 added missing whitespace where needed 2020-08-27 12:10:09 +01:00
A_D 474c8d144f removed unused import 2020-08-27 12:10:09 +01:00
A_D a546ecb735 Add newlines to separate scopes
Newlines between scope changes help you to not get lost when reading
source
2020-08-27 12:10:09 +01:00
A_D 7e422c73c4 Fixed code blocks 2020-08-27 12:10:09 +01:00
Athanasius af3e8f29c7 Updated docs
Added linting, testing, and new requirements-dev.txt instructions
2020-08-27 12:10:06 +01:00
Athanasius 6ab6b23d7a Create requirements-dev.txt 2020-08-27 12:08:53 +01:00
Athanasius 80b7f03f25 Removed dev deps from requirements.txt 2020-08-27 12:08:32 +01:00
A_D ff7d297167 Add flake8 and autopep8 to requirements.txt 2020-08-27 12:07:44 +01:00
Athanasius 6e7f934a74 Translations: Change to %H:%M:%S version of 'Last updated at'
This puts this branch in sync with OneSkyApp again, the same as develop.
2020-08-27 11:11:37 +01:00
Athanasius 2a09874554 Merge branch 'releases' into stable 2020-08-26 22:49:28 +01:00
Athanasius 4d85648e9d appcast 4.0.6 2020-08-26 18:15:44 +01:00
Athanasius 60a90e4b30 Version 4.0.6 Release/4.0.6 2020-08-26 18:12:31 +01:00
Athanasius 09351c9e17 Merge pull request #675 from A-UNDERSCORE-D/fix/early-link-update
Fixed system link updating on FSDTarget
2020-08-26 18:04:53 +01:00
A_D d635bd8469 Fixed system link updating on FSDTarget
FSDTarget contains the target system under `SystemAddress`, meaning that
any time you selected a star other than the current one, plugins'
`this.system_address` was updated to that target, rather than the
current system. Said updating causes the links provided from system_url
to reflect that update (for providers that support ID64s).

This changes the journal_entry behaviour to only update
`this.system_address` when the event is any of Location, Docked,
or FSDJump, all of which contain only the current system.
2020-08-26 18:59:14 +02:00
Athanasius e618f7c4b0 Update version in BOTH places on that URL line 2020-08-26 15:13:07 +01:00
Athanasius b34faba96a Merge branch 'release-4.0.5' into releases 2020-08-26 14:45:08 +01:00
Athanasius a862fc0860 appcast: Update size for 4.0.5 Release/4.0.5 2020-08-26 14:38:14 +01:00
Athanasius 84b0c566e7 Release 4.0.5: version, changelog, appcast 2020-08-26 14:34:56 +01:00
Athanasius f21bad8fae Releasing.md: Now using Python 3.7.9 2020-08-26 14:31:23 +01:00
Athanasius 1164240387 translations: pt-PT: "Use alternate URL method" now translated 2020-08-26 14:29:42 +01:00
Athanasius f004c9ddf6 "Not Python 3.x" popup message sub-substitutions fixed.
string.format() doesn't assign to string, so actually need to do that.
2020-08-26 14:21:25 +01:00
Athanasius c1dfc3ac1f Plugins "Not Python 3.x": Hacky escaping fix so translations work 2020-08-26 14:13:06 +01:00
Athanasius 8d6f761fb9 plugins/inara: return '' if can't otherwise make system_url 2020-08-26 12:01:45 +01:00
Athanasius bf9d7dff89 station providers: Ensure the 'early station' functionality for all
* If you request docking successfully then show the station namd and
  have the link work.
* This is then only undone if you:
	1) Dock and undock
	2) Supercruise away
	3) Jump away
  It is *not* undone if you simply cancel the docking request.

Tested only with same provider for system and station for each of the
three, not the other 6 combinations.
2020-08-26 11:55:23 +01:00
Athanasius c9dee18d70 system/station providers: Sanitise {system,station}_url logic
* Make all plugins use `requests.utils.requote_uri()`
* Make all plugins use roughly the same logic, without if/else trees
 (as the bodies do a `return ...`), ending with `return ''` if input
 parameters are None.

 This throws away the inara fallback to `this.station or this.system` as
 it's unlikely the in-plugin tracking did a better job than the
 monitor.py code.
2020-08-26 10:18:10 +01:00
Athanasius d46358796f system/station plugin providers: Don't override 'url'
By default the ttkHyperlinkLabels for 'system' and 'station' names have
their 'url' members set to the functions in EDMarketConnector.App.

The EDDB one used to override the function as it had to do that special
name -> EDDB ID lookup from systems.p.  When I changed the code to not
need that any more I didn't fully understand what these overrides were.

After updating the EDDB code I then made sure the same logic was also in
the other plugins which meant they *also* set static strings, overriding
the call to the EDMarketConnector.App functions (which chain through to
the current plugin providers).

Unfortunately I didn't quite update the EDSM code enough causing
journal_entry() code to *not* set a new system 'url' despite changing
the 'text'.  This meant that only CAPI updates (so docking and login)
caused the URL to change, despite updating the 'text' to the correct
system name.

Rather than have everything setting static strings just do away with the
overrides as they're not needed!
2020-08-25 21:38:22 +01:00
Athanasius 669f895ffa plugins/edsm: Set system_link based on system_provider, not station_provider 2020-08-25 13:37:26 +01:00
Athanasius 02cd8fc447 Merge branch 'release-4.0.4' into stable 2020-08-07 20:06:13 +01:00
Athanasius 405edfacb6 Merge tag 'Release/4.0.4' into releases
Release 4.0.4
2020-08-02 20:20:04 +01:00
Athanasius 412dad86a7 Release 4.0.4: Correct translations and update appcast length
* Pulling in latest translations meant needing to change %H:%M:%S back
 to {HH}:{MM}:{SS}.
* Built and tested, so has appcast length updated too.
Release/4.0.4
2020-08-02 20:14:55 +01:00
Athanasius c8635b84d2 Translations: Minor changes
* Back to {HH}:{MM}:{SS} for this.
* A few extra "Use alternate URL method" translations.
2020-08-02 20:04:37 +01:00
Athanasius 451dcbff21 Release 4.0.4: Post-build appcast length update 2020-08-02 20:02:45 +01:00
Athanasius c51a1459d1 Release 4.0.4: Mention Python 3.7.8 in changelogs. 2020-08-02 19:56:14 +01:00
Athanasius e5ca8a6f26 Release 4.0.4: Changelog, version, appcast
* Version 4.0.4
* ChangeLog.md
* edmarketconnector.xml (except length)
2020-08-02 19:41:14 +01:00
Athanasius 513e21a06e Inara timer fix.
I had to pull a diff out of the old branch, apply it, and reverse things
like the addition of logging.  This needs to be the minimum change for
the fix.

Tested with a quick login, then spamming market buy/sell orders.  They
were correctly queued and then sent after 30s since previous API calls.
2020-08-02 19:35:02 +01:00
Athanasius ba09cfd8aa PLUGINS.md: except not catch 2020-08-02 19:35:02 +01:00
Athanasius 0d55e4f6c9 PLUGINS.md: Fix typo ' -> ` 2020-08-02 19:35:02 +01:00
Athanasius ffd0079e16 PLUGINS.md: Logging is being added, how to prepare
* Currently you use `print(...)`
* `logging` support is coming, here's how to prepare.
2020-08-02 19:35:02 +01:00
Athanasius cf6eec3289 Removed keyring dependency
This remove all dependencies on the keyring lib, updates the
requirements.txt to reflect that, and ensures that setup.py does not
attempt to package it.

Any use of the "old" keyring code will now return None and warn about
its deprecation.
2020-08-02 19:31:20 +01:00