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

Fix some invalid links in documentation #2940

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@ def _load_theme(
# If true, show URL addresses after external links.
# man_show_urls = False

# -- Options for linkcheck builder ----------------------------------------
linkcheck_ignore = [
# Github "source code line" anchors are apparently too dynamic for linkcheck
# to detect correctly. The link exists, a browser can open it, but linkcheck
# reports a broken link.
r'https://github.com/packit/packit/blob/main/packit/utils/logging.py#L10'
]


def generate_tmt_docs(app: Sphinx) -> None:
""" Run `make generate` to populate the auto-generated sources """
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Why should I care?

You can get some more context in the `stackoverflow`__ article.

__ http://stackoverflow.com/questions/2290016/
__ https://stackoverflow.com/questions/2290016/

.. _develop:

Expand Down
2 changes: 1 addition & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ steps for example. This is currently used in the Testing Farm's

tmt run --last login < script.sh

__ https://docs.testing-farm.io/general/0.1/test-results.html#_tmt_reproducer
__ https://docs.testing-farm.io/Testing%20Farm/0.1/test-results.html#_tmt_reproducer

Have you heard already that using command abbreviation is possible
as well? It might save you some typing:
Expand Down
4 changes: 2 additions & 2 deletions docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ Git:
https://github.com/teemtee/tmt

Docs:
http://tmt.readthedocs.io/
https://tmt.readthedocs.io/

Stories:
https://tmt.readthedocs.io/en/stable/stories.html
Expand All @@ -714,7 +714,7 @@ Metadata Specification:
https://tmt.readthedocs.io/en/stable/spec.html

Flexible Metadata Format:
http://fmf.readthedocs.io/
https://fmf.readthedocs.io/

Testing Farm:
https://docs.testing-farm.io/
Expand Down
2 changes: 1 addition & 1 deletion docs/questions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -460,4 +460,4 @@ If you were using ``provision.fmf`` with Testing Farm, check out
the `Testing Farm docs`__ on this HW requirement for more details
and how Testing Farm works with tmt metadata.

__ https://docs.testing-farm.io/general/0.1/test-request.html
__ https://docs.testing-farm.io/Testing%20Farm/0.1/test-request.html
2 changes: 1 addition & 1 deletion spec/core/id.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ example: |
id: af994876-1c68-49a7-90e8-c8d2b189189d

link:
- implemented-by: /tmt/id.py
- implemented-by: /tmt/identifier.py
- verified-by: /tests/unit
2 changes: 1 addition & 1 deletion spec/tests/path.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ example: |
link:
- implemented-by: /tmt/base.py
- verified-by: /tests/execute/basic
- http://fmf.readthedocs.io/en/latest/features.html#virtual
- https://fmf.readthedocs.io/en/latest/features.html#virtual
6 changes: 3 additions & 3 deletions stories/cli/plan.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ story: 'As a user I want to comfortably work with plans'
link:
- implemented-by: /tmt/cli.py
- documented-by: /docs/examples.rst#explore-plans
- verified-by: /tests/plans/select
- verified-by: /tests/plan/select

/filter:
story: 'Filter available plans'
Expand All @@ -31,7 +31,7 @@ story: 'As a user I want to comfortably work with plans'
link:
- implemented-by: /tmt/base.py
- documented-by: /docs/examples.rst#explore-plans
- verified-by: /tests/plans/select
- verified-by: /tests/plan/select

/lint:
story: 'Check plan against the L2 metadata specification'
Expand All @@ -42,7 +42,7 @@ story: 'As a user I want to comfortably work with plans'
example: tmt plan lint
link:
- implemented-by: /tmt/cli.py
- verified-by: /tests/plan/lint
- verified-by: /tests/lint/plan

/create:
story: 'As a developer I want to easily enable CI'
Expand Down
2 changes: 1 addition & 1 deletion stories/cli/run.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ story: 'As a user I want to execute tests easily'
or investigate what happened after the test is finished.

link:
- implemented-by: /tmt/step
- implemented-by: /tmt/steps
- verified-by: /tests/login
- documented-by: /docs/examples.rst#guest-login

Expand Down
4 changes: 2 additions & 2 deletions stories/cli/steps.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
story: 'Use localhost for testing'
example: tmt run provision --how=local
link:
- implemented-by: /tmt/steps/provision/localhost.py
- implemented-by: /tmt/steps/provision/local.py
- documented-by: /docs/examples.rst#provision-options
- verified-by: /tests/init/base

Expand All @@ -58,7 +58,7 @@
Do not provision a new system. Instead, use provided
authentication data to connect to a running machine.
link:
- implemented-by: /tmt/steps/provision/vagrant.py
- implemented-by: /tmt/steps/provision/connect.py
- documented-by: /docs/examples.rst#provision-options
example:
- tmt run provision --how=connect --guest=name-or-ip --user=login --password=secret
Expand Down
2 changes: 1 addition & 1 deletion stories/cli/test.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ story: 'As a user I want to comfortably work with tests'
example: tmt test import
link:
- implemented-by: /tmt/convert.py
- verified-by: /tests/test_convert
- verified-by: /tests/unit/test_convert.py
- documented-by: /docs/examples.rst#convert-tests

/export:
Expand Down
2 changes: 1 addition & 1 deletion tmt/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Components of each constraint - dimension, operator, value, units - are
decoupled from the rest, and made available for inspection.

[1] https://tmt.readthedocs.io/en/latest/spec/plans.html#hardware
[1] https://tmt.readthedocs.io/en/stable/spec/hardware.html
"""

import dataclasses
Expand Down
3 changes: 2 additions & 1 deletion tmt/steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,8 @@ def to_dict(self) -> dict[str, Any]:
"""
Convert to a mapping.

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.
"""

data = super().to_dict()
Expand Down
24 changes: 16 additions & 8 deletions tmt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2984,7 +2984,8 @@ def to_dict(self) -> dict[str, Any]:
"""
Convert to a mapping.

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.
"""

return dict(self.items())
Expand All @@ -2993,7 +2994,8 @@ def to_minimal_dict(self) -> dict[str, Any]:
"""
Convert to a mapping with unset keys omitted.

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.
"""

return {
Expand Down Expand Up @@ -3101,7 +3103,8 @@ def from_spec(cls: type[SpecBasedContainerT], spec: SpecInT) -> SpecBasedContain
"""
Convert from a specification file or from a CLI option

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.

See :py:meth:`to_spec` for its counterpart.
"""
Expand All @@ -3112,7 +3115,8 @@ def to_spec(self) -> SpecOutT:
"""
Convert to a form suitable for saving in a specification file

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.

See :py:meth:`from_spec` for its counterpart.
"""
Expand All @@ -3123,7 +3127,8 @@ def to_minimal_spec(self) -> SpecOutT:
"""
Convert to specification, skip default values

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.

See :py:meth:`from_spec` for its counterpart.
"""
Expand Down Expand Up @@ -3178,7 +3183,8 @@ def to_serialized(self) -> dict[str, Any]:
"""
Convert to a form suitable for saving in a file.

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.

See :py:meth:`from_serialized` for its counterpart.
"""
Expand Down Expand Up @@ -3210,7 +3216,8 @@ def from_serialized(
"""
Convert from a serialized form loaded from a file.

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.

See :py:meth:`to_serialized` for its counterpart.
"""
Expand Down Expand Up @@ -3264,7 +3271,8 @@ def unserialize(
Restoring such containers requires inspection of serialized data
and dynamic imports of modules as needed.

See https://tmt.readthedocs.io/en/stable/classes.html#class-conversions for more details.
See https://tmt.readthedocs.io/en/stable/code/classes.html#class-conversions
for more details.

See :py:meth:`to_serialized` for its counterpart.
"""
Expand Down
Loading