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

docs(readme): add badges #203

Merged
merged 1 commit into from
Sep 27, 2024
Merged

docs(readme): add badges #203

merged 1 commit into from
Sep 27, 2024

Conversation

lengau
Copy link
Contributor

@lengau lengau commented Apr 12, 2024

Fixes #180

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run tox?

@lengau lengau force-pushed the badges branch 10 times, most recently from 4d93566 to cc2e34e Compare April 13, 2024 00:03
@lengau lengau marked this pull request as ready for review April 13, 2024 00:07
@lengau lengau requested review from mr-cal and mattculler April 13, 2024 00:08
Copy link
Contributor

@mattculler mattculler left a comment

Choose a reason for hiding this comment

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

Not sure what the correct way is to fix that "line too long" linter failure when the doc line is a URL - I would almost expect the linter to be aware that you can't wrap URLs.

@mr-cal
Copy link
Contributor

mr-cal commented Apr 15, 2024

Not sure what the correct way is to fix that "line too long" linter failure when the doc line is a URL - I would almost expect the linter to be aware that you can't wrap URLs.

I was fighting that last week on a personal repo.

These badges in craft-providers (here) used to work and outsmarted the sphinx-lint line-length rules. But that syntax broke on Github in the last month or so and they don't render well anymore.

Github does a bad job rendering RST and I found many comments to the same effect in Github's issue tracker.

I wasn't able to find any way with sphinx-lint to disable line-length for URLs.

@mattculler
Copy link
Contributor

mattculler commented Apr 15, 2024

Not sure what the correct way is to fix that "line too long" linter failure when the doc line is a URL - I would almost expect the linter to be aware that you can't wrap URLs.

I was fighting that last week on a personal repo.

These badges in craft-providers (here) used to work and outsmarted the sphinx-lint line-length rules. But that syntax broke on Github in the last month or so and they don't render well anymore.

Github does a bad job rendering RST and I found many comments to the same effect in Github's issue tracker.

I wasn't able to find any way with sphinx-lint to disable line-length for URLs.

Found this issue: pylint-dev/pylint#2178

Seems like sphinx does ignore long lines for URLs by default, but that fails here since the URL isn't at the start of the line.

So either you have to format your badge RST to put the URL on its own line, or modify sphinx's ignore-long-lines regex to ignore badge lines.

https://pylint.pycqa.org/en/latest/user_guide/configuration/all-options.html#ignore-long-lines

@tigarmo
Copy link
Contributor

tigarmo commented Apr 16, 2024

Here's one possible suggestion for handling the line-length issue (not sure if it'll actually work): put the URLs in a separate "urls.txt" file, .. include it at the bottom of the README and then pass --ignore urls.txt to the sphinx-lint call

@lengau
Copy link
Contributor Author

lengau commented Apr 19, 2024

Honestly I'm tempted to just get rid of the line-too-long linter for docs files. Static word wrapping is great for code, but I'm not sure it really matters as much with documentation since most text editors do a good job of wrapping the documentation lines anyway. What do you think @mr-cal @mattculler @tigarmo ?

@tigarmo
Copy link
Contributor

tigarmo commented Apr 19, 2024

well the real final boss you have to convince here is @sergiusens

@mattculler
Copy link
Contributor

@lengau FWIW I completely agree - hard line breaks are essential for code but don't make sense for docs.

@mr-cal
Copy link
Contributor

mr-cal commented Apr 22, 2024

+1 on dropping line length linting for docs because the tooling isn't good enough right now:

  • no auto-formatting to break lines
  • no way to disable the linter

@sergiusens
Copy link
Collaborator

Personally not a fan, in the sense that the whole point of these simple markup files is that you can read them without processing them and the presentation might require certain structure.

That said, this should be a soft requirement, I do not care for the linters. If we remove it, let's remove it for all, not just docs.

@mr-cal
Copy link
Contributor

mr-cal commented Aug 9, 2024

Line length issue will be fixed via #233

@tigarmo tigarmo closed this Sep 26, 2024
@tigarmo tigarmo reopened this Sep 26, 2024
@tigarmo tigarmo closed this Sep 26, 2024
@tigarmo tigarmo reopened this Sep 26, 2024
@mr-cal
Copy link
Contributor

mr-cal commented Sep 26, 2024

Is this passing now because of #221 ?

@lengau
Copy link
Contributor Author

lengau commented Sep 27, 2024

@mr-cal lol I guess. Nice!

@lengau lengau merged commit 76f2dbd into main Sep 27, 2024
34 of 35 checks passed
@lengau lengau deleted the badges branch September 27, 2024 18:42
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.

Add badges to README
5 participants