Skip to content

Commit 64452dd

Browse files
committed
Merge branch 'release/4.0.4'
* release/4.0.4: (39 commits) feat: add Dockerfile for multi-version Python setup and update devcontainer configuration prepare version 4.1.0 Bump version: 4.0.3 → 4.1.0 fix: correct quotes in bumpversion configuration for setup.py refactor: improve type hints and code structure in agent and message modules; update pyjabber dependency fix slixmpp address kwarg error + keep backwards compatibility fix format fix lint use of memory database. Will work with the new pyjabber release windows unittest timeout bad format label python matrix version drop python 3.8 support use of embedded server for examples fixed slixmpp JID problem with comparator fix lint fix slixmpp.JID cast to spade use + fix messagebase match update requirements and fix message equality check in tests hotfix hotfix server fixture hotfix unittest presence ...
2 parents 99d43f5 + 58f3335 commit 64452dd

40 files changed

+662
-265
lines changed

.devcontainer/Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM ubuntu:22.04
2+
3+
# Instalar versiones de Python 3.9, 3.10, 3.11 y 3.12
4+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5+
&& apt-get install -y software-properties-common \
6+
&& add-apt-repository -y ppa:deadsnakes/ppa \
7+
&& apt-get update \
8+
&& apt-get install -y python3.9 python3.10 python3.11 python3.12 \
9+
&& apt-get install -y python3-pip \
10+
# Instalar distutils y setuptools para todas las versiones de Python
11+
&& apt-get install -y python3-distutils python3-setuptools \
12+
&& apt-get install -y python3.9-distutils python3.10-distutils python3.11-distutils python3.12-distutils \
13+
&& apt-get install -y python3.9-dev python3.10-dev python3.11-dev python3.12-dev
14+
15+
# establecer Python 3.12 como predeterminado
16+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 \
17+
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 \
18+
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 3 \
19+
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 4
20+
21+
# Actualizar pip y setuptools
22+
RUN pip install --upgrade pip setuptools wheel
23+
24+
# Instalar tox
25+
RUN pip install tox
26+
27+
# Establecer directorio de trabajo
28+
WORKDIR /workspaces/spade
29+
30+
# No copiar requirements.txt (esto se hará después del montaje)
31+
# Los archivos se montarán automáticamente desde tu directorio local
32+
33+
# Establecer Python 3.12 como predeterminado
34+
ENV PYTHONPATH=/workspaces/spade

