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 pre-commits #212

Merged
merged 11 commits into from
Aug 21, 2023
Merged

add pre-commits #212

merged 11 commits into from
Aug 21, 2023

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Aug 14, 2023

Just codespell, that will be useful in the gh-pages, large files, and link check.

Closes #256

@ocefpaf ocefpaf marked this pull request as draft August 14, 2023 14:09
@ocefpaf
Copy link
Member Author

ocefpaf commented Aug 14, 2023

We need to enable pre-commit-ci first. I don't have my GH key with me now to do it. @MathewBiddle I'll do this later today but if you want to give it a go you can navigate to https://results.pre-commit.ci/ and add this repo to the list of the ones we run pre-commit-ci.

BTW, the last two commits are thanks to running these pre-commits. You will probably find the link checker quite useful in other non-sphinx IOOS sites.

     - repo: https://github.com/tcort/markdown-link-check
       rev: v3.11.2
       hooks:
         - id: markdown-link-check
           args: [-q]

@ocefpaf ocefpaf requested a review from MathewBiddle August 14, 2023 14:14
@ocefpaf ocefpaf marked this pull request as ready for review August 15, 2023 12:28
@ocefpaf
Copy link
Member Author

ocefpaf commented Aug 15, 2023

Looks like the link checker is not working on pre-commit-ci :-/

@ocefpaf ocefpaf marked this pull request as draft August 15, 2023 12:38
@MathewBiddle
Copy link
Contributor

Do I need to enable something? I never looked into it yesterday.

@ocefpaf
Copy link
Member Author

ocefpaf commented Aug 15, 2023

Do I need to enable something? I never looked into it yesterday.

Nope. I did it this morning. BTW, this is the report on the gh-pages:

  [✖] https://github.com/ioos/glider-dac-catalog → Status: 404
  [✖] https://github.com/ioos/glider_dac_thredds_catalog%3E → Status: 404
  [✖] http://www.ioos.noaa.gov/observing/observing_assets/glider_asset_map.html → Status: 404
  [✖] https://gliders.ioos.us/metadata-erddap/ → Status: 404
  [✖] https://gliders.ioos.us/metadata-thredds/ → Status: 404
  [✖] http://www.ndbc.noaa.gov/gliders.php → Status: 404
  [✖] https://raw.githubusercontent.com/kerfoot/ioosngdac/master/doco/IOOS-DAC-architecture.png → Status: 404
  [✖] #What-is-the-current-procedure-for-sending-data-to-the-Global-Telecommunications-System-(GTS) → Status: 404
  [✖] http://cfconventions.org/standard-names.html → Status: 404
  [✖] http://www.apl.washington.edu/project/project.php?id=seaglider#:~:text=The%20AUV%20Seaglider%20is%20the,time%20via%20satellite%20data%20telemetry. → Status: 0
  [✖] http://www.apl.washington.edu/ → Status: 0
  [✖] http://www.onr.navy.mil/ → Status: 0
  [✖] http://www.bluefinrobotics.com/products/spray-glider/ → Status: 404
  [✖] http://www.webbresearch.com/slocumglider.aspx → Status: 0
  [✖] http://www.webbresearch.com/ → Status: 0
  [✖] ngdac-netcdf-file-format-version-2.html → Status: 400
  [✖] /ioosngdac/glider-sampling-terminology.png → Status: 400
  [✖] ngdac-netcdf-file-format-version-2.html → Status: 400
  [✖] https://compliance.ioos.us/index.html → Status: 502
  [✖] /ioosngdac/ngdac-netcdf-file-submission-process.html#new-deployment-registration → Status: 400
  [✖] http://www.unidata.ucar.edu/software/thredds/current/tds/ → Status: 404
  [✖] /ioosngdac/ngdac-netcdf-file-submission-process.html → Status: 400
  [✖] http://www.unidata.ucar.edu/software/thredds/current/tds/TDS.html → Status: 404
  [✖] http://cfconventions.org/standard-names.html → Status: 404
  [✖] http://www.wmo.int/pages/prog/amp/mmop/wmo-number-rules.html → Status: 404
  [✖] /ioosngdac/useful-links → Status: 400
  [✖] ngdac-netcdf-file-format-version-2.html#description--examples-of-required-global-attributes → Status: 400
  [✖] ngdac-netcdf-file-format-version-2.html#platform → Status: 400
  [✖] ngdac-netcdf-file-format-version-2.html#trajectory → Status: 400
  [✖] ngdac-netcdf-file-submission-process.html#dataset-archiving → Status: 400
  [✖] ngdac-netcdf-file-format-version-2.html#file-naming-conventions → Status: 400
  [✖] /ioosngdac/ngdac-architecture.html#data-assembly-center-architecture → Status: 400
  [✖] https://compliance.ioos.us/index.html → Status: 502
  [✖] /ioosngdac/DAC_providers_your_deployments.png → Status: 400
  [✖] /ioosngdac/DAC_complete_deployment.png → Status: 400
  [✖] http://www.wmo.int/pages/prog/www/TEM/GTS/index_en.html → Status: 404
  [✖] /ioosngdac/ngdac-netcdf-file-format-version-2.html → Status: 400
  [✖] glider-background-and-sampling-terminology.html#sampling-pattern-terminology → Status: 400
  [✖] http://www.unidata.ucar.edu/software/thredds/current/tds/TDS.html → Status: 404
  [✖] /ioosngdac/IOOS-DAC-architecture.png → Status: 400
  [✖] http://www.ndbc.noaa.gov/gliders.php → Status: 404
  [✖] www.osmc.info → Status: 400

I'll try to fix a few buy going forward it would be nice to fix the pre-commit-ci. I'm in contact with upstream to figure this out.

@ocefpaf
Copy link
Member Author

ocefpaf commented Aug 21, 2023

The pre-commit version of this check is too fast and return valid links as Status: 0, which are not necessarily dead but sometimes just slow. The GHA action is a bit more roust though and will allow for more flexible configs in the future. This one is ready to go!

Screenshot from 2023-08-21 10-04-06

@ocefpaf ocefpaf marked this pull request as ready for review August 21, 2023 13:05
@ocefpaf ocefpaf requested review from MathewBiddle and removed request for MathewBiddle August 21, 2023 13:05
@ocefpaf ocefpaf mentioned this pull request Aug 21, 2023
4 tasks
Copy link
Contributor

@MathewBiddle MathewBiddle left a comment

Choose a reason for hiding this comment

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

Just one comment on the GHA.

.github/workflows/md-link-check.yml Show resolved Hide resolved
Copy link
Contributor

@MathewBiddle MathewBiddle left a comment

Choose a reason for hiding this comment

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

Thanks. Looks good

@ocefpaf ocefpaf merged commit 1495287 into ioos:master Aug 21, 2023
@ocefpaf ocefpaf deleted the pre-commits branch August 21, 2023 16:02
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.

pre-commit.ci failing
2 participants