Code Monkey home page Code Monkey logo

rockstar's Issues

Make it skip some days randomly

Idea - it can take float parameter from user and that will be the fraction of days that user wants to skip randomly from the total number of days user has mentioned.

I can take it up immediately. Just want to make sure, you are still maintaining it and merging PRs @avinassh

gitdb.utils.compat - Not found

Trying to run this myself... After trying to import RockStar, I get the following traceback:

  File "/home/dio/.local/lib/python3.7/site-packages/git/compat.py", line 12, in <module>
    from gitdb.utils.compat import (
ModuleNotFoundError: No module named 'gitdb.utils.compat'

From a google search result, I found this. Maybe the GitPython version just needs to be updated?

Can't update number of days

I used it to make 300 days commit history and then on the same directory used it for 900 days , but it kept with original 300 days , and now no body will hire me 😱 😜

FileNotFoundError after using "rock_it_bro.make_me_a_rockstar()"

Hi:
I installed rockstar today by using "pip install rockstar". It succeed and I can see the "rockstar" is in C:\Python34\Lib\site-packages now.

Then I run

from rockstar import RockStar

rock_it_bro = RockStar(days=300)
rock_it_bro.make_me_a_rockstar()

in my python 3.4 command line.

First two lines work well , and I can print the rock_it_bro(<rockstar.RockStar.RockStar object at 0x01015870>).
But the third lines makes some errors as follow:

>>> rock_it_bro
<rockstar.RockStar.RockStar object at 0x01015870>
>>> rock_it_bro.make_me_a_rockstar()
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\git\cmd.py", line 573, in execute
    **subprocess_kwargs
  File "C:\Python34\lib\subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "C:\Python34\lib\subprocess.py", line 1112, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python34\lib\site-packages\rockstar\RockStar.py", line 65, in make_me
_a_rockstar
    self.repo = git.Repo.init(self.repo_path)
  File "C:\Python34\lib\site-packages\git\repo\base.py", line 764, in init
    git.init(**kwargs)
  File "C:\Python34\lib\site-packages\git\cmd.py", line 440, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "C:\Python34\lib\site-packages\git\cmd.py", line 810, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "C:\Python34\lib\site-packages\git\cmd.py", line 576, in execute
    raise GitCommandNotFound(str(err))
git.exc.GitCommandNotFound: The system cannot find the file specified.
>>>

How can I fix it?
Thank you~

Doesn't work when git config is locally set

I executed the program and it created commits using my username and my machine name as the email id which git would never recognise as my commits.

I had to setup the user.name and user.email globally to get the commits on my name.

I don't know how this can be fixed, maybe by asking for params in the program itself?

But this was very annoying!

Make real code commits instead of random string

Currently the code commits random strings in code file and in commit message (uuid.uuid1). Instead it should write some real code and commit it with an intelligent commit message.

here's how I am thinking to implement: find some popular libraries (with MIT License), maintain a directory of those snippets and copy the code from it with commit message.

Idea originally suggested by Laurentvw on HN.

Not much of a rockstar here

can anyone tell me where im going wrong?

running python 3.4

when i run the example module.... i get an error like this

Traceback (most recent call last):
File "/Users/user/Desktop/rockstar/example.py", line 1, in
from RockStar import RockStar
File "/Users/user/Desktop/rockstar/RockStar/init.py", line 9, in
import git
ImportError: No module named 'git'

Gives the following error when I run it in pycharm

/Users/irateleaf/PycharmProjects/Demo/venv/bin/python /Users/irateleaf/PycharmProjects/Demo/venv/LetsDoIt.py
Making you a Rockstar Programmer
Making you a Rockstar Programmer
Traceback (most recent call last):
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 137, in _get_ref_info
fp = open(join(repo.git_dir, ref_path), 'rt')
FileNotFoundError: [Errno 2] No such file or directory: '/Users/irateleaf/PycharmProjects/Demo/venv/.git/refs/heads/master'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 91, in _iter_packed_refs
fp = open(cls._get_packed_refs_path(repo), 'rt')
FileNotFoundError: [Errno 2] No such file or directory: '/Users/irateleaf/PycharmProjects/Demo/venv/.git/packed-refs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 111, in _iter_packed_refs
raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/irateleaf/PycharmProjects/Demo/venv/LetsDoIt.py", line 4, in
rock_it_bro.make_me_a_rockstar()
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/rockstar/RockStar.py", line 85, in make_me_a_rockstar
self._edit_and_commit(str(uuid.uuid1()), commit_date)
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/rockstar/RockStar.py", line 65, in _edit_and_commit
self.repo.index.commit(self._get_random_commit_message())
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/index/base.py", line 924, in commit
head, author=author, committer=committer)
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/objects/commit.py", line 299, in create_from_tree
parent_commits = [repo.head.commit]
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 183, in _get_commit
obj = self._get_object()
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 176, in _get_object
return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 125, in dereference_recursive
hexsha, ref_path = cls._get_ref_info(repo, ref_path)
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 148, in _get_ref_info
for sha, path in cls._iter_packed_refs(repo):
RuntimeError: generator raised StopIteration

