-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Made a new method _make_ten_attempts that takes out a lot of repeated co... #2219
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
Conversation
|
This is in response to issue #2029 |
.idea/astropy.iml
Outdated
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.
These .idea files from your IDE should not be committed to git. (You can put .idea in your global gitignore so you don't forget in the future).
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.
Should I delete the .idea files, recommit and make a new pull request then?
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.
@anizami - no need to open a new pull request. If you add commits, just push again to your branch and the changes will appear here.
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.
Thanks!
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'm having a hard time making git delete the .idea files. I deleted the .idea folder from the repository on my computer and added .idea to the .gitignore file and committed the changes but it's still not going away on GitHub..suggestions on what I should do?
|
Regarding the |
|
There were some issues with git on my system which is why I was unable to delete the .idea files but I fixed them and was finally able to delete the .idea files! Is there any more work that I should do on this branch or can it be merged now? |
|
@anizami - this is a good start, but I think it would be better if we could avoid having all the |
|
@anizami - for the number of tries, this should be made a configuration item at the top of the file, following instructions from http://docs.astropy.org/en/stable/api/astropy.config.configuration.ConfigurationItem.html?highlight=configurationitem |
|
And you definitely still need to do a |
|
I'm sorry for not being able to work on this sooner, classes kept me really busy! I've worked on the changes @astrofrog suggested and I've added a configuration parameter (I hope I did it correctly, if not let me know and I'll fix it). The code does look a lot nicer without the if statements but I'm not sure how to get rid of the if statements for the Standard profile. That part of the code has |
|
@anizami - thanks! I'll review this soon, but in the mean time, for the standard profile, you could do e.g. |
|
@anizami - have you had a chance to try my suggestion to make use of |
|
@astrofrog My bad! I thought I'd hear back from you before starting to work on removing the last code using if statements. I've also been kind of busy with another project so this slipped my mind. I'll start working on this soon and I should have it done by tomorrow night (in about 24 hours). By the way, what does it mean that Travis CI build could not complete due to an error? Does the current package have tests that GitHub automatically runs to test the code? Does this mean my code has broken something? |
|
@anizami - the fact that quite a few of the builds are failing means it's likely real (we get flukes from time to time). You can try and run: to see what the results of the tests are locally. It may be a little tricky to debug, so if you get stuck trying to figure out what went wrong, let me know! |
astropy/vo/samp/hub.py
Outdated
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.
Maybe N_RETRIES can be used diirectly in _retry_method and not passed as an argument since it's always set to the configuration value. Also, you should access the value of N_RETRIES using N_RETRIES()
|
@anizami - apart from my comment above, this looks good to me so far, so try and implement what we discussed above, and see if you can get the tests passing locally. Thanks! |
|
@astrofrog - I'm not familiar with using getattr(...) but I think I've used it with the correct syntax. I also changed the code to access N_RETRIES using N_RETRIES(). The Travis CI build is still in progress so I'll try running the tests locally once I'm sure there are bugs. |
|
@anizami - re: testing, it's usually a good idea to always test locally before pushing to the pull request. You will get the results a lot faster, and it will be easier to debug. It looks like most builds are failing, so this is likely a genuine error. Let me know if you don't understand the failures and need help in fixing them! |
|
@astrofrog - I'm trying to run the tests locally but I'm running into some problems. When I type in the command 'python setup.py test -P vo.samp', I get this: ============================= test session starts ============================= Running tests with Astropy version 0.4.dev7709. Platform: Windows-7-6.1.7601-SP1 Executable: C:\Anaconda\python.exe Full Python Version: encodings: sys: ascii, locale: cp1252, filesystem: mbcs, unicode bits: 15 Numpy: 1.8.0 ERROR: file not found: C:\Users\Asra |
|
Oh wait, never mind. I tried moving it to a different folder and am running the tests now. Let's see what happens. |
|
@astrofrog- I'm still having problems running the tests locally. The tests are giving me the exception = "Exception: Timeout while waiting for file: c:\users\asrani~1\appdata\local\temp\tmpr2bkov\0dMnFfWjcCDUZwPe" at the test_helpers.py test. params = {'parameter1': 'abcde', 'parameter2': 1331, 'verification_file': 'c:\users\asrani~1\appdata\local\temp\tmpr2bkov\0dMnFfWjcCDUZwPe'} I'm confused about where to go from here. The directory that I have on my computer is 'C:users\Asra Nizami' and there's nothing like 'C:users\asran~1'. Do you think the tests wrong when they generate those random parameters and they're unable to run successfully on my computer? I don't think this is the reason the Travis CI build is failing though- what I'm facing only seems to be a local issue. |
… code from _call_, _notify_ and _reply_
4b19221 to
afdce05
Compare
|
We need to look into this further since there are still failures, so I will remove the 1.0 milestone for now. |
|
Since the failures are a bit weird I am going to take over the pull request (but will preserve the existing commits) |
...de from call, notify and reply