Process: Create new classical NRP for the Vedun project starting 2018-03-14 ending 2018-03-31

If you were logged in and working on this process, you would log your work on this page.



OVNi module 1.00 Idea due March 31, 2018


Planned Work: (Requirements are ordered by due date)

Work - Shopping: 1.00 Time - Hours due March 14, 2018
Work - Analysis and Strategy: 1.00 Time - Hours due March 14, 2018
Work - Documenting: 1.00 Time - Hours due March 14, 2018
Work events:
April 4, 2018 2.15 Time - Hours Done by davidh

Creating a hacks/ in the repo in case anyone else needs to install this thing.
Also refactored hacks for reuse a bit and committed.

Work - Training others: 1.00 Time - Hours due March 14, 2018
Work - Demo: 1.00 Time - Hours due March 14, 2018
Work - Meeting: 1.00 Time - Hours due March 14, 2018
Work events:
March 19, 2018 2.50 Time - Hours Done by davidh

workparty with Tibi on installing a new instance of the NRP for the Verdun project. we worked on, Github and exchanged about the work to be done.

March 19, 2018 2.50 Time - Hours Done by Tibi

workparty with David on installing a new instance of the NRP for the Verdun project. we worked on, Github and exchanged about the work to be done.

Work - Outreach-Marketing: 1.00 Time - Hours due March 14, 2018
Work - Programming for product: 1.00 Time - Hours due March 14, 2018
Work events:
April 20, 2018 3.43 Time - Hours Done by davidh

Starting regression test on edi-table using agent-associations
hmmm it claims that there is no view for that page, which is clearly wrong - must have introduced an error in the last commit to causing it to fail. Rolling it back to test theory. Nope! It was in; I had HiddenField instead of HiddenInput.

It looks like something broke. The form still insists on doing its default behavior, which means the enctype wasn't removed, Sure enough it's there. Also got an exception, data is undefined, which probably crashed a function before the attribute was removed. Seems to be the change that allowed the simple output to have a prefix & suffix; took the simple output and made it examine the data attributes to be a little more intelligent about this.

Dialog pops now, no exceptions, but the fields aren't being updated right; in particular, the agent field disappears from the form control and the table. The input is actually fine; the output span just isn't updated. Now it works.

Looked at the create resource type page; it had a funny facet list where the facets were not shown. Fixed that, now things just look ugly. Fixing it up.
Now it looks pretty good.

April 18, 2018 6.37 Time - Hours Done by davidh

Checking out additional targets for the edi-table.
I'm on agent_contributions.html, fixed a markup error. The embedded forms are really weird; there's a form for each field that can be edited, and the saves are caused by change events. There is a link to change_event.html in the last column of the table right beside delete. What I think I'll do is move that to its own first column and include the form from change_event.html as a modal. change_event.html is just a form|as_bootstrap anyway. Since there is also a model field for deliverables, which are not on the form itself, I also needed to make an API entry point in and to fetch the deliverables when the table is synced. In order to get a queryset for the JSON, I needed to alter the process.deliverables() function to return a queryset as well. Finally, the edi-table needs to be able to handle both async save and load, as well as several new data types.

That's that, can't test it until there is some contribution data in there. Moving on to the next target.

That is unscheduled_time_contributions.html. The table here has a tally of hours at the bottom; have to extend edi-table to take arbitrary callbacks when the form saves, Introduced an EdiTable class at document scope that has static methods to retrieve the table you want, and instances have methods to get columns, rows, column headings, do an onSave, etc. Also added another datatype override. Set up in the target HTML to recalculate the total hours when the modal is saved. Finally had to rework the edi-table to handle multiple controls per table cell since the table uses a custom widget with multiple input elements. Should regression test with agent-associations.

April 17, 2018 5.28 Time - Hours Done by davidh

There is no workparty; getting back to the edi-table.
Fixed a few easy bugs

Now looking for the source of two incomplete namespace errors:
- The form_dialog can't seem to find its dialog_id; looked at the call in the template (it's specified by name), python function in templatetags (the argument is there and not given a default string, so if anything, the concatenated defaults e.g. form ID should be appended with 'None' if the function can't see it, and it's also in the returned dictionary as specified in Django docs). Changed the python function to raise instead of return to see how the function sees it.
- The JS is throwing on rowEditor.wrapVal() in rowEditor.syncTbl() claiming it isn't a function. Verified that the default for non-overloaded fields is rowEditor.simple() and that all overload functions return a function. Verified that it's assigned during rowEditor.install() and that install() is called from the editor constructor. Added a default method for wrapVal() that throws the field details to get a better idea of what's going on (or, if I get no more throws, the class just wants the method defined and I can let it go).

Clearly the python function gets '' as dialog_id, though I can't see how. Could be that concatenating the array index silently fails thanks to the index being an int; converting it to string via |tr; now that's throwing too because of the ugettext_ugly function. Adding an explicit convert-to-string only in
It's stupid that it worked. Let's not use Django next time.
rolling back

On the JS diagnostic, the offending element is the submit button. Verified that the constructor doesn't add input[type=submit] to its fields or call install(). In fact it shouldn't even call the constructor, so it's unclear how the element gets a RowField at all.
Switched things around to use $().is(':submit') instead of comparing attributes. Also improving diagnostic throw just in case to identify matched elements. Now it seems the CSRF token is showing up, and obviously that doesn't belong either (although why it wouldn't be assigned a wrapVal function is a mystery). Filter the fields by :not([type=hidden]).

jQuery now throws when appending the description. Used reduce to cram all the <p> into a <span>.

Now the input elements are showing up in the table anyway. It seems as if the <select> doesn't show up, but the chosen library adds additional elements; could be the case that chosen is hiding those itself. Wrapping the form hidden elements in a display:none container. Also adding .delete to the delete field's td so that, if the CSS works, it won't be hidden.

The edit buttons now fail to pop the modals. No exception is thrown. My HTML is already following the Bootstrap docs to the letter, but it's worth modifying the HTML to use sample code from the library just to make sure. Also adding a call to focus() instead of counting on bootstrap to do that itself. Also converting the index to string explicitly, though that seems to be going alright already.
Checked the href itself, missing the word "has", so that will probably fix it.
Fixed typo.

The submit button is wanting to reload the page; tried a few ways to intercept this behavior while re-using the form_dialog template. Got it.

The cancel button is still saving the data. Apparently that somehow turns up with :submit selector. Added a class, .cancel, as a hack to prevent this.

The submit button now fails to close the dialog. Hacking the click handler to close the modal manually.

Models display as text, save as primary key, link when appropriate? Check.
Delete works? Check.
Dialog pops? Check.
Dialog closes on save? Check
Dialog closes on cancel but doesn't update table? Check.
Looks like we're good.

Now to check it out on my phone...
As predicted, the table still looks bad and messes with the page flow, which we decided to not get rid of. But the edit dialog is easy to find, pops right, saves right, looks slick. I think we have a winner.

Implementing for the is_associate table. Picture perfect.
Implementing for unscheduled_time_contributions.html. View of same name. Url accounting/unscheduled-time/. As of now it redirects to accounting/work. Possibly because there are no projects. Also looks like the view redirects if the agent is not found via get_agent().

Adding a bunch of test data to use for a dummy project. The resource class I use for all resources is Test. Added:
Resource Types: Lemonade, Lemon, Water, Juicer, Sugar, Squeezing
Agents: Lemonade Stand
Holding for input on how to set up the rest of the model system.

April 17, 2018 1.15 Time - Hours Done by davidh

Testing out the new editable table before the workparty

April 13, 2018 3.18 Time - Hours Done by davidh

Continuing to work on editable table.
Tried several approaches to getting Django to help with this, ended up doing the whole thing with ES6+ & jQuery.

April 12, 2018 2.00 Time - Hours Done by davidh

Been working on the editable table

April 12, 2018 7.42 Time - Hours Done by davidh

Picking up syntax fixes with process_oriented_logging.html
Modified chair_tag.chair() to handle object fields a little better.
Added a filter, |s to pluralize pre-translation, will sweep through previous commits with ack-grep to implement.
Added another chair_tag filter, |sp, to concatenate with a space added. This is for convenience, no need to sweep previous commits.
Finished with syntax, pulling to server, grepping for |s
Finished with that, resuming debugging

Fixed missing load in agents.html

Fixed typo in agent.html
Fixed more syntax in agent.html
Now the URL is acting silly. Used |escape and |safe to prevent default escaping.

Fixed missing load in demand.html

Supply.html claims it can't find the variable 't_xchg' on line 89 when it clearly can on line 82, still looking into why.
Apparently outer scope variables aren't visible from inner scope. Let's not use Django next time.
Done sweeping that up.

Fixed missing space in demand.html

Resuming going down the list of accessible pages with agent-value-accounting, but now that I look at it this is an unnecessarily convoluted approach because I'll end up trying to create a lot of objects at random. I'd better come up with a model system first.

Caught a template I missed when moving declarations around, exchange_types.html, and fixed.

Switching gears to check out the editable table prototype in agent_associations.html
Can't seem to find the dialog_id variable for the form_dialog includer. Fixed the syntax on that, maybe that will help. Nope.
Changed the python tag library code to construct default arguments in the function

April 11, 2018 4.68 Time - Hours Done by davidh

Debugging HTML output and UI
The page title appears to be; this is wrong. The site name should be in a template variable SITE_NAME per valuenetwork/templates/theme_bootstrap/base.html
That was a lot more difficult to find on documentation than it should have been. Updated the SITES config in
That caused an error, so I rolled it back and went in through the admin interface to change it through the DB.

Tried to check on agent_assoc_type.html, but it's not accessible.
Need to add an agent to check out agent_associations. Also this is the editable table prototype. Trying to get to the simple stuff at the moment, will return to this.

agent_type.html : no view can access this.

agent_value_accounting.html : view agent_value_accounting : url accounting/agent-value-accounting/<agent>/
Can't nest {% trans %}. Snap. That syntax error is probably going to pop up everywhere. Replaced in this case with {% trans as %}, but I bet it will be easier to move the localizations to the or chair.html. Set it up in; now it just needs to have the {% trans %} removed.
Need to coerce to string also.
And now it won't replace the template variables inside the tag; again this will pop up everywhere. Need to replace all instances of "const{{var}}" with "const"|add:var
Since this {% {% trans %} %} thing is crazy common, making a quick filter to use ugettext_ugly

Fixed everything down to process_oriented_logging.html
Will continue tomorrow.(files committed but server not yet updated)

April 7, 2018 0.00 Time - Hours Done by davidh
April 6, 2018 5.78 Time - Hours Done by davidh

Examining HTML output of resource_type.html template to determine what is happening with the quantity element of the form (which should not be there)
Sure is there, trying to get rid of it by eliminating the assignment in the form class. Also making sure the resource type typename alias is working.
Neither of those things worked. Attempting to remedy the extra field first by following the Django doc example of doing so to the letter. Also added print of context to diagnose typename aliases.
Neither of those worked either. Neither did setting up a Meta.fields (rather than relying on Meta.exclude). Used diagnostic print to verify that templatetags.types was loaded, still not sure why the variable is not being replaced.
Trying an inelegant hack, copy-pasting the desired fields into the form class rather than using inheritance. That did it. Still need to figure out the type tag issue, but will put together a separate test.

Starting work on the other 2 failures: test_explosions cycle occurs when an explosion repeats itself (grandchild_input.quantity == 5 but should be 15)
and exceptions in ValueEquationTest.setUp() (child_input.associated_producing_commitments() is empty)

Going for the exceptions first.
associated_producing_commitments sees producers = [<Commitment: make child produces 2 child>]
oops. That time was a no-throw. child_output = <Commitment: make child produces 2 child>
...... with the debugger running, the exception doesn't occur........... usually.
when it does, Commitment.objects.all() still shows the same object does exist (as do all previously existing Commitments)
looks as if, when not crashing, child_input is <Commitment: make parent consumes 2 child>
when crashing, child_input is <Commitment: make parent uses 1 hr usable type>
That can happen because process.incoming_commitments() returns a list of 2+ commitments, and the test arbitrarily chooses [0] instead of the right one.
For now the quickest fix seems to be modifying the test to set child_input to process.consumed_input_requirements().get() to narrow it down to the one that consumes the child resource type. While I'm at it, there's another query of the child_output.process.incoming_commitments()[0], which could just as easily crash. Changing that one too. While the other [0]'s of QuerySets should be get() as well, I'm not 100% sure they're not actually lists being returned by these functions.
Need to narrow it down by RT.
That fixes the setUp() errors, and somehow averts the test_explosions failure too (but probably not always), but there is one additional erring associated_producing_commitments in test_setup. Same errors made & fixed there.
Ran perfectly (at least once)

Now that I look at the other test, it seems as if it's caused by roughly the same underlying issue. Trying roughly the same fix.

All (automated) tests now pass. What's left is the UI and template tags tests.

April 5, 2018 1.07 Time - Hours Done by davidh

Put together instances of User, EconomicAgentType, EconomicAgent, and AgentUser in setUp function for the #512 fix test case. Evidently that wasn't the end of it. After verifying that the dummy agent actually makes it into the template context, the test proceeds to fail by containing the offending quantity control after all. Next step is to take a look at the actual html output.

After that, on to 5 == 15 and the empty collections.

April 4, 2018 3.50 Time - Hours Done by davidh

Fixed tests. Elected to delay repairs to the order form code that has apparently never worked so that I can address the remaining fails rapidly.

Lost a lot of log here somehow, but as I recall, the test I wrote for issue #512 still throws because the template only renders the forms under examination if the template context includes a Truth-y value for user. I'll likely have to modify the test case instance to generate a user and bind it to an agent to get it to work.

