Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

A bit of cleanup / infrastructure#1

Closed
cdeil wants to merge 8 commits into
lpaioro:sampfrom
cdeil:sampy1
Closed

A bit of cleanup / infrastructure#1
cdeil wants to merge 8 commits into
lpaioro:sampfrom
cdeil:sampy1

Conversation

@cdeil

@cdeil cdeil commented Apr 12, 2013

Copy link
Copy Markdown
Collaborator

@lpaioro Here's some cleanup and I've added a first unit test. You can comment on things you don't like on github and tell me to change them. Or if you like the changes you can pull them into your branch by hitting the merge button on github.

The unit test fails. You can run it via

python setup.py test --package vo

from the top-level astropy folder to see what the problem is.

@astrofrog If you have time to have a look that would be good.

I guess the first goal should be to get this unit test and the sampy command line tool working. Then we can do further re-structuring, e.g. I probably core.py should only contain the classes and the script should be in a separate file.

@cdeil

cdeil commented Apr 12, 2013

Copy link
Copy Markdown
Collaborator Author

Here's some issues that my editor (Eclipse PyDeV) points out in core.py (line numbers are for my samp1 branch):

Description Resource    Path    Location    Type
Undefined variable: keyfile core.py /astropy/astropy/vo/samp    line 3372   PyDev Problem
Undefined variable: _hubAsClientRequestHandler  core.py /astropy/astropy/vo/samp    line 1766   PyDev Problem
Undefined variable: certfile    core.py /astropy/astropy/vo/samp    line 3372   PyDev Problem
Duplicated signature: _notifyAll    core.py /astropy/astropy/vo/samp    line 2611   PyDev Problem

@lpaioro Are these real issues? Can you fix them?

@astrofrog

Copy link
Copy Markdown
Collaborator

@cdeil - it's not currently possible to see full diff as it indicates there are a lot of changes. Any ideas on how we can see them easily?

@cdeil

cdeil commented Apr 12, 2013

Copy link
Copy Markdown
Collaborator Author

That's because I ran autopep8 and most things weren't indented with 4 spaces.

Probably best to look at each commit except that one individually.
Or look at it locally.

@astrofrog

Copy link
Copy Markdown
Collaborator

Ok, so maybe the solution is to look though the individual ones and just trust the autopep8 one since it's still too large (or use diff -w locally to ignore whitespace changes).

@astrofrog

Copy link
Copy Markdown
Collaborator

@cdeil - I tried to have a look at the diff for the autopep8 offline, and I think that you should not let it shorten lines for now, as the result is not always more readable (it's the one PEP8 thing where we are not systematic). I would recommend using:

autopep8 --ignore=E501

and then leaving line wrapping for now. This will also make the diff simpler, because then most of the changes will be whitespace, and it's possible to silence those. In fact, I'd even recommend we keep the PEP8 in a separate pull request, because it'll then be much easier to review the actual changes here. Do you think you could easily just take out the autopep8 from here and then once this is merged, you can open a new PR with autopep8 (with the ignore clause to avoid automatically wrapping lines?)

@cdeil

cdeil commented Apr 13, 2013

Copy link
Copy Markdown
Collaborator Author

I made a new PR without the autopep8 changes:
#2

Let's try to get astropy.vo.samp working first and then do the cleanup later.

@lpaioro lpaioro closed this Sep 5, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants