Commit Graph
3014 Commits
Author SHA1 Message Date
Athanasius b4d246e071 Add 'Game Version' to bug report template
We don't want confusion if someone's reporting something on an Alpha rather than Live.
2021-04-01 14:46:43 +01:00
Athanasius 7ae40591ad PLUGINS.md: Big cleanup
* New 'Avoiding potential pitfalls' section to be sure we list them all.
* All plain text now wrapped at 80 columns.
* Re-did all the section headings for consistency, and added many `---`
  between sections.
* Headers added within the 'Plugin-specific events' section.
2021-04-01 14:46:43 +01:00
Athanasius 95458f12c7 Pre-Release 5.0.0-beta2: appversion & changelog 2021-04-01 14:46:43 +01:00
Athanasius 3c47b6c782 Fix semantic_version appversion issues in update.py and setup.py 2021-04-01 14:46:43 +01:00
Athanasius d585dd9233 Also str() appversion in EDSM and Inara plugins 2021-04-01 14:46:43 +01:00
Athanasius b0bda6e982 EDDN: Convert appversion_nobuild() to str
Without this the JSON serialisation later on barfs on it.
2021-04-01 14:46:43 +01:00
Athanasius be740d0bcd Remove another open 'U' flag. 2021-04-01 14:46:43 +01:00
Athanasius 69bc90f5b4 Make export_ship() paranoid about possible encoding issues.
We had a report of a UnicodeDecodeError trying to read an old file.  So
try utf-8 first, if it fails try the default, and if nothing else try to
write a new file so the next call should actually work as expected.
2021-04-01 14:46:43 +01:00
dependabot[bot] 4398e7a85e build(deps-dev): bump py2exe from 0.10.3.0 to 0.10.3.1
Bumps [py2exe](https://github.com/py2exe/py2exe) from 0.10.3.0 to 0.10.3.1.
- [Release notes](https://github.com/py2exe/py2exe/releases)
- [Changelog](https://github.com/py2exe/py2exe/blob/master/ChangeLog)
- [Commits](https://github.com/py2exe/py2exe/compare/v0.10.3.0...v0.10.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-01 14:46:43 +01:00
Athanasius 4d1c6906e7 Maybe I should stop putting types on :return: and :param: ... 2021-04-01 14:46:43 +01:00
Athanasius 5de4950fba Change config.appversion() to return semantic_version.Version
As we're changing it to a function at this stage anyway, it might as
well return this type, not a str.
2021-04-01 14:46:43 +01:00
Athanasius b841d434e5 plugintest: Document core version code & add to PLUGINS.md
* New PLUGINS.md section 'Checking core EDMC version'.
* And the same comments might as well be in the plugintest/load.py.
2021-04-01 14:46:43 +01:00
Athanasius dc920fdc6a plugintest: Implement example EDMC core version check. 2021-04-01 14:46:43 +01:00
Athanasius c0324b2d3f plugintest: Add missing " in logging 2021-04-01 14:46:43 +01:00
Athanasius 0a437961a3 plugintest: Add event type to logging & convert to classed 'this'. 2021-04-01 14:46:43 +01:00
Athanasius 20645f0731 Pre-Release 5.0.0-beta1: Changelog
appversion was already set from use in `develop`.

# Conflicts:
#	ChangeLog.md

# Conflicts:
#	ChangeLog.md
2021-04-01 14:46:41 +01:00
Athanasius 71fb362c52 EDMarketConnector.py: Two missing type annotations
Surprisingly window_title has nice simple types.
2021-04-01 14:45:53 +01:00
Athanasius 567bda048d plugins/eddn: Ensure types on all 'this' variables. 2021-04-01 14:45:53 +01:00
Athanasius 501682c439 Split text following """ if entire docstring not single line. 2021-04-01 14:45:53 +01:00
Athanasius 7da15faaf3 plugins/eddn: Convert 'this' to a class for typing reasons.
* Typing hates the 'this' hack on module's __name__, so use a small
  class instead.
* Added missing `return None`s.
* Other typing cleanups.
2021-04-01 14:45:53 +01:00
Athanasius 921185f7ce plugins/eddn: Now fully docstring'ed. 2021-04-01 14:45:53 +01:00
Athanasius 321ba6c812 coriolis: .p files update, and slight Releasing.md tweak about this. 2021-04-01 14:45:52 +01:00
norohind 26c47f3653 fix screening in killswitches.md 2021-04-01 14:45:52 +01:00
Athanasius e37c635a84 config.py: docstring pass for consistency. 2021-04-01 14:45:52 +01:00
Athanasius 52a64d3fb6 config.py: Last few docstrings
* Implementations of: delete(), save(), close().
* get_config()
2021-04-01 14:45:52 +01:00
Athanasius 6d2a0e29ee Bring MacConfig.set() in line with other implmentations.
* It wasn't doing any value type validation.
* Also dropped the `()` from the 'Implements' lines.
2021-04-01 14:45:52 +01:00
Athanasius 9a185e91ca config.py: Add a lot of docstrings to Config class methods.
I settled on having the full docstring only in the AbstractConfig
definitions.  In the implementations we then have:

"""
<first line same as AbstractConfig>

Implements :meth:`AbstractConfig.<method>`.
"""
2021-04-01 14:45:52 +01:00
Athanasius 9444973ebd config.py: docstring new appversion() and appversion_nobuild() 2021-04-01 14:45:52 +01:00
Athanasius 7a8b1100e9 config.py: Remove static_appversion_nobuild, and point to functions
* Also renamed static_appversion to have leading _ to further discourage
  use.
2021-04-01 14:45:52 +01:00
Athanasius fbd94c68aa build: .gitversion in DATA_FILES and installer. 2021-04-01 14:45:52 +01:00
Athanasius a3129a38c8 build: Somehow ko.strings got left out of .wxs 'Feature'
And thus didn't make it into builds.  Probably an issue with the develop
rebase.
2021-04-01 14:45:52 +01:00
Athanasius 2f9789afdd Update all code to use config.appversion() as a function
This *also* caught some instances where appversion_nobuild should
already have been used, so those were both changed and updated to a
function call.
2021-04-01 14:45:52 +01:00
Athanasius dcc4f1c4f1 Begin converting config.appversion to a function.
In-place converstion done, next will be all the call sites.
2021-04-01 14:45:52 +01:00
Athanasius cc571e44b1 Re-factor git short hash into a config.py function.
This should clear the way for using it in running code when not frozen.
2021-04-01 14:45:52 +01:00
Athanasius 3f3a4f282e app version: Write a .gitversion file with short hash from setup.py 2021-04-01 14:45:52 +01:00
Athanasius 8b3294ecdd typeshed now handles tk 'name' parameter 2021-04-01 14:45:52 +01:00
Athanasius f0c6b9efaa EDDN: Minor logging and format fixup to match 4.2.4 2021-04-01 14:45:52 +01:00
Athanasius 9a8daf665e EDDN: Restore 4.2.4 is_horizons() check in full 2021-04-01 14:45:52 +01:00
Athanasius 63be402cb4 EDDN: Restore safe_modules_and_ships() from 4.2.4 2021-04-01 14:45:52 +01:00
Athanasius b6dcc39fb2 JournalLock: No need to ' is True' on assert 2021-04-01 14:45:52 +01:00
Athanasius 0811a000ed JournalLock: tests - Expand on comment about other_process_lock() section 2021-04-01 14:45:52 +01:00
Athanasius d0617ba337 JournalLock: tests - minor docstring and formatting cleanups 2021-04-01 14:45:52 +01:00
Athanasius e0574e5584 Contributing.md: Minor pytest-related edits
* URL-ise some things.
* `` around some code.
2021-04-01 14:45:52 +01:00
Athanasius 7ad3518a7b config.py: Restor appversion to intended 5.0.0-beta1 for current develop. 2021-04-01 14:45:52 +01:00
Athanasius e3d3e79b50 tests: Add .coveragerc (excludes tests/ and venv/)
Without these 'omit' settings pytest coverage reports on the tests
themselves, plus the venv files if present.
2021-04-01 14:45:52 +01:00
Athanasius f2fd16307c JournalLock: Cleanup pytest coverage
* Some `# pragma: no cover' added where it's more pain to get coverage
  than to put up with lack of testing.

  We are choosing to NOT test retry_lock() or the call to it from
  update_lock() as it's tkinter stuff.
* Check `self.journal_dir_lockfile` exists before trying to call
  .close() on it.
* Note where platform checks means only one if branch gets run, so of
  course coverage will complain about the other one.
* Add test_release_lock_lie_locked() to test when not locked, but
  pretend we were so release_lock() returns False.
* Add test_update_lock_same() to check if an attempt is made to 'update'
  to the same directory.
2021-04-01 14:45:52 +01:00
Athanasius 8bf5a43c5b JournalLock: Add release_lock() test when not locked. 2021-04-01 14:45:52 +01:00
Athanasius 2fa3428581 JournalLock: Actually, just passing None as the tk.Tk parent works.
In the PASSED case we never even make a JournalAlreadyLocked instance.
In the FAILED case let it blow up on the `None`.
2021-04-01 14:45:52 +01:00
Athanasius baca42f06e JournalLock: Fix update_lock() with an extra mock
* update_lock() wants to, potentially, invoke
  JournalLock.JournalAlreadyLocked() instance for a tkinter pop-up.
  We do *not* want to mock all of that, so monkeypatch a mock so that in
  the 'test PASSED' case this just works.
2021-04-01 14:45:52 +01:00
Athanasius 8c74d46368 JournalLock: Implement update_lock() test.
* This uses a separate mock_journaldir_changing() that returns a new
  tmpdir on each invocation of config.get_str('journaldir').
2021-04-01 14:45:52 +01:00