Four tests in the same test suite (, throw on the very same line for retrieving the first element of an empty list. This means that I can solve the problem quickly by finding the source of the list and initializing it appropriately.

The last pesky failure is within the test_cycle test case. where grandchild_input.quantity is 5 when it should be 15.

April 4, 2018 7.27 Time - Hours Done by davidh

Pulling down from repo from git
Rerunning tests

ERROR: test_create_order (valuenetwork.valueaccounting.tests.test_orders.OrderTest)
Test create_order view
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 160, in test_create_order
response = form.submit("submit1").follow()
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 619, in submit
params=fields, **args)
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 297, in goto
return method(href, **args)
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django_webtest/", line 139, in post
upload_files, expect_errors, content_type, **kwargs)
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 379, in post
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 755, in _gen_request
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django_webtest/", line 86, in do_request
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 625, in do_request
res = req.get_response(app, catch_exc_info=True)
File "/home/valnet/lib/python2.7/webob/", line 1323, in send
application, catch_exc_info=True)
File "/home/valnet/lib/python2.7/webob/", line 1291, in call_application
app_iter = application(self.environ, start_response)
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 200, in lint_app
iterator = application(environ, start_response_wrapper)
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/contrib/staticfiles/", line 67, in __call__
return self.application(environ, start_response)
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/core/handlers/", line 241, in __call__
response = self.get_response(request)
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/core/handlers/", line 177, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/core/handlers/", line 109, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/contrib/auth/", line 20, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/", line 3067, in create_order
ext_id = request.POST["exchange_type"]
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/utils/", line 258, in __getitem__
raise MultiValueDictKeyError("Key %r not found in %r" % (key, self))
MultiValueDictKeyError: "Key 'exchange_type' not found in <QueryDict: {u'RT-90-description': [u''], u'due_date': [u'2018-04-05'], u'RT-89-quantity': [u''], u'RT-86-quantity': [u'3'], u'RT-90-quantity': [u''], u'description': [u''], u'RT-89-description': [u''], u'RT-86-description': [u''], u'provider': [u''], u'submit1': [u'None'], u'RT-89-resource_type_id': [u'89'], u'RT-86-resource_type_id': [u'86'], u'receiver': [u''], u'csrfmiddlewaretoken': [u'MczMC7BIXCS40TzxE5kO3CQ0Sz722FlR'], u'RT-90-resource_type_id': [u'90']}>"

Evidently the CreateOrderForm once but no longer contains a field for an ExchangeType.

