Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eliasdoehne/stellaris-dashboard
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.1
Choose a base ref
...
head repository: eliasdoehne/stellaris-dashboard
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 16,326 additions and 10,837 deletions.
  1. +81 −0 .github/workflows/build.yml
  2. +3 −1 .gitignore
  3. +3 −0 .gitmodules
  4. +108 −111 README.md
  5. +105 −0 configure_layout.md
  6. +3 −1 dev-requirements.txt
  7. BIN img/custom_tab_layout.png
  8. +1 −1 install.bat
  9. +0 −137 mod/Dashboard/interface/browser.gui
  10. +0 −63 mod/Dashboard/interface/timeline_button.gfx
  11. +0 −4 mod/StellarisDashboardIntegration.mod
  12. +62 −0 mod/description.txt
  13. +9 −0 mod/stellaris_dashboard/descriptor.mod
  14. BIN mod/stellaris_dashboard/gfx/interface/icons/dashboard_icon.dds
  15. +774 −0 mod/stellaris_dashboard/interface/main_bottom.gui
  16. +8 −0 mod/stellaris_dashboard/interface/stellaris_dashboard.gfx
  17. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_braz_por.yml
  18. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_english.yml
  19. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_french.yml
  20. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_german.yml
  21. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_japanese.yml
  22. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_korean.yml
  23. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_polish.yml
  24. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_russian.yml
  25. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_simp_chinese.yml
  26. +2 −0 mod/stellaris_dashboard/localisation/stellaris_dashboard_l_spanish.yml
  27. BIN mod/stellaris_dashboard/thumbnail.png
  28. +99 −0 pyinstaller-package.spec
  29. +33 −11 requirements.txt
  30. +5 −31 setup.py
  31. +0 −25 src/stellarisdashboard/__main__.py
  32. +0 −114 src/stellarisdashboard/cli.py
  33. +0 −33 src/stellarisdashboard/config.ini
  34. +0 −170 src/stellarisdashboard/config.py
  35. +0 −5,659 src/stellarisdashboard/cython_ext/token_value_stream.c
  36. BIN src/stellarisdashboard/cython_ext/token_value_stream.cp36-win32.pyd
  37. BIN src/stellarisdashboard/cython_ext/token_value_stream.cp36-win_amd64.pyd
  38. BIN src/stellarisdashboard/cython_ext/token_value_stream.cpython-36m-x86_64-linux-gnu.so
  39. +0 −53 src/stellarisdashboard/cython_ext/token_value_stream.pyx
  40. +0 −530 src/stellarisdashboard/dash_server.py
  41. +0 −273 src/stellarisdashboard/game_info.py
  42. +0 −932 src/stellarisdashboard/models.py
  43. +0 −284 src/stellarisdashboard/save_parser.py
  44. +0 −85 src/stellarisdashboard/static/style.css
  45. +0 −8 src/stellarisdashboard/templates/404_page.html
  46. +0 −76 src/stellarisdashboard/templates/history_page.html
  47. +0 −15 src/stellarisdashboard/templates/index.html
  48. +0 −18 src/stellarisdashboard/templates/layout.html
  49. +0 −1,291 src/stellarisdashboard/timeline.py
  50. +0 −42 src/stellarisdashboard/token_value_stream_re.py
  51. +0 −671 src/stellarisdashboard/visualization_data.py
  52. +0 −131 src/stellarisdashboard/visualization_mpl.py
  53. +0 −1 stellarisdashboard.bat
  54. 0 {src → }/stellarisdashboard/LICENSE
  55. 0 {src → }/stellarisdashboard/__init__.py
  56. +32 −0 stellarisdashboard/__main__.py
  57. +9 −0 stellarisdashboard/_force_imports.py
  58. +128 −0 stellarisdashboard/cli.py
  59. +558 −0 stellarisdashboard/config.py
  60. +27 −0 stellarisdashboard/dashboard_app/__init__.py
  61. +252 −0 stellarisdashboard/dashboard_app/assets/style.css
  62. +16 −0 stellarisdashboard/dashboard_app/assets/toggle_visibility.js
  63. +36 −0 stellarisdashboard/dashboard_app/game_index.py
  64. +1,015 −0 stellarisdashboard/dashboard_app/graph_ledger.py
  65. +623 −0 stellarisdashboard/dashboard_app/history_ledger.py
  66. +165 −0 stellarisdashboard/dashboard_app/settings.py
  67. +9 −0 stellarisdashboard/dashboard_app/templates/404_page.html
  68. +58 −0 stellarisdashboard/dashboard_app/templates/game_index.html
  69. +754 −0 stellarisdashboard/dashboard_app/templates/history_page.html
  70. +24 −0 stellarisdashboard/dashboard_app/templates/layout.html
  71. +44 −0 stellarisdashboard/dashboard_app/templates/settings_page.html
  72. +235 −0 stellarisdashboard/dashboard_app/timelapse_exporter.py
  73. +55 −0 stellarisdashboard/dashboard_app/utils.py
  74. +1,809 −0 stellarisdashboard/dashboard_app/visualization_data.py
  75. +1,911 −0 stellarisdashboard/datamodel.py
  76. +404 −0 stellarisdashboard/game_info.py
  77. +27 −0 stellarisdashboard/parse_existing_saves.py
  78. 0 {src/stellarisdashboard/cython_ext → stellarisdashboard/parsing}/__init__.py
  79. +72 −0 stellarisdashboard/parsing/rust_parser/.gitignore
  80. +962 −0 stellarisdashboard/parsing/rust_parser/Cargo.lock
  81. +17 −0 stellarisdashboard/parsing/rust_parser/Cargo.toml
  82. +15 −0 stellarisdashboard/parsing/rust_parser/pyproject.toml
  83. +64 −0 stellarisdashboard/parsing/rust_parser/src/file_io.rs
  84. +56 −0 stellarisdashboard/parsing/rust_parser/src/lib.rs
  85. +800 −0 stellarisdashboard/parsing/rust_parser/src/parser.rs
  86. +253 −0 stellarisdashboard/parsing/save_parser.py
  87. +3,959 −0 stellarisdashboard/parsing/timeline.py
  88. +14 −0 test/conftest.py
  89. +18 −0 test/localization_test_files/english/empire_formats_l_english.yml
  90. +3 −0 test/localization_test_files/english/name_list_HUMAN1_l_english.yml
  91. +5 −0 test/localization_test_files/english/species_species_01_l_english.yml
  92. +5 −0 test/localization_test_files/english/tagged_localization_test_strings.yml
  93. +394 −0 test/names_test.py
  94. +36 −0 test/parser_test.py
  95. +85 −0 test/parser_test_cases.py
  96. +1 −0 test/saves
  97. +0 −27 test/token_value_stream_test.py
  98. +0 −39 test/token_value_stream_test_data.py
  99. +62 −0 test/utils_test.py
81 changes: 81 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Test and build

on:
pull_request:
workflow_dispatch:
push:
branches:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version:
- '3.10'
os:
- ubuntu-latest
- windows-latest
- macOS-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r dev-requirements.txt
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
run: |
cargo test
working-directory: "stellarisdashboard/parsing/rust_parser"
- name: Build rust-parser
uses: PyO3/maturin-action@v1
with:
command: build
args: --release -o target
working-directory: "stellarisdashboard/parsing/rust_parser"
- name: Install rust parser
run: |
pip install --find-links=stellarisdashboard/parsing/rust_parser/target rust-parser
- name: Tests
run: |
python -m pytest -m "not skip_github_actions" --verbose
- name: pyInstaller build
run: |
pyinstaller pyinstaller-package.spec
- name: pyInstaller run
run: |
dist/stellarisdashboard-build/parse_saves
# Zip the file, makes a zip containing a zip but fixes download problems due to too many small files
- name: package files (win)
if: matrix.os == 'windows-latest'
run: |
cd dist
[IO.Compression.ZipFile]::CreateFromDirectory( (Join-Path -Path (Get-Location) -ChildPath "stellarisdashboard-build"), (Join-Path -Path (Get-Location) -ChildPath "../stellarisdashboard-${{ matrix.os }}.zip"), 'Optimal', $false )
cd ..
- name: package files
if: matrix.os != 'windows-latest'
run: |
base_dir=`pwd`
pushd dist/stellarisdashboard-build/
zip -r $base_dir/stellarisdashboard-${{ matrix.os }}.zip *
popd
- name: Publish
uses: actions/upload-artifact@v3
with:
name: stellarisdashboard-${{ matrix.os }}.zip
path: stellarisdashboard-${{ matrix.os }}.zip

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ data
**/config.ini
**/*.json
**/.pytest*
random_execution.py # file I use to debug issues

**/config.yml

# Byte-compiled / optimized / DLL files
__pycache__/
@@ -88,6 +89,7 @@ celerybeat-schedule

# dotenv
.env
.envpy*

# virtualenv
venv/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "test/saves"]
path = test/saves
url = https://github.com/chennin/stellaris-dashboard-test-saves
Loading