sagesharp / foss-heartbeat

(Unmaintained) FOSS Heartbeat analyses the health of a community of contributors. :heartbeat:
https://sarahsharp.github.io/foss-heartbeat/
Other
313 stars 38 forks source link

Negative delta for user error #48

Open emmairwin opened 6 years ago

emmairwin commented 6 years ago

I am trying to figure out why I get merge errors (in different repos) running

python ghstats.py repo name username docs/

Specifically Ive been running into this error which is being called from getRampTime();

('Negative delta for user', 'username', 'for', 'merger', 'on', datetime.datetime(2015, 7, 27, 9, 7, 1)) ('first contribution was on', datetime.datetime(2015, 8, 26, 20, 57, 25), 'file', 'mozilla-l10n/appstores/issue-103339758/comment-135168390.json') Traceback (most recent call last): File "ghstats.py", line 396, in main() File "ghstats.py", line 393, in main createGraphs(args.owner, args.repository, args.htmldir) File "ghstats.py", line 371, in createGraphs os.path.join(repoPath, i[0] + 's-frequency.html')) File "ghstats.py", line 248, in graphFrequency recent = nobots[0][4]

Ryuno-Ki commented 6 years ago

Hi, @emmairwin, I am afraid, I'd need a little bit of help from you … Here's what I did:

cd
cd src
virtualenv foss-heartbeat --python=/usr/bin/python3.5
cd foss-heartbeat
git clone https://github.com/sagesharp/foss-heartbeat.git src
source bin/activate
cd src
pip install -r requirements.txt  # This complained about being only for python 3.4, but went through nonetheless
python ghscraper.py foss-heartbeat sagesharp myaccesstoken  # Obviously myaccesstoken needs to be replaced by yours
python ghcategorize.py foss-heartbeat sagesharp
python ghstats.py foss-heartbeat sagesharp docs/

All of those worked flawlessly.

In order to properly reproduce it I would either need the repo associated with mozilla-l10n/appstores/issue-103339758/comment-135168390.json' or that file itself.

emmairwin commented 6 years ago

yes! I can give you those

for this issue:

https://github.com/mozilla-l10n/appstores https://github.com/mozilla-l10n/styleguides https://github.com/mozilla-l10n/mozilla.org

I ran these commands:

python ghscraper.py appstore mozilla-l10n [mytokenid]

python ghcategorize.py appstores mozilla-l10n

python ghstats.py appstores mozilla-l10n docs/

Ryuno-Ki commented 6 years ago

Confirmed. The Index Error is thrown, because nobots == [] in that case. I am looking into why …

Ryuno-Ki commented 6 years ago

@emmairwin One last thing to help the maintainer fix this issue: Could you upload the following files?

@sagesharp Steps to reproduce: Drop the above files in mozilla-l10n/appstores. Then open a python shell and run:

from ghstats import createGraphs
createGraphs('mozilla-l10n', 'appstores', 'docs/')
emmairwin commented 6 years ago

first-interactions.txt mergers.txt reporters.txt responders.txt reviewers.txt