diff --git a/README.rst b/README.rst index 483db93d..f2a92364 100644 --- a/README.rst +++ b/README.rst @@ -10,7 +10,7 @@ univers: mostly universal version and version ranges comparison and conversion :target: https://www.python.org/downloads/release/python-380/ -**univers** was born out of the need for a mostly univeral way to store version +**univers** was born out of the need for a mostly universal way to store version ranges and to compare two software package versions in VulnerableCode. Package version ranges and version constraints are useful and essential: @@ -36,7 +36,7 @@ ecosystem. **univers** is different: -- It tracks each ecosystem versionning scheme and how two versions are compared. +- It tracks each ecosystem versioning scheme and how two versions are compared. - It support a growing number of package ecosystems versioning in a single library. @@ -52,7 +52,7 @@ How does **univers** work ? ============================ **univers** wraps, embeds and implements multiple version comparison libraries, -each focused on a specific ecosystem versionning scheme. +each focused on a specific ecosystem versioning scheme. For each scheme, **univers** provides an implementation for: diff --git a/etc/scripts/README.rst b/etc/scripts/README.rst index d8b00f98..c4e25ee1 100755 --- a/etc/scripts/README.rst +++ b/etc/scripts/README.rst @@ -118,7 +118,7 @@ See each command line --help option for details. * (TODO) **add_package.py** will add or update a Python package including wheels, sources and ABOUT files and this for multiple Python version and OSes(for use with upload_packages.py afterwards) You will need an Azure personal access - token for buidling binaries and an optional DejaCode API key to post and fetch + token for building binaries and an optional DejaCode API key to post and fetch new package versions there. TODO: explain how we use romp diff --git a/etc/scripts/bootstrap.py b/etc/scripts/bootstrap.py index 31f2f553..fece274e 100644 --- a/etc/scripts/bootstrap.py +++ b/etc/scripts/bootstrap.py @@ -87,7 +87,7 @@ def bootstrap( build_remotely=False, ): """ - Boostrap a thirdparty Python packages directory from pip requirements. + Bootstrap a thirdparty Python packages directory from pip requirements. Fetch or build to THIRDPARTY_DIR all the wheels and source distributions for the pip ``--requirement-file`` requirements FILE(s). Build wheels compatible diff --git a/etc/scripts/publish_files.py b/etc/scripts/publish_files.py index 86693631..7ba67129 100644 --- a/etc/scripts/publish_files.py +++ b/etc/scripts/publish_files.py @@ -131,7 +131,7 @@ def create_or_update_release_and_upload_directory( TOKEN_HELP = ( - "The Github personal acess token is used to authenticate API calls. " + "The Github personal access token is used to authenticate API calls. " "Required unless you set the GITHUB_TOKEN environment variable as an alternative. " "See for details: https://github.com/settings/tokens and " "https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token" diff --git a/etc/scripts/utils_dejacode.py b/etc/scripts/utils_dejacode.py index f28e2479..31adab47 100644 --- a/etc/scripts/utils_dejacode.py +++ b/etc/scripts/utils_dejacode.py @@ -87,7 +87,7 @@ def update_with_dejacode_data(distribution): def update_with_dejacode_about_data(distribution): """ - Update the Distribution `distribution` wiht ABOUT code data fetched from + Update the Distribution `distribution` with ABOUT code data fetched from DejaCode. Return True if data was updated. """ package_data = get_package_data(distribution) diff --git a/etc/scripts/utils_thirdparty.py b/etc/scripts/utils_thirdparty.py index e2778fe7..296842be 100644 --- a/etc/scripts/utils_thirdparty.py +++ b/etc/scripts/utils_thirdparty.py @@ -175,7 +175,7 @@ def fetch_wheels( Download all of the wheel of packages listed in the ``requirements_file`` requirements file into ``dest_dir`` directory. - Only get wheels for the ``environment`` Enviromnent constraints. If the + Only get wheels for the ``environment`` Environment constraints. If the provided ``environment`` is None then the current Python interpreter environment is used implicitly. @@ -1464,7 +1464,7 @@ def fetch_wheel( ): """ Download a binary wheel of this package matching the ``environment`` - Enviromnent constraints into ``dest_dir`` directory. + Environment constraints into ``dest_dir`` directory. Return the wheel filename if it was fetched, None otherwise. @@ -2895,7 +2895,7 @@ def check_romp_is_configured(): raise Exception( "ROMP_BUILD_REQUEST_URL, ROMP_DEFINITION_ID, " "ROMP_PERSONAL_ACCESS_TOKEN and ROMP_USERNAME " - "are required enironment variables." + "are required environment variables." ) diff --git a/src/univers/debian.py b/src/univers/debian.py index b9520df4..ae90c596 100644 --- a/src/univers/debian.py +++ b/src/univers/debian.py @@ -232,7 +232,7 @@ def compare_strings_key(x): def compare_strings(version1, version2): """ - Compare two version strings (upstream or revision) using Debain semantics + Compare two version strings (upstream or revision) using Debian semantics and return one of the following integer numbers: - -1 means version1 sorts before version2 - 0 means version1 and version2 are equal diff --git a/src/univers/gem.py b/src/univers/gem.py index 36eb2a68..b59d32aa 100644 --- a/src/univers/gem.py +++ b/src/univers/gem.py @@ -9,7 +9,7 @@ # Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. # notes: This has been substantially modified and enhanced from the original -# puppeteer code to extract the Ruby version hanlding code. +# puppeteer code to extract the Ruby version handling code. # This code is in turn originally based and updated from the Rubygems code # Originally from https://github.com/rubygems/rubygems and # https://github.com/coi-gov-pl/puppeter diff --git a/src/univers/version_constraint.py b/src/univers/version_constraint.py index a9acd1ae..8ae3a3d9 100644 --- a/src/univers/version_constraint.py +++ b/src/univers/version_constraint.py @@ -254,7 +254,7 @@ def validate(cls, constraints): def simplify(cls, constraints): """ Return a new simplified ``constraints`` list with duplicated constraints - removed. This includes removing exact duplicates adn redundant + removed. This includes removing exact duplicates and redundant constraints. """ constraints = deduplicate(constraints) diff --git a/src/univers/version_range.py b/src/univers/version_range.py index 1f2f5285..9b2867a6 100644 --- a/src/univers/version_range.py +++ b/src/univers/version_range.py @@ -20,7 +20,7 @@ @attr.s(frozen=True, order=False, eq=True, hash=True) class VersionRange: """ - Base version range class. Subclasses must provide implememt. + Base version range class. Subclasses must provide implement. A VersionRange represents a list of constraints on the versions "timeline" of a package. """ @@ -38,7 +38,7 @@ class VersionRange: # PypiVersion. Subclasses MUST provide this. version_class = None - # A list of lists of VersionConstraint that are signposts on the versions + # A tuple of VersionConstraint that are signposts on the versions # timeline constraints = attr.ib(type=tuple, default=attr.Factory(tuple)) @@ -67,7 +67,7 @@ def from_natives(cls, strings): def to_native(self, *args, **kwargs): """ Return a native range string for this VersionRange. Subclasses can - implement. Opetional ``args`` and ``kwargs`` allow subclass to require + implement. Optional ``args`` and ``kwargs`` allow subclass to require extra arguments (such as a package name that some scheme may require like for deb and rpm.) """ @@ -803,7 +803,7 @@ def from_native(cls, string): vend = VersionConstraint(comparator="<", version=end_version) constraints.extend([vstart, vend]) else: - # mainline branch ranges are resolved to a singel constraint + # mainline branch ranges are resolved to a single constraint version = semantic_version.Version.coerce(vs) constraint = VersionConstraint(comparator=">=", version=version) constraints.append(constraint) diff --git a/src/univers/versions.py b/src/univers/versions.py index 82c81d30..429fed56 100644 --- a/src/univers/versions.py +++ b/src/univers/versions.py @@ -22,7 +22,7 @@ Version classes encapsulating the details of each version syntax. For instance semver is a version syntax. Python and Debian use another syntax. -Each subclass primary responsability to is be comparable and orderable +Each subclass primary responsibility to is be comparable and orderable """ # TODO: Add mozilla versions https://github.com/mozilla-releng/mozilla-version @@ -99,7 +99,7 @@ def build_value(self, string): def satisfies(self, constraint): """ - Return True is this Version satifies the ``constraint`` + Return True is this Version satisfies the ``constraint`` VersionConstraint. Satisfying means that this version is "within" the ``constraint``. """ @@ -155,7 +155,7 @@ class PypiVersion(Version): PEP 440 as implemented in packaging with fallback to "legacy" """ - # TODO: ensure we deal with tripple equal + # TODO: ensure we deal with triple equal @classmethod def build_value(cls, string): diff --git a/tests/test_gem.py b/tests/test_gem.py index 5065bbd8..2a675bed 100644 --- a/tests/test_gem.py +++ b/tests/test_gem.py @@ -5,7 +5,7 @@ # Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. # notes: This has been substantially modified and enhanced from the original -# puppeteer code to extract the Ruby version hanlding code. +# puppeteer code to extract the Ruby version handling code. from univers.gem import GemRequirement from univers.gem import GemVersion diff --git a/tests/test_maven_version.py b/tests/test_maven_version.py index 5cfc6912..0aa121b8 100644 --- a/tests/test_maven_version.py +++ b/tests/test_maven_version.py @@ -219,7 +219,7 @@ def test_from_string(self): ("1-final", (1,)), ("1.0-CR", (1, ("rc",))), ("1-cr", (1, ("rc",))), - # test some transistion + # test some transition ("1.0-alpha1", (1, ("alpha", (1,)))), ("1.0-alpha2", (1, ("alpha", (2,)))), ("1.0.0alpha1", (1, ("alpha", (1,)))), diff --git a/tests/test_rpm_vercmp.py b/tests/test_rpm_vercmp.py index 3bc1925a..e3143a7c 100644 --- a/tests/test_rpm_vercmp.py +++ b/tests/test_rpm_vercmp.py @@ -22,7 +22,7 @@ def parse_rpmvercmp_tests(fobj, with_buggy_comparisons=True): """ Yield triples (version1, version2, comparison result) describing the RPM version comparison tests found in the rpmvercmp.at test file-like object at - ``fobj`` Optionally includ "buggy" upstream tests. + ``fobj`` Optionally include "buggy" upstream tests. """ for line in fobj: line = line.strip()