branch | status |
---|---|
master |
Augur is focused on prototyping open source software metrics.
Functionally, Augur is a prototyped implementation of the Linux Foundation's CHAOSS Project on open source software metrics. Technically, Augur is a Flask web application, Python library and REST server that presents metrics on open source software development project health and sustainability.
For our project, we created three new API endpoints: contributor-affiliation, committer-data, and testing-coverage. We also created a website to view these new metrics, at http://129.114.16.76:8080/home.html .
- Clone this repository into a local directory using
git clone https://github.com/computationalmystic/sengfs19-group11.git
- Follow the 'Getting Started' guide in the Augur documentation to set up out Augur version, stopping before
make install
. - Ensure your virtual environment has been activated and uses python 3.
- Run
pip uninstall gunicorn
, then runpip install gunicorn==19.9.0
. - Run
make install
, opting to install the database schema, load the sample data, and not install front-end dependencies. - Using the database created following Augur's installation guide, enter into the database using
psql
, and add new data into the database using the commandsinsert into augur_data.repo_test_coverage(repo_id, file_subroutines_tested, file_subroutine_count, file_statements_tested, file_statement_count) values (25430, 124, 154, 254, 304)
andinsert into augur_data.repo_test_coverage(repo_id, file_subroutines_tested, file_subroutine_count, file_statements_tested, file_statement_count) values (25432, 354, 354, 463, 602)
- Run
make install
again - To start the API server, run
augur run --no-enable-housekeeper
You may now access your API endpoints on your localhost at port 5000, for instance using http://localhost:5000/api/unstable/repo-groups/20/committer-data
- In a separate terminal windown, naviage into /sengfs19-group11/website
- Ensure your virtual environment is activated.
- run
python3 server.py
You may now access your website at http://localhost:8080/home.html
- created
/website
directory to house the code for our front end, which containshome.html
,one.html
,two.html
,ethnicities.html
,navbar.html
,augur.css
,testData.js
,contributorData.js
,committerData.js
, andserver.py
- changed
commit.py
,routes.py
,test_commit_functions.py
, andtest_commit_routes.py
in/augur/metrics/commit
directory to add the committer-data API endpoint - changed
contributor.py
,routes.py
,test_contributor_functions.py
, andtest_contributor_routes.py
in/augur/metrics/contributor
directory to add the contributor-affiliation API endpoint - changed
insight.py
,routes.py
,test_insight_functions.py
, andtest_insight_routes.py
in/augur/metrics/insight
directory to add the testing-coverage API endpoint - created
sprint-1
,sprint-2
,sprint-3
, andsprint-4
directories to contain all class materials - created
Group 11 Design Doc.pdf
Function and route tests were written for all three new metrics. To verify your functions are working correctly:
- Activate your virtual environment (ex:
source augur_env/bin/activate
) - Run
pip install pytest-timeout
- Navigate into the
sengfs19-group11
directory - Run the tests for your desired metric:
- committer-data:
pytest augur/metrics/commit/test_commit_functions.py::test_committer_data
pytest augur/metrics/commit/test_commit_routes.py::test_committer_data --timeout=300
- contributor-affiliation:
pytest augur/metrics/contributor/test_contributor_functions.py::test_contributor_affiliation
pytest augur/metrics/contributor/test_contributor_routes.py::test_contributor_affiliation
- testing-coverage
pytest augur/metrics/insight/test_insight_functions.py::test_testing_coverage
pytest augur/metrics/insight/test_insight_routes.py::test_testing_coverage
- The maps should populate with pins at contributor locations when opening the home page. Locations can be confirmed by viewing the contributors' city in the location API.
- The pie charts and table in each repo group will appear after a load time. This can again be confirmed by comparing the diversity API against the table.
- The testing coverage meters are easily checked with doing a percentage calculation from the API.
Copyright © 2019 University of Nebraska at Omaha, University of Missouri and CHAOSS Project at the Linux Foundation
Augur is free software: you can redistribute it and/or modify it under the terms of the MIT License as published by the Open Source Initiative. See the LICENSE file for more details.
This work has been funded through the Alfred P. Sloan Foundation.