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

Add build tests #70

Merged
merged 3 commits into from
Mar 26, 2024
Merged

Add build tests #70

merged 3 commits into from
Mar 26, 2024

Conversation

rkent
Copy link
Contributor

@rkent rkent commented Mar 21, 2024

A couple of years ago, I experimented with a number of expansions of rosdoc2 to make more of the documentation of a project, in standard locations, available by default. It is a lot easier to do these changes if there are unit tests that can demonstrate and test various features. This PR adds such build tests by adding and testing several test packages.

The 'full_package' test packages includes a lot of documentation features that are not currently implemented in rosdoc2, but I hope to add in future PRs.

The inclusion of an existing demo package in the test cases might be controversial rather than starting from scratch. I'm open to suggestions there.

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

I think that testing on real packages make sense. However I don't think that the value of having the code copied in here makes sense.

This tool is not highly productized and focused on deployment into areas where there's not network expected. So we can take advantage of that in the unit tests.

To that end I would recommend that instead of embedding the code we add to the CI to checkout a few representative samples and run the tests against those. We should use some pinned versions of those things to avoid cross coupling potential breakages. But then we don't end up with the documentation only working on some stale version that the rosdoc2 maintainers aren't familiar with.

.github/workflows/test.yml Show resolved Hide resolved
strategy:
matrix:
python-version: ['3.8', '3.9']
Copy link
Member

Choose a reason for hiding this comment

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

Are these platform changes necessary? It's good, but it would be better to do these changes separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed that.

.gitignore Outdated
@@ -57,3 +57,10 @@ docs/_build/
# PyBuilder
target/
.pytest_cache

# Editors
.vscode/
Copy link
Member

Choose a reason for hiding this comment

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

Please put these user specific changes into your user's .gitignore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, reverted.

@rkent rkent requested a review from tfoote March 22, 2024 17:31
@tfoote
Copy link
Member

tfoote commented Mar 25, 2024

Thanks for the updates. I think that testing it on real packages as you were doing earlier is valuable too. To that end could you add a workflow which will clone a few selected packages and just run on those and check the return values etc. It will be more of an integration/system test than what's implemented here as unit tests.

@rkent
Copy link
Contributor Author

rkent commented Mar 25, 2024

"could you add a workflow which will clone a few selected packages"

That's a pretty significant change, and I am reluctant do it for several reasons. One important value of these unit tests is to the developer, as you can isolate issues that you want to address in a demo package, then add the needed changes with a quick change/run cycle by running the tests. Real packages with potential issues could be large enough to slow this down significantly, which makes development slower. Also, I've had the experience of trying to chase test regressions, and adding uncontrolled external clones is asking for many unpleasant hours of trying to figure out if a regression is due to some problem in rosdoc2, or to that external package. External packages tests with rosdoc2 could be useful, but I think they belong either in the test suite of the external package, or in a dedicated build farm job.

If you really want clones of external packages, could we do that as a follow-up PR and land this one? This is a pivotal PR for me to make progress, as any rosdoc2 issue I would address would typically have changes to the tests, so until this is landed I am blocked from more important changes.

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Adding this as incremental progress makes sense not blocking on the additional validation.

Thanks for taking the time to add tests! It's never valued enough.

.github/workflows/test.yml Show resolved Hide resolved
@tfoote tfoote merged commit e112a5f into ros-infrastructure:main Mar 26, 2024
2 checks passed
@rkent rkent deleted the add-build-tests branch March 26, 2024 18:33
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/rosdoc2-undergoing-significant-change/36905/2

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

Successfully merging this pull request may close these issues.

3 participants