Skip to content

Commit 1548127

Browse files
authored
Merge pull request #81 from nexB/release-prep-30-1
Prepare Release 30.1
2 parents 157f8aa + 37163bb commit 1548127

18 files changed

+358
-79
lines changed

.github/workflows/pypi-release.yml

Lines changed: 76 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,83 @@
1-
name: Release library as a PyPI wheel and sdist on GH release creation
1+
name: Create library release archives, create a GH release and publish PyPI wheel and sdist on tag in main branch
2+
3+
4+
# This is executed automatically on a tag in the main branch
5+
6+
# Summary of the steps:
7+
# - build wheels and sdist
8+
# - upload wheels and sdist to PyPI
9+
# - create gh-release and upload wheels and dists there
10+
# TODO: smoke test wheels and sdist
11+
# TODO: add changelog to release text body
12+
13+
# WARNING: this is designed only for packages building as pure Python wheels
214

315
on:
4-
release:
5-
types: [created]
16+
workflow_dispatch:
17+
push:
18+
tags:
19+
- "v*.*.*"
620

721
jobs:
8-
build-and-publish-to-pypi:
22+
build-pypi-distribs:
923
name: Build and publish library to PyPI
1024
runs-on: ubuntu-20.04
25+
26+
steps:
27+
- uses: actions/checkout@master
28+
- name: Set up Python
29+
uses: actions/setup-python@v1
30+
with:
31+
python-version: 3.9
32+
33+
- name: Install pypa/build
34+
run: python -m pip install build --user
35+
36+
- name: Build a binary wheel and a source tarball
37+
run: python -m build --sdist --wheel --outdir dist/
38+
39+
- name: Upload built archives
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: pypi_archives
43+
path: dist/*
44+
45+
46+
create-gh-release:
47+
name: Create GH release
48+
needs:
49+
- build-pypi-distribs
50+
runs-on: ubuntu-20.04
51+
52+
steps:
53+
- name: Download built archives
54+
uses: actions/download-artifact@v3
55+
with:
56+
name: pypi_archives
57+
path: dist
58+
59+
- name: Create GH release
60+
uses: softprops/action-gh-release@v1
61+
with:
62+
draft: true
63+
files: dist/*
64+
65+
66+
create-pypi-release:
67+
name: Create PyPI release
68+
needs:
69+
- create-gh-release
70+
runs-on: ubuntu-20.04
71+
1172
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-
73+
- name: Download built archives
74+
uses: actions/download-artifact@v3
75+
with:
76+
name: pypi_archives
77+
path: dist
78+
79+
- name: Publish to PyPI
80+
if: startsWith(github.ref, 'refs/tags')
81+
uses: pypa/gh-action-pypi-publish@master
82+
with:
83+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.py[cod]
33

44
# virtualenv and other misc bits
5+
/src/*.egg-info
56
*.egg-info
67
/dist
78
/build

CHANGELOG.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@ Changelog
22
=========
33

44

5+
v30.1.0 - 2023-01-16
6+
----------------------
7+
8+
This is a minor release without API changes
9+
10+
- Use latest skeleton (and updated configure script)
11+
- Update license list to latest ScanCode and SPDX 3.19
12+
- Use correct syntax for python_require
13+
- Drop using Travis and Appveyor
14+
- Drop support for Python 3.7 and add Python 3.11
15+
516

6-
30.0.0 - 2022-05-10
17+
v30.0.0 - 2022-05-10
718
----------------------
819

920
This is a minor release with API changes

CODE_OF_CONDUCT.rst

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
Contributor Covenant Code of Conduct
2+
====================================
3+
4+
Our Pledge
5+
----------
6+
7+
In the interest of fostering an open and welcoming environment, we as
8+
contributors and maintainers pledge to making participation in our
9+
project and our community a harassment-free experience for everyone,
10+
regardless of age, body size, disability, ethnicity, gender identity and
11+
expression, level of experience, education, socio-economic status,
12+
nationality, personal appearance, race, religion, or sexual identity and
13+
orientation.
14+
15+
Our Standards
16+
-------------
17+
18+
Examples of behavior that contributes to creating a positive environment
19+
include:
20+
21+
- Using welcoming and inclusive language
22+
- Being respectful of differing viewpoints and experiences
23+
- Gracefully accepting constructive criticism
24+
- Focusing on what is best for the community
25+
- Showing empathy towards other community members
26+
27+
Examples of unacceptable behavior by participants include:
28+
29+
- The use of sexualized language or imagery and unwelcome sexual
30+
attention or advances
31+
- Trolling, insulting/derogatory comments, and personal or political
32+
attacks
33+
- Public or private harassment
34+
- Publishing others’ private information, such as a physical or
35+
electronic address, without explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
Our Responsibilities
40+
--------------------
41+
42+
Project maintainers are responsible for clarifying the standards of
43+
acceptable behavior and are expected to take appropriate and fair
44+
corrective action in response to any instances of unacceptable behavior.
45+
46+
Project maintainers have the right and responsibility to remove, edit,
47+
or reject comments, commits, code, wiki edits, issues, and other
48+
contributions that are not aligned to this Code of Conduct, or to ban
49+
temporarily or permanently any contributor for other behaviors that they
50+
deem inappropriate, threatening, offensive, or harmful.
51+
52+
Scope
53+
-----
54+
55+
This Code of Conduct applies both within project spaces and in public
56+
spaces when an individual is representing the project or its community.
57+
Examples of representing a project or community include using an
58+
official project e-mail address, posting via an official social media
59+
account, or acting as an appointed representative at an online or
60+
offline event. Representation of a project may be further defined and
61+
clarified by project maintainers.
62+
63+
Enforcement
64+
-----------
65+
66+
Instances of abusive, harassing, or otherwise unacceptable behavior may
67+
be reported by contacting the project team at [email protected]
68+
or on the Gitter chat channel at https://gitter.im/aboutcode-org/discuss .
69+
All complaints will be reviewed and investigated and will result in a
70+
response that is deemed necessary and appropriate to the circumstances.
71+
The project team is obligated to maintain confidentiality with regard to
72+
the reporter of an incident. Further details of specific enforcement
73+
policies may be posted separately.
74+
75+
Project maintainers who do not follow or enforce the Code of Conduct in
76+
good faith may face temporary or permanent repercussions as determined
77+
by other members of the project’s leadership.
78+
79+
Attribution
80+
-----------
81+
82+
This Code of Conduct is adapted from the `Contributor Covenant`_ ,
83+
version 1.4, available at
84+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
85+
86+
.. _Contributor Covenant: https://www.contributor-covenant.org

Makefile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (c) nexB Inc. and others. All rights reserved.
4+
# ScanCode is a trademark of nexB Inc.
5+
# SPDX-License-Identifier: Apache-2.0
6+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7+
# See https://github.com/nexB/skeleton for support or download.
8+
# See https://aboutcode.org for more information about nexB OSS projects.
9+
#
10+
11+
# Python version can be specified with `$ PYTHON_EXE=python3.x make conf`
12+
PYTHON_EXE?=python3
13+
VENV=venv
14+
ACTIVATE?=. ${VENV}/bin/activate;
15+
16+
dev:
17+
@echo "-> Configure the development envt."
18+
./configure --dev
19+
20+
isort:
21+
@echo "-> Apply isort changes to ensure proper imports ordering"
22+
${VENV}/bin/isort --sl -l 100 src tests setup.py
23+
24+
black:
25+
@echo "-> Apply black code formatter"
26+
${VENV}/bin/black -l 100 src tests setup.py
27+
28+
doc8:
29+
@echo "-> Run doc8 validation"
30+
@${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/
31+
32+
valid: isort black
33+
34+
check:
35+
@echo "-> Run pycodestyle (PEP8) validation"
36+
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache .
37+
@echo "-> Run isort imports ordering validation"
38+
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
39+
@echo "-> Run black validation"
40+
@${ACTIVATE} black --check --check -l 100 src tests setup.py
41+
42+
clean:
43+
@echo "-> Clean the Python env"
44+
./configure --clean
45+
46+
test:
47+
@echo "-> Run the test suite"
48+
${VENV}/bin/pytest -vvs
49+
50+
docs:
51+
rm -rf docs/_build/
52+
@${ACTIVATE} sphinx-build docs/ docs/_build/
53+
54+
.PHONY: conf dev check valid black isort clean test docs

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ simplify and normalize license expressions (such as SPDX license expressions)
77
using boolean logic.
88

99
- License: Apache-2.0
10-
- Python: 3.6+
10+
- Python: 3.7+
1111
- Homepage: https://github.com/nexB/license-expression/
1212
- Install: `pip install license-expression` also available in most Linux distro.
1313

@@ -112,7 +112,7 @@ Using boolean logic, license expressions can be tested for equality, containment
112112
equivalence and can be normalized or simplified.
113113

114114
It also bundles the SPDX License list (3.19 as of now) and the ScanCode license
115-
DB (based on ScanCode 32.0.0b1) to easily parse and validate expressions using
115+
DB (based on latest ScanCode) to easily parse and validate expressions using
116116
the license symbols.
117117

118118

azure-pipelines.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,62 @@ jobs:
1111
parameters:
1212
job_name: ubuntu18_cpython
1313
image_name: ubuntu-18.04
14-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
14+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
1515
test_suites:
1616
all: venv/bin/pytest -n 2 -vvs
1717

1818
- template: etc/ci/azure-posix.yml
1919
parameters:
2020
job_name: ubuntu20_cpython
2121
image_name: ubuntu-20.04
22-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
22+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
23+
test_suites:
24+
all: venv/bin/pytest -n 2 -vvs
25+
26+
- template: etc/ci/azure-posix.yml
27+
parameters:
28+
job_name: ubuntu22_cpython
29+
image_name: ubuntu-22.04
30+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
2331
test_suites:
2432
all: venv/bin/pytest -n 2 -vvs
2533

2634
- template: etc/ci/azure-posix.yml
2735
parameters:
2836
job_name: macos1015_cpython
2937
image_name: macos-10.15
30-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
38+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
3139
test_suites:
3240
all: venv/bin/pytest -n 2 -vvs
3341

3442
- template: etc/ci/azure-posix.yml
3543
parameters:
3644
job_name: macos11_cpython
3745
image_name: macos-11
38-
python_versions: ['3.7', '3.8', '3.9', '3.10']
46+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
47+
test_suites:
48+
all: venv/bin/pytest -n 2 -vvs
49+
50+
- template: etc/ci/azure-posix.yml
51+
parameters:
52+
job_name: macos12_cpython
53+
image_name: macos-12
54+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
3955
test_suites:
4056
all: venv/bin/pytest -n 2 -vvs
4157

4258
- template: etc/ci/azure-win.yml
4359
parameters:
4460
job_name: win2019_cpython
4561
image_name: windows-2019
46-
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
62+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
4763
test_suites:
4864
all: venv\Scripts\pytest -n 2 -vvs
4965

5066
- template: etc/ci/azure-win.yml
5167
parameters:
5268
job_name: win2022_cpython
5369
image_name: windows-2022
54-
python_versions: ['3.7', '3.8', '3.9', '3.10']
70+
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
5571
test_suites:
5672
all: venv\Scripts\pytest -n 2 -vvs

0 commit comments

Comments
 (0)