Skip to content
Merged

Dev #40

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,6 @@ assets/base/tempo_cli_headless.exe
engine_version.json
engine_version.json
uv
spaghetti.exe
stove.exe
UAssetGUI.exe
14 changes: 9 additions & 5 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ default:

setup: clean_up
uv venv
uv run pre-commit install
uv run pre-commit install --hook-type commit-msg
uv run pre-commit install --hook-type pre-push
uv run prek install
uv run prek install --hook-type commit-msg
uv run prek install --hook-type pre-push

build:
uv run pyinstaller --noconfirm --onefile --hidden-import=textual.widgets._tab --console --name tempo_cli --collect-data trogon src/tempo_cli/__main__.py
Expand Down Expand Up @@ -86,10 +86,10 @@ git_reset:
git reset

pre_commit_auto_update:
uv run pre-commit autoupdate
uv run prek autoupdate

pre_commit_check_all:
uv run pre-commit run --all-files
uv run prek run --all-files

git_create_stash:
while ($true) { if (($pathToAdd = Read-Host "Enter a path to add or drag a file over this window (press Enter to exit)") -eq "") { Write-Host "Exiting..."; break }; if (($stashComment = Read-Host "Enter a comment/message for this stash") -eq "") { Write-Host "Stash comment cannot be empty. Please try again." -ForegroundColor Red; continue }; git stash push "$pathToAdd" -m "$stashComment"; Write-Host "`nStash created for '$pathToAdd' with comment: $stashComment`n" }
Expand All @@ -106,3 +106,7 @@ refresh_deps: pre_commit_auto_update

run:
uv run tempo_cli --help

lint:
uv run ruff check --fix
uv run ty check --fix
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:

