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

chore: fix invalid links (DEV-2251) #2699

Merged
merged 1 commit into from
Jun 15, 2023
Merged

Conversation

jnussbaum
Copy link
Contributor

Pull Request Checklist

Task Description/Number

Issue Number: DEV-2251

Basic Requirements

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • fix: represents bug fixes
  • refactor: represents production code refactoring
  • feat: represents a new feature
  • docs: documentation changes (no production code change)
  • chore: maintenance tasks (no production code change)
  • test: all about tests: adding, refactoring tests (no production code change)
  • other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No
  • Maybe (not 100% sure => check with FE)

Does this PR change client-test-data?

  • Yes (don't forget to update the JS-LIB team about the change)
  • No

@jnussbaum jnussbaum self-assigned this Jun 14, 2023
@linear
Copy link

linear bot commented Jun 14, 2023

DEV-2251 DSP-DOCS: resolve warnings

When building/serving dsp-docs locally, a lot of warnings appear.

For everyday use, it would be practical if they are resolved, so that the real warnings get more attention.

1. DeprecationWarning pkg_resources

INFO     -  DeprecationWarning: pkg_resources is deprecated as an API
              File "/opt/homebrew/lib/python3.11/site-packages/mike/mkdocs_plugin.py", line 6, in <module>
                from pkg_resources import iter_entry_points
              File "/opt/homebrew/lib/python3.11/site-packages/pkg_resources/__init__.py", line 121, in <module>
                warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

→ Upstream issue that is already fixed but awaits a release. See jimporter/mike#148

2. DSP-API/00-release-notes/index.mdcontains a link to '.'

This warning appears several times:

WARNING  -  Documentation file 'DSP-API/00-release-notes/index.md' contains a link to '.' which is not found in the documentation files.

The content of DSP-API/00-release-notes/index.md is:

{%
   include-markdown "../../CHANGELOG.md"
%}

The link is invalid, because CHANGELOG.md is located one level further up: "../../../CHANGELOG.md".

To make it even more confusing: there is no "00-release-notes" on docs.dasch.swiss, but rather a "09-release-notes" that I can't find in the repo: https://docs.dasch.swiss/2023.05.03/DSP-API/09-release-notes/ 🤷‍♂️

3. Pages missing in the nav

INFO     -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
              - DSP-API/Readme.md
              - DSP-API/architecture/README.md
              - DSP-API/architecture/decisions/0001-record-architecture-decisions.md
              - DSP-API/architecture/decisions/0002-change-cache-service-manager-from-akka-actor-to-zlayer.md
              - DSP-API/architecture/decisions/0003-change-iiif-service-manager-and-sipi-implementation-to-zlayer.md
              - DSP-API/architecture/decisions/0004-change-respondermanager-to-a-simple-case-class.md
              - DSP-API/architecture/flows/http-request-flow.md
              - DSP-APP/user-guide/publication.md

marcin.procyk: Have you got an idea how to resolve no. 2 or no. 3?

4. Missing git logs for ALL files

One example:

WARNING -  DSP-TOOLS/file-formats/json-project/caveats.md has no git logs, revision date defaulting to today's date

For no single md file in all 3 repos, there is a git log. You can click through every page of API, APP, TOOLS on https://docs.dasch.swiss/2023.05.03, and every file says on the bottom: Last update: 2023-06-01.

I think the problem is that https://github.com/zhaoterryy/mkdocs-git-revision-date-plugin cannot be used in a monorepo.

However, if we use https://github.com/timvink/mkdocs-git-revision-date-localized-plugin, it works:

mkdocs.yml:

plugins:
  - git-revision-date-localized    <-- works, must be on top
  - mike
  - monorepo
  - include-markdown
  - search
  - git-revision-date              <-- doesn't work (regardless of position)

@jnussbaum jnussbaum requested a review from mpro7 June 14, 2023 14:23
@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: +62.28 🎉

Comparison is base (ee3cddc) 17.89% compared to head (0ef6128) 80.18%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2699       +/-   ##
===========================================
+ Coverage   17.89%   80.18%   +62.28%     
===========================================
  Files         277      279        +2     
  Lines       28855    28936       +81     
===========================================
+ Hits         5165    23202    +18037     
+ Misses      23690     5734    -17956     
Impacted Files Coverage Δ
.../knora/webapi/http/handler/ExceptionHandlerZ.scala 0.00% <0.00%> (-70.00%) ⬇️
...esponder/standoffmessages/StandoffMessagesV2.scala 54.16% <0.00%> (+44.51%) ⬆️
...knora/webapi/responders/v1/ValuesResponderV1.scala 91.09% <ø> (+89.96%) ⬆️
...ra/webapi/responders/v2/ResourcesResponderV2.scala 88.26% <ø> (+86.99%) ⬆️
...knora/webapi/responders/v2/SearchResponderV2.scala 91.81% <ø> (+85.40%) ⬆️
...ora/webapi/responders/v2/StandoffResponderV2.scala 86.21% <ø> (+82.97%) ⬆️
.../slice/admin/api/model/ProjectExportResponse.scala 0.00% <0.00%> (ø)
...slice/admin/domain/service/ProjectADMService.scala 96.77% <0.00%> (-3.23%) ⬇️
...webapi/slice/admin/domain/service/ZipUtility.scala 0.00% <0.00%> (ø)
...a/webapi/store/iiif/impl/IIIFServiceSipiImpl.scala 50.74% <ø> (+50.00%) ⬆️
... and 21 more

... and 196 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jnussbaum jnussbaum merged commit 2419f58 into main Jun 15, 2023
@jnussbaum jnussbaum deleted the wip/dev-2251-fix-dead-links branch June 15, 2023 11:13
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.

2 participants