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

Add numpy example #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .style.yapf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[style]
COLUMN_LIMIT = 119
INDENT_WIDTH = 4
USE_TABS = False
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ cache:
- pip
- bundler
install:
- bundle install
- pip install -r requirements.txt
- bundle install
script:
- bundle exec danger
- python hello_world.py
- bundle exec danger
- python hello_world.py
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/robertodr/danger-code_style_validation.git
revision: de63c3daee20a8611a6216ac35e77327eba5cd50
revision: 6978bba01500f30294aab14db9c36298979f7d5b
branch: yapf
specs:
danger-code_style_validation (0.2.0)
Expand Down
7 changes: 7 additions & 0 deletions hello_world.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
def vector(dim):
import numpy as np


return np.random.rand(dim)

def message():
return 'Hello, Danger world!'

def main():
print(message())
print(vector(10))

if __name__ == '__main__':
main()
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yapf
futures