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

Change docforge manifest API #54

Merged
merged 1 commit into from
Oct 22, 2020
Merged

Change docforge manifest API #54

merged 1 commit into from
Oct 22, 2020

Conversation

g-pavlov
Copy link
Contributor

@g-pavlov g-pavlov commented Oct 18, 2020

What this PR does / why we need it:
Changes:

  • structure replaces root as top level element
  • structure now has a list of node descendants instead of a required single root node.
  • top level nodeSelector that resolves into structure
  • top level nodeSelector and structure can co-exist. When resolved the nodes of the node selector are appended to the structure top level nodes. In next iteration the append should change to merge to avoid node duplicates by name.
  • links replaces localityDomain with new structure and semantic elements:
    • rewrites for rules governing rewriting document links. Rules are mapped to regular expressions that match links for which they apply. Rewriting targets are version, destination, text and title of a link.
      A nil rule (~ in yaml) mapped to a regular expression is a shortcut to effectively remove the matched links from the document.
      Setting the destination and text property to empty string has the same effect.
      Setting the destination to empty string when text is not empty string has the effect removing the link but leaving the text component in the document.
    • downloads for rules governing the scope of downloaded resources and rename rules for downloads. Rules are mapped to regular expressions that match links for which they apply.
      Downloads can have scope which is the scope of the downloaded resources. The scope is defined by a set of regular expressions for matching resource links to download. They can be optionally mapped to rename rules that define renaming pattern for downloaded resources that match a name pattern expression. Or they can be mapped to nil (~ in yaml) to specify default rename pattern. The renaming pattern can be an exact string or an expression constructed form three variables provided when a link is matched:
      • $name: the name of the original resource
      • $ext: the extension of the original resource, . included
      • $uuid: a generated UUID
        The default naming pattern is $uuid$ext
        Besides scope-specific renames there can be global ones defined with the renames element. It is virtually the same as in the scope renames, but is global ruleset that applies to anything that is subject to download but is not governed by scope-specific rules already.
  • links settings are inherited. Global top level links apply if more concrete nodes links are not defined. Parent node links apply if not overridden by node-specific links. A more global links settings can define a subset of the properties to rewrite and node links can define another. The effective links for the node is a resolved aggregation of both. For example there might be global rewrite rules for links version and node specific link destination rewrites.
  • nodeSelector now supports excludePaths and depth (starting at 1) filtering options when it is resolved.

A few bypass improvements are:

  • GitHub wiki pages are now first-class citizen and can be used as source to document nodes.
  • Markdown Images with GitHub destination are converted to their raw resource type form.
  • Getting started examples

Which issue(s) this PR fixes:
Fixes #57

Release note:

The manifest API changed to a more intuitive structure and adds new capabilities. See the [pull request](#54) for summary of changes.
The change is not backwards compatible and previous manifests need to update to the new API

@g-pavlov g-pavlov added the component/documentation Gardener Documentation label Oct 18, 2020
@g-pavlov g-pavlov self-assigned this Oct 18, 2020
@gardener-robot gardener-robot added kind/api-change API change with impact on API users needs/second-opinion Needs second review by someone else needs/review Needs review size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) labels Oct 18, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 18, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 18, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 18, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 18, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 19, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 19, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 19, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 19, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 19, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 19, 2020
@g-pavlov g-pavlov closed this Oct 19, 2020
@g-pavlov g-pavlov deleted the api branch October 19, 2020 18:01
@g-pavlov g-pavlov restored the api branch October 19, 2020 18:03
@g-pavlov g-pavlov reopened this Oct 19, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 19, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 20, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 20, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 20, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 20, 2020
@g-pavlov
Copy link
Contributor Author

@swilen-iwanow ready for review

@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 21, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 21, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 21, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 21, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 21, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 21, 2020
Copy link
Contributor

@swilen-iwanow swilen-iwanow left a comment

Choose a reason for hiding this comment

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

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/documentation Gardener Documentation kind/api-change API change with impact on API users needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/second-opinion Needs second review by someone else size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

round up the docofrge api
6 participants