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
2 changes: 1 addition & 1 deletion .github/workflows/ci-build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
max-parallel: 1 # X Display is not supported on parallel jobs
fail-fast: true # Stop all jobs if one fails
matrix:
python-version: ['3.11']
python-version: ['3.10','3.11','3.12','3.13']
defaults:
run:
shell: bash -l {0}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### action execute when the commands are executed:
### git tag v1.0.0
### git push origin v1.0.0

name: Publish to PyPI

on:
Expand All @@ -19,6 +23,15 @@ jobs:
with:
python-version: "3.11"

- name: Verify release tag
run: |
TAG_NAME="${{ github.ref_name }}"
if [[ ! "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "❌ Le tag '$TAG_NAME' ne suit pas le format vX.Y.Z (ex: v1.0.0)."
exit 1
fi
echo "✅ Le tag est valide : $TAG_NAME"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
Expand Down
12 changes: 12 additions & 0 deletions devsimpy/Utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,20 @@ def load_and_resize_image(filename, width=16, height=16):
sys.stdout.write("Unknown operating system.\n")
sys.exit()

import tomllib
from pathlib import Path

#-------------------------------------------------------------------------------

def get_version():
"""Récupère la version du package depuis pyproject.toml."""
pyproject_path = Path(__file__).parent.parent / "pyproject.toml"

with pyproject_path.open("rb") as f:
pyproject_data = tomllib.load(f)
return pyproject_data["project"]["version"]


def getFilePathInfo(path):
"""
"""
Expand Down
7 changes: 4 additions & 3 deletions devsimpy/devsimpy-nogui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Laurent CAPOCCHI
# SPE - University of Corsica
# --------------------------------
# Version 5.0 last modified: 03/11/25
# Version 5.1.0 last modified: 03/11/25
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
#
# GENERAL NOTES AND REMARKS:
Expand All @@ -30,8 +30,6 @@
#
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

__version__ = '5.1'

def serialize_date(obj):
if isinstance(obj, date):
return obj.isoformat()
Expand All @@ -50,6 +48,9 @@ def serialize_date(obj):
from InteractionYAML import YAMLHandler
from InteractionJSON import JSONHandler
from StandaloneNoGUI import StandaloneNoGUI
from Utilities import get_version

__version__ = get_version()

## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
#
Expand Down
16 changes: 8 additions & 8 deletions devsimpy/devsimpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# L. CAPOCCHI (capocchi@univ-corse.fr)
# SPE Lab - SISU Group - University of Corsica
# --------------------------------
# Version 4.0 last modified: 03/11/25
# Version 5.1.0 last modified: 03/11/25
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
#
# GENERAL NOTES AND REMARKS:
Expand Down Expand Up @@ -56,12 +56,6 @@
if sys.version_info[0] < 3:
raise Exception("Must be using Python 3")

__authors__ = "Laurent Capocchi <capocchi@univ-corse.fr>, <santucci@univ-corse.fr>"
__date__ = str(datetime.datetime.now())
__version__ = '5.1'
__docformat__ = 'epytext'
__min_wx_version__ = '4.0'

################################################################
### Loading wx python library
################################################################
Expand Down Expand Up @@ -142,7 +136,7 @@
from Reporter import ExceptionHook
from PreferencesGUI import PreferencesGUI
from PluginManager import PluginManager
from Utilities import GetUserConfigDir, install, install_and_import, updatePiPPackages, load_and_resize_image, updateFromGitRepo, updateFromGitArchive, NotificationMessage, getTopLevelWindow
from Utilities import GetUserConfigDir, install, install_and_import, updatePiPPackages, load_and_resize_image, updateFromGitRepo, updateFromGitArchive, NotificationMessage, getTopLevelWindow, get_version
from Decorators import redirectStdout, BuzyCursorNotification, ProgressNotification, cond_decorator
from DetachedFrame import DetachedFrame
from LibraryTree import LibraryTree
Expand All @@ -156,6 +150,12 @@
from XMLModule import getDiagramFromXMLSES
from StandaloneGUI import StandaloneGUI

__authors__ = "Laurent Capocchi <capocchi@univ-corse.fr>, <santucci@univ-corse.fr>"
__date__ = str(datetime.datetime.now())
__version__ = get_version()
__docformat__ = 'epytext'
__min_wx_version__ = '4.0'

### http://comments.gmane.org/gmane.comp.python.wxpython/98744
wx.Log.SetLogLevel(0)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ devsimpy = "devsimpy.devsimpy:main"

[project]
name = "devsimpy"
version = "5.0.4"
version = "5.1.0"
dependencies = [
"wxpython>=4.2.2",
"psutil",
Expand Down