Skip to content
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
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand All @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/publish_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/utils_dejacode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions etc/scripts/utils_thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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."
)


Expand Down
2 changes: 1 addition & 1 deletion src/univers/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/univers/gem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/univers/version_constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/univers/version_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand All @@ -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))

Expand Down Expand Up @@ -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.)
"""
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/univers/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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``.
"""
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_maven_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,)))),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rpm_vercmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down