Permalink
Browse files

Preparing for submission to the PyPi index. installation with setup.p…

…y is now fully configured.
  • Loading branch information...
javipalanca committed Aug 1, 2012
1 parent 4895651 commit ee9977e1a12156eefff6a522ecff38322a6dcf99
Showing with 5,081 additions and 251 deletions.
  1. +16 −0 README
  2. +99 −97 configure.py
  3. +5 −0 doc/manual/Makefile
  4. +39 −0 doc/manual/base-html-stylesheet.xsl
  5. +96 −0 doc/manual/book.xml
  6. +233 −0 doc/manual/ch00-introduction-to-spade.xml
  7. +40 −0 doc/manual/ch01-quickstart-guide.xml
  8. +38 −0 doc/manual/ch02-fundamental-concepts.xml
  9. +396 −0 doc/manual/ch03-basic-agents.xml
  10. +200 −0 doc/manual/ch04-platform-services.xml
  11. +182 −0 doc/manual/ch05-advanced-behaviours.xml
  12. +140 −0 doc/manual/ch06-bdi.xml
  13. +17 −0 doc/manual/ch07-content-objects.xml
  14. +21 −0 doc/manual/chunk-stylesheet.xsl
  15. +170 −0 doc/manual/docbookx.dtd
  16. +47 −0 doc/manual/foreword.xml
  17. +16 −0 doc/manual/html-stylesheet.xsl
  18. +49 −0 doc/manual/html/ch05s03.html
  19. BIN doc/manual/html/images/fsm.png
  20. +135 −0 doc/manual/html/index.html
  21. +108 −0 doc/manual/html/spade.advanced.eventbehaviour.html
  22. +139 −0 doc/manual/html/spade.advanced.fsm.html
  23. +56 −0 doc/manual/html/spade.advanced.html
  24. +68 −0 doc/manual/html/spade.basic.html
  25. +140 −0 doc/manual/html/spade.basic.im.html
  26. +96 −0 doc/manual/html/spade.basic.mas.html
  27. +50 −0 doc/manual/html/spade.basic.spadelibrary.html
  28. +51 −0 doc/manual/html/spade.basic.spadeplatform.html
  29. +49 −0 doc/manual/html/spade.basic.whatsnext.html
  30. +161 −0 doc/manual/html/spade.basicagents.agentmodel.communication.html
  31. +72 −0 doc/manual/html/spade.basicagents.agentmodel.html
  32. +178 −0 doc/manual/html/spade.basicagents.behav.html
  33. +75 −0 doc/manual/html/spade.basicagents.first.html
  34. +65 −0 doc/manual/html/spade.basicagents.html
  35. +50 −0 doc/manual/html/spade.basicagents.library.html
  36. +49 −0 doc/manual/html/spade.basicagents.whatsnext.html
  37. +47 −0 doc/manual/html/spade.bdi.future.html
  38. +53 −0 doc/manual/html/spade.bdi.goals.html
  39. +60 −0 doc/manual/html/spade.bdi.html
  40. +68 −0 doc/manual/html/spade.bdi.intro.html
  41. +63 −0 doc/manual/html/spade.bdi.kb.html
  42. +63 −0 doc/manual/html/spade.bdi.plans.html
  43. +89 −0 doc/manual/html/spade.bdi.running.html
  44. +72 −0 doc/manual/html/spade.foreword.html
  45. +53 −0 doc/manual/html/spade.fundamental.html
  46. +63 −0 doc/manual/html/spade.fundamental.platform.html
  47. +193 −0 doc/manual/html/spade.platform.ams.html
  48. +64 −0 doc/manual/html/spade.platform.df.html
  49. +57 −0 doc/manual/html/spade.platform.html
  50. +57 −0 doc/manual/html/spade.quickstart.html
  51. +56 −0 doc/manual/html/spade.quickstart.installation.html
  52. +53 −0 doc/manual/html/spade.quickstart.requirements.html
  53. +247 −0 doc/manual/html/styles.css
  54. BIN doc/manual/images/fsm.png
  55. BIN doc/manual/images/note.png
  56. BIN doc/manual/images/tip.png
  57. BIN doc/manual/images/warning.png
  58. +247 −0 doc/manual/styles.css
  59. +78 −81 runspade.py
  60. +45 −66 setup.py
  61. 0 { → spade}/templates/404.pyra
  62. 0 { → spade}/templates/501.pyra
  63. 0 { → spade}/templates/503.pyra
  64. 0 { → spade}/templates/__init__.py
  65. 0 { → spade}/templates/admin.pyra
  66. 0 { → spade}/templates/agents.pyra
  67. 0 { → spade}/templates/colorbox.css
  68. 0 { → spade}/templates/default.css
  69. BIN { → spade}/templates/favicon.ico
  70. 0 { → spade}/templates/header.pyra
  71. BIN { → spade}/templates/images/border.png
  72. BIN { → spade}/templates/images/controls.png
  73. BIN { → spade}/templates/images/internet_explorer/borderBottomCenter.png
  74. BIN { → spade}/templates/images/internet_explorer/borderBottomLeft.png
  75. BIN { → spade}/templates/images/internet_explorer/borderBottomRight.png
  76. BIN { → spade}/templates/images/internet_explorer/borderMiddleLeft.png
  77. BIN { → spade}/templates/images/internet_explorer/borderMiddleRight.png
  78. BIN { → spade}/templates/images/internet_explorer/borderTopCenter.png
  79. BIN { → spade}/templates/images/internet_explorer/borderTopLeft.png
  80. BIN { → spade}/templates/images/internet_explorer/borderTopRight.png
  81. BIN { → spade}/templates/images/loading.gif
  82. BIN { → spade}/templates/images/loading_background.png
  83. BIN { → spade}/templates/images/overlay.png
  84. BIN { → spade}/templates/images/spade_logo_noalpha.png
  85. BIN { → spade}/templates/images/templatemo_background_section_top_bg.png
  86. BIN { → spade}/templates/images/templatemo_middle_section_box_bg.png
  87. 0 { → spade}/templates/jquery.colorbox-min.js
  88. 0 { → spade}/templates/jquery.colorbox.js
  89. 0 { → spade}/templates/log.pyra
  90. 0 { → spade}/templates/login.pyra
  91. 0 { → spade}/templates/magwood.css
  92. 0 { → spade}/templates/message.pyra
  93. 0 { → spade}/templates/messages.pyra
  94. 0 { → spade}/templates/quirksmode.css
  95. 0 { → spade}/templates/search.pyra
  96. 0 { → spade}/templates/sentmsg.pyra
  97. 0 { → spade}/templates/services.pyra
  98. 0 { → spade}/templates/table.css
  99. 0 { → spade}/templates/table_blue.css
  100. 0 { → spade}/templates/webadmin_indigo.pyra
  101. +7 −7 spade/wui.py
