Skip to content
Merged
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
33 changes: 8 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,21 @@ jobs:
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ["3.10"]
# Pixi environments, one per supported Python version (`default` is 3.12).
environment: [default, py313, py314]

steps:
- uses: actions/checkout@v7
- uses: browser-actions/setup-chrome@v2.2.0
- uses: conda-incubator/setup-miniconda@v4
- uses: prefix-dev/setup-pixi@v0.11.0
with:
auto-update-conda: true
auto-activate-base: true
activate-environment: ""
channels: conda-forge,esss
channel-priority: true
- name: Install
env:
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
run: |
conda config --system --set always_yes yes --set changeps1 no
conda install -c conda-forge conda-devenv
conda info -a
export TEST_QMXGRAPH=1
conda devenv -n qmxgraph
conda list -n qmxgraph
cache: true
environments: ${{ matrix.environment }}
- name: Tests
shell: bash -l {0}
run: |
conda activate qmxgraph
scripts/run_tests.sh
run: pixi run --environment ${{ matrix.environment }} bash scripts/run_tests.sh
- name: Coveralls
shell: bash -l {0}
if: matrix.environment == 'default'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
conda activate qmxgraph
coveralls
run: pixi run coveralls
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,5 @@ target/
resource_*.qrc
resource_*.py

environment.yml
docs_environment.yml
esss_environment.yml
# pixi environments
.pixi/
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"

sphinx:
configuration: docs/conf.py
Expand Down
25 changes: 0 additions & 25 deletions _base_environment.devenv.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
source_suffix = ".rst"
html_theme = "sphinx_rtd_theme"
master_doc = "index"
language = None
language = "en"
pygments_style = "sphinx"
# html_static_path = ["_static"] # Logo and other static files used on the docs.
html_sidebars = {"**": ["about.html", "navigation.html", "searchbox.html"]}
Expand Down
13 changes: 5 additions & 8 deletions docs/examples/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@ The examples here can be found in the examples folder in the project's repositor
How to run the examples
-----------------------

To run test you will need `Conda`_ and `conda-devenv`_ to setup the environment.
To run the examples you will need `pixi`_ to setup the environment.

.. code-block:: shell

git clone https://github.com/ESSS/qmxgraph.git
cd qmxgraph
git clone --depth=1 --branch v3.7.5 https://github.com/jgraph/mxgraph.git
conda devenv
conda activate qmxgraph
inv qrc
pixi run inv qrc
# Hello world example.
python examples/hello_world/main.py
pixi run python examples/hello_world/main.py
# Drag and drop example.
python examples/drag_and_drop/main.py
pixi run python examples/drag_and_drop/main.py

.. _Conda: https://docs.conda.io/projects/conda/en/latest/index.html
.. _conda-devenv: https://conda-devenv.readthedocs.io/en/latest/
.. _pixi: https://pixi.sh

Hello world
------------
Expand Down
35 changes: 16 additions & 19 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Installation
============

Since pip no longer offers the PyQt version required by qmxgraph you will need `Conda`_ and `conda-devenv`_ to setup the environment.
Since pip no longer offers the PyQt version required by qmxgraph you will need `pixi`_ to setup the environment.
Until a new version is published the only option is getting the source code.
To install the required dependencies and build the necessary static resources:

Expand All @@ -11,25 +11,22 @@ To install the required dependencies and build the necessary static resources:
git clone https://github.com/ESSS/qmxgraph.git
cd qmxgraph
git clone --depth=1 --branch v3.7.5 https://github.com/jgraph/mxgraph.git
export PYTHON_VERSION=3.6 # Optional
conda devenv
conda activate qmxgraph
inv qrc
pixi run inv qrc

If you want to run the tests:
If you want to run the tests, which need Google Chrome installed:

.. code-block:: shell
:emphasize-lines: 5,9

git clone https://github.com/ESSS/qmxgraph.git
cd qmxgraph
git clone --depth=1 --branch v3.7.5 https://github.com/jgraph/mxgraph.git
export PYTHON_VERSION=3.6 # Optional
export TEST_QMXGRAPH=1
conda devenv
conda activate qmxgraph
inv qrc
inv test

.. _Conda: https://docs.conda.io/projects/conda/en/latest/index.html
.. _conda-devenv: https://conda-devenv.readthedocs.io/en/latest/
pixi run inv test

To build this documentation locally:

.. code-block:: shell

pixi run inv docs

The environment is generated by `pixi-devenv`_: edit ``pixi.devenv.toml`` instead of
``pixi.toml``, then run ``pixi exec pixi-devenv update``.

.. _pixi: https://pixi.sh
.. _pixi-devenv: https://github.com/ESSS/pixi-devenv
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Used by Read the Docs; keep in sync with the `docs` feature in pixi.devenv.toml.
sphinx
sphinx-rtd-theme
8 changes: 0 additions & 8 deletions docs_environment.devenv.yml

This file was deleted.

33 changes: 0 additions & 33 deletions environment.devenv.yml

This file was deleted.

41 changes: 39 additions & 2 deletions pixi.devenv.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[devenv]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64"]

[devenv.dependencies]
python = ">=3.10"
python = ">=3.12"
attrs = ">=17"
colorama = "*"
flake8 = "*"
Expand All @@ -10,9 +14,42 @@ pip = "*"
pre-commit = "*"
pyqt = ">=5.12,<6.0"
pyqtwebengine = "*"
mxgraph = ">=3.7.5"
# Needed by oop-ext, whose conda-forge package doesn't declare it.
typing_extensions = "*"

[devenv.env-vars]
PYTHONPATH = ["${{ devenv_project_dir }}/src"]
MYPYPATH = ["${{ devenv_project_dir }}/src"]

[devenv.feature.test.dependencies]
cherrypy = ">=18.0.0"
coveralls = "*"
pytest = "*"
pytest-cov = "*"
pytest-mock = "*"
pytest-qt = "*"
pytest-timeout = "*"
selenium = ">=4.10.0"

[devenv.feature.test.target.unix.dependencies]
pytest-xvfb = "*"

[devenv.feature.test.env-vars]
# Feature env-vars replace the main ones instead of extending them.
PYTHONPATH = ["${{ devenv_project_dir }}/src", "${{ devenv_project_dir }}/tests"]
# Where `inv qrc` and the test server find mxgraph, cloned as the docs explain.
MXGRAPHPATH = "${{ devenv_project_dir }}/mxgraph"

# Keep in sync with docs/requirements.txt, used by Read the Docs.
[devenv.feature.docs.dependencies]
sphinx = "*"
sphinx_rtd_theme = "*"

[devenv.feature.python312.dependencies]
python = "3.12.*"

[devenv.feature.python313.dependencies]
python = "3.13.*"

[devenv.feature.python314.dependencies]
python = "3.14.*"
Loading
Loading