Skip to content

Commit

Permalink
Merge branch 'remove-whatsnew' into update-flatpak-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rdbende committed Feb 3, 2024
2 parents ac2b8e6 + 13195b7 commit 2d77b39
Show file tree
Hide file tree
Showing 97 changed files with 1,028 additions and 8,144 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/aur.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
jobs:
deploy:

runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/build.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Checks

on:
push:
branches:
- "main"
pull_request:

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
args: --exit-zero
4 changes: 2 additions & 2 deletions .github/workflows/flathub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
jobs:
deploy:

runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ on: [push, pull_request]
jobs:
flatpak:
runs-on: ubuntu-latest

container:
image: bilelmoussaoui/flatpak-github-actions:gnome-44
image: bilelmoussaoui/flatpak-github-actions:gnome-45
options: --privileged

strategy:
Expand All @@ -25,7 +24,7 @@ jobs:

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
if: ${{ matrix.arch == 'aarch64' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Tests

on:
push:
branches:
- "main"
- "master"
pull_request:

jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/geigi/cozy-ci:main

steps:
- uses: actions/checkout@v4

- name: Run pytest
run: pytest
1 change: 0 additions & 1 deletion AUTHORS

This file was deleted.

84 changes: 42 additions & 42 deletions data/ui/about.ui → AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="AdwAboutWindow" id="about_dialog">
<property name="application_name">Cozy</property>
<property name="application_icon">com.github.geigi.cozy</property>
<property name="license_type">gpl-3-0</property>
<property name="issue_url">https://github.com/geigi/cozy/issues/new</property>
<property name="website">https://github.com/geigi/cozy</property>
<property name="developer_name">geigi</property>
<property name="developers">geigi
A6GibKm
alyssais
apandada1
AsavarTzeth
Fatih20
NathanBnm
camellan
chris-kobrzak
elya5
foliva
grenade
jimmac
jnbr
jubalh
kaphula
leuc
magnickolas
meisenzahl
naglis
oleg-krv
paper42
phpwutz
rapenne-s
rdbende
thibaultamartin
umeboshi2
worldofpeace</property>
<property name="translator_credits">Ainte
# Code
- Julian Geywitz
- Benedek Dévényi
- A6GibKm
- alyssais
- apandada1
- AsavarTzeth
- Fatih20
- NathanBnm
- camellan
- chris-kobrzak
- elya5
- foliva
- grenade
- jnbr
- jubalh
- kaphula
- leuc
- magnickolas
- meisenzahl
- naglis
- oleg-krv
- paper42
- phpwutz
- rapenne-s
- thibaultamartin
- umeboshi2
- worldofpeace

# Design
- Julian Geywitz
- Tobias Bernard
- Benedek Dévényi

# Icon
- Jakub Steiner

# Translators
```
Ainte
AndreBarata
Andrey389
Asyx
Expand Down Expand Up @@ -136,6 +137,5 @@ useruseruser1233211
vanhoxx
vlabo
xfgusta
yalexaner</property>
</object>
</interface>
yalexaner
```
102 changes: 64 additions & 38 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# Cozy development

This document is intended for software engineers and translators who would like to help out with the development of Cozy or simply be able to run bleeding edge versions of the code locally.
This document is intended for software engineers and translators who would like to help out with the development of Cozy, or simply be able to run bleeding edge versions of the code locally.

## Ubuntu

_The below instructions have been tested on Ubuntu 20.04_
## Building with GNOME Builder (recommended)

## Requirements
Cozy can be built and run with [GNOME Builder](https://apps.gnome.org/Builder/).

```bash
1. Open GNOME Builder
2. Click the **Clone Repository** button
3. Enter `https://github.com/geigi/cozy.git` in the **Repository URL** field
4. Click the **Clone Project** button
5. Click the ▶️**Run** button to start building the application


## Building manually

_The below instructions have been tested on Ubuntu 20.04 and Fedora 39_


### Requirements (Ubuntu)

```console
sudo apt update
sudo apt install \
appstreamcli \
Expand All @@ -21,86 +34,99 @@ sudo apt install \
gstreamer1.0-plugins-ugly \
libgirepository1.0-dev \
libgstreamer1.0-0 \
libgtk-3-dev \
libgtk-4-dev \
libadwaita-1-dev \
pip \
python-gi-cairo \
python3-gst-1.0 \
python3-venv

sudo add-apt-repository ppa:apandada1/libhandy-1
sudo apt update
sudo apt install libhandy-1-0 libhandy-1-dev
```

In case of issues with the `libhandy` installation, please refer to our [GitHub build script](.github/workflows/build.yml) on an alternative source of the library packages.

### UI development
### Requirements (Fedora)

[Glade](https://glade.gnome.org/) is the GUI tool we have been using for generating and managing application [windows and widgets](data/ui/).
```console
sudo dnf install \
appstream \
cmake \
gettext \
gstreamer1-libav \
gstreamer1-plugins-ugly \
gstreamer1-plugins-bad \
gstreamer1-plugins-good \
gstreamer1-devel\
gtk4-devel \
libadwaita-devel \
pipenv \
python3-cairo-devel \
python3-gstreamer1
```

## Source code

```bash
### Source code

```console
git clone https://github.com/geigi/cozy.git
cd cozy
```

## Python packages

It is generally a good idea to set up a virtual environment to avoid referencing packages and the Python binary installed globally.
### Python packages

> At its core, the main purpose of Python virtual environments is to create an isolated environment for Python projects. This means that each project can have its own dependencies, regardless of what dependencies every other project has.
>
> realpython.com
> [!TIP]
> It is generally a good idea to set up a virtual environment for Python projects. It creates an isolated environment where packages can be installed without creating conflicts with other packages installed system-wide.
```bash
# only if you wish to use a virtual environment
```console
python3 -m venv venv
source ./venv/bin/activate

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

pip install \
meson \
ninja
pip install meson ninja

pip install \
pytest \
pytest-mock
pip install pytest pytest-mock
```

## Build and install
To enter the virtual environment, you will need to run `source ./venv/bin/activate` every time you reopen your terminal.


### Build and install

Let's assume you wish to build the application under the `build/` directory and install the binaries under `app/`:

```bash
meson --prefix=$(pwd)/app ./build
```console
meson setup --prefix=$(pwd)/app ./build

ninja -C build install
```


### Install translation files

```bash
```console
ninja -C build com.github.geigi.cozy-update-po
ninja -C build extra-update-po
```

## Run application

```bash
### Run application

```console
XDG_DATA_DIRS=app/share:/usr/share \
PYTHONPATH=app/lib/python3.8/site-packages \
PYTHONPATH=app/lib/python3.11/site-packages \
app/bin/com.github.geigi.cozy
```

Your Python path may be different so you might need to amend the `PYTHONPATH` environment variable above in case of errors.

Please note, every time you make code changes, you need to execute `ninja -C build install` before you run the application.
> [!NOTE]
> Every time you make changes to the code, you need to execute `ninja -C build install` before you run the application.
## Test

## Running the test suite

```bash
python -m pytest
```
```

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ The translators:
- karaagac
- kevinmueller
- leondorus
- libreajans
- Sabri Unal
- linuxmasterclub
- magnickolas
- makaleks
Expand Down
Loading

0 comments on commit 2d77b39

Please sign in to comment.