- repo: https://github.com/adhtruong/mirrors-typos
rev: v1.44.0
rev: v1.45.1
hooks:
- id: typos
14 changes: 14 additions & 0 deletions .zed/debug.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@
"cwd": "$ZED_WORKTREE_ROOT",
"justMyCode": false
},
{
"label": "Test Poppy Playtime Chapter 5 full_run_all",
"adapter": "Debugpy",
"request": "launch",
"module": "tempo_cli",
"args": [
"run",
"full_run_all",
"--settings_json",
".tempo.json"
],
"cwd": "$ZED_WORKTREE_ROOT/../PoppyPlaytimeChapter5",
"justMyCode": false
},
{
"label": "Test Poppy Playtime Chapter 5 test_mods_all",
"adapter": "Debugpy",
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@

## 5.2.0-dev.24591472908 (2026-04-17)

## 5.2.0-dev.24590958324 (2026-04-17)

## 5.1.1 (2026-04-01)

### Feat

- **All**: changed how cache works

## 5.1.1-dev.23959330723 (2026-04-03)
## 5.1.1 (2026-04-01)

## 5.1.1-dev.23831093874 (2026-04-01)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ Tempo is distributed as a single package, [tempo-cli](https://www.github.com/tem

```bash
# With pip.
pip install git+https://www.github.com/tempo-cli
pip install git+https://www.github.com/Tempo-Organization/tempo-cli
```

```bash
# Or pipx.
pipx install git+https://www.github.com/tempo-cli
pipx install git+https://www.github.com/Tempo-Organization/tempo-cli
```

```bash
# Or uv.
uv add git+https://www.github.com/tempo-cli
uv add git+https://www.github.com/Tempo-Organization/tempo-cli
```

## Releases
Expand Down Expand Up @@ -81,7 +81,7 @@ When creating an issue, please provide as much information as possible, includin
## Contributing
Contributions are always appreciated, but please keep in mind the following:
- Before coding new features, try to make an issue to see if the idea/implementation needs any tweaking, or is out of scope
- Make sure your changes pass all pre-commit checks
- Make sure your changes pass all k checks

## FAQ

Expand Down
6 changes: 3 additions & 3 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ Tempo is distributed as a single package, [tempo-cli](https://www.github.com/tem
=== "pip"

``` bash
pip install git+https://www.github.com/tempo-cli
pip install git+https://www.github.com/Tempo-Organization/tempo-cli
```

=== "pipx"

``` bash
pipx install git+https://www.github.com/tempo-cli
pipx install git+https://www.github.com/Tempo-Organization/tempo-cli
```

=== "uv"

``` bash
uv add git+https://www.github.com/tempo-cli
uv add git+https://www.github.com/Tempo-Organization/tempo-cli
```

### Prebuilt Releases
Expand Down
4 changes: 2 additions & 2 deletions docs/to_do_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ hide:
## Docs & Examples

- [ ] GitHub Actions example with zipping files
- [ ] Pre-commit example
- [ ] prek example

---

Expand Down Expand Up @@ -141,7 +141,7 @@ project publish
project dep add
project dep remove
project dep refresh

`
mod update
mod commit
mod publish
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "tempo-cli"
version = "5.1.1"
version = "5.2.0-dev.24591472908"
description = "Unreal Engine modding tool, that covers project management, automated builds, and more"
readme = "README.md"
requires-python = ">=3.12"
Expand All @@ -20,7 +20,7 @@ classifiers = [
dependencies = [
"commitizen>=4.12.0",
"mkdocs-material>=9.7.1",
"pre-commit>=4.5.1",
"prek>=0.3.9",
"questionary>=2.1.0",
"rich-click>=1.9.4",
"tempo-core",
Expand All @@ -35,17 +35,17 @@ build-backend = "uv_build"

[tool.uv.sources]
tempo-core = { git = "https://www.github.com/Tempo-Organization/tempo-core" }
ue4ss-installer-core = { git = "https://github.com/Tempo-Organization/ue4ss-installer-core" }
ue4ss-installer-core = { git = "https://www.github.com/Tempo-Organization/ue4ss-installer-core" }

[dependency-groups]
dev = [
"commitizen>=4.8.3",
"mkdocs-material>=9.6.15",
"mkdocstrings-python>=1.16.12",
"pre-commit>=4.2.0",
"prek>=0.3.9",
"pyinstaller>=6.14.2",
"pyright>=1.1.402",
"ruff>=0.12.2",
"ty>=0.0.31",
]
x86-64-pc-windows-msvc = []
i686-pc-windows-msvc = []
Expand Down
25 changes: 8 additions & 17 deletions src/tempo_cli/commands/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@

from tempo_core import main_logic, window_management, utilities, game_runner, logger
from tempo_core.programs import retoc, pattern_sleuth
from tempo_core.programs import jmap as jmap_tool
from tempo_core.programs import jmap as jmap_program
from tempo_core.threads import game_monitor

from tempo_cache_tools import jmap as jmap_tool
from tempo_cache_tools import retoc as retoc_tool

import rich_click as click


Expand Down Expand Up @@ -46,9 +49,6 @@ def dump():
help="Whether the dumped info should be stored in the tempo config file or not.",
)
def aes_keys(settings_json, directory, dump_to_tempo_config):
if not pattern_sleuth.is_current_preferred_patternsleuth_version_installed():
pattern_sleuth.install_tool_patternsleuth()

aes_keys = []
for key in pattern_sleuth.run_patternsleuth_aes_key_scan_command():
logger.log_message(f"AES Key: {key}")
Expand Down Expand Up @@ -116,9 +116,6 @@ def aes_keys(settings_json, directory, dump_to_tempo_config):
)
def engine_version(settings_json, directory, dump_to_tempo_config):

if not pattern_sleuth.is_current_preferred_patternsleuth_version_installed():
pattern_sleuth.install_tool_patternsleuth()

info = pattern_sleuth.run_patternsleuth_engine_version_scan_command()

if not info:
Expand Down Expand Up @@ -187,9 +184,6 @@ def engine_version(settings_json, directory, dump_to_tempo_config):
)
def build_configuration(settings_json, directory, dump_to_tempo_config):

if not pattern_sleuth.is_current_preferred_patternsleuth_version_installed():
pattern_sleuth.install_tool_patternsleuth()

info = pattern_sleuth.run_patternsleuth_build_configuration_scan_command()

if not info:
Expand Down Expand Up @@ -250,9 +244,6 @@ def build_configuration(settings_json, directory, dump_to_tempo_config):
)
def jmap(settings_json, output):
os.makedirs(os.path.dirname(output), exist_ok=True)
if not jmap_tool.is_current_preferred_jmap_version_installed():
jmap_tool.install_tool_jmap()

game_runner.run_game()
game_monitor.start_game_monitor_thread()

Expand Down Expand Up @@ -285,8 +276,8 @@ def jmap(settings_json, output):
# sometimes if you scan right when game opens errors occur, so a bit of a delay, make this configurable later somehow
time.sleep(3)

jmap_tool.run_dump_jmap_jmap_command(
jmap_executable=str(jmap_tool.get_jmap_package_path()),
jmap_program.run_dump_jmap_jmap_command(
jmap_executable=jmap_tool.JmapToolInfo().get_executable_path(),
game_pid=game_pid,
output_jmap_location=output
)
Expand Down Expand Up @@ -333,5 +324,5 @@ def jmap(settings_json, output):
)
def generate_script_objects(settings_json, jmap_path, output):
os.makedirs(os.path.dirname(output), exist_ok=True)
retoc.ensure_retoc_is_installed()
retoc.run_gen_script_objects_retoc_command(pathlib.Path(retoc.get_retoc_package_path()), jmap_path, output)
retoc_exec_path = retoc_tool.RetocToolInfo().get_executable_path()
retoc.run_gen_script_objects_retoc_command(pathlib.Path(retoc_exec_path), jmap_path, output)
10 changes: 5 additions & 5 deletions src/tempo_cli/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def project_init(directory: pathlib.Path):
"version management": "should_use_versioning",
"should auto close game": "should_auto_close_game",
"should auto close fmodel and umodel": "should_close_fmodel_and_umodel",
"should setup pre-commit": "should_use_pre_commit"
"should setup prek": "should_use_prek"
}

chosen_options = questionary.checkbox(
Expand Down Expand Up @@ -274,8 +274,8 @@ def pre_commit_setup(setup_information: SetupInformation):
file_paths=[".pre-commit-config.yaml"],
output_directory=str(setup_information.working_directory),
)
subprocess.run("uv add pre-commit")
subprocess.run("uv run pre-commit install")
subprocess.run("uv add prek")
subprocess.run("uv run prek install")


def versioning_setup(setup_information: SetupInformation):
Expand Down Expand Up @@ -308,8 +308,8 @@ def versioning_setup(setup_information: SetupInformation):
f.write(tomlkit.dumps(toml_doc))

if setup_information.should_use_pre_commit:
subprocess.run("uv run pre-commit install --hook-type commit-msg")
subprocess.run("uv run pre-commit install --hook-type pre-push")
subprocess.run("uv run prek install --hook-type commit-msg")
subprocess.run("uv run prek install --hook-type pre-push")


def process_management_setup():
Expand Down
18 changes: 8 additions & 10 deletions src/tempo_cli/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
import rich_click as click
from ue4ss_installer_core import ue4ss

from tempo_core import main_logic, file_io, data_structures, settings, cache
from tempo_core import main_logic, file_io, data_structures, settings
from tempo_core.programs import kismet_analyzer as tempo_core_kismet_analyzer

from tempo_cache import cache
from tempo_cache_tools import kismet_analyzer as kismet_analyzer_tool

ue4ss.cache_repo_releases_info("UE4SS-RE", "RE-UE4SS")

# make this only happen if online is working, if online not working, throw error when calling related commands
# ue4ss.cache_repo_releases_info("UE4SS-RE", "RE-UE4SS")


@click.group()
Expand Down Expand Up @@ -138,18 +142,12 @@ def game(settings_json, toggle_engine):
type=bool,
help="Should the generated kismet analyzer be opened after being completed.",
)
def kismet_analyze_directory(settings_json, kismet_analyzer_executable, mappings, assets, output, open):
if kismet_analyzer_executable:
kismet_analyzer_directory = os.path.normpath(os.path.dirname(kismet_analyzer_executable))
else:
kismet_analyzer_directory = os.path.normpath(f'{os.getcwd()}/Modding/tools/kismet_analyzer')
def kismet_analyze_directory(mappings, assets, output, open):
os.makedirs(output, exist_ok=True)
if len(file_io.get_files_in_tree(assets)) < 1:
raise RuntimeError('When kismet analyzing a directory, the provided assets path must not be an empty directory tree.')
if tempo_core_kismet_analyzer.does_kismet_analyzer_exist(tempo_core_kismet_analyzer.get_kismet_analyzer_path(kismet_analyzer_directory)):
tempo_core_kismet_analyzer.install_kismet_analyzer(kismet_analyzer_directory)
tempo_core_kismet_analyzer.run_gen_cfg_tree_command(
kismet_analyzer_executable=pathlib.Path(tempo_core_kismet_analyzer.get_kismet_analyzer_path(kismet_analyzer_directory)),
kismet_analyzer_executable=pathlib.Path(kismet_analyzer_tool.KismetAnalyzerToolInfo().get_executable_path()),
mappings_file=mappings,
asset_tree=assets,
output_tree=output
Expand Down
9 changes: 2 additions & 7 deletions src/tempo_cli/commands/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,5 @@ def install():
type=bool,
help="Should the installed program be run after installation.",
)
@click.argument(
"output_directory",
type=click.Path(exists=False, resolve_path=True, path_type=pathlib.Path),
default=os.path.normpath(f'{os.getcwd()}/tools/{name}')
)
def _command(output_directory, run_after_install, func=func):
func(output_directory=output_directory, run_after_install=run_after_install)
def _command(run_after_install, func=func):
func(run_after_install=run_after_install)
2 changes: 1 addition & 1 deletion src/tempo_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def styled_build_prompt(text, prompt_suffix, show_default, default, show_choices
return ""


click.termui._build_prompt = styled_build_prompt
click.termui._build_prompt = styled_build_prompt # ty: ignore


def main():
Expand Down
Loading
Loading