-
-
Notifications
You must be signed in to change notification settings - Fork 50
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 issue 292 adhoc services and passing session through #293
Conversation
Codecov Report
@@ Coverage Diff @@
## main #293 +/- ##
==========================================
- Coverage 75.50% 75.49% -0.02%
==========================================
Files 44 44
Lines 5128 5125 -3
==========================================
- Hits 3872 3869 -3
Misses 1256 1256
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
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've never looked into the inner workings of passing around the session, but these changes look very reasonable.
On changing the MRO on SCSResults: Let's go for it.
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
This is done by extracting non-core terms -- really, anything with a URI that starts with something that is not the core URI -- and excepting it from our normalisation.
Add missing code and data files back to dist wheels.
There are a number of simple workarounds (kludges) to this problem:
The Line 29 in 9d5c501
However, the ability to pass an external session might have its own merits (apart from setting verify=False) and should probably be considered in the context of the upcoming proposed changes to SSO (https://wiki.ivoa.net/twiki/bin/view/IVOA/SSO_next). |
What do I need to do to get this through? |
Apparently my rebase screwed everything up. Might be best to nuke it all from orbit and start over. |
I'm happy to fix it for this PR if you prefer. (you might not have pushed the rebased version back with |
I did. Isn't that the correct way? But why does the PR now show that I changed 31 files when I only changed a couple of them? I was wondering if the fact that I forked before master became main would cause git any confusion. If it's not fixable, I can close this, delete my fork and start fresh and do a new PR. |
Yes, it's the correct way. Anyway, at this point, an interactive rebase is needed on the freshly fetched astropy version. And it has to be interactive to be able to remove the duplicated commits. |
That's exactly why I prefer the "Squash and merge" approach. I've screwed it up myself so many times that I think that the benefits of rebasing are not worth it. |
Haha, I firmly believe that there are usually one or two tricky steps, and if one identifies them they will be set up to be a rebase wizard for life. Typical issues are that the rebase branch is not the up-to-date one but either the default branch from the fork, or an outdated version from upstream. And other typical issue is that force push isn't used instead the offer by github to update is accepted (and that lands a 'main' merge commit in the branch). Even in the case when it doesn't introduce extra unrelated commits, it brings in a nonlinear branch structure that is not nice to work with if/when a bisect or any history digging is required. IMO the squash on merge has a ton of negative side effects, 1: it doesn't create a merge commit on the main branch but puts the squashed commit on it directly. That messes up a lot of the release scripts (you may not use those in pyvo, but they are super useful to identify any changelog and backport inconsistencies before they end up in a release) and possibly with the backports, too. Anyway, I'm not a maintainer here, so I'm OK with whichever workflow you decide to follow. (one rather good resource to practice some of the scenarios is https://learngitbranching.js.org/, especially the remote and advanced topics) |
I agree 100% (and thanks for the resource). Re-basing makes sense for large projects or commits but the effort is not justified in all cases. That's why in |
Closing in favor of cleaner PR #327 |
The original issue is simple to fix in scs.py. But in order to test it, I needed to be able to call a development server that didn't have the right certificate information. So I wanted to be able to do this:
etc. So I added the option to specify the session in the
.getdatalink()
method. It in turn calls some DAL methods that already take an optional session, so the change to help me debug was small and will be useful in future. It's undoubtedly also useful in other methods, but there might be a better way to do this. For instance, in DALResults, the methodfrom_result_url()
(called bygetdatalink()
) callsuse_session()
from utils/http.py, which creates a new session by default. Instead of creating a new one, DALResults could use self._session. In that case, the above call to getdatalink() wouldn't have to specify the session and would automatically inherit the one used in the cone service, the one already defined with verif=False.Thoughts?