-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: fixed testing and added more examples #10
Conversation
5c57f78
to
c0bde1d
Compare
cc4ff88
to
4f63716
Compare
4f63716
to
d0e8b89
Compare
@@ -10,7 +10,24 @@ on: | |||
branches: [ "*" ] | |||
|
|||
jobs: | |||
check-linting: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice-to-have but might want to start running mypy and/or pylint at some point as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. For the time being, I like black
because it's uniform, easy to run and doesn't add a lot of complexity. Linting can be painfull on certain behaviours that we normally use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left a few small nits. Awesome work!
result = a[0] + a[1] + a[2] | ||
result = Integer(0) | ||
for i in range(a.shape[0]): # GET ATTR | ||
result += a[i] # GET ITEM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcabrero Does this work nested as well? e.g., a[i][i][i]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the shape is known at compilation time, it can be done, yes.
tests/test_all.py
Outdated
] | ||
|
||
TESTS = [("tests/nada-tests/", test) for test in TESTS] + [ | ||
("examples/" + test, test) for test in EXAMPLES | ||
("examples/" + test + "/", test) for test in EXAMPLES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit but this wouldn't work on Windows --> os.path.join
is probably better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it. I may add tests for Windows, but I think nilup, nada ... do not officially support Windows besides WSL.
tests/test_all.py
Outdated
@@ -79,7 +85,7 @@ def test_run(self, testname): | |||
cwd = os.getcwd() | |||
try: | |||
# Build Nada Program |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, I assume this comment is no longer accurate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks for pointing it out.
d0e8b89
to
4d5a93c
Compare
This PR does 3 things:
a) It creates a new example for broadcasting.
b) It fixes the errors where testing may not have been done because errors where not propagated.
c) It adds a linting check on the actions that can be solved by using:
black .