Process finished with exit code 1

Command line interface

Instead of writing a script, I could really like something that can be called from the command line. Since most of the functionality is done, this can be achieved easily with the proper arguments.

Gives an error while running the lines of code provided in the readme

/Users/irateleaf/PycharmProjects/Demo/venv/bin/python /Users/irateleaf/PycharmProjects/Demo/venv/LetsDoIt.py
Making you a Rockstar Programmer
Making you a Rockstar Programmer
Traceback (most recent call last):
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 137, in _get_ref_info
fp = open(join(repo.git_dir, ref_path), 'rt')
FileNotFoundError: [Errno 2] No such file or directory: '/Users/irateleaf/PycharmProjects/Demo/venv/.git/refs/heads/master'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 91, in _iter_packed_refs
fp = open(cls._get_packed_refs_path(repo), 'rt')
FileNotFoundError: [Errno 2] No such file or directory: '/Users/irateleaf/PycharmProjects/Demo/venv/.git/packed-refs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 111, in _iter_packed_refs
raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/irateleaf/PycharmProjects/Demo/venv/LetsDoIt.py", line 4, in
rock_it_bro.make_me_a_rockstar()
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/rockstar/RockStar.py", line 85, in make_me_a_rockstar
self._edit_and_commit(str(uuid.uuid1()), commit_date)
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/rockstar/RockStar.py", line 65, in _edit_and_commit
self.repo.index.commit(self._get_random_commit_message())
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/index/base.py", line 924, in commit
head, author=author, committer=committer)
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/objects/commit.py", line 299, in create_from_tree
parent_commits = [repo.head.commit]
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 183, in _get_commit
obj = self._get_object()
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 176, in _get_object
return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 125, in dereference_recursive
hexsha, ref_path = cls._get_ref_info(repo, ref_path)
File "/Users/irateleaf/PycharmProjects/Demo/venv/lib/python3.7/site-packages/git/refs/symbolic.py", line 148, in _get_ref_info
for sha, path in cls._iter_packed_refs(repo):
RuntimeError: generator raised StopIteration

Process finished with exit code 1

just can't work ,why?

from rockstar import RockStar
rock_it_bro = RockStar(days=300)
rock_it_bro.make_me_a_rockstar()//started going wrong

Traceback (most recent call last):
File "C:\Python34\lib\site-packages\git\cmd.py", line 573, in execute
**subprocess_kwargs
File "C:\Python34\lib\subprocess.py", line 859, in init
restore_signals, start_new_session)
File "C:\Python34\lib\subprocess.py", line 1112, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] System can not find the file specified.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Python34\lib\site-packages\rockstar\RockStar.py", line 81, in make_m
_a_rockstar
self.repo = git.Repo.init(self.repo_path)
File "C:\Python34\lib\site-packages\git\repo\base.py", line 764, in init
git.init(*_kwargs)
File "C:\Python34\lib\site-packages\git\cmd.py", line 440, in
return lambda *args, *_kwargs: self._call_process(name, _args, *_kwargs)
File "C:\Python34\lib\site-packages\git\cmd.py", line 810, in _call_process
return self.execute(make_call(), **_kwargs)
File "C:\Python34\lib\site-packages\git\cmd.py", line 576, in execute
raise GitCommandNotFound(str(err))
git.exc.GitCommandNotFound: [WinError 2] System can not find the file specified.

somebody can help me ,thx

Not working

Can somebody please tell me where am I going wrong?

pip install rockstar

then I made the script mentioned in the README
and on runnning that script with python3 it says:

ImportError: No module named rockstar

Launch rockstar

