Skip to content

Commit

Permalink
Added new (tentative) logo and some small adjustments to the document…
Browse files Browse the repository at this point in the history
…ation.
  • Loading branch information
assamite committed Nov 8, 2019
1 parent 80bfa26 commit 9a7b1e9
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 37 deletions.
2 changes: 1 addition & 1 deletion creamas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
'expose'
]

__version__ = '0.5.0'
__version__ = '0.5.1'
2 changes: 1 addition & 1 deletion creamas/core/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def refill(self):
def evaluate(self, artifact):
"""Evaluate an artifact.
** This is a dummy method which should be overridden in a subclass. **
**This is a dummy method which should be overridden in a subclass.**
"""
return 0.0, None

Expand Down
21 changes: 21 additions & 0 deletions creamas/core/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self, creator, obj, domain=int):
self._domain = domain
self._evals = {}
self._framings = {}
self._feature_values = {} # Objective feature values for each feature.

@property
def creator(self):
Expand Down Expand Up @@ -63,6 +64,26 @@ def framings(self):
"""
return self._framings

self._feature_values = {} # Objective feature values for each feature.

@property
def feature_values(self):
"""Values for all features extracted from the artifact.
"""
return self._feature_values

def add_feature_value(self, feat, val):
"""Add extracted value for the given feature string.
"""
self._feature_values[feat] = val

def get_feature_value(self, feat):
"""Return value for the given feature string, or ``None`` if it is not found.
"""
if feat in self._feature_values:
return self._feature_values[feat]
return None

def add_eval(self, agent, e, fr=None):
"""Add or change agent's evaluation of the artifact with given framing
information.
Expand Down
19 changes: 0 additions & 19 deletions creamas/domains/image/gp/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,6 @@ def __init__(self, creator, obj, function_tree, string_repr=None):
# Artifact ID #
self.aid = None
self.rank = None
self._feature_values = {} # Objective feature values for each feature.

@property
def feature_values(self):
"""Values for all features extracted from the image.
"""
return self._feature_values

def add_feature_value(self, feat, val):
"""Add objective feature value for given feature.
"""
self._feature_values[feat] = val

def get_feature_value(self, feat):
"""Return objective feature value for given feature, or ``None`` if it is not found.
"""
if feat in self._feature_values:
return self._feature_values[feat]
return None

@staticmethod
def _individual_from_file(fname, pset):
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docs/source/_static/css/creamas_theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/** css/creamas_theme.css **/

/* This line is theme specific - it includes the base theme CSS */
/*@import '../alabaster.css'; /* for Alabaster */
@import 'theme.css'; /* for the Read the Docs theme */

body {
/* ... */

}

.wy-side-nav-search {
/* background-color: #2980B9; */
background-color: #222222;
}

.wy-side-nav-search>div.version{
color: rgba(255,255,255,0.7);
}

.wy-nav-side {
background: #434343;
}
37 changes: 29 additions & 8 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
# The short X.Y version.
version = '0.5'
# The full version, including alpha/beta/rc tags.
release = '0.5.0'
release = '0.5.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -123,6 +123,7 @@
'python': ('https://docs.python.org/3.7', None),
'asyncssh': ('https://asyncssh.readthedocs.io/en/latest/', None),
'deap': ('https://deap.readthedocs.io/en/stable/', None),
'nltk': ('https://www.nltk.org/', None),
}


Expand All @@ -148,19 +149,35 @@ def __getattr__(cls, name):

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
# html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

#html_theme = 'alabaster'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.

html_theme_options = {
#'github_user': 'assamite',
#'github_repo': 'mas',
#'github_button': True,
#'github_banner': True
'logo_only': True,
}

github_url = 'https://github.com/assamite/creamas'

# Alabaster options
#html_theme_options = {
# 'github_user': 'assamite',
# 'github_repo': 'mas',
# #'github_button': True,
# 'logo': 'creamas-logo-triangle-rainbow.png',
# 'sidebar_width': '30%',
# 'page_width': '70%',
# 'code_font_size': '14px',
# 'code_font_family': ['Menlo', 'Consolas', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'monospace'],
# #'github_banner': True
#}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

Expand All @@ -169,16 +186,16 @@ def __getattr__(cls, name):
#html_title = None

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
html_short_title = "Creative agent systems made easy."

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
html_logo = "_static/creamas-logo-triangle-rainbow.png"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
html_favicon = "_static/creamas-logo-triangle-only.png"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -190,6 +207,10 @@ def __getattr__(cls, name):
# directly to the root of the documentation.
#html_extra_path = []

html_css_files = [
'css/creamas_theme.css',
]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
Expand Down
18 changes: 18 additions & 0 deletions docs/source/domains.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ Features
.. automodule:: creamas.domains.image.features
:members:

Text
----

Tools
.....

.. automodule:: creamas.domains.text.tools
:members:

Markov Chains
.............

.. automodule:: creamas.domains.text.mc.generator
:members:




Other domains
-------------

Expand Down
22 changes: 14 additions & 8 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
Creamas - Creative Multi-Agent Systems
======================================

.. image:: _static/python-powered-w-70x28.png
.. image:: _static/creamas-logo-triangle-rainbow.png
:align: center
:width: 80%
:alt: Creamas logo

Creamas is Python (3.5+) library for (creative) multi-agent systems. It is a tool to research and implement multi-agent
systems that exhibit emergent and/or creative behavior in some ways. However, its main implementations are general
enough to be used for multi-agent systems with other purposes.
|
Introduction
============

Creamas is a library to develop, research and teach agent-based systems that exhibit emergent and/or creative behavior
in some ways. Its main implementations are quite general so that it could be used for diverse needs. See :doc:`overview`
for an introduction to the library's main components. Creamas is developed for Python 3.5+ and its main repository is in
`github <https://github.com/assamite/creamas>`_.

Features, etc.
--------------
Expand All @@ -20,8 +27,7 @@ Features, etc.
* Social decision making using voting
* NetworkX integration to generate agent connections from NetworkX structures and vice versa

See :doc:`overview` for a more detailed introduction to the library's main components.
Project's main repository is in `github <https://github.com/assamite/creamas>`_.


.. toctree::
:hidden:
Expand Down

0 comments on commit 9a7b1e9

Please sign in to comment.