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

Fix data access and redirects #182

Merged
merged 3 commits into from
Apr 18, 2024
Merged

Conversation

JR-1991
Copy link
Member

@JR-1991 JR-1991 commented Apr 18, 2024

Overview

This pull request fixes the get_datafile endpoint and allows redirects upon requests, which is happening in the case of data access. Before this PR, the get_datafile method used the persistent ID access URL if pid=False and vice versa. This has been fixed by simply switching the if statements. In addition, tests have been added to pyDataverse to check if data access is working.

TLDR

  • Fixed get_datafile method of DataAccessApi due to wrong conditions
  • Redirects are now followed if a request encounters one
  • Added tests for get_datafile (pid and id case)

@JR-1991 JR-1991 added type:bug Something isn't working pkg:api api related activities status:for review Waiting to be reviewd labels Apr 18, 2024
@JR-1991 JR-1991 added this to the 0.3.2 milestone Apr 18, 2024
@JR-1991 JR-1991 self-assigned this Apr 18, 2024
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are passing. Looks like a straightforward change. I didn't test it but I'm approving this.

@JR-1991 JR-1991 merged commit 4b325c0 into master Apr 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:api api related activities status:for review Waiting to be reviewd type:bug Something isn't working
Projects
Development

Successfully merging this pull request may close these issues.

2 participants