Skip to content

Latest commit

 

History

History
90 lines (58 loc) · 2.91 KB

File metadata and controls

90 lines (58 loc) · 2.91 KB

Contribution

Requirements

  • uv installed
  • Git CLI installed

Commands and screens were created on Windows 10. Please, update all the paths according to your OS.

Setting up the project manually

Clone the repository

git clone <repo> pyfa

Install the locked dependencies. This creates .venv and downloads interpreter and necessary packages.

cd pyfa
uv sync

Check what was installed

uv pip list

wxPython on linux

On Windows and macOS wxPython installs binary package. On linux there is no binary package in pypi, which leads us to two options:

  • build from source (needs extra dependencies, slow)
  • install wheels from github release page (fast, but high chance they are linked to libraries which do not exist on your system)

First is executed with regular uv sync command. The second needs uv sync --no-default-groups --group dev --group wx-binary; it grabs binary package built for Ubuntu 22.04. If you need wxPython for different Ubuntu version, you will have to edit pyproject.toml.

Build translations and database:

uv run python scripts/compile_lang.py
uv run python db_update.py

Test that the project is starting properly

uv run python pyfa.py

uv run syncs the environment before each command, so there is no virtualenv to activate manually. If you prefer an activated shell, the venv is at .venv.

Setting up the project with PyCharm/IntelliJ

Install PyCharm / Other IntelliJ product with Python plugin

After launching - select Check out from Version Control -> GIt

welcome

Login to GitHub, paste the repo URL and select the folder to which to clone the project into, press Clone.

Clone

After the process is complete, run uv sync in a terminal at the project root to create .venv.

Then open File -> Settings -> Project -> Project Interpreter.

Settings

Press on options and add an existing virtual environment, pointing it at the .venv folder uv created.

venv

Create new Run Configuration. Set correct Script path and Python interpreter.

Run configuraion

Check that the project is starting properly.

Running tests

pytest is not a project dependency, so pull it in for the run:

uv run --with pytest python -m pytest

More information on tests can be found on appropriate Wiki page.