Skip to content
Merged
Changes from 1 commit
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
12 changes: 8 additions & 4 deletions source/addonHandler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,15 +720,17 @@ def createAddonBundleFromPath(path, destDir=None):
def _report_manifest_errors(manifest):
log.warning("Error loading manifest:\n%s", manifest.errors)


class AddonManifest(ConfigObj):
""" Add-on manifest file. It contains metadata about an NVDA add-on package. """
configspec = ConfigObj(StringIO(
"""
# NVDA Add-on Manifest configuration specification
# Add-on unique name
# Suggest convention is lowerCamelCase.
Comment thread
seanbudd marked this conversation as resolved.
Resolved
name = string()

# short summary (label) of the add-on to show to users.
# short summary (label) of the add-on to show to users.
summary = string()

# Long description with further information and instructions
Expand All @@ -737,7 +739,8 @@ class AddonManifest(ConfigObj):
# Name of the author or entity that created the add-on
author = string()

# Version of the add-on. Should preferably in some standard format such as x.y.z
# Version of the add-on.
# Should be in <major>.<minor>.<patch> format.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does it mean that in the future, X.Y.Z will be mandatory?
For now, I have not dealt with beta versions. However, I was hoping to use version names such as "4.3beta1". "4.3.1" does not indicate clearly to the user that it is a beta version. Having a version name indicating clearly which version is a beta and which not in the add-on manager (or in the future add-on store) would be a plus IMO.

Same for dev versions even if I personally do not plan to release dev versions of my add-ons.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

submissions with these formats may not be valid for the add-on store. The add-on store requires a major.minor.pitch version scheme.
This current PR just proposes encouraging authors to follow the standards for the add-on store when making a manifest, not force any mandatory changes.

It's still an open question whether or not we add validation enforcing major.minor.patch in all add-on manifests, not just submissions to the add-on store.
This would not be until a breaking release of course.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
# Should be in <major>.<minor>.<patch> format.
# Suggested convention is <major>.<minor>.<patch> format.

version = string()

# The minimum required NVDA version for this add-on to work correctly.
Expand All @@ -747,8 +750,9 @@ class AddonManifest(ConfigObj):
# Must be greater than or equal to minimumNVDAVersion
lastTestedNVDAVersion = apiVersion(default="0.0.0")

# URL for more information about the add-on. New versions and such.
url= string(default=None)
# URL for more information about the add-on, e.g. a homepage.
# Should begin with https://
url = string(default=None)

# Name of default documentation file for the add-on.
docFileName = string(default=None)
Expand Down