.devcontainer/devcontainer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@
33
{
44
"name": "SPADE Python 3",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
6+
//"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
7+
"dockerFile": "Dockerfile",
78

89
// Features to add to the dev container. More info: https://containers.dev/features.
910
// "features": {},
1011

12+
1113
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1214
// "forwardPorts": [],
1315

1416
// Use 'postCreateCommand' to run commands after the container is created.
15-
"postCreateCommand": "chmod +x .devcontainer/postcreate.sh && .devcontainer/postcreate.sh",
17+
"postCreateCommand": "pip install -e .[dev] || pip install -r requirements.txt -r requirements_dev.txt || echo 'No se pudieron instalar las dependencias automáticamente'",
1618
// Configure tool-specific properties.
1719
"customizations": {
1820
"vscode": {
1921
"extensions": [
20-
"GitHub.copilot"
22+
"GitHub.copilot",
23+
"ms-python.python",
24+
"gitlens.vscode-gitlens"
2125
]
2226
}
2327
}

.devcontainer/postcreate.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/python-package.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,22 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
name:
37-
- "ubuntu-py38"
3837
- "ubuntu-py39"
3938
- "ubuntu-py310"
4039
- "ubuntu-py311"
4140
- "ubuntu-py312"
4241

43-
- "macos-py38"
4442
- "macos-py39"
4543
- "macos-py310"
4644
- "macos-py311"
4745
- "macos-py312"
4846

49-
- "windows-py38"
5047
- "windows-py39"
5148
- "windows-py310"
5249
- "windows-py311"
5350
- "windows-py312"
5451

5552
include:
56-
- name: "ubuntu-py38"
57-
python: "3.8"
58-
os: ubuntu-latest
59-
tox_env: "py38"
6053
- name: "ubuntu-py39"
6154
python: "3.9"
6255
os: ubuntu-latest
@@ -74,10 +67,6 @@ jobs:
7467
os: ubuntu-latest
7568
tox_env: "py312"
7669

77-
- name: "macos-py38"
78-
python: "3.8"
79-
os: macos-latest
80-
tox_env: "py38"
8170
- name: "macos-py39"
8271
python: "3.9"
8372
os: macos-latest
@@ -95,10 +84,6 @@ jobs:
9584
os: macos-latest
9685
tox_env: "py312"
9786

98-
- name: "windows-py38"
99-
python: "3.8"
100-
os: windows-latest
101-
tox_env: "py38"
10287
- name: "windows-py39"
10388
python: "3.9"
10489
os: windows-latest
@@ -140,7 +125,7 @@ jobs:
140125
strategy:
141126
fail-fast: false
142127
matrix:
143-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
128+
python-version: ["3.9", "3.10", "3.11", "3.12"]
144129
steps:
145130
- uses: actions/checkout@v2
146131
- name: Set up Python ${{ matrix.python-version }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ target/
6262
.python-version
6363
/.ipynb_checkpoints/
6464
/.pytest_cache/
65+
66+
# pyjabberdb
67+
pyjabber.db

HISTORY.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
History
33
=======
44

5+
4.1.0 (2025-05-22)
6+
---------------------
7+
8+
* XMPP server is now auto launched transparently with agents.
9+
* Added support for Python 3.13.
10+
* Added end2end tests.
11+
* Memory database integration for the XMPP server.
12+
* Server parameter configurations improved.
13+
* Enhanced presence management and subscription process.
14+
* Added embedded server capability for examples.
15+
* Dropped Python 3.8 support.
16+
* Added overloadable presence_received handler.
17+
* Fixed slixmpp address kwarg error.
18+
* Improved type hints and code structure in agent and message modules.
19+
20+
521
4.0.3 (2025-02-17)
622
--------------------
723
* Prepare XMPP messages linked to client stream.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ clean-test: ## remove test and coverage artifacts
5454
lint: ## check style with flake8
5555
ruff check spade tests
5656

57+
format: ## format code with black
58+
ruff format spade tests
59+
5760
test: ## run tests quickly with the default Python
5861
pytest
5962

docs/conf.py

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#
1313
# All configuration values have a default; values that are commented out
1414
# serve to show the default.
15-
15+
import spade
1616
import sys
1717
import os
1818

@@ -31,7 +31,6 @@
3131
# version is used.
3232
sys.path.insert(0, project_root)
3333

34-
import spade
3534

3635
# -- General configuration ---------------------------------------------
3736

@@ -40,23 +39,27 @@
4039

4140
# Add any Sphinx extension module names here, as strings. They can be
4241
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
43-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.autosectionlabel']
42+
extensions = [
43+
"sphinx.ext.autodoc",
44+
"sphinx.ext.viewcode",
45+
"sphinx.ext.autosectionlabel",
46+
]
4447

4548
# Add any paths that contain templates here, relative to this directory.
46-
templates_path = ['_templates']
49+
templates_path = ["_templates"]
4750

4851
# The suffix of source filenames.
49-
source_suffix = '.rst'
52+
source_suffix = ".rst"
5053

5154
# The encoding of source files.
5255
# source_encoding = 'utf-8-sig'
5356

5457
# The master toctree document.
55-
master_doc = 'index'
58+
master_doc = "index"
5659

5760
# General information about the project.
58-
project = u'SPADE'
59-
copyright = u"2020, Javi Palanca"
61+
project = "SPADE"
62+
copyright = "2020, Javi Palanca"
6063

6164
# The version info for the project you're documenting, acts as replacement
6265
# for |version| and |release|, also used in various other places throughout
@@ -79,7 +82,7 @@
7982

8083
# List of patterns, relative to source directory, that match files and
8184
# directories to ignore when looking for source files.
82-
exclude_patterns = ['_build']
85+
exclude_patterns = ["_build"]
8386

8487
# The reST default role (used for this markup: `text`) to use for all
8588
# documents.
@@ -97,7 +100,7 @@
97100
# show_authors = False
98101

99102
# The name of the Pygments (syntax highlighting) style to use.
100-
pygments_style = 'sphinx'
103+
pygments_style = "sphinx"
101104

102105
# A list of ignored prefixes for module index sorting.
103106
# modindex_common_prefix = []
@@ -111,7 +114,7 @@
111114

112115
# The theme to use for HTML and HTML Help pages. See the documentation for
113116
# a list of builtin themes.
114-
html_theme = 'sphinx_rtd_theme'
117+
html_theme = "sphinx_rtd_theme"
115118

116119
# Theme options are theme-specific and customize the look and feel of a
117120
# theme further. For a list of options available for each theme, see the
@@ -142,7 +145,7 @@
142145
# here, relative to this directory. They are copied after the builtin
143146
# static files, so a file named "default.css" will overwrite the builtin
144147
# "default.css".
145-
html_static_path = ['_static']
148+
html_static_path = ["_static"]
146149

147150
# If not '', a 'Last updated on:' timestamp is inserted at every page
148151
# bottom, using the given strftime format.
@@ -188,17 +191,15 @@
188191
# html_file_suffix = None
189192

190193
# Output file base name for HTML help builder.
191-
htmlhelp_basename = 'spadedoc'
194+
htmlhelp_basename = "spadedoc"
192195

193196
# -- Options for LaTeX output ------------------------------------------
194197

195198
latex_elements = {
196199
# The paper size ('letterpaper' or 'a4paper').
197200
# 'papersize': 'letterpaper',
198-
199201
# The font size ('10pt', '11pt' or '12pt').
200202
# 'pointsize': '10pt',
201-
202203
# Additional stuff for the LaTeX preamble.
203204
# 'preamble': '',
204205
}
@@ -207,9 +208,7 @@
207208
# (source start file, target name, title, author, documentclass
208209
# [howto/manual]).
209210
latex_documents = [
210-
('index', 'spade.tex',
211-
u'SPADE Documentation',
212-
u'Javi Palanca', 'manual'),
211+
("index", "spade.tex", "SPADE Documentation", "Javi Palanca", "manual"),
213212
]
214213

215214
# The name of an image file (relative to this directory) to place at
@@ -237,11 +236,7 @@
237236

238237
# One entry per manual page. List of tuples
239238
# (source start file, name, description, authors, manual section).
240-
man_pages = [
241-
('index', 'spade',
242-
u'SPADE Documentation',
243-
[u'Javi Palanca'], 1)
244-
]
239+
man_pages = [("index", "spade", "SPADE Documentation", ["Javi Palanca"], 1)]
245240

246241
# If true, show URL addresses after external links.
247242
# man_show_urls = False
@@ -253,12 +248,15 @@
253248
# (source start file, target name, title, author,
254249
# dir menu entry, description, category)
255250
texinfo_documents = [
256-
('index', 'spade',
257-
u'SPADE Documentation',
258-
u'Javi Palanca',
259-
'spade',
260-
'Smart Python multi-Agent Development Environment.',
261-
'Artificial Intelligence'),
251+
(
252+
"index",
253+
"spade",
254+
"SPADE Documentation",
255+
"Javi Palanca",
256+
"spade",
257+
"Smart Python multi-Agent Development Environment.",
258+
"Artificial Intelligence",
259+
),
262260
]
263261

264262
# Documents to append as an appendix to all manuals.

0 commit comments

Comments
 (0)