Skip to content

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
@JR-1991 JR-1991 deleted the fix-data-access-and-redirects branch August 14, 2025 10:07
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.

3 participants