Traceback (most recent call last):
File "/usr/local/bin/rockstar", line 9, in
load_entry_point('rockstar==0.5', 'console_scripts', 'rockstar')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/Library/Python/2.7/site-packages/rockstar/init.py", line 1, in
from .RockStar import RockStar
File "/Library/Python/2.7/site-packages/rockstar/RockStar.py", line 11, in
import git
File "/Library/Python/2.7/site-packages/git/init.py", line 6, in
from repository import Repository, InvalidRepositoryError
File "/Library/Python/2.7/site-packages/git/repository.py", line 11, in
from objects import Commit
File "/Library/Python/2.7/site-packages/git/objects/init.py", line 10, in
from .submodule import util as smutil
File "/Library/Python/2.7/site-packages/git/objects/submodule/util.py", line 3, in
from git.config import GitConfigParser
ImportError: cannot import name GitConfigParser

Hello,

I've just install rockstar, but when I try to launch rockstar, i've got an error about a GitConfigParser ?

Any ideas ?

Max.

Does not support Rasberry PI

I laughed when I saw this and wondered if it ran on my raspberry pi; Tried this on a rasberry pi and the version it installs does not work. :(

pi@raspberrypi ~/github/rockstar/lol/rockstar/RockStar $ python3 init.py
Traceback (most recent call last):
File "init.py", line 9, in
import click
File "/usr/local/lib/python3.2/dist-packages/click/init.py", line 18, in
from .core import Context, BaseCommand, Command, MultiCommand, Group,
File "/usr/local/lib/python3.2/dist-packages/click/core.py", line 8, in
from .types import convert_type, IntRange, BOOL
File "/usr/local/lib/python3.2/dist-packages/click/types.py", line 7, in
from .exceptions import BadParameter
File "/usr/local/lib/python3.2/dist-packages/click/exceptions.py", line 2, in
from .utils import echo
File "/usr/local/lib/python3.2/dist-packages/click/utils.py", line 301
file.write(u'\n')
^
SyntaxError: invalid syntax

"from: can't read /var/mail/rockstar"

Hey,

Tried playing with this but getting this error when typing

I've done sudo pip install rockstar and all requirements are satisfied.
I've also installed python 3.6, and gitpython.

So I'm doing git init then cd to ~/.git/
There trying to from rockstar import RockStar and getting the error from: can't read /var/mail/rockstar.

Any idea of what I'm f*cking up ?

Add Other Languages

In the beginning was the word.
^
Expected "&", "'n'", "(", "*", "+", ", and", ",", "-", "/", "=", "\n", "\r", "ain't", "aint", "and", "are ", "at", "between ", "is ", "is", "minus ", "nor", "of ", "or", "over ", "plus ", "says ", "takes", "taking", "times ", "was ", "were ", "with ", "without ", [ \t], [;,?!&.], or [A-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĸĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽ] but "t" found.
line 1 col 4

import broken

I am getting this error:
ImportError: cannot import name 'RockStar'

Error trying to install

Error and traceback:

Downloading/unpacking rockstar
  Downloading rockstar-0.3-py2-none-any.whl
Downloading/unpacking gitpython==1.0.1 (from rockstar)
  Running setup.py (path:c:\users\adrin~1\appdata\local\temp\pip_build_Adrißn\gitpython\setup.py) egg_info for package gitpython
    W:\DEV\Python2X\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'test_requirements'
      warnings.warn(msg)

    warning: no files found matching 'README'
Cleaning up...
Exception:
Traceback (most recent call last):
  File "W:\DEV\Python2X\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "W:\DEV\Python2X\lib\site-packages\pip\commands\install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "W:\DEV\Python2X\lib\site-packages\pip\req.py", line 1234, in prepare_files
    req_to_install.assert_source_matches_version()
  File "W:\DEV\Python2X\lib\site-packages\pip\req.py", line 464, in assert_source_matches_version
    % (display_path(self.source_dir), version, self))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 60: ordinal not in range(128)

Traceback (most recent call last):
  File "W:\DEV\Python2X\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "W:\DEV\Python2X\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "W:\DEV\Python2X\Scripts\pip.exe\__main__.py", line 9, in <module>
  File "W:\DEV\Python2X\lib\site-packages\pip\__init__.py", line 185, in main
    return command.main(cmd_args)
  File "W:\DEV\Python2X\lib\site-packages\pip\basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 75: ordinal not in range(128)

Running Python 2.7.9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.