Skip to content

Commit 8213ce4

Browse files
authored
Merge branch 'main' into type-hints
2 parents bcb7e6d + 92b1a24 commit 8213ce4

58 files changed

Lines changed: 92397 additions & 29820 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs-ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-22.04
7+
runs-on: ubuntu-24.04
88

99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: [3.9]
12+
python-version: ["3.11",]
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
fetch-depth: 0
1719

1820
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2022
with:
2123
python-version: ${{ matrix.python-version }}
2224

@@ -30,5 +32,3 @@ jobs:
3032
- name: Check for documentation style errors
3133
working-directory: ./docs
3234
run: ./scripts/doc8_style_check.sh
33-
34-

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: run tests
2+
3+
on: [push, pull_request]
4+
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-24.04
9+
permissions:
10+
contents: read
11+
12+
strategy:
13+
max-parallel: 4
14+
matrix:
15+
python-version: ["3.10", "3.11", "3.12"]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: make dev
28+
29+
- name: Run tests
30+
run: |
31+
source venv/bin/activate
32+
make test

.github/workflows/pypi-release.yml

Lines changed: 69 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,75 @@
11
name: Release library as a PyPI wheel and sdist on tag
22

33
on:
4-
release:
5-
types: [created]
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*.*.*"
68

79
jobs:
8-
build-and-publish-to-pypi:
9-
name: Build and publish library to PyPI
10-
runs-on: ubuntu-20.04
10+
build-pypi-distribs:
11+
name: Build for publishing
12+
runs-on: ubuntu-24.04
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- name: Set up Python
19+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
20+
with:
21+
python-version: "3.10"
22+
23+
- name: Install pypa/build
24+
run: python -m pip install build --user
25+
26+
- name: Build a binary wheel and a source tarball
27+
run: python -m build --sdist --wheel --outdir dist/
28+
29+
- name: Upload built archives
30+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
31+
with:
32+
name: pypi_archives
33+
path: dist/*
34+
35+
create-gh-release:
36+
name: Create GH release
37+
needs:
38+
- build-pypi-distribs
39+
runs-on: ubuntu-24.04
40+
41+
steps:
42+
- name: Download built archives
43+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
44+
with:
45+
name: pypi_archives
46+
path: dist
47+
48+
- name: Create GH release
49+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
50+
with:
51+
draft: false
52+
generate_release_notes: true
53+
files: dist/*
54+
55+
create-pypi-release:
56+
name: Create PyPI release
57+
needs:
58+
- create-gh-release
59+
runs-on: ubuntu-24.04
60+
environment: pypi-publish
61+
permissions:
62+
id-token: write
63+
1164
steps:
12-
- uses: actions/checkout@master
13-
- name: Set up Python
14-
uses: actions/setup-python@v1
15-
with:
16-
python-version: 3.9
17-
- name: Install pypa/build
18-
run: python -m pip install build --user
19-
- name: Build a binary wheel and a source tarball
20-
run: python -m build --sdist --wheel --outdir dist/
21-
.
22-
- name: Publish distribution to PyPI
23-
if: startsWith(github.ref, 'refs/tags')
24-
uses: pypa/gh-action-pypi-publish@master
25-
with:
26-
password: ${{ secrets.PYPI_API_TOKEN }}
27-
65+
- name: Download built archives
66+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
67+
with:
68+
name: pypi_archives
69+
path: dist
70+
71+
- name: Publish to PyPI
72+
if: startsWith(github.ref, 'refs/tags/')
73+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
74+
with:
75+
verbose: true

CHANGELOG.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
Changelog
22
=========
33

4+
Version v32.0.1
5+
----------------
6+
7+
- Add lexicographic versioning scheme https://github.com/aboutcode-org/univers/pull/160
8+
- Datetime versioning scheme https://github.com/aboutcode-org/univers/pull/149
9+
- Add alpine in RANGE_CLASS_BY_SCHEME https://github.com/aboutcode-org/univers/pull/185
10+
- chore: pin workflow dependencies and publish using trusted publisher https://github.com/aboutcode-org/univers/pull/193
11+
- fix: return None when from_versions is called with empty constraints https://github.com/aboutcode-org/univers/pull/194
12+
- Raise error for deb comparators << and >> https://github.com/aboutcode-org/univers/pull/190
13+
- fix: use apk scheme for Alpine packages https://github.com/aboutcode-org/univers/pull/197
14+
15+
16+
Version v31.1.0
17+
----------------
18+
19+
- Introduce intdot versioning scheme
20+
- Add description to test fixture
21+
- Organize schema-based tests according to ecosystem
22+
- Use VERS test definition schema for tests
23+
424
Version v31.0.0
525
----------------
626

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
univers: mostly universal version and version ranges comparison and conversion
1+
univers: mostly universal version and version range comparison and conversion
22
===============================================================================
33

44
|Build Status| |License| |Python 3.6+|
@@ -62,16 +62,16 @@ For each scheme, **univers** provides an implementation for:
6262
- converting a range back to its scheme-native range syntax and to the
6363
``vers`` syntax.
6464

65-
**univers** implements ``vers``, an experimental unified and mostly universal
65+
**univers** implements VERS, an experimental unified and mostly universal
6666
version range syntax. It can parse and convert an existing native version range
67-
strings to this unified syntax. For example, this means:
67+
string to this unified syntax. For example, this means:
6868

6969
- converting ">=1.2.3" as used in a Python package into ``vers:pypi/>=1.2.3``,
7070

7171
- or converting "^1.0.2" as used in an npm package dependency declaration into
7272
``vers:npm/>=1.0.2|<2.0.0``
7373

74-
The supported package ecosystems versioning schemes and underlying libraries
74+
The supported package ecosystem versioning schemes and underlying libraries
7575
include:
7676

7777
- npm that use the "node-semver" ranges notation and the semver versions syntax
@@ -124,7 +124,7 @@ Alternative
124124
Rather than using ecosystem-specific version schemes and code, another approach
125125
is to use a single procedure for all the versions as implemented in `libversion
126126
<https://github.com/repology/libversion>`_. ``libversion`` works in the most
127-
common case but may not work correctly when a task that demand precise version
127+
common cases but may not work correctly when a task that demand precise version
128128
comparisons such as for dependency resolution and vulnerability lookup where
129129
a "good enough" comparison accuracy is not acceptable. ``libversion`` does not
130130
handle version range notations.

azure-pipelines.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,21 @@
77

88
jobs:
99

10-
- template: etc/ci/azure-posix.yml
11-
parameters:
12-
job_name: ubuntu20_cpython
13-
image_name: ubuntu-20.04
14-
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
15-
test_suites:
16-
all: |
17-
source venv/bin/activate
18-
pytest -n 2 -vvs
19-
2010
- template: etc/ci/azure-posix.yml
2111
parameters:
2212
job_name: ubuntu22_cpython
2313
image_name: ubuntu-22.04
24-
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
14+
python_versions: ['3.9', '3.10', '3.11', '3.12']
2515
test_suites:
2616
all: |
2717
source venv/bin/activate
2818
pytest -n 2 -vvs
2919
3020
- template: etc/ci/azure-posix.yml
3121
parameters:
32-
job_name: macos12_cpython
33-
image_name: macOS-12
34-
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
22+
job_name: ubuntu24_cpython
23+
image_name: ubuntu-24.04
24+
python_versions: ['3.9', '3.10', '3.11', '3.12']
3525
test_suites:
3626
all: |
3727
source venv/bin/activate
@@ -41,23 +31,33 @@ jobs:
4131
parameters:
4232
job_name: macos13_cpython
4333
image_name: macOS-13
44-
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
34+
python_versions: ['3.9', '3.10', '3.11', '3.12']
4535
test_suites:
4636
all: venv/bin/pytest -n 2 -vvs
4737

4838
- template: etc/ci/azure-posix.yml
4939
parameters:
5040
job_name: macos14_cpython_arm64
5141
image_name: macOS-14
52-
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
42+
python_versions: ['3.9', '3.10', '3.11', '3.12']
5343
test_suites:
5444
all: venv/bin/pytest -n 2 -vvs
5545

46+
- template: etc/ci/azure-posix.yml
47+
parameters:
48+
job_name: macos15_cpython
49+
image_name: macOS-15
50+
python_versions: ['3.9', '3.10', '3.11', '3.12']
51+
test_suites:
52+
all: |
53+
source venv/bin/activate
54+
pytest -n 2 -vvs
55+
5656
- template: etc/ci/azure-win.yml
5757
parameters:
5858
job_name: win2019_cpython
5959
image_name: windows-2019
60-
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
60+
python_versions: ['3.9', '3.10', '3.11', '3.12']
6161
test_suites:
6262
all: |
6363
call venv\Scripts\activate.bat
@@ -67,7 +67,7 @@ jobs:
6767
parameters:
6868
job_name: win2022_cpython
6969
image_name: windows-2022
70-
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
70+
python_versions: ['3.9', '3.10', '3.11', '3.12']
7171
test_suites:
7272
all: |
7373
call venv\Scripts\activate.bat

docs/source/contribute/contrib_doc.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ Interspinx
172172
ScanCode toolkit documentation uses `Intersphinx <http://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html>`_
173173
to link to other Sphinx Documentations, to maintain links to other Aboutcode Projects.
174174

175-
To link sections in the same documentation, standart reST labels are used. Refer
176-
`Cross-Referencing <http://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#ref-role>`_ for more information.
175+
To link sections in the same documentation, standard reST labels are used. Refer
176+
`Cross-Referencing <http://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html>`_ for more information.
177177

178178
For example::
179179

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ packaging==25.0
33
pyparsing==2.4.7
44
semantic-version==2.8.5
55
semver==2.13.0
6-
isort==5.10.1
6+
isort==5.10.1

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[metadata]
22
name = univers
3+
version = 32.0.1
34
license = Apache-2.0 AND BSD-3-Clause AND MIT
45

56
# description must be on ONE line https://github.com/pypa/setuptools/issues/1390

0 commit comments

Comments
 (0)