Contributions for Project Verdun
 
Date Type From Resource Type Qty URL Description Process Deliverables
April 20, 2018 Time Contribution davidh Work - Programming for product 3.43 HR 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 views.py causing it to fail. Rolling it back to test theory. Nope! It was in forms.py; 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. Create new classical NRP for the Vedun project
April 19, 2018 Time Contribution Tim Work - Meeting 1.00 HR Meeting with Tibi to discuss communication strategy about the MESI memo. Writing the MESI memo
April 19, 2018 Time Contribution Tibi Work - Meeting 1.00 HR Meeting with Tim to discuss communication strategy about the MESI memo. Writing the MESI memo
April 19, 2018 Time Contribution Winluck Work - Writing 1.50 HR Fleshed out MESI memo outline and provided a potential direction the memo message can take. Writing the MESI memo
April 18, 2018 Time Contribution Tibi Work - Writing 1.50 HR Flashed out Structure, made a call on social media and communicated with Sensorica and Ouishare the work done and to be done. Writing the MESI memo
April 18, 2018 Time Contribution davidh Work - Programming for product 6.37 HR 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 urls.py and views.py 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. Create new classical NRP for the Vedun project
April 17, 2018 Time Contribution davidh Work - Programming for product 1.15 HR Testing out the new editable table before the workparty Create new classical NRP for the Vedun project
April 17, 2018 Time Contribution davidh Work - Programming for product 5.28 HR 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 chair_tag.py It's stupid that it worked. Let's not use Django next time. rolling back form_dialog.py 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. Create new classical NRP for the Vedun project
April 15, 2018 Time Contribution Winluck Work - Analysis and Strategy 2.00 HR Worked with Tibi on the MESI presentation to brainstorm on its strategy and structuring its format to lead into Verdun project next steps. Writing the MESI memo
April 15, 2018 Time Contribution Winluck Work - Writing 0.50 HR Studied MESI memo working doc and referenced materials in preparation of memo drafting meeting with Tibi Writing the MESI memo
April 13, 2018 Time Contribution davidh Work - Programming for product 3.18 HR 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. Create new classical NRP for the Vedun project
April 12, 2018 Time Contribution davidh Work - Programming for product 2.00 HR Been working on the editable table Create new classical NRP for the Vedun project
April 12, 2018 Time Contribution davidh Work - Programming for product 7.42 HR 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 Create new classical NRP for the Vedun project
April 11, 2018 Time Contribution davidh Work - Programming for product 4.68 HR Debugging HTML output and UI The page title appears to be example.com; 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 settings.py 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 chair_tag.py or chair.html. Set it up in chair_tag.py; 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) Create new classical NRP for the Vedun project
April 7, 2018 Time Contribution davidh Work - Programming for product 0.00 HR Create new classical NRP for the Vedun project
April 6, 2018 Time Contribution davidh Work - Programming for product 5.78 HR 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. Create new classical NRP for the Vedun project
April 5, 2018 Time Contribution davidh Work - Programming for product 1.07 HR 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. Create new classical NRP for the Vedun project
April 4, 2018 Time Contribution Winluck Work - Meeting 1.00 HR Worked with Tibi on the MESI proposal, he walked me through this initiative. I will be part of the synthesis and actual writing of the memo. Writing the MESI memo
April 4, 2018 Time Contribution davidh Work - Programming for product 3.48 HR 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/test_resource_types.py", line 33, in test_no_quantity doc = ElementTree.fromstring(resp.content) File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1300, in XML parser.feed(text) File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/usr/lib64/python2.7/xml/etree/ElementTree.py", 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) x4 ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/tests/test_value_equations.py", line 184, in setUp child_output=child_input.associated_producing_commitments()[0] 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/test_explosions.py", 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/test_orders.py", line 139, in test_create_order form["RT-6-quantity"] = 3 File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/forms.py", 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/test_orders.py", 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 views.py. 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. Create new classical NRP for the Vedun project
April 4, 2018 Time Contribution davidh Work - Programming for product 7.27 HR Pulling down from repo from git Rerunning tests .........F............F.E...F...F.F........EEEE ====================================================================== 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/test_orders.py", line 160, in test_create_order response = form.submit("submit1").follow() File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/forms.py", line 619, in submit params=fields, **args) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/response.py", line 297, in goto return method(href, **args) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django_webtest/__init__.py", line 139, in post upload_files, expect_errors, content_type, **kwargs) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/app.py", line 379, in post content_type=content_type) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/app.py", line 755, in _gen_request expect_errors=expect_errors) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django_webtest/__init__.py", line 86, in do_request expect_errors) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/app.py", line 625, in do_request res = req.get_response(app, catch_exc_info=True) File "/home/valnet/lib/python2.7/webob/request.py", line 1323, in send application, catch_exc_info=True) File "/home/valnet/lib/python2.7/webob/request.py", line 1291, in call_application app_iter = application(self.environ, start_response) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/lint.py", line 200, in lint_app iterator = application(environ, start_response_wrapper) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__ return self.application(environ, start_response) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__ response = self.get_response(request) File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/core/handlers/base.py", 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/base.py", 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/decorators.py", line 20, in _wrapped_view return view_func(request, *args, **kwargs) File "/home/valnet/webapps/verdunnrp/VerdunNRP/valuenetwork/valueaccounting/views.py", line 3067, in create_order ext_id = request.POST["exchange_type"] File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/django/utils/datastructures.py", 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. ====================================================================== ERRORS: 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/test_value_equations.py", line 184, in setUp child_output=child_input.associated_producing_commitments()[0] 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/test_explosions.py", 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/test_resource_types.py", line 28, in test_no_quantity '/accounting/resource-type/%s/' % self.rt.id File "/home/valnet/Envs/verdun/lib/python2.7/site-packages/webtest/response.py", 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/test_orders.py", 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/forms.py", 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/test_orders.py", 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/test_orders.py", 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/forms.py", 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... .........F............F.........EEEE ====================================================================== ERRORS: 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/test_value_equations.py", line 184, in setUp child_output=child_input.associated_producing_commitments()[0] 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/test_explosions.py", 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/test_resource_types.py", 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 models.py: 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]$ Create new classical NRP for the Vedun project
April 4, 2018 Time Contribution davidh Work - Programming for product 3.50 HR 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 (test_value_equations.py), 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. Create new classical NRP for the Vedun project
April 4, 2018 Time Contribution davidh Work - Documenting 2.15 HR Creating a hacks/readme.md in the repo in case anyone else needs to install this thing. Also refactored hacks for reuse a bit and committed. Create new classical NRP for the Vedun project
April 4, 2018 Time Contribution davidh Work - Programming for product 0.92 HR 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/views.py, /management.py, and /urls.py, whereas the library imports django.contrib.syndication.views.feed only in its own views.py. Their views.py 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. Create new classical NRP for the Vedun project
April 4, 2018 Time Contribution Tibi Work - Meeting 1.00 HR Worked with Windluck on the MESI proposal, walked him through this initiative. He will be part of the synthesis and actual writing of the memo. Writing the MESI memo
April 3, 2018 Time Contribution Tibi Work - Analysis and Strategy 5.00 HR Open Set up the Memo for the collaborative economy doc and worked on it. shared it with Sensorica and Ouishare. This is relevent for the Verdun project, because it tells the Government that we are on top of the collaborative economy. Moreover, we make sure that we carve our proper place in society and that our Verdun project stands out as a true collaborative economy project. We also inform future policy about the collaborative economy.