#This repository is archived and deprecated. Please see the USDS Agile Solicitation Builder for current updates.
The intent of this tool is to assist in the creation of requirements documents for agile software development using best practices from the USDS Playbook and TechFAR. In the alpha release the tool can help Contracting Officer working with Program Managers develop an RFQ for a firm-fixed price procurement.
Clone the repository
git clone https://github.com/18F/agile-solicitation-builder.git
Create a virtual environment with Python 3.5.1
To create a virtualenv setup on mac check out this gist.
# pyenv install 3.5.1
pyenv local 3.5.1
mkvirtualenv asb
pip install -r requirements.txt
If you do not have postgresql installed run:
brew install postgres
initdb /usr/local/var/postgres
To create an app database run:
createdb your_database_name
export DATABASE_URL=postgresql://localhost/your_database_name
Replacing your_database_name
with the db you'd like.
You can then seed the database by running:
flask -a server.py seed_db
If you plan on developing the front-end, make sure you have npm installed (brew install npm
). Then run:
cd app
npm install
npm install -g gulp
gulp
cd ..
From the root directory of the project run
python server.py
When performing any front-end changes please run gulp developing
.
To add a new "questions" page (all pages are listed in the right sidebar):
-
Create a new file in the questions folder.
-
See
XX_sample.js
to get an idea of what needs to be included in a page.
-
Update the states to reflect the data fields you would like to collect on the page. (On line 6)
-
Update the page number to order in the questions list on line 12. (This will need to match the custom components in the backend)
-
Update the name of the
React class
(line 14) toComponentName
(reflecting your component) and change that to the same on line 74. -
Update the render function to reflect your states that need to be changed, and add additional components as needed. (Lines 55-70)
-
To make the page visible in and accessible from the side bar you must add it to
question_list.js
. -
Make sure you have run
gulp
or are runninggulp developing
to update the resulting javascript file. -
Update the
create_document.py
file.
- Add a function to add the custom text:
def component_name(document, rfq):
document.add_heading("XX. Name of Section", level=BIG_HEADING)
component_name = session.query(ContentComponent).filter_by(document_id=rfq.id).filter_by(section=XX).first()
document.add_paragraph(component_name.text)
return document
Add additional dictionary in the content_components list in seed.py
, for each additional field (state on the front end)
You will likely need to run seed.py or add sample text to the database to prevent API errors. In the future, these errors will be handled.
- and add a line in the
create_document
function
document = component_name(document, rfq)
- Add the section to the
section
array in theoverview
function
-
Delete the corresponding page file from the questions folder
-
Remove the reference to the question from
question_list.js
. -
Remove the reference from seed.py.
-
Remove the function from the
create_document.py
file and thecreate_document
function of the same file, and from thesection
variable in theoverview
function.
Content that can be modified is created in seed.py. There are 3 types of content, ContentComponents, CustomComponents, and Deliverables. Content types are declared in models.py
.
To remove content you need to both remove the content object from seed.py and if it is referenced by name on a page you need to remove that reference. CustomComponents are not referenced individually so this second step is not necessary.
Please note that any documents created prior to the removal or addition of new content will be incompatible and will break the site so they should be deleted as soon as the changes go live.
The code for the API can be found in server.py
. Each "questions" page (found in the "questions" folder) calls a function in helpers.js
. which in turn sends an ajax request to server.py
which sends the request to the database.
This is managed in the file create_document.py
. Currently everything is added to the document manually.
This project uses the following node modules:
- babel-preset-react
- babelify
- browserify
- gulp
- gulp-notify
- gulp-rename
- history
- react
- react-bootstrap
- react-dom
- react-flexbox
- react-router
- reactify
- vinyl-source-stream
- watchify
This project is in the worldwide public domain. As stated in CONTRIBUTING:
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.