Skip to content

Commit b7ac9c2

Browse files
authored
Merge pull request #347 from capocchi/version-5.1
update
2 parents 2b73292 + 76f8ce6 commit b7ac9c2

6 files changed

Lines changed: 39 additions & 13 deletions

File tree

.github/workflows/ci-build-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
max-parallel: 1 # X Display is not supported on parallel jobs
1313
fail-fast: true # Stop all jobs if one fails
1414
matrix:
15-
python-version: ['3.11']
15+
python-version: ['3.10','3.11','3.12','3.13']
1616
defaults:
1717
run:
1818
shell: bash -l {0}

.github/workflows/publish-pypi.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### action execute when the commands are executed:
2+
### git tag v1.0.0
3+
### git push origin v1.0.0
4+
15
name: Publish to PyPI
26

37
on:
@@ -19,6 +23,15 @@ jobs:
1923
with:
2024
python-version: "3.11"
2125

26+
- name: Verify release tag
27+
run: |
28+
TAG_NAME="${{ github.ref_name }}"
29+
if [[ ! "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
30+
echo "❌ Le tag '$TAG_NAME' ne suit pas le format vX.Y.Z (ex: v1.0.0)."
31+
exit 1
32+
fi
33+
echo "✅ Le tag est valide : $TAG_NAME"
34+
2235
- name: Install build dependencies
2336
run: |
2437
python -m pip install --upgrade pip

devsimpy/Utilities.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,20 @@ def load_and_resize_image(filename, width=16, height=16):
111111
sys.stdout.write("Unknown operating system.\n")
112112
sys.exit()
113113

114+
import tomllib
115+
from pathlib import Path
116+
114117
#-------------------------------------------------------------------------------
115118

119+
def get_version():
120+
"""Récupère la version du package depuis pyproject.toml."""
121+
pyproject_path = Path(__file__).parent.parent / "pyproject.toml"
122+
123+
with pyproject_path.open("rb") as f:
124+
pyproject_data = tomllib.load(f)
125+
return pyproject_data["project"]["version"]
126+
127+
116128
def getFilePathInfo(path):
117129
"""
118130
"""

devsimpy/devsimpy-nogui.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Laurent CAPOCCHI
99
# SPE - University of Corsica
1010
# --------------------------------
11-
# Version 5.0 last modified: 03/11/25
11+
# Version 5.1.0 last modified: 03/11/25
1212
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
1313
#
1414
# GENERAL NOTES AND REMARKS:
@@ -30,8 +30,6 @@
3030
#
3131
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
3232

33-
__version__ = '5.1'
34-
3533
def serialize_date(obj):
3634
if isinstance(obj, date):
3735
return obj.isoformat()
@@ -50,6 +48,9 @@ def serialize_date(obj):
5048
from InteractionYAML import YAMLHandler
5149
from InteractionJSON import JSONHandler
5250
from StandaloneNoGUI import StandaloneNoGUI
51+
from Utilities import get_version
52+
53+
__version__ = get_version()
5354

5455
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
5556
#

devsimpy/devsimpy.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# L. CAPOCCHI (capocchi@univ-corse.fr)
1010
# SPE Lab - SISU Group - University of Corsica
1111
# --------------------------------
12-
# Version 4.0 last modified: 03/11/25
12+
# Version 5.1.0 last modified: 03/11/25
1313
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
1414
#
1515
# GENERAL NOTES AND REMARKS:
@@ -56,12 +56,6 @@
5656
if sys.version_info[0] < 3:
5757
raise Exception("Must be using Python 3")
5858

59-
__authors__ = "Laurent Capocchi <capocchi@univ-corse.fr>, <santucci@univ-corse.fr>"
60-
__date__ = str(datetime.datetime.now())
61-
__version__ = '5.1'
62-
__docformat__ = 'epytext'
63-
__min_wx_version__ = '4.0'
64-
6559
################################################################
6660
### Loading wx python library
6761
################################################################
@@ -142,7 +136,7 @@
142136
from Reporter import ExceptionHook
143137
from PreferencesGUI import PreferencesGUI
144138
from PluginManager import PluginManager
145-
from Utilities import GetUserConfigDir, install, install_and_import, updatePiPPackages, load_and_resize_image, updateFromGitRepo, updateFromGitArchive, NotificationMessage, getTopLevelWindow
139+
from Utilities import GetUserConfigDir, install, install_and_import, updatePiPPackages, load_and_resize_image, updateFromGitRepo, updateFromGitArchive, NotificationMessage, getTopLevelWindow, get_version
146140
from Decorators import redirectStdout, BuzyCursorNotification, ProgressNotification, cond_decorator
147141
from DetachedFrame import DetachedFrame
148142
from LibraryTree import LibraryTree
@@ -156,6 +150,12 @@
156150
from XMLModule import getDiagramFromXMLSES
157151
from StandaloneGUI import StandaloneGUI
158152

153+
__authors__ = "Laurent Capocchi <capocchi@univ-corse.fr>, <santucci@univ-corse.fr>"
154+
__date__ = str(datetime.datetime.now())
155+
__version__ = get_version()
156+
__docformat__ = 'epytext'
157+
__min_wx_version__ = '4.0'
158+
159159
### http://comments.gmane.org/gmane.comp.python.wxpython/98744
160160
wx.Log.SetLogLevel(0)
161161

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ devsimpy = "devsimpy.devsimpy:main"
88

99
[project]
1010
name = "devsimpy"
11-
version = "5.0.4"
11+
version = "5.1.0"
1212
dependencies = [
1313
"wxpython>=4.2.2",
1414
"psutil",

0 commit comments

Comments
 (0)