Skip to content

Latest commit

 

History

History
150 lines (121 loc) · 5.53 KB

README.md

File metadata and controls

150 lines (121 loc) · 5.53 KB

AYAB - All Yarns Are Beautiful

This is the GUI interface for AYAB.

For information on how to install the release version of the software, see http://manual.ayab-knitting.com

Branching Model

Development of the latest and upcoming features happens on the 'main' branch. For each major release, a dedicated maintenance branch is created to manage bug fixes, security patches, and backporting for that specific release. These branches follow the naming convention -maint (e.g. 0.95-maint). This approach allows us to continue forward development while ensuring stability and long-term support for previous versions.

Running from Source & Development

The AYAB desktop software runs using Python 3.11.
The Python module dependencies are split across runtime dependencies, which are in requirements.build.txt and development dependencies, found in requirements.txt.

This repository uses pre-commit hooks. After cloning the repo and installing the development dependencies, you should run pre-commit install to set up the git hook scripts.

Platform-Specific Setup

Linux

For flashing the firmware, avrdude has to be available on your system. To build or run the application, you will also need the system libraries required by Qt 6; installing the Qt 6 development tools is a concise (if heavy-handed) way of bringing in these dependencies.

Debian/Ubuntu

    sudo apt install python3.11 python3.11-dev python3.11-venv
    sudo apt install libasound2-dev avrdude qt6-tools-dev-tools build-essential

openSUSE

    sudo zypper install python311 python311-pip python311-virtualenv python311-devel
    sudo zypper install libasound2 alsa-devel avrdude qt6-tools-dev-tools build-essential

All Distributions

To be able to communicate with your Arduino, it might be necessary to add the rights for USB communication by adding your user to some groups.

    sudo usermod -aG tty [userName]
    sudo usermod -aG dialout [userName]
Windows

AYAB requires Windows version 10 or later.

Run Anaconda Powershell as administrator and install git.

    conda install git

Now you can download the git repository with:

    git clone https://github.com/AllYarnsAreBeautiful/ayab-desktop
    cd ayab-desktop

Next, create a virtual environment for AYAB:

    conda create --name ayab -c conda-forge python=3.11 pip

Activate the virtual environment. The command prompt should now display (ayab) at the beginning of each line.

    conda activate ayab

(You may skip the virtual environment setup below.)

You will also need to download and install Perl from https://www.perl.org/get.html.

macOS

You can install Git using Homebrew:

    brew install git

You will also need the Xcode command line tools:

    xcode-select --install

Install python from the official universal2 installer. (Conda does not produce universal binaries)

If you encounter the pip SSL:TLSV1_ALERT_PROTOCOL_VERSION problem:

    curl https://bootstrap.pypa.io/get-pip.py | python

Universal Setup Steps

Once platform-specific setup is complete, download the git repository:

    git clone https://github.com/AllYarnsAreBeautiful/ayab-desktop
    cd ayab-desktop

Create a virtual environment for AYAB:

    python3.11 -m venv .venv 

Now activate the virtual environment. The command prompt should now display (.venv) at the beginning of each line.

    source .venv/bin/activate

Install the remaining prerequisites with:

    python -m pip install --upgrade pip
    pip install --upgrade setuptools
    pip install -r requirements.txt

Next, convert the PySide6 .ui files and generate the translation files:

    bash ./setup-environment.ps1

Finally, you can start AYAB with

    fbs run

CI/CD on GitHub

Triggering a new build

A new build is triggered when a new tag is created, either starting with

  • v (i.e. v1.0.0), or
  • test (i.e. test230517)

Convention for the test-tag is to suffix the current date in the YYMMdd format. If there is already an existing test build for a single day, attach a letter. The test tags and releases will be manually removed from time for a better overview.

The tag can be pushed from your local environment, or via the "Draft a new Release" button on the GitHub website.

Choosing the firmware release to be bundled with the build

The CI automatically downloads a given firmware release from the ayab-firmware repo and packs it into the Desktop release. The name of the firmware release is chosen in this manifest file in the ayab-desktop repo.

Whenever building from source, you should ensure that the firmware is available as a compiled hex file is available at main/resources/base/ayab/firmware/firmware.hex. You can either compile the firmware and upload it through other means (e.g. VSCode with PlatformIO), or compile and then drop it into the right path in the desktop directory, making it available for the flash through AYAB desktop.