Граф коммитов

71 Коммитов

Автор SHA1 Сообщение Дата
Marco Castelluccio 8e581d57f7 Use flake8 configuration suggested by black 2023-04-17 12:12:56 +02:00
ElusiveEllie 8936218ab2
Refactor print statements to use logger (#3330) 2023-03-14 17:54:15 +01:00
Amotul-Raheem Olajide 98f841de35
Add nom metric (#3115) 2022-10-14 11:46:16 -04:00
tuncbkose 4a71c48f6b
Add more Halstead metrics (#2372) 2022-10-11 18:57:31 -04:00
Marco Castelluccio 51304e6d07 Skip fake reviewers also when there are real reviewers in the list 2021-08-31 20:47:44 +02:00
Gokul Viswanath 99b1c0e17e
Add Blank Metric (#2203)
Fixes #1482
2021-04-08 16:58:53 +02:00
Gokul Viswanath 2d7c53f276
Add Mi metric (#2207)
Fixes #1448.
2021-03-08 13:50:14 +01:00
Marco Castelluccio fc2c37849d Bring back storing functions touched by commits
Fixes a regression from 43e1ad10ee
2021-02-03 12:44:41 +01:00
Marco Castelluccio 43e1ad10ee
Add diff in complexity metrics to the features (#2088)
Fixes #1190
2021-01-11 17:19:32 +01:00
Marco Castelluccio 98667effbb
Add function-level complexity metrics (#2073)
Fixes #1314
2021-01-07 22:15:38 +01:00
Marco Castelluccio 9f313eea28 Fix a off-by-one error in touched function detection 2021-01-06 18:36:15 +01:00
Marco Castelluccio 0b707ec1d9 Don't consider all functions with the same name as touched by a commit when only one of them is 2021-01-06 18:24:22 +01:00
Marco Castelluccio dff8e1d6bf Add a simple test for repository.get_metrics 2021-01-06 13:45:22 +01:00
Marco Castelluccio 916bde5120 Add a test to ensure fields expected by commit_features functions are actually present in the commit dict 2021-01-06 13:44:14 +01:00
Marco Castelluccio 161488da56 Don't consider some special r= keywords as actual reviewers 2020-12-09 02:04:32 +01:00
Marco Castelluccio bfeecc60d2 Store coverage statistics (added coverable lines, covered lines, unknown coverage lines) in the commit data
Part of #1197
2020-11-19 01:02:12 +01:00
Marco Castelluccio 9ede8db0e0 Add a method to retrieve a Phabricator revision ID from a commit 2020-10-05 12:02:35 +02:00
Marco Castelluccio 80d2e6262b Fix some new linting errors appearing with the new versions of the linters 2020-08-27 16:19:02 +02:00
Marco Castelluccio 73c64abd81 Switch back to using push date to calculate experiences
Partial revert of 5c61636ffc

Fixes #1735
2020-07-28 15:37:12 +02:00
Marco Castelluccio a355125673 Stop storing commits' dates
We are only using push dates.
2020-07-17 16:07:16 +02:00
Marco Castelluccio 5c61636ffc Stop relying on push date to calculate experiences 2020-07-17 15:29:17 +02:00
Marco Castelluccio d7170c5c3e
Make download_commits not analyze all commits when the list of commits to analyze is empty (#1691)
Fixes #1690
Fixes a regression from b5a194a17e
2020-07-14 14:59:56 +02:00
Lucky Sivagurunathan e9aa7d9909
Add tests for the repository.get_commits function (#1674)
Fixes #383
2020-07-10 21:54:44 +02:00
Marco Castelluccio f131785b9b Directly pass all revs to hg.log instead of a rev range 2020-06-02 00:45:44 +02:00
Marco Castelluccio cd92e910eb Don't update repository after cloning it
Fixes #1542
2020-05-05 16:46:46 +02:00
Marco Castelluccio f659c7c9d7 Store all commits, even ignored ones, in the commits DB
We ignore them at runtime, so users which need them can still use them.
Note: the ignored commits are still not analyzed, only their metadata
is stored in the DB.
2020-04-29 13:40:15 +02:00
Marco Castelluccio c7a8470a66 Test set_commits_to_ignore without ignoring commits with no linked bug 2020-04-28 21:30:42 +02:00
Marco Castelluccio edf5bacebd Store hashes of commits which are backed out by backouts
This greatly simplifies the code to find commits to ignore for the regressor finder.
2020-04-28 21:29:56 +02:00
Marco Castelluccio c5726cc5e5 Don't update working copy of the repository
Unless necessary (in the commit classifier script, where we are currently
"manually" applying patches from Phabricator).

Fixes #1469
2020-04-22 13:29:02 +02:00
Marco Castelluccio 9c645e35b6 Read the .hg-annotate-ignore-revs file using hg.cat
This was the only file we were reading directly from the repository
working directory, and we need to avoid reading directly from it in
order to be able to do clone without updating (#1469).
2020-04-22 13:27:30 +02:00
Marco Castelluccio dcef895196
Use a single API call to rust-code-analysis to get both functions and metrics (#1468)
Fixes #1453
2020-04-09 16:24:33 +02:00
Marco Castelluccio 4438ede7c3 No need to create a branch in the repository tests 2020-04-08 02:28:48 +02:00
Marco Castelluccio 686b5cf520 Add a test for repository.clone 2020-03-21 13:35:24 +01:00
Marco Castelluccio b5a194a17e Make the commits mining function accept either a start revision or a set of revisions to analyze
This way for test scheduling we can directly pass the revs and avoid
an additional Mercurial exection.

Ref #1422
2020-03-21 12:57:12 +01:00
Marco Castelluccio 6410b9c12c Skip empty paths when setting files modified by a commit
It can happen in empty commits.
2020-03-19 21:34:49 +01:00
Marco Castelluccio 56a77db4a8 Open a different LMDB database handle in each process which is going to access it 2020-03-19 17:02:50 +01:00
Marco Castelluccio e5cec94e30 Store file-to-component mapping in a LMDB database instead of keeping it in memory
This reduces the peak memory usage while mining commits by ~150 MB.

Should help with #1374
2020-03-18 23:39:34 +01:00
Marco Castelluccio 3993e7ec49 Don't redownload the component mapping file 2020-03-13 19:55:00 +01:00
Marco Castelluccio 5656b422a3 Add an option to use a single process for mining commits 2020-03-13 17:18:37 +01:00
Marco Castelluccio 42046cd0a0 Use shelve with LMDB instead of Pickle to store commit experiences
Fixes #1034
2020-03-04 15:42:02 +01:00
Marco Castelluccio 94151c2613 Add a test for calculate_experiences with save=False 2020-03-04 14:27:59 +01:00
Marco Castelluccio c479ab2c26
Improvements for getting touched functions in JavaScript code (#1187)
* Skip error entries and anonymous functions right away

* Add a few comments to explain get_touched_functions

* Don't stop at the first function containing a line

To support functions which are defined inside other functions.

* Skip a function when it has already been added to the set

* Add some get_touched_functions tests with JavaScript code
2019-12-19 12:15:40 +01:00
Marco Castelluccio 75d9ccb41c
Get functions touched by line deletions too (#1181)
Also add a test for get_touched_functions

Fixes #1163
2019-12-17 10:10:19 +01:00
Marco Castelluccio b965438f8b Update passthru URL for repository test
Needed because of 61983f6637
2019-12-11 15:46:44 +01:00
Marco Castelluccio b7a17d323c
Collect information about functions while analyzing commits (#1161)
Pre-requisite for #1133 and part of #372
2019-12-10 13:22:55 +01:00
Marco Castelluccio 61ea0c3125 Initialize path_to_component to an empty dict in the hg_modified_files test 2019-12-08 13:39:39 +01:00
Marco Castelluccio 7d99fa660e Fix expected reviewers values in the repository test
Regression from 7888356b50
2019-11-21 23:17:19 +01:00
Marco Castelluccio bd10150993 Update component mapping URL mocks
Related to 3fb8cc051f
2019-11-20 01:16:09 +01:00
Brian Stack f54149cd90 Update .taskcluster.yml for community cluster (#1076) 2019-11-08 22:13:10 +01:00
Horacio Gonzalez 367f993144 Move exp_queue from repository.py to utils.py (#974)
Fixes #971
2019-09-25 15:52:37 +02:00