Skip to content

WEB: Better management of releases #56207

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

Merged

Conversation

Dukastlik
Copy link
Contributor

@Dukastlik Dukastlik commented Nov 27, 2023

Added releases sorting by version number and sorting out obsolete releases in web/pandas_web.py

sorting on version number + sorting out obsolete versions
@Dukastlik
Copy link
Contributor Author

Dukastlik commented Nov 27, 2023

Hi @datapythonista !
Added this PR and tests, but was not sure what you've meant in original issue by:

Maybe just a tests/test_pandas_web.py in the same directory as the script, and calling pytest on that directory in the documentation build is the best option.

Could not figure out how new tests should be called.
Also added mock_response fixture that can be used for testing other web features.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Great job, just one comment

for _, release_group in grouped_releases
]
# sorting releases by version number
context["releases"].sort(key=lambda r: r["name"], reverse=True)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we sort by the parsed version? Maybe I'm missing something, but feels like sorting by name will make 2.0 be shown before 10.0, no?

Copy link
Contributor Author

@Dukastlik Dukastlik Nov 27, 2023

Choose a reason for hiding this comment

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

I'm parsing version before that on line 244. Is that ok?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, true. Makes sense, but probably worth renaming the field from name to something like parsed_version then, no? I think the code is a bit misleading otherwise, at least it was for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

"published_at": "2023-01-19T03:34:05Z",
"tag_name": "v1.5.3xd",
"assets": None,
},
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can add 10.0 to make sure the possible bug commented above is not there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@datapythonista
Copy link
Member

Could not figure out how new tests should be called. Also added mock_response fixture that can be used for testing other web features.

Good point. I think the normal tests just call pytest for the pandas/ directory. In the CI job to build the website and docs we could add a step to call pytest for the tests in web/. I think that's what makes sense, but other ideas are welcome.

@Dukastlik
Copy link
Contributor Author

Could not figure out how new tests should be called. Also added mock_response fixture that can be used for testing other web features.

Good point. I think the normal tests just call pytest for the pandas/ directory. In the CI job to build the website and docs we could add a step to call pytest for the tests in web/. I think that's what makes sense, but other ideas are welcome.

Can you please point me out a file with CI job for docs and website? Sorry, I'm new to the project.

@datapythonista
Copy link
Member

Can you please point me out a file with CI job for docs and website? Sorry, I'm new to the project.

https://github.com/pandas-dev/pandas/blob/main/.github/workflows/docbuild-and-upload.yml

@Dukastlik Dukastlik requested a review from mroeschke as a code owner November 27, 2023 21:45
@Dukastlik
Copy link
Contributor Author

Can you please point me out a file with CI job for docs and website? Sorry, I'm new to the project.

https://github.com/pandas-dev/pandas/blob/main/.github/workflows/docbuild-and-upload.yml

Thanks a lot! Added "Test website" step to ci job.

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

LGTM merge when ready @datapythonista

@mroeschke mroeschke added the Web pandas website label Nov 28, 2023
@mroeschke mroeschke added this to the 2.2 milestone Nov 28, 2023
@datapythonista datapythonista merged commit db6fd22 into pandas-dev:main Dec 13, 2023
@datapythonista
Copy link
Member

Amazing job, thanks for taking care of this @Dukastlik, and sorry that reviews took a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web pandas website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WEB: Better management of releases in the pandas home page
3 participants