Skip to content

Commit

Permalink
Merge branch 'develop' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixxan committed May 27, 2024
2 parents 0464990 + 99a7451 commit 4b228fa
Show file tree
Hide file tree
Showing 86 changed files with 2,074 additions and 2,878 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ exclude =
FDevIDs/
venv/
.venv/
hotkey/darwin.py # FIXME: Check under macOS VM at some point

# Show exactly where in a line the error happened
#show-source = True
Expand Down
35 changes: 23 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,19 @@ assignees: ''

---

**Please check the [Known Issues](https://github.com/EDCD/EDMarketConnector/issues/618) in case this has already been reported.**

**Please also check if the issue is covered in our [Troubleshooting Guide](https://github.com/EDCD/EDMarketConnector/wiki/Troubleshooting).** It might be something with a known work around, or where a third party (such as EDSM) is causing logging that is harmless.

**Please complete the following information:**
- Version: [e.g. 4.0.6 - See 'Help > About E:D Market Connector'. If running from source using git then please paste the output of `git log --decorate=full | head -1`]

[//]: # (You can gather most of this information with the EDMC System Profiler)

- Version: [e.g. 5.10.4+39af6c34`]
- Game Version: [e.g. 'Live' or 'Odyssey']
- OS: [e.g. Windows 10, Linux Debian 10.6, etc.]
- OS Locale: [e.g. English, French, Serbian...]
- If applicable: Browser [e.g. chrome, safari]
- Please attach **BOTH** log files, by dragging and dropping them into this input:
1. `%TEMP%\EDMarketConnector.log` from *immediately* after the bug occurs (re-running the application overwrites this file).
1. `%TEMP%\EDMarketConnector\EDMarketConnector-debug.log`. See [Debug Log File](https://github.com/EDCD/EDMarketConnector/wiki/Troubleshooting#debug-log-files). NB: If you don't have this log file then you're not running the latest version of the application and should update first to see if we already fixed the bug you're reporting.

**Describe the bug**
A clear and concise description of what the bug is.

[//]: # (A clear and concise description of what the bug is.)

**To Reproduce**
Steps to reproduce the behavior:
Expand All @@ -32,10 +29,24 @@ Steps to reproduce the behavior:
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

[//]: # (A clear and concise description of what you expected to happen.)

**Screenshots**
If applicable, add screenshots to help explain your problem.

[//]: # (If applicable, add screenshots to help explain your problem.)

**Additional context**
Add any other context about the problem here.

**Please Confirm the Following...**

[//]: # (Add any other context about the problem here.)
- [ ] I have checked the [Known Issues](https://github.com/EDCD/EDMarketConnector/issues/618) list to ensure this is not a duplicate
- [ ] I have checked the [Troubleshooting Guide](https://github.com/EDCD/EDMarketConnector/wiki/Troubleshooting) to check for known workarounds

**Logs**
Please attach both the EDMarketConnector.log and EDMarketConnector-debug.log if available.

You can find these logs at `%TEMP%\EDMarketConnector.log` and `%TEMP%\EDMarketConnector\EDMarketConnector-debug.log`

See [Debug Log File](https://github.com/EDCD/EDMarketConnector/wiki/Troubleshooting#debug-log-files) for information on the Debug Log files
13 changes: 13 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Reporting Security Issues

EDMC takes security very seriously. Our users trust us to provide a secure and safe tool to support their experience in Elite.

In general, the best way to report a major security issue with us that should not be publically discussed is to email our maintainer teams.

The best point of contact for this is edmc@hullseals.space. When contacting, be sure to include as much information in your report.

As soon as your report is processed, we'll get in touch to make sure we quickly move ahead with fixing the issue and will lay out a timeline for public disclosure and fixes.

Another method of reporting vulnerabilities is to open a new Bug Report [here](https://github.com/EDCD/EDMarketConnector/issues/new?assignees=&labels=bug%2C+unconfirmed&projects=&template=bug_report.md&title=).

If reporting a security issue here, do not include details as to the issue or steps to reproduce, simply indicate you have found a potential security bug and would like us to contact you directly.
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!---
Thank you for submitting a PR for EDMC! Please follow this template to ensure your PR is processed.
In general, you should be submitting targeting the develop branch. Please make sure you have this selected.
-->
# Description
<!-- What does this PR Do? -->

# Example Images
<!-- Only if relevant. Remove if irrelevant. -->

# Type of Change
<!-- What type of change is this? New Feature? Enhancement to Existing Feature? Bug Fix? Translation Update? -->

# How Tested
<!-- How have you tested this change to ensure it works and doesn't cause new issues -->

# Notes
<!-- Does this resolve any open issues? Was this PR discussed internally somewhere off GitHub? -->
95 changes: 95 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches-ignore:
- 'stable'
- 'releases'
- 'beta'
pull_request:
branches: [ develop ]
schedule:
- cron: '38 5 * * 4'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: 'ubuntu-latest'
timeout-minutes: 360
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
3 changes: 2 additions & 1 deletion .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
code-checks:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest

steps:

Expand Down Expand Up @@ -56,6 +56,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/push-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
jobs:
push_checks:

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Expand All @@ -28,6 +28,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: 'pip' # caching pip dependencies
python-version-file: '.python-version'
- name: Install dependencies
run: |
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ jobs:
mv ../EDMarketConnector-release-${{ needs.variables.outputs.sem_ver }}.tar.gz .
- name: Upload build files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Built files
name: built-files-linux
path: |
EDMarketConnector-release-*.tar.gz
windows_build:
needs: [variables]
name: Build EDMC
runs-on: windows-2019
runs-on: windows-latest

defaults:
run:
Expand Down Expand Up @@ -105,6 +105,7 @@ jobs:
with:
python-version-file: '.python-version'
architecture: "x86"
cache: 'pip' # caching pip dependencies

- name: Install python tools
run: |
Expand All @@ -131,22 +132,31 @@ jobs:
Get-ChildItem -Path . -Filter "EDMarketConnector_Installer_*.exe" | Rename-Item -NewName {"EDMarketConnector_Installer_Unsigned_$($_.Name -replace '^EDMarketConnector_Installer_', '')"}
- name: Upload build files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Built files
name: built-files-windows
path: |
EDMarketConnector_Installer_*.exe
EDMarketConnector-release-*.zip
Merge:
runs-on: ubuntu-latest
needs: [ windows_build, linux_build ]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: Built files
pattern: built-files-*

release:
name: Release new version
runs-on: ubuntu-latest
needs: [ windows_build, linux_build ]
needs: Merge
if: "${{ github.event_name != 'workflow_dispatch' }}"

steps:
- name: Download binary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Built files
path: ./
Expand All @@ -155,7 +165,7 @@ jobs:
run: sha256sum EDMarketConnector_Installer_*.exe EDMarketConnector-release-*.{zip,tar.gz} > ./hashes.sum

- name: Create Draft Release
uses: "softprops/action-gh-release@v1"
uses: "softprops/action-gh-release@v2"
with:
token: "${{secrets.GITHUB_TOKEN}}"
draft: true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ pylint.txt

# Ignore Submodule data directory
coriolis-data/
FDevIDs/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "coriolis-data"]
path = coriolis-data
url = https://github.com/EDCD/coriolis-data.git
[submodule "FDevIDs"]
path = FDevIDs
url = https://github.com/EDCD/FDevIDs.git
1 change: 0 additions & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ scripts_are_modules = True
; `<var> = <value>`
; i.e. no typing info.
check_untyped_defs = True
; platform = darwin
explicit_package_bases = True
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11.7
3.11.9
4 changes: 2 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ for removal in the next major release! Please look for that change coming soon.

**Changes and Enhancements**
* Added new `modules.json` and `ships.json` files to improve security and readability
* Added a core Spanch URL provider plugin
* Added a core Spansh URL provider plugin
* Added a new auth response page for successful FDEV authentication
* Added a new Open Log Folder option to the Help menu
* Added a new `--start_min` command flag to force the application to start minimized
Expand Down Expand Up @@ -241,7 +241,7 @@ Known Issues

Release 5.9.3
===
This release is identical to 5.9.3, except reverts a bad change.
This release is identical to 5.9.2, except reverts a bad change.

- REVERTS Deprecated load_module() is now retired (#1462)

Expand Down
2 changes: 1 addition & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ the following does not work:

```py
from sys import platform
if platform == 'darwin':
if platform == 'win32':
...
```

Expand Down
16 changes: 11 additions & 5 deletions EDMC.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
import commodity
import companion
import edshipyard
import l10n
from l10n import translations as tr
import loadout
import outfitting
import shipyard
import stats
from commodity import COMMODITY_DEFAULT
from config import appcmdname, appversion, config
from monitor import monitor
from update import EDMCVersion, Updater
from update import EDMCVersion, Updater, check_for_fdev_updates

sys.path.append(config.internal_plugin_dir)
# This import must be after the sys.path.append.
Expand All @@ -65,7 +65,7 @@ def log_locale(prefix: str) -> None:
)


l10n.Translations.install_dummy()
tr.install_dummy()

SERVER_RETRY = 5 # retry pause for Companion servers [s]
EXIT_SUCCESS, EXIT_SERVER, EXIT_CREDENTIALS, EXIT_VERIFICATION, EXIT_LAGGING, EXIT_SYS_ERR, EXIT_ARGS, \
Expand Down Expand Up @@ -162,7 +162,9 @@ def main(): # noqa: C901, CCR001
updater = Updater()
newversion: EDMCVersion | None = updater.check_appcast()
if newversion:
print(f'{appversion()} ({newversion.title!r} is available)')
# LANG: Update Available Text
newverstr: str = tr.tl("{NEWVER} is available").format(NEWVER=newversion.title)
print(f'{appversion()} ({newverstr})')
else:
print(appversion())
return
Expand Down Expand Up @@ -495,6 +497,10 @@ def main(): # noqa: C901, CCR001


if __name__ == '__main__':
main()
try:
check_for_fdev_updates(silent=True)
main()
except KeyboardInterrupt:
logger.info("Ctrl+C Detected, Attempting Clean Shutdown")
logger.debug('Exiting')
sys.exit(EXIT_SUCCESS)
Loading

0 comments on commit 4b228fa

Please sign in to comment.