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

Refactor datasets.py module #74

Open
3 of 5 tasks
ninamiolane opened this issue May 4, 2022 · 1 comment
Open
3 of 5 tasks

Refactor datasets.py module #74

ninamiolane opened this issue May 4, 2022 · 1 comment
Assignees

Comments

@ninamiolane
Copy link
Contributor

ninamiolane commented May 4, 2022

What?

Why?

There are several reasons for this task:

  • Functionality in ioSPI and simSPI should not be entangled. The fact that they are, i.e. simSPI is using ioSPI, complicates the development: as any PR on ioSPI potentially requires a refactoring PR on simSPI.
  • Functionalities that download or upload data with OSF use different logics that are hard to grasp for newcomers: this task creates one Python class only, i.e. one single point of entry with one logic.

The library ioSPI can only be useful if users can understand it quickly. This task is urgent and very much needed.

Where?

The class OSFProject should go into the ioSPI/datasets.py module.

This class replaces the classes Project and OSFUpload from ioSPI/datasets.py.

How?

The new class OSFProject should have (at least):

  • a method ls: listing the files of a OSF project
  • a method download
  • a method upload

and follow the logic that one object instantiated from this class corresponds to one OSF project.

@ninamiolane ninamiolane added this to the PIMS - Hackathon milestone May 4, 2022
@bongjinkoo bongjinkoo self-assigned this May 9, 2022
@bongjinkoo
Copy link
Collaborator

I also added remove method. Btw, osf ls does not give us all items in the project. Somehow it doesn't list ones created by the obsolete OSFUpload. I suspect it is because it was added as a child node and osf ls cannot list them, or something. Move on for now, as we will only use osf upload?

bongjinkoo added a commit that referenced this issue May 13, 2022
… error checks in datasets.py. Update test_datasets.py.
bongjinkoo added a commit that referenced this issue May 17, 2022
bongjinkoo added a commit that referenced this issue May 17, 2022
bongjinkoo added a commit that referenced this issue May 17, 2022
bongjinkoo added a commit that referenced this issue May 17, 2022
bongjinkoo added a commit that referenced this issue May 17, 2022
…s difference test instances access the same file.
bongjinkoo added a commit that referenced this issue May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants