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

109 - Add totalFilesCount to GetDatasetFiles use case #116

Merged

Conversation

MellyGray
Copy link
Contributor

What this PR does / why we need it:

This PR introduces totalFilesCount to the GetDatasetFiles use case, which is essential for pagination. This ensures consistency with the pagination implementation, as seen in DatasetPreviewSubset.

Which issue(s) this PR closes:

Related Dataverse PRs:

Special notes for your reviewer:

The implementation should be consistent with GetAllDatasetPreviews implementation, so just compare the code with that use case

Suggestions on how to test this:

Run integration tests or review GitHub action execution

@MellyGray MellyGray linked an issue Jan 17, 2024 that may be closed by this pull request
@MellyGray MellyGray added the Size: 3 A percentage of a sprint. 2.1 hours. label Jan 17, 2024
@GPortas GPortas added pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows labels Jan 22, 2024
@GPortas GPortas self-assigned this Jan 23, 2024
Copy link
Contributor

@GPortas GPortas left a comment

Choose a reason for hiding this comment

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

Looks good.

We need also to export the FilesSubset model in the index.ts file of the files folder, just as we do with the DatasetPreviewSubset

@GPortas GPortas assigned MellyGray and unassigned GPortas Jan 23, 2024
@MellyGray
Copy link
Contributor Author

Looks good.

We need also to export the FilesSubset model in the index.ts file of the files folder, just as we do with the DatasetPreviewSubset

I addressed the change. But I'm worried about what would had happened if you hadn't noticed. I think that somehow we need some tests to test the package from the outside. To force the check on these index exports, and also ensure that the package functions properly when used as a library

@GPortas
Copy link
Contributor

GPortas commented Jan 24, 2024

Looks good.
We need also to export the FilesSubset model in the index.ts file of the files folder, just as we do with the DatasetPreviewSubset

I addressed the change. But I'm worried about what would had happened if you hadn't noticed. I think that somehow we need some tests to test the package from the outside. To force the check on these index exports, and also ensure that the package functions properly when used as a library

Yes. There is an open issue related to functional tests that would be useful for what you mention: #81

I just updated the issue to link to this comment.

Copy link
Contributor

@GPortas GPortas left a comment

Choose a reason for hiding this comment

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

Sorry, I forgot to submit this review.

Can you check the comment?

// eslint-disable-next-line @typescript-eslint/no-explicit-any
filesPayload.forEach(function (filePayload: any) {
files.push(transformFilePayloadToFile(filePayload));
filesPayload.forEach(function (filesPayload: any) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why have you changed the name of the variable inside the function from singular to plural?

Now we have transformFilePayloadToFile(filesPayload) which makes it a little confusing.

Copy link
Contributor Author

@MellyGray MellyGray Jan 24, 2024

Choose a reason for hiding this comment

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

My bad, I committed the change to restore the name

@GPortas GPortas assigned MellyGray and unassigned GPortas Jan 24, 2024
@MellyGray MellyGray assigned GPortas and unassigned MellyGray Jan 24, 2024
@GPortas GPortas assigned GPortas and unassigned GPortas Jan 24, 2024
@GPortas GPortas merged commit d257346 into develop Jan 31, 2024
2 checks passed
@GPortas GPortas deleted the feature/109-add-total-file-count-to-getdatasetfiles-use-case branch January 31, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add total file count to GetDatasetFiles use case
2 participants