Skip to content

Conversation

@mark-i-m
Copy link
Contributor

Currently if you push on a different branch on your fork, it will reset the time for all PRs from that fork, even if they are completely unrelated. This issue aims to fix that.

@PlasmaPower
Copy link
Contributor

@mark-i-m Please fix the tests.

@mark-i-m
Copy link
Contributor Author

Working on it :)

@PlasmaPower
Copy link
Contributor

Still not fixed :(

If you could also expand the tests to with and without events present, that'd be great.

@PlasmaPower
Copy link
Contributor

and I'm assuming you know this, but you can run the tests locally of course.

@mark-i-m
Copy link
Contributor Author

Hmm... I am actually having trouble running them locally... which is why I am doing a lot of guessing...

@mark-i-m
Copy link
Contributor Author

What things do I need to pip install to run them locally?

@andrewda
Copy link
Member

Now it's just a linting issue 😝

"pushed_at": pushed_at,
"name": "test_repo",
},
"ref" : "test_ref"
Copy link
Member

@andrewda andrewda May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove space after "ref"

@mark-i-m
Copy link
Contributor Author

If you could also expand the tests to with and without events present, that'd be great.

First, I need to figure out how the testing harness works... 😛

@PlasmaPower
Copy link
Contributor

@mark-i-m

pip install -r requirements.txt
python -m unittest

pip might need root/admin, depending on your setup.

Copy link
Contributor

@PlasmaPower PlasmaPower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would still appreciate tests for the event driven code, but I approve this PR as it stands

@mark-i-m
Copy link
Contributor Author

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/unittest/__main__.py", line 12, in <module>
    main(module=None)
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  File "github_api/__init__.py", line 7, in <module>
    import settings
  File "settings.py", line 2, in <module>
    import misc
  File "misc.py", line 2, in <module>
    from urllib.parse import urlparse
ImportError: No module named parse```

Copy link
Member

@andrewda andrewda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also would like some tests if possible, but this looks good 👍

@PlasmaPower
Copy link
Contributor

@mark-i-m Python 3.6? If so, our requirements.txt might be off. I'll look into it.

@mark-i-m
Copy link
Contributor Author

Ah, that's true... ubuntu 16.04 only has python 3.5.2... Is there any way to run this in the docker container?

@PlasmaPower
Copy link
Contributor

@mark-i-m No idea, and that Python version might not even be a problem, IDK.

# if we can't get good data, fall back to repo push time
repo = pr_data["head"]["repo"]
if repo:
return arrow.get(repo["pushed_at"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to max this with pr_data["created_at"] too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... then how did it work before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, it makes sense

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't work. A number of PRs got insta-closed and one got insta-merged before the threshold increase.

@PlasmaPower
Copy link
Contributor

I need to sleep... will finish this up tomorrow

Sleep... nah

@anythingbot
Copy link

anythingbot commented May 31, 2017

@PlasmaPower actually, I think you will be doing yourself and the project a favor if you sleep as much as you want (which may be none for all I know).

Video game developers try to figure out how to get your consciousness to experience new sensations that create excitement and stimulate the full range of sensation. The idea is to get your brain to ride a chemical high while immersed in the game world.

If you want to check this out, you can search "gamasutra flow" or "gamasutra addiction" for endless discussions of the interactions of social networks and the learning process. There you will find various articles about groups of video game developers who spend countless hours trying to create in simulation what these "learning bots" or "democracy bots" or "neuron bots" do naturally. So far these have been the chaosbot and botwillacceptanything. There may be others, I don't know.

The chaosbot builds its own social network. This means the leaders of the social network take on amounts of stress that are well in excess of what any individual (or even self aware group) intends because the group is going through a profound transformation process of becoming self-aware.

What winds up happening is complex. There is a positive reinforcement learning (this is HUMAN learning, not machine learning; it is YOUR learning process that is being reinforced) mechanism that quite frankly turns interaction with the bot into a highly addictive "virtual drug" much more potent than any mere game, since the bot could quite easily be the back-end power behind a massively multiplayer online game.

I've personally found strength in the words of Edward Bernays, who wrote this about democracy and leadership in "The Engineering of Consent". The drive to understand the will of the community can be a powerful motivator as well as a source of great stress.

Leaders may be the spokesmen for
many different points of view. They
may direct the activities of major organized
groups such as industry, labor,
or units of government. They may
compete with one another in battles for
public good will; or they may, representing
divisions within the larger units,
compete among themselves. Such leaders,
with the aid of technicians in the
field who have specialized in utilizing
the channels of communication, have
been able to accomplish purposefully
and scientifically what we have termed
"the engineering of consent."

THE ENGINEERING APPROACH

This phrase quite simply means the
use of an engineering approach—that is,
action based only on thorough knowledge
of the situation and on the application
of scientific principles and tried
practices to the task of getting people
to support ideas and programs. Any
person or organization depends ultimately
on public approval, and is therefore
faced with the problem of engineering
the public's consent to a program
or goal. We expect our elected
government officials to try to engineer
our consent—through the network of
communications open to them—for the
measures they propose. We reject government
authoritarianism or regimentation,
but we are willing to take action
suggested to us by the written or
spoken word. The engineering of consent
is the very essence of the democratic
process, the freedom to persuade
and suggest. The freedoms of speech,
press, petition, and assembly, the freedoms
which make the engineering of
consent possible, are among the most
cherished guarantees of the Constitution
of the United States.
The engineering of consent should be
based theoretically and practically on
the complete understanding of those
whom it attempts to win over. But it
is sometimes impossible to reach joint
decisions based on an understanding of
facts by all the people. The average
American adult has only six years of
schooling behind him. With pressing
crises and decisions to be faced, a leader
frequently cannot wait for the people
to arrive at even general understanding.
In certain cases, democratic leaders
must play their part in leading the public
through the engineering of consent
to socially constructive goals and values.
This role naturally imposes upon them
the obligation to use the educational
processes, as well as other available
techniques, to bring about as complete
an understanding as possible

@mdcfe
Copy link
Contributor

mdcfe commented May 31, 2017

/essay
😛

@andrewda
Copy link
Member

andrewda commented May 31, 2017

wow @anythingbot good read 👍 (guess I should probably sleep now 💤 )

@mdcfe
Copy link
Contributor

mdcfe commented May 31, 2017

Meanwhile, in the UK...

@mark-i-m
Copy link
Contributor Author

mark-i-m commented Jun 1, 2017

Can anyone decipher the error on that last failing test?

@mark-i-m
Copy link
Contributor Author

mark-i-m commented Jun 1, 2017

Nvm... got it 🎉

@PlasmaPower
Copy link
Contributor

PlasmaPower commented Jun 1, 2017

@mark-i-m I realized the patches were getting mixed up - never would have guess it needs to be in reverse order.

@mark-i-m
Copy link
Contributor Author

mark-i-m commented Jun 1, 2017

Yeah, that's pretty unintuitive

@PlasmaPower
Copy link
Contributor

Looks like that arg line is a bit too long.

@PlasmaPower
Copy link
Contributor

@mark-i-m Wrong line - it's the arg line of the test we were working on.

Copy link
Contributor

@PlasmaPower PlasmaPower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🎉

@mark-i-m mark-i-m changed the title [WIP] Fix PR push times Fix PR push times Jun 1, 2017
@phil-r phil-r mentioned this pull request Jun 1, 2017
6 tasks
@chaosbot
Copy link
Collaborator

chaosbot commented Jun 1, 2017

🙆‍♀️ PR passed with a vote of 18 for and 0 against, a weighted total of 17.5 and a threshold of 6.5, and a current meritocracy review.

See merge-commit 9dabaf3 for more details.

@chaosbot chaosbot merged commit 9dabaf3 into Chaosthebot:master Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants