Skip to content
Draft
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
88 changes: 88 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Funq CI
run-name: ${{ github.actor }} is testing out Funq

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
host: linux
install-deps: true
setup-python: true

- name: Install qmake
run: sudo apt-get install qt5-qmake

- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Setup client
run: python client/setup.py develop

- name: Setup server
run: python server/setup.py develop

test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Restore pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run client tests
run: python -m pytest funq/client/tests/

- name: Run server tests
run: make -C server/tests/ check

- name: Run functional tests
run: pytest tests-functionnal/
149 changes: 0 additions & 149 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You can instead get the sources and install it::

For contributors, you may want to use **pip install -e** instead of
**pip install** commands. Note that **virtualenv** is highly recommended,
so you can easily manage multiple python2/python3/Qt4/Qt5 environments.
so you can easily manage multiple python3/Qt4/Qt5 environments.

When installing funq-server from sources, you can create a server/setup.cfg
file to specify the qmake path::
Expand Down
16 changes: 8 additions & 8 deletions client/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
master_doc = 'index'

# General information about the project.
project = u'funq'
copyright = u'2014, Julien Pagès'
project = 'funq'
copyright = '2014, Julien Pagès'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -189,8 +189,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'funq.tex', u'funq Documentation',
u'jpages', 'manual'),
('index', 'funq.tex', 'funq Documentation',
'jpages', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -219,8 +219,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'funq', u'funq Documentation',
[u'jpages'], 1)
('index', 'funq', 'funq Documentation',
['jpages'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -233,8 +233,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'funq', u'funq Documentation',
u'jpages', 'funq', 'One line description of project.',
('index', 'funq', 'funq Documentation',
'jpages', 'funq', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
14 changes: 7 additions & 7 deletions client/doc/tutorial_test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_libelle_btn_test(self):
btn_test = self.funq.widget('btnTest')
properties = btn_test.properties()

self.assertEquals(properties['text'], 'Test')
self.assertEqual(properties['text'], 'Test')

def test_open_dialog(self):
"""
Expand All @@ -31,29 +31,29 @@ def test_open_dialog(self):
self.funq.widget('btnTest').click()
dlg_label = self.funq.widget('dialog1_label')

self.assertEquals(dlg_label.properties()['text'], "Button clicked")
self.assertEqual(dlg_label.properties()['text'], "Button clicked")

def test_tableview_content(self):
"""
Test the data in tableview.
"""
view = self.funq.widget('tableview')
items = list(view.model_items().iter())
self.assertEquals(len(items), 16)
self.assertEqual(len(items), 16)

for item in items:
text = "row {r}, column {c}".format(r=item.row,
c=item.column)
self.assertEquals(item.value, text)
self.assertEqual(item.value, text)

def test_some_treeview_content(self):
"""
test some data in the treeview
"""
model = self.funq.widget('treeview').model_items()

item = model.item_by_named_path([u"item 1", u"item 1-2"])
parent_item = model.item_by_named_path([u"item 1"])
item = model.item_by_named_path(["item 1", "item 1-2"])
parent_item = model.item_by_named_path(["item 1"])

self.assertEquals(item.value, u"item 1-2")
self.assertEqual(item.value, "item 1-2")
self.assertIn(item, parent_item.items)
2 changes: 1 addition & 1 deletion client/funq/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
complete widget's paths.
"""

from ConfigParser import ConfigParser
from configparser import ConfigParser
import collections
from funq.errors import HooqAliasesInvalidLineError, HooqAliasesKeyError

Expand Down
Loading