Skip to content

Commit

Permalink
Update tutorial (pending.signed, test data)
Browse files Browse the repository at this point in the history
  • Loading branch information
annawzz committed Dec 20, 2017
1 parent 54b585d commit f6f813a
Show file tree
Hide file tree
Showing 29 changed files with 408 additions and 284 deletions.
27 changes: 16 additions & 11 deletions docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,24 @@
"suppliers": [
{
"address": {
"countryName": "Україна",
"locality": "м. Вінниця",
"postalCode": "21100",
"region": "м. Вінниця",
"streetAddress": "вул. Островського, 33"
"countryName": "Republica Moldova",
"locality": "Chisinau",
"postalCode": "MD-2033",
"region": "Chisinau",
"streetAddress": "Strada Miorita, 33"
},
"contactPoint": {
"email": "soleksuk@gmail.com",
"name": "Сергій Олексюк",
"telephone": "+380 (432) 21-69-30"
"name": "Vitalie Zlatan",
"telephone": "212449"
},
"identifier": {
"id": "13313462",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"scheme": "UA-EDR",
"uri": "http://sch10.edu.vn.ua/"
"legalName": "Întreprinderea de stat comunală de catering",
"scheme": "MD-IDNO",
"uri": "http://sch10.edu.vn.md/"
},
"name": "ДКП «Школяр»"
"name": "Întreprinderea de stat comunală de catering"
}
],
"value": {
Expand Down Expand Up @@ -378,6 +378,11 @@ def test_docs(self):
# i['complaintPeriod']['endDate'] = i['complaintPeriod']['startDate']
# self.db.save(tender)

with open('docs/source/tutorial/tender-contract-pending-signed.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/contracts/{}?acc_token={}'.format(
self.tender_id, self.contract_id, owner_token), {'data': {'status': 'pending.signed'}})
self.assertEqual(response.status, '200 OK')

with open('docs/source/tutorial/tender-contract-sign.http', 'w') as self.app.file_obj:
response = self.app.patch_json('/tenders/{}/contracts/{}?acc_token={}'.format(
self.tender_id, self.contract_id, owner_token), {'data': {'status': 'active'}})
Expand Down
3 changes: 2 additions & 1 deletion docs/source/standard/contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ Contract workflow
C [ label="cancelled"]
D [ label="pending.signed"]
A -> B;
A -> C;
A -> D;
D -> B;
edge[label="auto-trasition\n on award cancellation" style=dashed];
A -> C;
}

\* marks initial state
7 changes: 6 additions & 1 deletion docs/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,13 @@ Let's see the list of all uploaded contract documents:

Contract registration
---------------------
To ensure contract is fetched and sent to Treasury for validation, upon confirming award qualification,
contract is to be switched into pending.signed status:

**Reporting** tender contract can be registered immediately after award confirmation:
.. include:: tutorial/tender-contract-pending-signed.http
:code:

Tender contract can be registered by changing it's status to active:

.. include:: tutorial/tender-contract-sign.http
:code:
Expand Down
22 changes: 11 additions & 11 deletions docs/source/tutorial/active-cancellation.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/cancellations/73cd7880549642ae94fd1c962d241de7?acc_token=1142190ec4f04f50a88fb21c1cd589e4 HTTP/1.0
PATCH /api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/cancellations/3d17afdd89504a42b8b51934f37b2dc2?acc_token=d4574ebc11b047ae8b360d43132184d3 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Expand All @@ -19,29 +19,29 @@ Content-Type: application/json; charset=UTF-8
{
"description": "Changed description",
"title": "Notice.pdf",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/cancellations/73cd7880549642ae94fd1c962d241de7/documents/76eca0e7e1444150b21fc630e1c000b4?download=54cce9d1b3e944539186516b34047e08",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/cancellations/3d17afdd89504a42b8b51934f37b2dc2/documents/4366e9df64f64393adf422faca3f7952?download=22ae929d95fd4f62ba23cd8d4839b52c",
"format": "application/pdf",
"documentOf": "tender",
"datePublished": "2017-12-19T13:26:14.727559+02:00",
"id": "76eca0e7e1444150b21fc630e1c000b4",
"dateModified": "2017-12-19T13:26:14.727582+02:00"
"datePublished": "2017-12-20T13:36:19.252466+02:00",
"id": "4366e9df64f64393adf422faca3f7952",
"dateModified": "2017-12-20T13:36:19.252490+02:00"
},
{
"description": "Changed description",
"title": "Notice-2.pdf",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/cancellations/73cd7880549642ae94fd1c962d241de7/documents/76eca0e7e1444150b21fc630e1c000b4?download=4324f2c6df3646c5a5345812c22aeab3",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/cancellations/3d17afdd89504a42b8b51934f37b2dc2/documents/4366e9df64f64393adf422faca3f7952?download=7cd79fe0702b44f994f1edc3e79064a2",
"format": "application/pdf",
"documentOf": "tender",
"datePublished": "2017-12-19T13:26:14.727559+02:00",
"id": "76eca0e7e1444150b21fc630e1c000b4",
"dateModified": "2017-12-19T13:26:14.871396+02:00"
"datePublished": "2017-12-20T13:36:19.252466+02:00",
"id": "4366e9df64f64393adf422faca3f7952",
"dateModified": "2017-12-20T13:36:19.402794+02:00"
}
],
"reason": "cancellation reason",
"reasonType": "unsuccessful",
"date": "2017-12-19T13:26:14.959738+02:00",
"date": "2017-12-20T13:36:19.494945+02:00",
"cancellationOf": "tender",
"id": "73cd7880549642ae94fd1c962d241de7"
"id": "3d17afdd89504a42b8b51934f37b2dc2"
}
}

22 changes: 11 additions & 11 deletions docs/source/tutorial/create-tender-procuringEntity.http
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Host: api-sandbox.mepps.openprocurement.net
"locality": "Chisinau"
},
"deliveryDate": {
"startDate": "2017-12-21T13:26:11.907207",
"endDate": "2017-12-24T13:26:11.907207"
"startDate": "2017-12-22T13:36:16.048704",
"endDate": "2017-12-25T13:36:16.048704"
},
"description_ru": "Канцелярские товары и бумага",
"id": "2dc54675d6364e2baffbc0f8e74432ac"
Expand All @@ -77,11 +77,11 @@ Host: api-sandbox.mepps.openprocurement.net

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a
Location: http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb
{
"access": {
"transfer": "72067ab011e242429dede7ecbc133a1f",
"token": "1142190ec4f04f50a88fb21c1cd589e4"
"transfer": "10dcd967930c45a5859159cefa780d70",
"token": "d4574ebc11b047ae8b360d43132184d3"
},
"data": {
"procurementMethod": "limited",
Expand Down Expand Up @@ -111,8 +111,8 @@ Location: http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fb
"locality": "Chisinau"
},
"deliveryDate": {
"startDate": "2017-12-21T13:26:11.907207+02:00",
"endDate": "2017-12-24T13:26:11.907207+02:00"
"startDate": "2017-12-22T13:36:16.048704+02:00",
"endDate": "2017-12-25T13:36:16.048704+02:00"
},
"description_ru": "Канцелярские товары и бумага",
"id": "2dc54675d6364e2baffbc0f8e74432ac"
Expand All @@ -124,7 +124,7 @@ Location: http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fb
"amount": 500000.0,
"valueAddedTaxIncluded": false
},
"dateModified": "2017-12-19T13:26:13.446048+02:00",
"dateModified": "2017-12-20T13:36:17.802034+02:00",
"procuringEntity": {
"contactPoint": {
"url": "http://www.edu.gov.md/",
Expand All @@ -146,14 +146,14 @@ Location: http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fb
"locality": "Chisinau"
}
},
"date": "2017-12-19T13:26:13.444214+02:00",
"date": "2017-12-20T13:36:17.798391+02:00",
"procurementMethodType": "reporting",
"description_en": "Stationery and paper",
"title_ru": "Канцелярские товары и бумага",
"owner": "broker",
"description_ru": "Канцелярские товары и бумага",
"id": "667ddc4fbc794e27955f606e324e989a",
"tenderID": "MD-2017-12-19-000001"
"id": "e880178c4afa45b08d1c9873d61cd6eb",
"tenderID": "MD-2017-12-20-000001"
}
}

10 changes: 5 additions & 5 deletions docs/source/tutorial/patch-cancellation.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/cancellations/73cd7880549642ae94fd1c962d241de7/documents/76eca0e7e1444150b21fc630e1c000b4?acc_token=1142190ec4f04f50a88fb21c1cd589e4 HTTP/1.0
PATCH /api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/cancellations/3d17afdd89504a42b8b51934f37b2dc2/documents/4366e9df64f64393adf422faca3f7952?acc_token=d4574ebc11b047ae8b360d43132184d3 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 48
Content-Type: application/json
Expand All @@ -16,12 +16,12 @@ Content-Type: application/json; charset=UTF-8
"data": {
"description": "Changed description",
"title": "Notice.pdf",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/cancellations/73cd7880549642ae94fd1c962d241de7/documents/76eca0e7e1444150b21fc630e1c000b4?download=54cce9d1b3e944539186516b34047e08",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/cancellations/3d17afdd89504a42b8b51934f37b2dc2/documents/4366e9df64f64393adf422faca3f7952?download=22ae929d95fd4f62ba23cd8d4839b52c",
"format": "application/pdf",
"documentOf": "tender",
"datePublished": "2017-12-19T13:26:14.727559+02:00",
"id": "76eca0e7e1444150b21fc630e1c000b4",
"dateModified": "2017-12-19T13:26:14.727582+02:00"
"datePublished": "2017-12-20T13:36:19.252466+02:00",
"id": "4366e9df64f64393adf422faca3f7952",
"dateModified": "2017-12-20T13:36:19.252490+02:00"
}
}

14 changes: 7 additions & 7 deletions docs/source/tutorial/patch-items-value-periods.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.3/tenders/667ddc4fbc794e27955f606e324e989a?acc_token=1142190ec4f04f50a88fb21c1cd589e4 HTTP/1.0
PATCH /api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb?acc_token=d4574ebc11b047ae8b360d43132184d3 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 80
Content-Type: application/json
Expand Down Expand Up @@ -49,8 +49,8 @@ Content-Type: application/json; charset=UTF-8
"locality": "Chisinau"
},
"deliveryDate": {
"startDate": "2017-12-21T13:26:11.907207+02:00",
"endDate": "2017-12-24T13:26:11.907207+02:00"
"startDate": "2017-12-22T13:36:16.048704+02:00",
"endDate": "2017-12-25T13:36:16.048704+02:00"
},
"description_ru": "Канцелярские товары и бумага",
"id": "2dc54675d6364e2baffbc0f8e74432ac",
Expand All @@ -67,7 +67,7 @@ Content-Type: application/json; charset=UTF-8
"amount": 500000.0,
"valueAddedTaxIncluded": false
},
"dateModified": "2017-12-19T13:26:13.536374+02:00",
"dateModified": "2017-12-20T13:36:17.895360+02:00",
"procuringEntity": {
"contactPoint": {
"url": "http://www.edu.gov.md/",
Expand All @@ -89,14 +89,14 @@ Content-Type: application/json; charset=UTF-8
"locality": "Chisinau"
}
},
"date": "2017-12-19T13:26:13.444214+02:00",
"date": "2017-12-20T13:36:17.798391+02:00",
"procurementMethodType": "reporting",
"description_en": "Stationery and paper",
"title_ru": "Канцелярские товары и бумага",
"owner": "broker",
"description_ru": "Канцелярские товары и бумага",
"id": "667ddc4fbc794e27955f606e324e989a",
"tenderID": "MD-2017-12-19-000001"
"id": "e880178c4afa45b08d1c9873d61cd6eb",
"tenderID": "MD-2017-12-20-000001"
}
}

8 changes: 4 additions & 4 deletions docs/source/tutorial/prepare-cancellation.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POST /api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/cancellations?acc_token=1142190ec4f04f50a88fb21c1cd589e4 HTTP/1.0
POST /api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/cancellations?acc_token=d4574ebc11b047ae8b360d43132184d3 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 43
Content-Type: application/json
Expand All @@ -12,15 +12,15 @@ Host: api-sandbox.mepps.openprocurement.net

Response: 201 Created
Content-Type: application/json; charset=UTF-8
Location: http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/cancellations/73cd7880549642ae94fd1c962d241de7
Location: http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/cancellations/3d17afdd89504a42b8b51934f37b2dc2
{
"data": {
"status": "pending",
"reason": "cancellation reason",
"reasonType": "cancelled",
"date": "2017-12-19T13:26:14.585410+02:00",
"date": "2017-12-20T13:36:19.115451+02:00",
"cancellationOf": "tender",
"id": "73cd7880549642ae94fd1c962d241de7"
"id": "3d17afdd89504a42b8b51934f37b2dc2"
}
}

44 changes: 22 additions & 22 deletions docs/source/tutorial/tender-award-approve.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATCH /api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/awards/37333e37dfa346608a6d10b38549ceb3?acc_token=1142190ec4f04f50a88fb21c1cd589e4 HTTP/1.0
PATCH /api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/awards/89e507f4b41446f29e9ada88300773f5?acc_token=d4574ebc11b047ae8b360d43132184d3 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Content-Length: 30
Content-Type: application/json
Expand All @@ -18,43 +18,43 @@ Content-Type: application/json; charset=UTF-8
"documents": [
{
"title": "award_first_document.doc",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/awards/37333e37dfa346608a6d10b38549ceb3/documents/0f5a9af38e184e1e86593031979fb90f?download=5c695cf8ae994c799cd0946268f9bce7",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/awards/89e507f4b41446f29e9ada88300773f5/documents/ae2f7a9f68254ca4a743c9c41daa26d3?download=76edc40a6b3043f5a1afb20524b2cfb8",
"format": "application/msword",
"documentOf": "tender",
"datePublished": "2017-12-19T13:26:13.848304+02:00",
"id": "0f5a9af38e184e1e86593031979fb90f",
"dateModified": "2017-12-19T13:26:13.848327+02:00"
"datePublished": "2017-12-20T13:36:18.218618+02:00",
"id": "ae2f7a9f68254ca4a743c9c41daa26d3",
"dateModified": "2017-12-20T13:36:18.218642+02:00"
},
{
"title": "award_second_document.doc",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/awards/37333e37dfa346608a6d10b38549ceb3/documents/ea8df6bb48b74edc90531f568859a5eb?download=38cfb81884544e0c9e8bdd78ae2d2c74",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/awards/89e507f4b41446f29e9ada88300773f5/documents/8a377bb593e7479bbd16653b3e585fbe?download=96281314e08f43549abbc667fb55b279",
"format": "application/msword",
"documentOf": "tender",
"datePublished": "2017-12-19T13:26:13.913498+02:00",
"id": "ea8df6bb48b74edc90531f568859a5eb",
"dateModified": "2017-12-19T13:26:13.913522+02:00"
"datePublished": "2017-12-20T13:36:18.280084+02:00",
"id": "8a377bb593e7479bbd16653b3e585fbe",
"dateModified": "2017-12-20T13:36:18.280106+02:00"
}
],
"suppliers": [
{
"contactPoint": {
"email": "soleksuk@gmail.com",
"telephone": "+380 (432) 21-69-30",
"name": "Сергій Олексюк"
"telephone": "212449",
"name": "Vitalie Zlatan"
},
"identifier": {
"scheme": "UA-EDR",
"legalName": "Державне комунальне підприємство громадського харчування «Школяр»",
"scheme": "MD-IDNO",
"legalName": "Întreprinderea de stat comunală de catering",
"id": "13313462",
"uri": "http://sch10.edu.vn.ua/"
"uri": "http://sch10.edu.vn.md/"
},
"name": "ДКП «Школяр»",
"name": "Întreprinderea de stat comunală de catering",
"address": {
"postalCode": "21100",
"countryName": "Україна",
"streetAddress": "вул. Островського, 33",
"region": "м. Вінниця",
"locality": "м. Вінниця"
"postalCode": "MD-2033",
"countryName": "Republica Moldova",
"streetAddress": "Strada Miorita, 33",
"region": "Chisinau",
"locality": "Chisinau"
}
}
],
Expand All @@ -63,8 +63,8 @@ Content-Type: application/json; charset=UTF-8
"amount": 475000.0,
"valueAddedTaxIncluded": false
},
"date": "2017-12-19T13:26:13.985783+02:00",
"id": "37333e37dfa346608a6d10b38549ceb3"
"date": "2017-12-20T13:36:18.353473+02:00",
"id": "89e507f4b41446f29e9ada88300773f5"
}
}

18 changes: 9 additions & 9 deletions docs/source/tutorial/tender-award-get-documents-again.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GET /api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/awards/37333e37dfa346608a6d10b38549ceb3/documents?acc_token=1142190ec4f04f50a88fb21c1cd589e4 HTTP/1.0
GET /api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/awards/89e507f4b41446f29e9ada88300773f5/documents?acc_token=d4574ebc11b047ae8b360d43132184d3 HTTP/1.0
Authorization: Basic YnJva2VyOg==
Host: api-sandbox.mepps.openprocurement.net

Expand All @@ -8,21 +8,21 @@ Content-Type: application/json; charset=UTF-8
"data": [
{
"title": "award_first_document.doc",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/awards/37333e37dfa346608a6d10b38549ceb3/documents/0f5a9af38e184e1e86593031979fb90f?download=5c695cf8ae994c799cd0946268f9bce7",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/awards/89e507f4b41446f29e9ada88300773f5/documents/ae2f7a9f68254ca4a743c9c41daa26d3?download=76edc40a6b3043f5a1afb20524b2cfb8",
"format": "application/msword",
"documentOf": "tender",
"datePublished": "2017-12-19T13:26:13.848304+02:00",
"id": "0f5a9af38e184e1e86593031979fb90f",
"dateModified": "2017-12-19T13:26:13.848327+02:00"
"datePublished": "2017-12-20T13:36:18.218618+02:00",
"id": "ae2f7a9f68254ca4a743c9c41daa26d3",
"dateModified": "2017-12-20T13:36:18.218642+02:00"
},
{
"title": "award_second_document.doc",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/667ddc4fbc794e27955f606e324e989a/awards/37333e37dfa346608a6d10b38549ceb3/documents/ea8df6bb48b74edc90531f568859a5eb?download=38cfb81884544e0c9e8bdd78ae2d2c74",
"url": "http://api-sandbox.mepps.openprocurement.net/api/2.3/tenders/e880178c4afa45b08d1c9873d61cd6eb/awards/89e507f4b41446f29e9ada88300773f5/documents/8a377bb593e7479bbd16653b3e585fbe?download=96281314e08f43549abbc667fb55b279",
"format": "application/msword",
"documentOf": "tender",
"datePublished": "2017-12-19T13:26:13.913498+02:00",
"id": "ea8df6bb48b74edc90531f568859a5eb",
"dateModified": "2017-12-19T13:26:13.913522+02:00"
"datePublished": "2017-12-20T13:36:18.280084+02:00",
"id": "8a377bb593e7479bbd16653b3e585fbe",
"dateModified": "2017-12-20T13:36:18.280106+02:00"
}
]
}
Expand Down

0 comments on commit f6f813a

Please sign in to comment.