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

Minor updates #1

Merged
merged 7 commits into from Jun 19, 2013
Merged

Minor updates #1

merged 7 commits into from Jun 19, 2013

Conversation

@jpf
Copy link
Contributor

jpf commented Jun 17, 2013

I added a .gitignore, because it's useful.

I use virtualenv, so I added a requirements.txt file so that I can do a pip install -r requirements.txt to get PIL

I also also changed the comments in sstv.py to reflect the explanations that you put in README.md - they are much more clear and very useful to see in the code.

.gitignore Outdated
@@ -0,0 +1,2 @@
*.py[cod]

This comment has been minimized.

This comment has been minimized.

@jpf

jpf Jun 18, 2013 Author Contributor

I added these because it seems to be convention for the projects that I've seen. That said, I'll take your advice to set up a global gitignore and remove the .gitignore from my pull request.

.gitignore Outdated
@@ -0,0 +1,2 @@
*.py[cod]
venv

This comment has been minimized.

@dnet

dnet Jun 18, 2013 Owner

this should go to your local gitignore in .git/info/exclude since the code doesn't refer to venv anywhere, so I assume you used it to store a virtual environment or something like that

def test_gen_samples(self):
gen_values = self.s.gen_samples()
# I expected to need this, but I don't? Not in this instance?
# sstv.random = Mock(return_value=0.4) # xkcd:221

This comment has been minimized.

@dnet

dnet Jun 18, 2013 Owner

It requires random because I avoided quantization noise using additive noise, so there's always a chance of running the code two consecutive times on the same machine and having different results, but only by ±1. If you'd like to do tests like this, it'd be better to initialize random (within the SSTV class) in a way that the output is predictable.

This comment has been minimized.

@jpf

jpf Jun 18, 2013 Author Contributor

Ah, very cool. Thanks for letting me know. This project is my first exposure to digital signal processing, so I'm learning as I go along.

expected = 'bf61c82e96aed1370d5c1753d87729db'
data = sio.getvalue()
hash = hashlib.md5()
hash.update(data)

This comment has been minimized.

@dnet

dnet Jun 18, 2013 Owner

hashlib.md5(data) would've achieved the same

@dnet
Copy link
Owner

dnet commented Jun 18, 2013

Thanks for the pull request, I agree with most of it. I put some comments in the code, if you could deal with those, I'll merge your branch.

@jpf
Copy link
Contributor Author

jpf commented Jun 18, 2013

Cool! I'll make the changes you've suggested and send you a pull request when I do.

@jpf
Copy link
Contributor Author

jpf commented Jun 18, 2013

Alright. Updates made. Let me know if I missed anything.

dnet added a commit that referenced this pull request Jun 19, 2013
@dnet dnet merged commit f14d0a8 into dnet:master Jun 19, 2013
@dnet dnet added the enhancement label Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.