-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2045 from fedspendingtransparency/staging
Sprint 90 Production Deploy
- Loading branch information
Showing
157 changed files
with
2,052 additions
and
285,761 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
language: python | ||
|
||
python: | ||
- "3.5" | ||
- '3.5' | ||
- '3.7' | ||
|
||
services: | ||
- postgresql | ||
|
||
addons: | ||
postgresql: "10" | ||
postgresql: '10' | ||
apt: | ||
packages: | ||
- postgresql-10 | ||
|
@@ -23,7 +24,7 @@ before_install: | |
- npm install [email protected] --global | ||
|
||
install: | ||
- pip install -r requirements/requirements.txt | ||
- if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then travis_retry pip install -r requirements/requirements_3-7.txt; else travis_retry pip install -r requirements/requirements.txt; fi | ||
- pip install coveralls | ||
|
||
before_script: | ||
|
@@ -35,6 +36,7 @@ before_script: | |
|
||
script: | ||
- flake8 | ||
- if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then black --check . ; fi | ||
- python manage.py check_for_endpoint_documentation | ||
- pytest --cov=usaspending_api | ||
# - dredd (Disable dredd until test data is loaded into DB for API responses) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
appdirs==1.4.3 | ||
asyncpg==0.18.3 | ||
atomicwrites==1.3.0 | ||
attrs==19.1.0 | ||
black==19.3b0 | ||
boto3==1.9.224 | ||
botocore==1.12.224 | ||
certifi==2019.6.16 | ||
chardet==3.0.4 | ||
codeclimate-test-reporter==0.2.3 | ||
coverage==4.3.4 | ||
dj-database-url==0.5.0 | ||
django-cors-headers==1.2.2 | ||
django-debug-toolbar==1.7 | ||
django-extensions==1.7.5 | ||
django-filter==0.14.0 | ||
django-partial-index==0.5.2 | ||
django-queryset-csv==1.0.1 | ||
django-simple-history==1.8.2 | ||
django-spaghetti-and-meatballs==0.2.2 | ||
Django>=1.11.0,<2.0 | ||
djangorestframework==3.9.4 | ||
docutils==0.15.2 | ||
drf-extensions==0.3.1 | ||
drf-tracking==1.4.0 | ||
elasticsearch==6.3.0 | ||
entrypoints==0.3 | ||
et-xmlfile==1.0.1 | ||
filechunkio==1.8 | ||
fiscalyear==0.1.0 | ||
flake8==3.7.8 | ||
git+https://github.com/fedspendingtransparency/django-mock-queries#egg=django-mock-queries | ||
idna==2.8 | ||
importlib-metadata==0.20 | ||
jdcal==1.4.1 | ||
jmespath==0.9.4 | ||
jsonpickle==1.2 | ||
Markdown==3.1.1 | ||
mccabe==0.6.1 | ||
mock==3.0.5 | ||
model-mommy==1.6.0 | ||
more-itertools==7.2.0 | ||
numpy==1.17.2 | ||
openpyxl==2.4.7 | ||
pandas==0.25.1 | ||
pip>=19.2 | ||
pluggy==0.12.0 | ||
psycopg2-binary==2.7.5 | ||
py-gfm==0.1.3 | ||
py==1.8.0 | ||
pycodestyle==2.5.0 | ||
pyflakes==2.1.1 | ||
pytest-cov==2.5.1 | ||
pytest-django==3.2.1 | ||
pytest==3.10.1 | ||
python-dateutil==2.7.3 | ||
python-json-logger==0.1.9 | ||
pytz==2019.2 | ||
requests==2.22.0 | ||
retrying==1.3.3 | ||
s3transfer==0.2.1 | ||
six==1.12.0 | ||
sqlparse==0.3.0 | ||
unicodecsv==0.14.1 | ||
urllib3>=1.25,<1.26 | ||
xlrd==1.0.0 | ||
zipp==0.6.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
usaspending_api/api_contracts/contracts/v2/awards/accounts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
FORMAT: 1A | ||
HOST: https://api.usaspending.gov | ||
|
||
# Award Federal Accounts | ||
|
||
These endpoints are used to power USAspending.gov's Award Summary page Federal Accounts visualization section. | ||
|
||
## List Federal Accounts [/api/v2/awards/accounts/] | ||
|
||
This endpoint returns a list of federal accounts under a given award. | ||
|
||
### List Federal Accounts [POST] | ||
+ Request (application/json) | ||
+ Attributes | ||
+ `award_id`:`CONT_AWD_DEAC5206NA25396_8900_-NONE-_-NONE-` (required, string) | ||
Award to return accounts for | ||
+ `page`: 1 (optional, number) | ||
Page number to return | ||
+ `limit`: 10 (optional, number) | ||
Maximum number to return | ||
+ `order`: `desc` (optional, string) | ||
Direction of sort | ||
+ `sort`:`total_transaction_obligated_amount` (optional, string) | ||
The field to sort on | ||
|
||
+ Response 200 (application/json) | ||
+ Attributes | ||
+ `results` (required, array[AccountListing], fixed-type) | ||
+ `page_metadata` (required, PageMetadata, fixed-type) | ||
+ Body | ||
|
||
{ | ||
"results": [ | ||
{ | ||
"total_transaction_obligated_amount": 1234.56, | ||
"federal_account": "075-1301", | ||
"account_title": "Bureau of Consumer Financial Protection Fund", | ||
"funding_agency_abbreviation": "NIH", | ||
"funding_agency_name": "National Institutes of Health", | ||
"funding_agency_id": 123 | ||
} | ||
], | ||
"page_metadata": { | ||
"page": 1, | ||
"next": 2, | ||
"count": 4, | ||
"previous": 1, | ||
"hasNext": true, | ||
"hasPrevious": false | ||
} | ||
} | ||
|
||
|
||
# Data Structures | ||
|
||
## PageMetadata (object) | ||
+ `page` (required, number) | ||
+ `next` (required, number, nullable) | ||
+ `count` (required, number) | ||
+ `previous` (required, number, nullable) | ||
+ `hasNext` (required, boolean) | ||
+ `hasPrevious` (required, boolean) | ||
|
||
## AccountListing (object) | ||
+ `total_transaction_obligated_amount` (required, number) | ||
+ `federal_account` (required, string) | ||
+ `account_title` (required, string) | ||
+ `funding_agency_abbreviation` (required, string) | ||
+ `funding_agency_name` (required, string) | ||
+ `funding_agency_id` (required, number) |
26 changes: 26 additions & 0 deletions
26
usaspending_api/api_contracts/contracts/v2/awards/funding_rollup.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FORMAT: 1A | ||
HOST: https://api.usaspending.gov | ||
|
||
# Award Funding Rollup [/api/v2/awards/funding_rollup/] | ||
|
||
This endpoint returns the total transaction obligations and count of awarding agencies, funding agencies, and federal accounts for an award. | ||
|
||
## POST | ||
|
||
+ Request (application/json) | ||
+ Attributes (object) | ||
+ `award_id`: `CONT_AWD_DEAC5206NA25396_8900_-NONE-_-NONE-` (required, string) | ||
+ Response 200 (application/json) | ||
+ Attributes | ||
+ `total_transaction_obligated_amount` (required, number) | ||
+ `awarding_agency_count` (required, number) | ||
+ `funding_agency_count` (required, number) | ||
+ `federal_account_count` (required, number) | ||
+ Body | ||
|
||
{ | ||
"total_transaction_obligated_amount": 42946881.56, | ||
"awarding_agency_count": 27, | ||
"funding_agency_count": 28, | ||
"federal_account_count": 47 | ||
} |
Oops, something went wrong.