Skip to content

Commit

Permalink
Merge branch 'a181049447354185_awarding' in master
Browse files Browse the repository at this point in the history
* 'a181049447354185_awarding' of github.com:openprocurement/openprocurement.auctions.dgf:
  Docs: update https
  Update award periods calculation
  Remove check for auction protocol when verification period is expired
  Docs: awarding 2.1
  Awarding 2.1
  Switch award to pending.payment only with auction owner auctionProtocol
  zc.buildout = 2.2.5
  Switch op.api to ea_production branch
  Docs:fix graph
  Added awarding statuses diagram, description, links to qualification, as well as  translation (#18)
  Tweaked the tutorial translation (#17)
  Docs: minor localization tweaks for tutorial
  Docs: tweaked the english version of the tutorial
  Docs: translated the ukrainian localization of the tutorial
  Docs: changed the description for 'cancelled' status & its translation
  Docs: added desriptions to new statuses and periods & their translations
  Switch auction status after chronograph switch award from active to unsuccessful
  Docs: add new periods and statuses for award in standard
  Docs: new awarding
  New awarding
  • Loading branch information
Andrew Leitsius committed Feb 15, 2017
2 parents 4909f53 + 93ff631 commit 021598a
Show file tree
Hide file tree
Showing 93 changed files with 2,997 additions and 977 deletions.
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ eggs =


[sources]
openprocurement.api = git https://github.com/openprocurement/openprocurement.api.git branch=document_service
openprocurement.api = git https://github.com/openprocurement/openprocurement.api.git branch=ea_production
openprocurement.auctions.flash = git https://github.com/openprocurement/openprocurement.auctions.flash.git
openprocurement.auctions.core = git https://github.com/openprocurement/openprocurement.auctions.core.git
111 changes: 72 additions & 39 deletions docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@

test_max_uid = uuid4().hex

test_auction_maximum_data = {
"title": u"футляри до державних нагород",
test_auction_maximum_data = test_auction_data.copy()
test_auction_maximum_data.update({
"title_en": u"Cases with state awards",
"title_ru": u"футляры к государственным наградам",
"procuringEntity": {
Expand All @@ -147,14 +147,6 @@
},
'kind': 'general'
},
"value": {
"amount": 500,
"currency": u"UAH"
},
"minimalStep": {
"amount": 35,
"currency": u"UAH"
},
"items": [
{
"id": test_max_uid,
Expand All @@ -171,12 +163,7 @@
"quantity": 5
}
],
"auctionPeriod": {
"startDate": (now + timedelta(days=14)).isoformat()
},
"procurementMethodType": "dgfOtherAssets",
"mode": u"test"
}
})


test_complaint_data = {'data':
Expand Down Expand Up @@ -594,8 +581,27 @@ def test_docs_tutorial(self):

self.app.authorization = ('Basic', ('broker', ''))

response = self.app.get('/auctions/{}/awards'.format(self.auction_id))
with open('docs/source/tutorial/get-awards.http', 'w') as self.app.file_obj:
response = self.app.get('/auctions/{}/awards'.format(self.auction_id))
self.assertEqual(response.status, '200 OK')
self.assertEqual(len(response.json['data']), 2)

# get waiting award
award = [i for i in response.json['data'] if i['status'] == 'pending.waiting'][0]
award_id = award['id']

with open('docs/source/qualification/award-waiting-cancel.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/auctions/{}/awards/{}?acc_token={}'.format(
self.auction_id, award_id, bids_access[award['bid_id']]), {"data": {"status": "cancelled"}})
self.assertEqual(response.status, '200 OK')

# get pending award
response = self.app.get('/auctions/{}/awards'.format(self.auction_id))
award_id = [i['id'] for i in response.json['data'] if i['status'] == 'pending.verification'][0]

with open('docs/source/tutorial/bidder-auction-protocol.http', 'w') as self.app.file_obj:
response = self.app.post_json('/auctions/{}/bids/{}/documents?acc_token={}'.format(self.auction_id, bid2_id, bids_access[bid2_id]),
response = self.app.post_json('/auctions/{}/awards/{}/documents?acc_token={}'.format(self.auction_id, award_id, bids_access[bid2_id]),
{'data': {
'title': u'SignedAuctionProtocol.pdf',
'url': self.generate_docservice_url(),
Expand All @@ -605,12 +611,23 @@ def test_docs_tutorial(self):
}})
self.assertEqual(response.status, '201 Created')

response = self.app.get('/auctions/{}/awards'.format(self.auction_id))
# get pending award
award_id = [i['id'] for i in response.json['data'] if i['status'] == 'pending'][0]
with open('docs/source/tutorial/owner-auction-protocol.http', 'w') as self.app.file_obj:
response = self.app.post_json('/auctions/{}/awards/{}/documents?acc_token={}'.format(self.auction_id, award_id, owner_token),
{'data': {
'title': u'SignedAuctionProtocol.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
"documentType": "auctionProtocol",
}})
self.assertEqual(response.status, '201 Created')

with open('docs/source/tutorial/verify-protocol.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/auctions/{}/awards/{}?acc_token={}'.format(self.auction_id, award_id, owner_token), {"data": {"status": "pending.payment"}})
self.assertEqual(response.status, '200 OK')

with open('docs/source/tutorial/confirm-qualification.http', 'w') as self.app.file_obj:
self.app.patch_json('/auctions/{}/awards/{}?acc_token={}'.format(self.auction_id, award_id, owner_token), {"data": {"status": "active"}})
response = self.app.patch_json('/auctions/{}/awards/{}?acc_token={}'.format(self.auction_id, award_id, owner_token), {"data": {"status": "active"}})
self.assertEqual(response.status, '200 OK')

response = self.app.get('/auctions/{}/contracts'.format(self.auction_id))
Expand Down Expand Up @@ -735,11 +752,11 @@ def test_docs_disqualification(self):
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.post_json('/auctions/{}/bids'.format(self.auction_id),
{'data': {"qualified": True, 'tenderers': [bid["data"]["tenderers"][0]], "value": {"amount": 450}}})
bid_id = response.json['data']['id']
bid_token = response.json['access']['token']
self.initial_bids_tokens[response.json['data']['id']] = response.json['access']['token']
self.app.authorization = ('Basic', ('broker', ''))
response = self.app.post_json('/auctions/{}/bids'.format(self.auction_id),
{'data': {"qualified": True, 'tenderers': [bid["data"]["tenderers"][0]], "value": {"amount": 475}}})
self.initial_bids_tokens[response.json['data']['id']] = response.json['access']['token']
# get auction info
self.set_status('active.auction')
self.app.authorization = ('Basic', ('auction', ''))
Expand Down Expand Up @@ -769,7 +786,21 @@ def test_docs_disqualification(self):
response = self.app.get('/auctions/{}/awards'.format(self.auction_id))
self.assertEqual(response.status, '200 OK')

award_id = [i['id'] for i in response.json['data'] if i['status'] == 'pending'][0]
award = [i for i in response.json['data'] if i['status'] == 'pending.verification'][0]
award_id = award['id']
bid_token = self.initial_bids_tokens[award['bid_id']]

self.app.authorization = ('Basic', ('broker', ''))

response = self.app.post_json('/auctions/{}/awards/{}/documents?acc_token={}'.format(
self.auction_id, award_id, bid_token), {'data': {
'title': u'auction_protocol.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
'documentType': 'auctionProtocol',
}})
self.assertEqual(response.status, '201 Created')

response = self.app.post_json('/auctions/{}/awards/{}/documents?acc_token={}'.format(
self.auction_id, award_id, self.auction_token), {'data': {
Expand All @@ -785,23 +816,25 @@ def test_docs_disqualification(self):
self.assertEqual(response.status, '200 OK')

response = self.app.get('/auctions/{}/awards'.format(self.auction_id))
award_id2 = [i['id'] for i in response.json['data'] if i['status'] == 'pending'][0]
award = [i for i in response.json['data'] if i['status'] == 'pending.verification'][0]
award_id2 = award['id']
bid_token = self.initial_bids_tokens[award['bid_id']]

response = self.app.patch_json('/auctions/{}/awards/{}?acc_token={}'.format(
self.auction_id, award_id2, self.auction_token), {"data": {"status": "active"}})
self.assertEqual(response.status, '200 OK')

with open('docs/source/qualification/award-active-cancel.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/auctions/{}/awards/{}?acc_token={}'.format(
self.auction_id, award_id2, self.auction_token), {"data": {"status": "cancelled"}})
self.assertEqual(response.status, '200 OK')
self.app.authorization = ('Basic', ('broker', ''))

response = self.app.get('/auctions/{}/awards?acc_token={}'.format(self.auction_id, self.auction_token))
award_id3 = [i['id'] for i in response.json['data'] if i['status'] == 'pending'][0]
response = self.app.post_json('/auctions/{}/awards/{}/documents?acc_token={}'.format(
self.auction_id, award_id2, bid_token), {'data': {
'title': u'auction_protocol.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
'format': 'application/pdf',
'documentType': 'auctionProtocol',
}})
self.assertEqual(response.status, '201 Created')

with open('docs/source/qualification/award-active-cancel-upload.http', 'w') as self.app.file_obj:
with open('docs/source/qualification/award-active-unsuccessful-upload.http', 'w') as self.app.file_obj:
response = self.app.post_json('/auctions/{}/awards/{}/documents?acc_token={}'.format(
self.auction_id, award_id3, self.auction_token), {'data': {
self.auction_id, award_id2, self.auction_token), {'data': {
'title': u'Disqualified_reason.pdf',
'url': self.generate_docservice_url(),
'hash': 'md5:' + '0' * 32,
Expand All @@ -810,9 +843,9 @@ def test_docs_disqualification(self):
}})
self.assertEqual(response.status, '201 Created')

with open('docs/source/qualification/award-active-cancel-disqualify.http', 'w') as self.app.file_obj:
with open('docs/source/qualification/award-active-disqualify.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/auctions/{}/awards/{}?acc_token={}'.format(
self.auction_id, award_id3, self.auction_token), {"data": {"status": "unsuccessful", "title": "Disqualified", "description": "Candidate didn’t sign the auction protocol in 3 business days"}})
self.auction_id, award_id2, self.auction_token), {"data": {"status": "unsuccessful", "title": "Disqualified", "description": "Candidate didn’t sign the auction protocol in 3 business days"}})
self.assertEqual(response.status, '200 OK')

def _test_docs_complaints(self):
Expand Down
47 changes: 47 additions & 0 deletions docs/source/award_workflow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. _award_workflow:

Award Workflow
==============

For a more detailed information see :ref:`award`

* :ref:`Qualification`
* :ref:`Confirming_qualification`
* :ref:`Candidate_disqualification`
* :ref:`Waiting_refusal`


.. graphviz::

digraph G {
subgraph cluster_0 {
label = "award #2";
node [style=filled];
edge[style=dashed];
"pending.waiting" -> cancel;
color=blue
}
subgraph cluster_1 {
node [style=filled];
edge[label=" 3d"];
"pending.verification" -> unsuccessful;
edge[label="5d**"];
active -> unsuccessful;
edge[label=" 3d*"];
"pending.verification" -> "pending.payment";
edge[label="*" style=dashed];
"pending.verification" -> "pending.payment"
label = "award #1";
color=blue
}
edge[style=dashed];
active -> unsuccessful;
edge[label="***"];
"pending.waiting" -> "pending.verification";
edge[label="7d" style=solid];
"pending.payment" -> unsuccessful;
edge[label="*" style=dashed];
"pending.verification" -> unsuccessful;
edge[style=dashed];
"pending.payment" -> active;
}
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Contents:
overview
standard/index
upload
award_workflow
tutorial
fintutorial
2pc
Expand Down
87 changes: 87 additions & 0 deletions docs/source/locale/uk/LC_MESSAGES/award_workflow.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# greg <greg@quintagroup.com>, 2016.
msgid ""
msgstr ""
"Project-Id-Version: openprocurement.auctions.dgf 1.0.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-16 17:10+0200\n"
"PO-Revision-Date: 2016-12-16 17:15+0200\n"
"Last-Translator: greg <greg@quintagroup.com>\n"
"Language-Team: English <support@quintagroup.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_US\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 2.0\n"

msgid "Award Workflow"
msgstr "Схема роботи кваліфікації"

msgid "For a more detailed information see :ref:`award`"
msgstr "Для більш детальної інформації зверніться до секції :ref:`award`"

msgid ":ref:`Qualification`"
msgstr ""

msgid ":ref:`Confirming_qualification`"
msgstr ""

msgid ":ref:`Candidate_disqualification`"
msgstr ""

msgid ":ref:`Waiting_refusal`"
msgstr ""

msgid "digraph G {"
msgstr ""

msgid "subgraph cluster_0 {"
msgstr ""

msgid "label = \"award #2\"; node [style=filled]; edge[style=dashed];"
msgstr ""

msgid "\"pending.waiting\" -> cancel;"
msgstr ""

msgid "color=blue }"
msgstr ""

msgid "subgraph cluster_1 {"
msgstr ""

msgid "node [style=filled];"
msgstr ""

msgid ""
"edge[label=\" 3d\"]; \"pending.verification\" -> unsuccessful; "
"edge[label=\"5d**\"]; active -> unsuccessful; edge[label=\" 3d*\"];"
msgstr ""

msgid "\"pending.verification\" -> \"pending.payment\";"
msgstr ""

msgid ""
"edge[label=\"*\" style=dashed]; \"pending.verification\" ->"
" \"pending.payment\""
msgstr ""

msgid "label = \"award #1\"; color=blue"
msgstr ""

msgid "} edge[style=dashed]; active -> unsuccessful; edge[label=\"***\"];"
msgstr ""

msgid "\"pending.waiting\" -> \"pending.verification\";"
msgstr ""

msgid ""
"edge[label=\"7d\" style=solid]; \"pending.payment\" -> unsuccessful; "
"edge[label=\"*\" style=dashed]; \"pending.verification\" -> unsuccessful; "
"edge[style=dashed]; \"pending.payment\" -> active;"
msgstr ""

msgid "}"
msgstr ""

Binary file modified docs/source/locale/uk/LC_MESSAGES/standard/award.mo
Binary file not shown.
Loading

0 comments on commit 021598a

Please sign in to comment.