Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative delta for user error #48

Open
emmairwin opened this issue Feb 15, 2018 · 5 comments
Open

Negative delta for user error #48

emmairwin opened this issue Feb 15, 2018 · 5 comments

Comments

@emmairwin
Copy link

emmairwin commented Feb 15, 2018

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]

  • It appears to be because nextDate - startDate has a negative value.
  • If I remove the offending username records from merge.txt this error does go away, but I end up with another - which means I'm not solving anything :)
  • This user for what it's worth, is a staff member (thus frequently listed), I've only seen this with staff name so far, which makes me wonder if there's it's related to a slightly different way of working (and first arrival logic).
@Ryuno-Ki
Copy link

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
Copy link
Author

emmairwin commented Feb 16, 2018

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
Copy link

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

@Ryuno-Ki
Copy link

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

  • mozilla-l10n/appstores/first-interactions.txt
  • mozilla-l10n/appstores/responders.txt
  • mozilla-l10n/appstores/mergers.txt
  • mozilla-l10n/appstores/reporters.txt
  • mozilla-l10n/appstores/reviewers.txt

@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
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants