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

1818 Commits

Author SHA1 Message Date
Athanasius
f2fa489819 Attempt "git diff <branch> --"
As in "git diff [<options>] [<commit>] [--] [<path>...]", in case
it's an ambiguity rather than not knowing what 'develop' is.
2020-07-29 15:00:39 +01:00
Athanasius
4a965bb7c9 Extra git commands for diagnosis 2020-07-29 15:00:39 +01:00
Athanasius
3f97588ab6 Try "fetch-depth: 0" on the extra checkouts 2020-07-29 15:00:39 +01:00
Athanasius
18ff1c0e3f Add 'set -x' to get feedback on all bash commands run 2020-07-29 15:00:39 +01:00
Athanasius
d36e213ae2 Correct "-name" -> "- name" 2020-07-29 15:00:39 +01:00
Athanasius
3ad8bd6cc8 pr-checks: Changed to pull_request and fleshed out
* Name all steps
* After checkout@v2 fetch: 1) checkout base_ref, 2) checkout head_ref
* Set and use BASE_REF env var
2020-07-29 15:00:39 +01:00
Athanasius
56e33d20d6 Copy push-checks.yml to pr-checks.yml 2020-07-29 15:00:39 +01:00
Athanasius
755e401df8 Revert "Change the push-checks back into also PRs."
This reverts commit 4da1d9df4ed14909574a69c70d7d0dd3d228e529.
2020-07-29 15:00:39 +01:00
A_D
ce4149efd5 Added debug logs 2020-07-29 14:58:17 +01:00
Athanasius
68955e0070
Merge pull request #644 from A-UNDERSCORE-D/enhancement/remove-keyring
Enhancement/remove keyring
2020-07-29 14:50:54 +01:00
Athanasius
a3ea7008b4
Merge pull request #646 from EDCD/enhancement/638-flake8-prs
Run flake8 for status on all pull requests
2020-07-28 13:49:07 +01:00
Athanasius
4da1d9df4e Change the push-checks back into also PRs.
Renamed to suit.
2020-07-28 13:45:55 +01:00
Athanasius
525ebae61d
Merge pull request #625 from A-UNDERSCORE-D/fix/624-inara-too-fast
Switched to using a timer for inara updates
2020-07-28 11:26:51 +01:00
A_D
9d2548c70b
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-07-28 11:24:49 +02:00
Athanasius
cbb64a60a8
Merge pull request #636 from EDCD/cleanup/EDMarketConnector.py
Continuing work on passing flake8 in EDMarketConnector.py
2020-07-27 18:35:11 +01:00
Athanasius
b1d35e0579 Merge branch 'fix/639-crash-linux-unset-journal-dir' into develop 2020-07-27 18:12:40 +01:00
A_D
6ab4433c59
Add TODO regarding type config 2020-07-27 19:07:54 +02:00
A_D
1b543e5820
Dont crash when journal_dir is None
Ensures that journal_dir is always at least an empty string.

Fixes #639
2020-07-27 18:55:59 +02:00
Athanasius
a5b7bea2ca Move comment to line above if 2020-07-27 15:16:23 +01:00
Athanasius
b17b3a4a72
Merge pull request #632 from A-UNDERSCORE-D/cleanup/eddb
Cleanup eddb plugin
2020-07-27 14:56:29 +01:00
A_D
b27e4a3628
fixed tk import and type annotations 2020-07-27 15:15:56 +02:00
A_D
cad5f72b0a
updated type annotation 2020-07-27 15:15:55 +02:00
A_D
7b231fb244
removed unicode specifier from string
python3 strings are always unicode
2020-07-27 15:15:55 +02:00
A_D
07c43d3057
added type annotations to globals 2020-07-27 15:15:54 +02:00
A_D
e0462d8719
Replaced complex oneliner with multiline if 2020-07-27 15:15:54 +02:00
A_D
37181264c9
Added newline after scope changes 2020-07-27 15:15:53 +02:00
A_D
4eed4404c6
Added Any type hint to this
Resolves most type warnings
2020-07-27 15:15:53 +02:00
A_D
ab58aa6355
autoformatted file 2020-07-27 15:15:52 +02:00
A_D
d4299c224f
dont force a send on exit
just try and send if we can
2020-07-27 15:12:32 +02:00
A_D
bb817eee3b
removed outdated comment 2020-07-27 15:08:47 +02:00
A_D
340f8928b3
switched to using config for last update time 2020-07-27 15:08:47 +02:00
A_D
34760683e5
added some debug logging 2020-07-27 15:08:46 +02:00
A_D
72498b3bbc
Switched to using a timer for inara updates
This adds a new thread that will run in a loop sending inara events once
ever 30 seconds. The old method of sending once for "special" events has
been removed.
2020-07-27 15:08:46 +02:00
Athanasius
9face638fe Minor cleanups all done.
Only remaining are:

 * TAE001 too few type annotations
 * Multiple "Cognitive complexity is too high" / "is too complex"