test_contribution_shares (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
test_distribution (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
test_rollup (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
test_rollup (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
test_setup (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 184, in setUp
IndexError: list index out of range

will look into how child_input.associated_producing_commitments() could be empty.

FAIL: test_cycle (valuenetwork.valueaccounting.tests.test_explosions.ExplosionTest)
cycles occur when an explosion repeats itself:
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 128, in test_cycle
self.assertEqual(grandchild_input.quantity, Decimal("15"))
AssertionError: Decimal('5.00') != Decimal('15')

Still looks painful

FAIL: test_no_quantity (valuenetwork.valueaccounting.tests.test_resource_types.NoQuantityTest)
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 28, in test_no_quantity
'/accounting/resource-type/%s/' %
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 101, in follow
% self.status)
AssertionError: You can only follow redirect responses (not 200 OK)

Looks like this has to be hard-set as a non-redirect, which I don't like, but, meh.

FAIL: test_create_workflow_order (valuenetwork.valueaccounting.tests.test_orders.OrderTest)
Test create_order for a workflow item
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 211, in test_create_workflow_order
form[self.rt_form_name(self.rt_by_id(9), 'quantity')] = 2000
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 516, in __setitem__
% (name, ', '.join(map(repr, self.fields.keys()))))
AssertionError: No field by the name 'RT-129-quantity' found (fields: u'csrfmiddlewaretoken', u'provider', u'receiver', u'due_date', u'exchange_type', u'description', u'submit1', u'RT-132-resource_type_id', u'RT-132-quantity', u'RT-132-description', u'RT-131-resource_type_id', u'RT-131-quantity', u'RT-131-description', u'RT-128-resource_type_id', u'RT-128-quantity', u'RT-128-description', u'submit2')

Will try fiddling with the resource types again

FAIL: test_order_validation (valuenetwork.valueaccounting.tests.test_orders.OrderTest)
Test fix for #510 Create order blows up: at least one item must have quantity > 0
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 194, in test_order_validation
self.assertIsNone(e, msg="setting form fields or submit threw %s" % (str(e),))
AssertionError: setting form fields or submit threw "Key 'exchange_type' not found in <QueryDict: {u'due_date': [u'2018-04-05'], u'RT-172-description': [u''], u'description': [u''], u'RT-171-quantity': [u'0'], u'RT-172-resource_type_id': [u'172'], u'provider': [u''], u'RT-171-resource_type_id': [u'171'], u'submit1': [u'None'], u'RT-168-description': [u''], u'RT-172-quantity': [u'0'], u'receiver': [u''], u'csrfmiddlewaretoken': [u'pbkZrbHdhuF2upHKnOe6Zyh4053NHbua'], u'RT-168-quantity': [u'0'], u'RT-168-resource_type_id': [u'168'], u'RT-171-description': [u'']}>"

Exchange type doesn't exist in the OrderForm.

FAIL: test_two_workflow_item_order (valuenetwork.valueaccounting.tests.test_orders.OrderTest)
Test create_order for two workflow items
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 247, in test_two_workflow_item_order
form[self.rt_form_name(self.rt_by_id(9), 'quantity')] = 2000
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 516, in __setitem__
% (name, ', '.join(map(repr, self.fields.keys()))))
AssertionError: No field by the name 'RT-189-quantity' found (fields: u'csrfmiddlewaretoken', u'provider', u'receiver', u'due_date', u'exchange_type', u'description', u'submit1', u'RT-192-resource_type_id', u'RT-192-quantity', u'RT-192-description', u'RT-191-resource_type_id', u'RT-191-quantity', u'RT-191-description', u'RT-188-resource_type_id', u'RT-188-quantity', u'RT-188-description', u'submit2')

Will fiddle with resource types again.

Ran 47 tests in 17.851s

FAILED (failures=5, errors=5)

Bob revealed that the entire order test suite was dropped and never worked. Although I have a strategy for matching the objects under study to their primary key, it's going to be a little more involved to fix the view function. Though I'm certainly up to coming back for this one, I'm just commenting out the import for now. I'll also seal off the view function just so it doesn't see any accidental traffic.

push, pull, manage, test, that leaves us with...

test_contribution_shares (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
test_distribution (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
test_rollup (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
test_setup (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 184, in setUp
IndexError: list index out of range

Investigating where the associated_producing_commitments are coming from.

FAIL: test_cycle (valuenetwork.valueaccounting.tests.test_explosions.ExplosionTest)
cycles occur when an explosion repeats itself:
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 128, in test_cycle
self.assertEqual(grandchild_input.quantity, Decimal("15"))
AssertionError: Decimal('5.00') != Decimal('15')

Not looking forward to this at all.

FAIL: test_no_quantity (valuenetwork.valueaccounting.tests.test_resource_types.NoQuantityTest)
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 36, in test_no_quantity
self.assertIsNotNone(res_form, msg='form#resourceForm not found')
AssertionError: form#resourceForm not found

That would mean the template has some condition for rendering the form#resourceForm. It does require a truthy agent. The agent comes from a property of a user object, found by request.user.agent.agent in this case. No agent property belongs to Django User as is documented by django, so how it gets there and sticks is a little mysterious.

What I have been able to put together from the Django docs and the valnet NRP's models is a bit hackish. In this and many other cases, classes with little to no logical purpose except to convince the DB and Django to store relationships between objects as objects themselves. A P2P NRP would not need this pattern, but here it is. In

class AgentUser(models.Model):
agent = models.ForeignKey(EconomicAgent,
verbose_name=_('agent'), related_name='users')
user = models.OneToOneField(User,
verbose_name=_('user'), related_name='agent')

Ran 36 tests in 11.890s

FAILED (failures=2, errors=4)
Destroying test database for alias 'default'...
(verdun) [valnet@wf-207-38-92-205 VerdunNRP]$

April 4, 2018 3.48 Time - Hours Done by davidh

Debugging for test failures.

ERROR: test_no_quantity (valuenetwork.valueaccounting.tests.test_resource_types.NoQuantityTest)
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 33, in test_no_quantity
doc = ElementTree.fromstring(resp.content)
File "/usr/lib64/python2.7/xml/etree/", line 1300, in XML
File "/usr/lib64/python2.7/xml/etree/", line 1642, in feed
File "/usr/lib64/python2.7/xml/etree/", line 1506, in _raiseerror
raise err
ParseError: mismatched tag: line 77, column 6

This is my bad, one of the first tests I wrote used the ElementTree instead of Django's HTML inspection classes. Will fix.

ERROR: test_contribution_shares (valuenetwork.valueaccounting.tests.test_value_equations.ValueEquationTest)
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 184, in setUp
IndexError: list index out of range

There are 4 of these, likely related to lack of object population when tests are run.

FAIL: test_cycle (valuenetwork.valueaccounting.tests.test_explosions.ExplosionTest)
cycles occur when an explosion repeats itself:
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 128, in test_cycle
self.assertEqual(grandchild_input.quantity, Decimal("15"))
AssertionError: Decimal('5.00') != Decimal('15')

This is going to be painful.

FAIL: test_create_order (valuenetwork.valueaccounting.tests.test_orders.OrderTest)
Test create_order view
Test create_order for a workflow item
Test create_order for two workflow items
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 139, in test_create_order
form["RT-6-quantity"] = 3
File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/", line 516, in __setitem__
% (name, ', '.join(map(repr, self.fields.keys()))))
AssertionError: No field by the name 'RT-6-quantity' found (fields: u'csrfmiddlewaretoken', u'provider', u'receiver', u'due_date', u'exchange_type', u'description', u'submit1', u'RT-90-resource_type_id', u'RT-90-quantity', u'RT-90-description', u'RT-89-resource_type_id', u'RT-89-quantity', u'RT-89-description', u'RT-86-resource_type_id', u'RT-86-quantity', u'RT-86-description', u'submit2')

Will look at the template to see if this is my fault. Doesn't look like it. The hard-coded "RT-6-quantity" etc. seem to be very brittle. Will change to a more sensible abstraction, but it's guesswork as to which resource type they actually meant when the tests were written. I'll go ahead and guess they're in the order they were created.

FAIL: test_order_validation (valuenetwork.valueaccounting.tests.test_orders.OrderTest)
Test fix for #510 Create order blows up
Traceback (most recent call last):
File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/", line 167, in test_order_validation
raise AssertionError((_('an empty order should not throw, but threw %s' % str(e)),))
AssertionError: (<django.utils.functional.__proxy__ object at 0x3c54f90>,)

Used the wrong syntax for the error message, will make it more informative. Also changed it around to use the Django and unittest assertion methods, again for clarity.

Test create_order view now errs: request.POST['exchange_type'] does not exist in The dict looks like a form dictionary for CreateOrderForm.
The other two tests look like, for whatever reason, the ID numbers are incremented by 1.
Once eliminating the rest of the problems with the test of zero quantity orders (#510), it errs like create_order view.

picking this up tomorrow.

April 4, 2018 0.92 Time - Hours Done by davidh

In lieu of response from django-notification library devs, exploring possibility of developing a shim. Could go with a notification shim for the project or a feed shim for notification. Imports of the library occur and are used in valuenetwork/valueaccounting/, /, and /, whereas the library imports django.contrib.syndication.views.feed only in its own
Their only uses the feed function once, in function feed_for_user.
Docstring: """An atom feed for all unarchived :model:`notification.Notice`s for a user."""
Let's see if we even use that function. No we do not! Whew.
Implemented hack.

April 3, 2018 2.03 Time - Hours Done by davidh

Laptop crashed a moment ago -- maybe this thing does have an insane memory leak after all.

Getting back to pointing all the tests at the new fixture file, verdun.json.

Tests now run.

5 throw due to the notifications library attempting to import django.contrib.syndication.views.feed, which does not exist. Probably needs yet another version shift.

in test_value_equations.ValueEquationsTest,
test_contribution_shares throws an index out of bounds on child_output = child_input.associated_producing_commitments()[0]
test_distribution throws same on same statement
test_rollup throws same on same
test_setup throws same on same

in test_explosions.ExplosionTest.test_cyle, test fails "cycles should occur when an explosion repeats itself" on assertion grandchild_input.quantity==Decimal("15")

re: notifications, we're already rolled back beyond their changelog, so it's a guessing game. Installing yolk to catalog available versions. But yolk throws for whatever reason, so I'll just guess version 9001 and see what pip's error message lists as available.
0.1.5 doesn't work.
0.1.4 doesn't work.
0.1.3 doesn't work, and somehow causes a new test failure for #510
0.1.2 same
0.1.1 weirdest yet, it fixes all of those ValueEquationsTest errors. That seems impossible. But still doesn't work on import.
0.1.0 restores those index errors and still doesn't fix the imports, and we're out of versions to try.
As I recall, 0.6.4 drops compatibility with django 1.4, and pip doesn't have anything between 0.2 and 0.6.4. Will have to try to find it elsewhere.
Does not exist as far as I can tell. Will send out a bunch of emails to see if one of the authors has a compatible copy lying around, and to Bob & Lynn to see if we can get rid of the library safely.

April 2, 2018 3.73 Time - Hours Done by davidh

Setting up a private DB for the verdun nrp to run tests on.
Updating to use said DB

Tests and presumably everything else fail if the app parameter to post_migrate callbacks is not "valueaccounting". Need to change the self-installing fixtures through this signal to create UseCase etc instances that other classes depend on.
Fixed create_use_cases, create_event_types, create_usecase_eventtypes, create_agent_types, create_agent_association_types
Didn't work, still not creating these objects for the tests
Creating a fixtures file... nah, tedious and over-complicated. Adding an override to the corresponding manager classes that will install the fixtures the first time the get() method is run. Also not going to work, too many entry points to the query to catch the empty query effectively.
Fixtures it is.
Wrote a JS script that consumes the initialization code and generates a fixture. Keeping it around just in case.
Generated all necessary fixtures.
Apparently all the test case classes also need to be pointed at the fixtures. Doing that. Unless all these open files run me out of memory.

April 2, 2018 1.58 Time - Hours Done by davidh

Fix work init script to set DJANGO_SETTINGS_MODULE successfully.
Now I'm hitting an exception from the corsheaders library, which is trying to import from a module called mock. Definitely doesn't exist as far as I can see. Could be referring to the python 3+ unittest.mock
In any case it was fine this morning. Will look over pythonpath and see if it could be looking at a different version.

Fixed local_settings to use the DB owner so the test database can be accessed.
That table had all rows created by the old user, so I switched local_settings back and made that user owner.
Still not working, and webfaction is now failing to fetch information about the databases.
Rather than trying to untangle this, it's probably quicker to wipe both DBs and start them over with valnet as both owner and user. As soon as webfaction will let me do that.

April 2, 2018 0.00 Time - Hours Done by davidh
April 1, 2018 3.00 Time - Hours Done by davidh

Bug fixes

Invalid syntax: Fixed a missing comma in

Transaction aborted: Related to the new Unit.default_unit()
In class EconomicResourceType initialization of field unit, changed default to be a reference to the Unit.default_unit_id function instead of the value of the default unit itself.

During migrate, there was a failure related to easy_thumbnails. Added the appropriate fix to, but now I'm thinking it might as well go into in the repo so that no one else has the issue.

During migrate, the lib account.migrations attempts to import django.db.migrations, which does not exist. This is likely to be another rollback issue, but the library itself is not included in requirements.txt or the installation instructions. Thus it's downloaded as a dependency of one of these other libraries.
Or, it could be a name clash; in the INSTALLED_APPS in, "account" is under the local project heading. There is a VerdunNRP/account as well as a python2.7/account. The fact that the lib version is obviously not compatible with django 1.4 is an issue, but it's possible that the wrong module is being loaded here.
The offending library is django-user-accounts from the pinax project. The docs explicitly say django 1.8+. Requirements.txt does explicitly give a version for the pinax-related libraries though. The earliest version in their changelog (1.1.0) breaks compatibility with django 1.4.
Rolled back to 1.0, uninstalled 2.0.3. Perfect. Adding to requirements.txt

Tried to load fixtures, help worked, starters did not.

Set up email in local_settings.

Corrected a syntax error in
Removed error message (that was apparently problematic) in class OrderItemForm
Unexpected **kwarg default, same class, same field.
Could also be related to the lack of required **kwargs max_digits and decimal_places. Set to 10 and 4 respectively.
Oops. That's a forms.Field, not a models.Field. Removed default.

Fixed account settings to stop emailing Bob.

Tests do not want to run for lack of test database, even after creating one explicitly via webfaction. It says that permission to create or delete databases is denied.

March 27, 2018 1.67 Time - Hours Done by davidh

Finishing work on issue: Process logging - display Type of work description #461

Evaluating issue: Adding more flexibility to the pattern setup process #460
This is a problem for scaling, so it could be necessary. Came up with a rough design to solve the problem, not implementing until I know we need it

Evaluating issue: Incentivizing practices with less-harmful side effects, and/or intangible benefits #459
Feature request, not a priority

Issue: Use internal credit resource rather than claims #455
Refactoring, not a priority

Issue: Don't require process patterns #454
Seems like a usability issue as we scale. We could also factor the pattern out of the UI, i.e. merge the pattern editing page into the process editing page, edit the process data without referring to any patterns, but keep the patterns in the backend as first class entities. This would significantly increase the number of patterns in the DB since they would not be reused in most cases, and ultimately I think it might be more difficult to work with resource types in processes because you would have to reconstruct your facet filters all the time or choose from really long listboxes. I think we should solve at most one of #454 or #460 since they are directed at the same issues.

Issue: UI - themes #452
I like the idea, it seems to tie in with the dashboard interface. It also doesn't seem to differ that much from adding or modifying options of the top level menu. Will look into it.

For now breaking from this to try and get the server running.

March 26, 2018 2.32 Time - Hours Done by davidh

Re-evaluated agent_contributions.html. This is a target for the editable table design.

Revisited create_distribution_using_value_equation.html
examined view function in, form in
Second table (calculated distribution quantities) is a real table, first is absolutely not. Reworking it using field_as_p.

Revisiting create_order.html
fixed a typo
The way the page is organized, the table makes sense, but it seems like a very unorthodox way to put together an order. Probably better to make a catalog-like interface with modals for each item. Maybe bootstrap has something, I think jQuery UI has something like that as well.
If I recall correctly, this page was never really used. Better verify that it's necessary before making a sweeping change like that.

Revisiting unscheduled_time_contributions.html
This is another good target for editable table design once that's tested.

Getting back to issue: Project page and financial contributions - UI UX #471
Could fix, need more detail. Overall may not be a priority.

Issue: Validation on cash account on Distribution page #467
Can be done pretty quickly. Adding an override to DistributionValueEquationForm.clean(). Fixed.

Issue: Easy thumbnails migrations mismatch #466
Seems like it's already fixed

Issue: process logging get-directional-unit bug #465
I already fixed this one

Issue: Burnrate visual #464
Probably save it for next-gen

Issue: cached events are causing problems again #463
Looks like Bob self-assigned this, will see if he fixed it. Otherwise it seems like a lot of new users will be creating spurious events and then deleting them, so will need to see what actually happens when the cache holds onto a deleted event. If it doesn't allow deleted events to be referenced in other objects it's probably not that bad. Also I haven't seen any custom cache code, so a fix might mean hacking django.

Issue: Process logging - display Type of work description #461
Seems doable and will keep things moving along. Will implement in JS with type descriptions provided & mapped through template.

March 25, 2018 0.52 Time - Hours Done by davidh

Implementing a test of my editable table in agent_associations.html (has associations only, not is associations yet)
Probably shouldn't continue until this is verified to work


March 25, 2018 1.65 Time - Hours Done by davidh

fixing a minor bug in
beginning to convert tables with inline form controls to data tables with modal dialogs for editing.
starting with all_contributions.html
actually that needed types only; no form controls live in the table after all.
same for bucket_filter.html
cash_report.html looks fine too

change_pattern.html: examined what was going on in the view and forms, determined it was safe to remove the table entirely
added types to demand.html, determined that nested forms are fine

distribution_logging.html: reviewed nested forms, looks okay to me

added type_agent_association to as "agent association" (type_agent_association_type is currently "agent relationship")

trying out the table fix in agent_associations.html; not totally sure it will work without modifying the view significantly, as the rows (associations) are not accessible to the template. Will probably need to add some JS to update the table after modification. Need to look into Django details to see if there is an easier way.

March 24, 2018 0.50 Time - Hours Done by davidh

Created templatetags/ and templates/valueaccounting/_form_dialog.html
to hasten and simplify modal dialog construction for new interfaces

March 23, 2018 5.20 Time - Hours Done by davidh

Add types to process_oriented_logging.html

In site_base.html, added a div.toolbar css style that will prefer to break up unrelated tools between lines before related tools. Will probably require some implementation work in other places, but I know this will help in process_oriented_logging.html

best practices work in process_oriented_logging.html (favor contextually relevant elements to <br/>)
also converted some default field renderings to field_as_p and some manual table renderings to form.as_ul

add types to process_selections.html
add types to process.html
fixed a wacky case of {{ resource.unit_ofFtake_quantity }}, replaced with {{ resource.unit_of_quantity }}

add types to resource_facets.html
tables may be the easiest way to construct an interface for this, but that doesn't make it right or good for small screens. Will need a total re-work.
drew up some mockups, but need to evaluate usage, e.g. who uses this view anyway (anyone?) and what does the workflow look like? Are there, in practice, only a few sorts that are commonly used? Would it be more convenient to change a resource type's facet values by other interfaces if that was the task, and if so, what tasks am I missing?

resource_flow_report.html has more internal structure than I like to see in a table, but it's pretty much legit.

resource_flow.html is a little mysterious (4 ways to frame a receipt?) but now it doesn't feature tables.

resource_type_list.html needed to research what forms were involved, but ended up replacing the table renderings with .as_ul default renderings

resource_type_lists.html needed types

resource_type.html needed types, table formset renderings changed to .as_ul default renderings
resource_types.html needed same

resource.html needed types, chair tag

start.html, no, this is not happening in a table. It seems like a good place to do the "dashboard" interface Tiberius talked about, so I'm not scrapping the whole thing just yet. Rather put some thought into what this would look like ideally.

supply.html needed types
test_patterns.html needed types

today.html, again, not what a table is for, but too complicated to replace or throw out right away. will revisit.

unscheduled_time_contributions.html again has a table; will look at the view function to see if it's really tabular data. There is some JS calculating the total hours for the table, so make sure the function is replaced. Will revisit.

work.html yet again, I will need to redesign the interface with all things related to this "todo" function. Will revisit.

workbook.html added types, fixed several JS errors.

That wraps it up for all the easy mobile UI work. Everything else is a serious redesign or entirely new content.

March 22, 2018 6.05 Time - Hours Done by davidh

Adding type tags to exchange_logging.html
fixing sloppy markup
replaced <tr><td> elements outside of a <table> with <ul><li> list
separating some forms out into _add_xfer_form.html and _commit_form.html
both need sweeping changes to adhere to best practices, remove inappropriate tables, use type tags
both appear several times in exchange_logging
created additional tags in chair_tag.html for displaying best-practice form fields: field_as_div, field_as_p, field_as_li
this still needs work to get it totally consistent with the rest of the UI, but I need to get my eyes away from it before they melt
moving on for now

adding type tags to exchange_types.html
removed inline styles from finished_processes.html
type tags to internal_exchanges.html
type tags to inventory.html

added type tags to log_past_work.html
moved input control inside its label in absence of input id
tried removing table behavior of context variable forms using form.as_p, form.as_ul, and form|as_bootstrap

removed another facet table form from log_simple.html using .as_ul

added type tags to maintain_patterns.html
type tags to network.html
I bet all of these visualizations are going to choke on mobile, but I need to study the libraries in detail to know if I can remedy.

Checked out order_graph.html, and this is really going to be hurting on a small screen. Will look into the fractalDom library, but all these numeric literals are always going to bite you.

removed form tables from order_schedule.html
removed form tables in orders.html
added types to plan_from_recipe.html
added types to plan_from_rt_recipe.html

March 21, 2018 0.88 Time - Hours Done by davidh

Picking up with edit_stream_recipe.html
adding type tags for process type
adding classes for logical-only divs (inline styles considered harmful)

removed inline styles from divs in edit_value_equation.html; table is an actual data table.

removed inline styles from divs in edit_xbill.html
added type tags
I am almost certain the table of facets would be better as a list, but the contents of the forms live in view.nodes[].xbill_object.xbill_consumable_rt_facet_formset[]
another in view.nodes[].xbill_usable_rt_facet_formset[]
another in view.nodes[].xbill_citable_rt_facet_formset[]

event_history.html; fixed some bad markup

next up is exchange_logging, which is huge. Fresh start tomorrow.


March 21, 2018 4.13 Time - Hours Done by davidh

Evaluated td elements in agents.html; no elements match the queries, so I'm going to go ahead and remove the table

all_contributions.html table is a real data table; nothing to be done for mobile users
I could turn the real data tables into ul li structures, but this is considered harmful.
same for bucket_filter.html
same for cash_flow.html

created valueaccounting/templatetags/
declared assignment tags to allow model type names appearing in the UI to be changed at any time
{% type_FOO %} replaced with the name we use for FOO
{% type_FOO_type %} replaced with the name we use for FOO TYPE
{% type_FOO_type as BAR %} creates a template variable BAR whose text is the name we use for FOO TYPE
for the moment:
exchange type => exchange plan
transfer type => transfer
transfer => transfer event
event type => event
event => event record
agent association type => agent relationship
facet => quality
facet value => category
use case => usage
use case event type => use event
process type => process plan
agent resource type => agent resource association

fixed misspelling in
implemented type tags in agent_type.html
type tags in agent_assoc_type.html
type tags in change_exchange_type.html
type tags in change_pattern.html, need to examine view.slots[].formset and view.slots[].formset.management_form to see if it can be removed from a table.
type tags in change_rand.html


type tags in cleanup_resource_types.html
type tags in cleanup_work_resource_types.html
morally wrong tables found in create_distribution_using_value_equation.html, but I have to look at view.header_form before removing them.
type tags in create_order.html. Possibly wrong table, need to look at view.item_forms[]
type tags in create_process.html
type tags in create_rand.html
type tags in demand_exchanges.html
demand.html has a fishy view variable, view.nav_form.exchange_type, but no type names in html
distribution_logging.html has many nested forms from the view, but contains nothing directly offending


breaking to learn from Bob momentarily

March 20, 2018 3.68 Time - Hours Done by davidh

Verified that all templates use <meta name="viewport" content="width=device-width, initial-scale=1"> for mobile scaling
checking for bootstrap container classes: .container and .container-fluid
making a CSS style for inline divs (div with style attribute is considered harmful)

checking out pages on my phone
/agents/ ok
/projects/ could use some work at the top (overflow)
/all-contributions/ horrendous table
/project-network/ graph nodes have too many line breaks
/cash-report/ detail report has too many td
/value-equations/ ok
/edit-value-equation/#/ head could use work at top (overflow)
/value-equation-sandbox/#/ looks good except for head

patterns emerging: page links along top and in buttons within lists need to wrap as an element. Tables, while probably hopeless for mobile, are too wide. Consider not using tables except where needed to cut and paste to excel or google docs.

extended the inline block class to legend > a, which covers all of the messy-looking overflows at the tops of pages.

replaced pointless table in agent_assoc_type.html
replaced pointless table in agent_association.html
can't remove table from agent_associations.html
table in agent_contributions.html probably looks terrible, but can't remove it right now
agent_stats.html: I don't like div#chart_div with inline style, but it's managed by a google lib, so changing it would have unpredictable effects. Almost definitely won't look right on mobile
agent_type.html: another silly table. Fixing.
created templatetags/ to register a template tag, "chair" to simplify removal of tables
created templates/chair.html as a template to simplify removal of tables
put chairs in agent_value_accounting.html

committing files

more tables in agent.html, but there is JS referring to some td elements, will have to go over it in detail to see if the table can go.

March 20, 2018 0.00 Time - Hours Done by davidh
March 19, 2018 6.42 Time - Hours Done by davidh

Looking for opportunities to filter or create defaults using transfer types in valuenetwork/valueaccounting/ functions:
fixed a potential bug that would cause a crash if events were deleted or changed
no UI for this, moving on

fixed potential bug that would cause a crash if agents were deleted or changed
fixed potential security flaw by requiring a valid login to post changes to an exchange
modified valuenetwork/valueaccounting/ to arrange transfers within a "slot" (transfer type in an exchange) would be sorted by date
all the filters and defaults seem to be working

can't add any more defaults or filters

calling issue: Transfer Types should be able to configure more defaults... #495 closed

On issue: Should the resources selected in dropdowns on contributions be related to the selected context? #494
maybe, but it looks like this is already being done in many places

Evaluating issue: Validate dates past vs future on transfers and commitments #492
If it hasn't been done already, it's probably not a big problem. In order to do it in a really useful, fool-proof way, I'd have to somehow verify that a transfer took place, but there is no reasonable way to verify that a transfer HASN'T taken place. It wouldn't be that hard, however, to lock the data after the transfer date has passed. Moving on for now

Evaluating issue: Should transfer data be locked at some point? #489
An interesting question, but not vital in this release

Evaluating issue: Resource page probably needs update for exchange #488
Can't find what she's talking about on site. Digging through a small number of code points. Looks fixed to me.

Evaluating issue: Organization page error if dup agent association #482
Not a priority

Evaluating issue: Add total hours for project to agent page #481
Not a priority

issue: Orders page should not show finished processes #480
already fixed

fixed issue: Resource type should require unit #479
in valuenetwork/valueaccounting/
added static method Unit.default_unit() to correspond with the DB's "Each", or if there is no "Each", it will create one
modified method so that if either .unit or .unit_of_use is blank, it will fill it with the other, or if both are blank, it will use the default.
modified every unsafe assignment of type Unit to use the default in such a way that no exception will be thrown.
this should work even on a migrated DB with blank Unit entries

issue: Resource contributions not computed correctly in flows from use events #477
I don't understand the calculation well enough to know what the output should be. Begging Bob & Lynn for help.

fixing: Fix delete value equation button on ve list #475
check for deletability is on model.
adding this check to valuenetwork/valueaccounting/ method delete_value_equation

issue: Re-evaluate agent type party type list #474
refactoring, not a priority

issue: Re-evaluate agent assoc type behavior list #473
refactoring, not a priority

issue: Plan Work Order on Resource page only works for workflow recipes #472
this looks like it's been fixed

issue: Project page and financial contributions - UI UX #471
still investigating

March 18, 2018 2.92 Time - Hours Done by davidh

Renovations to valuenetwork/valueaccounting/ function exchanges (line 10170)
This function has been gutted and rebuilt on top of itself too many times. I need to be able to read it to see what I can do about defaults & filtering.
cleaned it up, made it more pythonic, should be able to mess with the sort order, add more filtering, cluster events, etc. now if necessary
still not seeing anywhere I can add defaults using the transfer types per #495

Same treatment for function internal_exchanges.

the template (valuenetwork/templates/valueaccounting/exchanges.html) currently filters by:
- context agent matches agent in exchange (can't turn that off)
- transfers are listed ordered by date but otherwise unfiltered.
- the specific transfer to which an event is attached is not accessible.

It is now possible to reorganize the events by transfer or to filter transfers by date once the template exposes this functionality

March 16, 2018 4.00 Time - Hours Done by davidh

Fixed Issue: Create order blows up, unclear condition #510
in valueaccounting/ in create_order() added an additional check on form validity that takes the item forms' validity into account.
in valueaccounting/ to OrderItemForm.quantity, changed required=False to default="1.0" and added a MinValueValidator.
in valueaccounting/tests/ to class OrderTest, added method test_order_validation to ensure that order quantities of 0 were not ordered and that no exception was raised.
committed fix.

Resuming work on UI/UX issue: Transfer Types should be able to configure more defaults... #495
Identifying usage of transfer type in valueaccounting/

no opportunity to add defaults as far as I can tell


March 16, 2018 0.97 Time - Hours Done by davidh

Petitioned Bob and Lynn for additional details on issues:
the fixture help.json has obsolete homepage image map code and the help sucks #498
Exchange shows previous list of suppliers #499
Both issues are worth fixing

Evaluated issue: Get rid of old stuff prior to new exchange code #497
Code cleanup and refactoring, not a priority

Started investigating issue: Transfer Types should be able to configure more defaults... #495
Important UI/UX issue. Fixing.
Need to gather information about transfer types and their relationship to exchange types to determine what the default values should be.

March 15, 2018 1.72 Time - Hours Done by davidh

Evaluated issue: Let's internalize notification #501
Refactoring request, not a priority

Evaluated issue: When distribute part of a receipt, don't get the partial field back #500
Need more information re: where this occurs, but should fix

Evaluated and researched issue: Exchange shows previous list of suppliers #499
Clearly impacts usability. Source not yet found.

Committed tests

March 15, 2018 2.40 Time - Hours Done by davidh

Resuming work on test cases for issue #511
finished valuenetwork/valueaccounting/tests/
appended module import to valuenetwork/valueaccounting/tests/

Adding tests to verify that bugs I resolved yesterday (3/14/18) are fixed
added valuenetwork/valueaccounting/tests/ to test fix of issue: Create resource popup shouldn't have quantity #512
added module import to valuenetwork/valueaccounting/tests/

Laptop is running extremely slowly, will resume and push when resolved

March 15, 2018 0.55 Time - Hours Done by davidh

Creating valuenetwork/valueaccounting/tests/
writing a test class NoThrowTransferTest to ensure that the method Transfer.event_text is unable to throw an exception even if provided garbage data

March 15, 2018 0.90 Time - Hours Done by davidh

Fixing issue: Bug in exchange page #511
Determined that the bug is likely fixed but unclosed as an issue.
Adding a test case that attempts to reproduce the error anyway.

March 14, 2018 1.93 Time - Hours Done by davidh

fixing issue: Create resource popup shouldn't have quantity #512
in valuenetwork/valueaccounting/ line 285: added class CreateUnquantifiedResourceForm(CreateEconomicResourceForm) with 'quantity' added to Meta.exclude and overridden class property quantity = None
in valuenetwork/valueaccounting/ line 994: changed variable create_form to use the new class

re issue: Bug in exchange page #511
Bob claims Freedom Coop version has this fixed; solicited him for a link so that I can check out the files

evaluated issue: hyperlinks to resources from location page #505
feature request, not a priority

evaluated issue: improving support for Transportation (process) #504
cool idea, but feature request, not a priority

evaluated issue: Transfers between affiliates' virtual accounts #503
cool idea for next gen. feature request, not a priority

fixing issue: NRP front page #502
seems easy and useful enough to consider it a UI/UX improvement for this revision. Tracking down the template.
in valuenetwork/templates/_work_panel.html line 23: changed item.description to item.process.timeline_description

issue: Delete warning popup #513
needs a fix for user-proofing. Will do once I understand the client side javascript they have going a little better.

Work - Training self: 1.00 Time - Hours due March 14, 2018
Work events:
March 25, 2018 0.30 Time - Hours Done by davidh

Looking at Django and Bootstrap docs to see if there's any way around manually binding instance data if it has multiple representations in a single page.

March 21, 2018 0.47 Time - Hours Done by davidh

Reading Bob's in-depth explanation of value equations and their implementation in the NRP

March 20, 2018 1.60 Time - Hours Done by davidh

Investigating the HTML, CSS, and JavaScript present in the old NRP to determine how best to modify them to make them more mobile-friendly
Found that the HTML is relying on locally served JavaScript that is missing from the repo; it is a minified version of the Bootstrap library, which must go into /static/js/bootstrap/js/bootstrap.js. The version of the library is unknown, but without including it in the repo the site will crash and burn.

March 20, 2018 0.00 Time - Hours Done by davidh
March 17, 2018 2.58 Time - Hours Done by davidh

Investigating Transfer Type relationship to Exchange Type, Resource Type, Transfer Facet Value in detail
Preparing to fill fields and filter lists in various Exchange, Commitment, and Transfer views
Exhaustively catalogued all the fields available through the Exchange logging view, listing types and relationships to Transfer Types

March 16, 2018 1.15 Time - Hours Done by davidh

for issue: Transfer Types should be able to configure more defaults... #495
Gathering information on transfer types, exchange types, use cases, and facets to determine what the default values should be

March 15, 2018 0.38 Time - Hours Done by davidh

Researching original details to determine the best approach to testing issue #511, specifically how to break the function Transfer.event_text

Work - Design Software - Game: 1.00 Time - Hours due March 14, 2018
Work - Information mining: 1.00 Time - Hours due March 14, 2018
Work - Writing: 1.00 Time - Hours due March 14, 2018
Work events:
March 17, 2018 0.53 Time - Hours Done by davidh

Adding a few ideas about how to reduce the model jargon in the UI to the Legacy NRP Revision Plan

March 14, 2018 1.50 Time - Hours Done by davidh

Wrote initial commit of the document "Legacy NRP Revision Roadmap"

Work - Infrastructure - OVNi module development: 1.00 Time - Hours due March 14, 2018
Work - Facilitation and coordination: 1.00 Time - Hours due March 14, 2018
Work events:
March 30, 2018 1.22 Time - Hours Done by davidh

Fixed the checks problem by rolling back the django-cors-headers library to 1.1.0
Now the problem appears to be that django cannot find the corsheaders library; it appears to install at a funny location, ~/lib/python2.7/home/lib/python2.7/
Uninstalling all dependencies and starting a fresh virtualenv

Still can't find corsheaders.
Moving it to a normal location manually

Now it can't find south. looks like it installed into lib/python3.6. May have to roll it back; if the current version wants python3.6 it just isn't going to play along.
That worked.

Now it is missing a setting for AUTH_USER_MODEL. It looks like this can be used to override the default user model in django, but I have no idea whether this was done or not in the NRP.
It appears that the original does not set AUTH_USER_MODEL either; will look down the stack trace to see if a library messed this up, then roll it back further.
Nope, this is directly in django. I'll have to take a wild guess at what this should be.
Looks like it's a really bad idea to make a wild guess based on the django docs. Grovelling at Bob for info.

March 30, 2018 4.15 Time - Hours Done by davidh

Verified that django 1.4 has no checks module, which means one of these libraries thinks it has a newer django. Will need to roll back something to a previous version.
Yep, django-extensions library versions 1.7+ requires django 1.8+. This has to be rolled back, at minimum. Setting requirements.txt to use 1.6.7 for now.
django-webtest versions 1.9+ require django > 1.7. Setting in requirements.txt to 1.8.0
django-notifications versions >0.8 require django > 1.6. Setting in requirements.txt to 0.8.0
django-cors-headers current version is not tested with 1.4 but supports versions above and below it. Let's see if the other rollbacks work.
apparently django-notifications doesn't come in 0.8 anymore. Most recent < 0.8 is 0.2.0.
still running into error looking for checks, so something is clearly still incompatible syncdb problem was (mostly) solved, but there's an extensions package missing from the backend adapter.
fetched a fresh copy of that, no more problem there. Now syncdb fails due to missing checks again.
brute force searched for core.checks on entire library directory, no dice, so while these would all have become issues eventually, there's something else causing this.
Now it must be related to the old version of django that was on there before.

Brief break for research.

Checking out environment variables that could affect the libraries accessed. No dice. As it stands, I don't have access to some of the folders on the current python path, it's possible that something else is interfering with django there.

March 29, 2018 2.32 Time - Hours Done by davidh

Working out how to get this running without sudo
Need to roll back python to 2.7 or earlier, otherwise django can't use except ImportError, e
Adding missing to github repo and pulling to server
Django is missing django.core.checks, possibly due to version clash; webfaction doesn't ship django 1.4 anymore, but the NRP specifically requires it. I installed 1.4, but either the installation was unsuccessful (verified that there is no core/checks in lib/python2.7/django/) or there's something still pointing at the old django

March 27, 2018 1.37 Time - Hours Done by davidh

Setting up server to run the project
got it to the point where I could follow the proto-manual, but couldn't continue because "valnet is not on the sudoers list" i.e. can't sudo apt-get etc.

Prototype software: 1.00 Idea due March 14, 2018

Process context:

Pattern: Infrastructure virtual dev
Context: Verdun
Order: Work order 270 , Create new classical NRP for the Vedun project due: 2018-03-31

Previous processes:

Next processes:

Process notes:

Process used mostly by David and Tibi to set up a new NRP instance for the Verdun project.

Project Folder