View
16 README
@@ -0,0 +1,16 @@
+==========
+SPADE
+==========
+
+
+Welcome to SPADE
+===========================
+SPADE (Smart Python multi-Agent Development Environment) is a Multiagent and Organizations Platform based on the XMPP/Jabber technology and written in the Python programming language. This technology offers by itself many features and facilities that ease the construction of MAS, such as an existing communication channel, the concepts of users (agents) and servers (platforms) and an extensible communication protocol based on XML, just like FIPA-ACL. Many other agent platforms exist, but SPADE is the first to base its roots on the XMPP technology.
+
+The SPADE Agent Platform does not require (but strongly recommends) the operation of agents made with the SPADE Agent Library. The platform itself uses the library to empower its internals, but aside from that, you can develop your own agents in the programming language of your choice and use them with SPADE. The only requirement those agents must fulfill is to be able to communicate through the XMPP protocol. The FIPA-ACL messages will be embedded in XMPP messages. Be warned, however, that some features of the whole SPADE experience may not be available if you do not use the SPADE Agent Library to build your agents.
+
+The SPADE Agent Library
+============================
+The SPADE Agent Library is a module for the Python programming language for building SPADE agents. It is a collection of classes, functions and tools for creating new SPADE agents that can work with the SPADE Agent Platform. Using it is the best way to start developing your own SPADE agents. In the future, we would like to offer bindings of the SPADE Agent Library for more programming languages, like Java or C#, but for now only Python is supported.
+
+If you have worked with Python before, you will find the SPADE Agent Library easy to understand and use, with classes ready to use and expand, and many functionalities already built in the library. If you have worked with other high-level behavioral agent platforms (like Jade or MadKit) you will find some similarities in the way the library works, although the agent model present in SPADE is a bit different.
View
@@ -10,51 +10,53 @@
globalhostname = ""
def generateCode():
- # Fill the template with the correct data
-
- global jabber_template
- global globalhostname
-
- if os.name == "posix":
- # If no hostname was previously specified, get one from the system
- if globalhostname == "":
- hostname = socket.gethostname()
- else:
- hostname = globalhostname
-
- path = os.sep+"usr"+os.sep+"share"+os.sep+"spade"
- else:
- # If no hostname was previously specified, get one from the system
- if globalhostname == "":
- hostname = socket.gethostbyaddr(socket.gethostname())[0]
- else:
- hostname = globalhostname
- path = "usr"+os.sep+"share"+os.sep+"spade"
-
- if hostname == "localhost":
- hostname = "127.0.0.1"
- print "Translating localhost DNS to IP (127.0.0.1)."
-
- acc_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
- ams_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
- df_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
-
-
- spadexml = """
- <spade>
+ # Fill the template with the correct data
+
+ global jabber_template
+ global globalhostname
+
+ path=""
+
+ if os.name == "posix":
+ # If no hostname was previously specified, get one from the system
+ if globalhostname == "":
+ hostname = socket.gethostname()
+ else:
+ hostname = globalhostname
+
+ #path = os.sep+"usr"+os.sep+"share"+os.sep+"spade"
+ else:
+ # If no hostname was previously specified, get one from the system
+ if globalhostname == "":
+ hostname = socket.gethostbyaddr(socket.gethostname())[0]
+ else:
+ hostname = globalhostname
+ #path = "usr"+os.sep+"share"+os.sep+"spade"
+
+ if hostname == "localhost":
+ hostname = "127.0.0.1"
+ print "Translating localhost DNS to IP (127.0.0.1)."
+
+ acc_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
+ ams_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
+ df_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
+
+
+ spadexml = """
+ <spade>
<platform>
<hostname>""" + hostname + """</hostname>
<port>5222</port>
- <path>"""+path+"""</path>
+ <path>"""+path+"""</path>
</platform>
<acc>
<hostname>acc."""+hostname+"""</hostname>
<password>"""+acc_passwd+"""</password>
<port>5222</port>
- #MTPS#
- </acc>
+ #MTPS#
+ </acc>
<ams>
<hostname>ams."""+hostname+"""</hostname>
@@ -67,86 +69,86 @@ def generateCode():
<password>"""+df_passwd+"""</password>
<port>5222</port>
</df>
-
+
</spade>
- """
-
- # Now fill the MTPs information
- mtp_str = "\n"
- for file in os.listdir("spade/mtp"):
- try:
- # If its a python script
- if file[-3:] == ".py":
- fname = file[:-3]
- mtp_str = mtp_str + '''\t\t\t<mtp name="''' + fname + '''">\n\t\t\t\t<instance>''' + fname + '''</instance>\n'''
- mtp_str = mtp_str + """\t\t\t\t<protocol>""" + fname + """</protocol>\n"""
- mtp_str = mtp_str + """\t\t\t</mtp>\n\n"""
- except Exception, e:
- print "EXCEPTION GETTING MTPS: ", str(e)
-
- # Fill the data
- # GUS: By default, no MTPs, thank you
- #spadexml = spadexml.replace("#MTPS#", mtp_str)
- spadexml = spadexml.replace("#MTPS#", "")
-
- file = open("etc/spade.xml", "w+")
- file.write(spadexml)
- file.close()
-
- # Generating real xmppd.xml
- if os.name == 'posix':
- xmppdxml = '''
- <server>
- <servernames>
- <name>'''+hostname+'''</name>
- </servernames>
- <certificate file="xmppd.pem"/>
- <spool path="'''+str(os.environ['HOME'])+'''/.spade/spool"/>
- <plugins>
- <MUC jid="muc.'''+hostname+'''" name="SPADE MUC Component"/>
- <WQ jid="wq.'''+hostname+'''" name="SPADE Workgroup Queues"/>
- </plugins>
+ """
+
+ # Now fill the MTPs information
+ #mtp_str = "\n"
+ #for file in os.listdir("spade/mtp"):
+ # try:
+ # # If its a python script
+ # if file[-3:] == ".py":
+ # fname = file[:-3]
+ # mtp_str = mtp_str + '''\t\t\t<mtp name="''' + fname + '''">\n\t\t\t\t<instance>''' + fname + '''</instance>\n'''
+ # mtp_str = mtp_str + """\t\t\t\t<protocol>""" + fname + """</protocol>\n"""
+ # mtp_str = mtp_str + """\t\t\t</mtp>\n\n"""
+ # except Exception, e:
+ # print "EXCEPTION GETTING MTPS: ", str(e)
+
+ # Fill the data
+ # GUS: By default, no MTPs, thank you
+ #spadexml = spadexml.replace("#MTPS#", mtp_str)
+ spadexml = spadexml.replace("#MTPS#", "")
+
+ file = open("spade.xml", "w+")
+ file.write(spadexml)
+ file.close()
+
+ # Generating real xmppd.xml
+ if os.name == 'posix':
+ xmppdxml = '''
+ <server>
+ <servernames>
+ <name>'''+hostname+'''</name>
+ </servernames>
+ <certificate file="xmppd.pem"/>
+ <spool path="'''+str(os.environ['HOME'])+'''/.spade/spool"/>
+ <plugins>
+ <MUC jid="muc.'''+hostname+'''" name="SPADE MUC Component"/>
+ <WQ jid="wq.'''+hostname+'''" name="SPADE Workgroup Queues"/>
+ </plugins>
<components>
<AMS jid="ams.'''+hostname+'''" name="AMS" username="ams" password="'''+ams_passwd+'''"/>
<DF jid="df.'''+hostname+'''" name="DF" username="df" password="'''+df_passwd+'''"/>
<ACC jid="acc.'''+hostname+'''" name="ACC" username="acc" password="'''+acc_passwd+'''"/>
</components>
- </server>
- '''
- else:
- xmppdxml = '''
- <server>
- <servernames>
- <name>'''+hostname+'''</name>
- </servernames>
- <certificate file="xmppd.pem"/>
- <spool path="usr/share/spade/xmppd/spool"/>
- <plugins>
- <MUC jid="muc.'''+hostname+'''" name="SPADE MUC Component"/>
- <WQ jid="wq.'''+hostname+'''" name="SPADE Workgroup Queues"/>
- </plugins>
+ </server>
+ '''
+ else:
+ xmppdxml = '''
+ <server>
+ <servernames>
+ <name>'''+hostname+'''</name>
+ </servernames>
+ <certificate file="xmppd.pem"/>
+ <spool path="usr/share/spade/xmppd/spool"/>
+ <plugins>
+ <MUC jid="muc.'''+hostname+'''" name="SPADE MUC Component"/>
+ <WQ jid="wq.'''+hostname+'''" name="SPADE Workgroup Queues"/>
+ </plugins>
<components>
<AMS jid="ams.'''+hostname+'''" name="AMS" username="ams" password="'''+ams_passwd+'''"/>
<DF jid="df.'''+hostname+'''" name="DF" username="df" password="'''+df_passwd+'''"/>
<ACC jid="acc.'''+hostname+'''" name="ACC" username="acc" password="'''+acc_passwd+'''"/>
</components>
- </server>
- '''
+ </server>
+ '''
- file = open("etc/xmppd.xml", "w+")
- file.write(xmppdxml)
- file.close()
+ file = open("xmppd.xml", "w+")
+ file.write(xmppdxml)
+ file.close()
if __name__ == '__main__':
# We look for a command line parameter
if len(sys.argv) > 1:
- # There is a parameter
- globalhostname = sys.argv[1]
+ # There is a parameter
+ globalhostname = sys.argv[1]
else:
- # There is no parameter (i.e. macho-mode)
- pass
-
+ # There is no parameter (i.e. macho-mode)
+ pass
+
generateCode()
View
@@ -0,0 +1,5 @@
+all:
+ mkdir -p html/images
+ xsltproc --output html/ chunk-stylesheet.xsl book.xml
+ cp styles.css html
+ cp images/* html/images
@@ -0,0 +1,39 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+ <!-- xsltproc can't support these extensions
+ <xsl:param name="use.extensions">1</xsl:param>
+ <xsl:param name="callouts.extension">1</xsl:param>
+ <xsl:param name="linenumbering.extension">1</xsl:param>
+ <xsl:param name="tablecolumns.extension">1</xsl:param>
+ <xsl:param name="textinsert.extension">1</xsl:param>
+ -->
+
+ <xsl:param name="html.stylesheet">styles.css</xsl:param>
+ <xsl:param name="toc.section.depth">3</xsl:param>
+ <xsl:param name="annotate.toc">0</xsl:param>
+
+ <xsl:param name="admon.graphics" select="1" />
+ <xsl:param name="admon.graphics.extension">.png</xsl:param>
+ <xsl:param name="callout.graphics" select="1" />
+ <xsl:param name="callout.graphics.extension">.png</xsl:param>
+
+ <xsl:template match="sect1" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes"
+ select="sect2|refentry|bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="sect2" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes"
+ select="sect3|refentry|bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:template>
+
+</xsl:stylesheet>
View
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!DOCTYPE book SYSTEM "docbookx.dtd"
+[
+<!--<!ENTITY % vers SYSTEM "version.xml">
+%vers;-->
+<!ENTITY foreword SYSTEM "foreword.xml">
+<!ENTITY ch00 SYSTEM "ch00-introduction-to-spade.xml">
+<!ENTITY ch01 SYSTEM "ch01-quickstart-guide.xml">
+<!ENTITY ch02 SYSTEM "ch02-fundamental-concepts.xml">
+<!ENTITY ch03 SYSTEM "ch03-basic-agents.xml">
+<!ENTITY ch04 SYSTEM "ch04-platform-services.xml">
+<!ENTITY ch05 SYSTEM "ch05-advanced-behaviours.xml">
+<!ENTITY ch06 SYSTEM "ch06-bdi.xml">
+<!ENTITY ch07 SYSTEM "ch07-content-objects.xml">
+<!ENTITY ch08 SYSTEM "ch08-gui.xml">
+<!ENTITY ch09 SYSTEM "ch09-agent-organizations.xml">
+<!ENTITY ch10 SYSTEM "ch10-extending-spade.xml">
+<!ENTITY ch11 SYSTEM "ch11-creating-a-complex-example.xml">
+<!ENTITY ch12 SYSTEM "ch12-faq-and-troubleshooting.xml">
+<!ENTITY license SYSTEM "copyright.xml">
+]>
+
+<book id="spade">
+ <title>SPADE User's Manual</title>
+
+ <bookinfo>
+
+ <subtitle>For SPADE 2.0</subtitle>
+
+ <!-- Using revnumber would be more appropriate, but our stylesheets -->
+ <!-- don't seem to render it. -->
+ <!--<subtitle>(Compiled from &svn.l10n_revision;&svn.version;)</subtitle>-->
+
+ <edition>First</edition>
+ <isbn>?-?????-???-?</isbn>
+ <authorgroup>
+
+ <author>
+ <firstname>Gustavo</firstname>
+ <surname>Aranda</surname>
+ </author>
+
+ <author>
+ <firstname>Javier</firstname>
+ <surname>Palanca</surname>
+ </author>
+
+ </authorgroup>
+
+ <!--<editor>
+ <firstname>Vicente</firstname>
+ <surname>Botti</surname>
+ </editor>-->
+
+ <pagenums>XXX pages (est.)</pagenums>
+ <pubdate>(TBA)</pubdate>
+
+ <copyright>
+ <year>2005</year>
+ <year>2010</year>
+ <holder>Gustavo Aranda</holder>
+ <holder>Javier Palanca</holder>
+ <holder>Miguel Escriva</holder>
+ <holder>Natalia Criado</holder>
+ <holder>Juan Angel Garcia-Pardo</holder>
+ </copyright>
+
+ <legalnotice><para>This work is licensed under the Creative
+ Commons Attribution License. To view a copy of this license,
+ visit <ulink url="http://creativecommons.org/licenses/by/2.0/"/>
+ or send a letter to Creative Commons, 559 Nathan Abbott Way,
+ Stanford, California 94305, USA.</para></legalnotice>
+
+ </bookinfo>
+
+ <!-- External entity refs -->
+
+ &foreword;
+ &ch00;
+ &ch01;
+ &ch02;
+ &ch03;
+ &ch04;
+ &ch05;
+ &ch06;
+ <!--&ch07;
+ &ch08;
+ &ch09;
+ &appa;
+ &appb;
+ &appc;
+ &appd;
+ &license;
+ &index;-->
+
+</book>
Oops, something went wrong.

0 comments on commit ee9977e

Please sign in to comment.