-----------
Changed initio check on attribute so that allows reuse of deed in other frames
use _iois to store attribute names created with initio. If name in _iois
then print warning but proceed to init Otherwise raise ValueError as before
Exchanged semantics of 'with' and 'per' as 'with' is more like 'from' so more symmetric
Made nodes objects in Store that are modified odicts that have name property
which is pathname of node in store. Convenience method byName to allow creating
and chaining of Node
Refactored salting.py. To use shares instead of fields for status etc
change status on overload to be a node not share and then the overload, onCount,
offCount, healthy, deadCode.
Added postInit method to deeds to be called by initio
---------
20131108
---------
Commented out print module and print package lines
Converted existing Deeds to use new ioinit interface so that store shares are not
created until a deed gets used in a floscript. See the salting.py for an example
of how this is done. Easy way to convert is not use new interface but use old
interfaces just .ioinit.update(oldargs)
Added .time share that is the store's time stamp .stamp. This gets reset by the skedder
in its .run method so corresponds to start of mission.
Changed license to MIT
got rid of "debug" variable
Add Log rules 'lifo' and 'fifo' that will log a mutable sequence or dict until empty
This is useful to flush event deques etc. /This if for read only deques whoes
purpose is solely to be logged not for consumption by something else.
Updated init protocol
inode instead of proem
Default value for inode is instance name split into path on uppercase
Removed some prints in building not done
---------
20131107
----------
salting.py mostly working
Updated to use new ioinit paradigm.
with this paradigm initializing the ioflo (inputs outputs)
is not performed until the Deed instance is used in a floscript.
There are three places to specify what the initialization of the ioflos will be when the instance is
used (not created)
1) import time in CreateInstances by updating the ioinit attribute of the newly created instance
at parse time .initio(**.ioinit) is called to initialize in the store
2) Parse time in buildDo using the 'with' and/or 'per' connectives
3) link time (not yet implemented) with the "on link" clause in the do command
ipath instead of path
ival instead of valu
iown instead of iflo
ipri instead of ipri
Changed "with" use "to" for link time parameters to be consistent with "set"
"inc" Updated do, tasker, server commands. Use "per" for init and "from"
for link time so now the convention is.
to data from source with data per source
where the with and per are init time and to and from are link time
Refactored so no more mulitple inheritance of Patron and Registry instead
added StoriedRegistry to include .store. and Share has its own .store.
This allows using slots for Actors at least for the first few levels of inheritance.
Added __slots__ for Registry on down to Actors
Changed terminology. Store share path are nodes and tip not group.
Registries now odicts
.
----------
20131024
---------
-- Initial pass at Salt Stack integration. New trim/fancy/salting.py module
-------
20131101
--------
-- meta first node in store
-- addNode createNote methods on store
---------
20131023
----------
-- Bump version to 0.7.0
-- change version tov 0.6.4
-- change indent to 4 from 3
-- change licence to apache2
-- Lots of refactoring of console printout when running Skedder
-- Change Tasker to Skedder and Task to Tasker. Break out skedder into its own module
refactor Server, Monitor, Tasker Framer
-- Replace verbose with Console object that acts like logger but not threaded
but writes to file. Default is stdout
Refactor __init__ Verbose it don't have
to be redefined in each __init__.py but instead recursively pull the globals
from each module . That is they define module level globals
def Verbose(level = 1):
"""Sets the modules' verbose level
Must redefine this function in each module since the global namespace
is the namespace of the defining module not the calling module
"""
global _verbose, __all__
level = int(level)
_verbose = level
call the Verbose function on all modules named in __all__
gns = globals() get global namespace which includes modules
for m in __all__: assume module of name == m already imported
gns[m].Verbose(level)
---------
20131017
--------
-- add line continuation character \ or continue needs if end in 'and'.
-- refactor tasker to be skedder then refactor task to be tasker
-- Refactor CreateActors so it don't have
to be redefined in each __init__.py but instead recursively pull the globals
from each module . That is they define module level globals
def CreateActors(store):
"""Makes new instances of actors. Should have blank registry
Must redefine this function in each module since the global namespace
is the namespace of the defining module not the calling module
"""
global _InstanceModules
if _verbose: print "Creating actors for package %s" % __name__
for module in _InstanceModules:
module.CreateActors(store = store)
-- Add task command and normalize other task commands.
currently each type of task gets its own command
framer name options
server kind name options
logger name options
where options are repectively:
[at period] [first frame][be scheduled] [in order]
[at pd] [rx h:p] [tx h:p][be sd] [in or] [to px]
[at pd] [to px] [be sd] [in or]
But we need generic task
task name [modifier ...] options
where name [modifier ...] allows us to name space tasks like we do deeds
For example server has recon specific defaults in building.py these
should not be there but should be in task definition specific not in builder.
so each specific task type would instead be of form
framer name [modifier ...] options
createInstances passes in store to all instances in registry are in same
store. Need to update tasks so get store same way in stead of manually
pasing in,
---------
20131009
----------
-- refactor resolvLinks so always to checks for type outside of if to convert name
to object. Some resolveLinks were not right.
-- added **kw to resolveLinks method of actors so that if additional parms passed
it will not cause reolveLinks to fail
-- fixed status need was not working
-- done need now can be used on any Task not just framers and not just aux and slave
-- Added READY control and READIED status to Tasks so can check if slave task
can be started independent of actually trying to start
-- Add ready control to indicate that a task is ready to start
so can explicity do the checkstart for framers
and allow other task to indicate if ready to start.
-- Added ready command to send ready control to slave task
-- Change done need so will allow slave framers
-- added .done attribute to Task so all tasks have attribute
-- added READY control else block to all runner methods of all existing task classes
-- Changed Frame.precur so it checks to see if act.actor is an interruptive class
indicated by it having the attr ._interruptive. This makes it so other actors
besides needs can be used in beacts in that they return something besides Falsy
so that the beact semantics work but can also be used in preacts without messing up the
preact processing for transistions.
In general the policy should still be that action methods return None unless
there is a use case to do otherwise such as would be used in a beact or the actor
is interruptive such as Transitor and Suspender (transisiton and conditional auxes)
The ReadyFiat is a use case where it can be used in a beact to determine if
a slave framer is ready to be run before transitioning to the frame
ready testslave benter
-- Get rid of tell command. this allows new tell command (below)
replace old
tell task (start stop run abort)
with new
(start stop run abort) task as slave tasks require explicit control this
makes it more convenient. Only can work with slave framers/tasks.
operate slave framers/tasks using new (start stop run abort) slave commands
so activity is explict runs slave framer/task generator directly and not
done automatically by Tasker
use the 'status' need conditions for slave tasks
if status task is started, running, stopped, aborted
-- names to resolve should be checked by builder for valid "identifier" re
at parse time not at resolve time
aux framer
over frame
under frame
first frame
framer first frame
---------
20131008
--------
-- Add with and from connectives to deed command so can pass in at runtime
direct and indirect values to deed Actor.action() method.
-- Add support to all actors for run time parameters to action method
.action(**kw)
-- make deed name spacing generic now its a list of one or more name parts
genre and kind optional for deed parsing
do genre kind name
-- repeat command similar to timeout command implicit transact
repeat 3
go next if recurred >= 3
which does it 4 times 0 1 2 3
---------
20131007
--------
-- Fix the timeout command which was using obsolete code before makeDirectNeed and preact
-- replace repeat goal with reccured.
Although iter is shorter and closer in meaning as repeat is strong verb form
iter is too much like python iterm built in and would be confusing to python
programmers while not meaning anything to non python programmers
so maybe use recurred to be the recur count and is syntactically similar to
elapsed
-------
20131004
---------
-- Reorder need conditions so target comes first easier to parse and will eventually
allow multiline conditions
let [me] if condition (Beact Benter) Other verbs (en, come, allow, admit)
go target if condition (Transition
aux target if condition (Conditional Aux)
-------
20131003
---------
-- get rid of behaving directory in haf.base
move arbiting.py to haf.base
move rest of the behaviors to the trim directory
-- have tasker inject metadata into build so there is hook back for build task
to put stuff
The metadata is not in each House as an odict house.meta of items (name, share)
When each House is created an image of the metadata shares is created for that house
The tasker has access to the meta data via its .houses list
-- Change Scaffold terminology to House to avoid meaning collison for testing scaffolds
-- refactor tasker so that tasker does the build, i.e. tasked calls builder
this will eventually allow
tasker to run as daemon and autobuild based on config file.
-- Refactor so all imports are relative using from . import syntax so guarantee
that do not import module from some place else. The old way of doing relative
imports where a simple
import mymodule
would first look in the same directory
as the importing module and then look in sys.path means there is a chance
of importing the wrong thing. Using the new relative import
from . import mymodule
guarantees the correct thing is imported. (See Beazley)
---------
20130407
---------
Added BENTER benter context and beact support
not tested.
-- Should context commands be verbs or nouns? exit is the same for both noun and verb
I think verb since precur and recur do not have noun form.
benter - beacts (not bentry)
enter - enacts (not entry)
renter - renacts (not rentry)
precur - preacts
recur - reacts
rexit - rexacts
exit - exacts
---------
20130301
---------
Refactor directory layout to use HG mercurial and subprojects get AUV
and WHOI specific actions in separate folder
Put private repo on bitbucket
-- Repository on BitBucket
https://bitbucket.org/smithsamuelm/HalfScript need to commit setup
-- Fixed circular import
Had some kind of circular import problem that an instance of Store, store
was failing isinstance(store, Store)
I fixed it by replacing absolute imports from haf with the new relative imports
using from . import
-------------
20100211
---------------
Made it compatible with python 2.6 and python 2.7
The incompatibility is that starting with pyton2.6 the root object's __init__
and __new__ methods no longer accept any arguments. this is a problem when
you have multiple inheritance with one class that accepts arguments.
the workaround is to define a dummy object that inherits from object
who's __init__ method throws away any argurments and use this object instead
of the root object.
For new just don't pass in the arguments.
Dummy object defined in registering is Corpus. So Patron and Registry class
now inhereit from Corpus instead of object and Data objects new method no longer
calls object new with parameters.
TypeError: object.__init__() takes no parameters
DeprecationWarning: object.__new__() takes no parameters
return object.__new__(cls, uri)
---------
20090611