2020-07-27 13:00:59 +01:00
Athanasius
e0324cb9cd More flake8 cleanup 2020-07-27 11:15:03 +01:00
Athanasius
9fcaeb5feb
Merge pull request #630 from EDCD/enhancement/563-proper-logging
Enhancement/563 proper logging

Covers only a few files for now.  But let's get this merged so we can move on.
2020-07-27 11:07:50 +01:00
Athanasius
63f3859af4 Remove extraneous __class__ in logging strings 2020-07-27 10:56:57 +01:00
Athanasius
19e750eddd Use logger.exception() not log.error(.., exc_info=..) 2020-07-27 10:47:57 +01:00
Athanasius
6429cae932 Use isinstance() for type checking 2020-07-27 10:37:36 +01:00
Athanasius
6c9139e395 TODO: unittest hint about testing logging
And comment out the use of it here.
2020-07-27 10:35:08 +01:00
Athanasius
d7c2372417 Flake8 cleanup round #2 2020-07-27 10:14:16 +01:00
Athanasius
cbba1ce28a Change time string in translations.
It makes the code far too complicated to sub {HH} -> %H and the like.
2020-07-27 09:44:12 +01:00
Athanasius
f9a23cc831 Clean up flake8 output for this branch 2020-07-27 09:37:10 +01:00
Athanasius
3653a1342f No need to subclass object. 2020-07-27 06:57:53 +01:00
Athanasius
307910739a Remove now un-necessary imports for logging/traceback 2020-07-27 06:57:53 +01:00
Athanasius
66e2c354c7 Documentation update and getLogger() -> get_logger()
* Technically %(class)s can be e.g. A.B not just 'B' so say "name(s)".
* To not confuse EDMCLogging.getLogger() with logging.getLogger() it's
 been renamed to get_logger().
* Note how we signal errors with finding class and/or qualname.
* Call out EDMCLogging.py in Contributing.md.
2020-07-27 06:57:53 +01:00
Athanasius
2eba647f17 Simply walk up the stack finding the frame we want.
Also leave that 'A.B' test around as a hint for a unittest.  Obviously
that instantiation will need commenting out for a release.
2020-07-27 06:57:53 +01:00
Athanasius
5a779a3379 Cleanups and docstrings
* Added/fleshed out docstrings on file, classes and functions.
* No need to use a function for the stack frame getting.
* Check if LogRecord has class or qualname before setting, allowing
 upstream to implement them.
* Use setattr()/getattr() rather than __dict__ fiddling.
* Force an error string into class/qualname if we have issues finding
 them, rather than failing silently to ''.
2020-07-27 06:57:53 +01:00
Athanasius
596527bda2 Move logging setup to EDMCLogging.py with a class
* Also now providers single caller_class_and_qualname() method to get
 both strings, returned as a Tuple[str, str].  Either could be empty
 if something went wrong.
* Rather than a fragile 'skip' this now:
    1. Looks for the first up-stack frame with self of logging.Logger
    1. Then looks for the next up-stack frame with self NOT of
     logging.Logger.  This should be the call site we want.
2020-07-27 06:57:53 +01:00
Athanasius
c196a38e09 Add logging TODOs. logger creation & frame detection
* Nothing should "from EDMarketConnector import logger" any more, so
 we can move this back inside __main__ section
* We shouldn't rely on a magic number of frames to skip.  Detect the
 proper frame automatically.
2020-07-27 06:57:52 +01:00