Skip to content

Commit

Permalink
Merge pull request #81 from nexB/release-prep-30-1
Browse files Browse the repository at this point in the history
Prepare Release 30.1
  • Loading branch information
pombredanne committed Jan 17, 2023
2 parents 157f8aa + 37163bb commit 1548127
Show file tree
Hide file tree
Showing 18 changed files with 358 additions and 79 deletions.
96 changes: 76 additions & 20 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,83 @@
name: Release library as a PyPI wheel and sdist on GH release creation
name: Create library release archives, create a GH release and publish PyPI wheel and sdist on tag in main branch


# This is executed automatically on a tag in the main branch

# Summary of the steps:
# - build wheels and sdist
# - upload wheels and sdist to PyPI
# - create gh-release and upload wheels and dists there
# TODO: smoke test wheels and sdist
# TODO: add changelog to release text body

# WARNING: this is designed only for packages building as pure Python wheels

on:
release:
types: [created]
workflow_dispatch:
push:
tags:
- "v*.*.*"

jobs:
build-and-publish-to-pypi:
build-pypi-distribs:
name: Build and publish library to PyPI
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: python -m pip install build --user

- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/

- name: Upload built archives
uses: actions/upload-artifact@v3
with:
name: pypi_archives
path: dist/*


create-gh-release:
name: Create GH release
needs:
- build-pypi-distribs
runs-on: ubuntu-20.04

steps:
- name: Download built archives
uses: actions/download-artifact@v3
with:
name: pypi_archives
path: dist

- name: Create GH release
uses: softprops/action-gh-release@v1
with:
draft: true
files: dist/*


create-pypi-release:
name: Create PyPI release
needs:
- create-gh-release
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/
.
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Download built archives
uses: actions/download-artifact@v3
with:
name: pypi_archives
path: dist

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.py[cod]

# virtualenv and other misc bits
/src/*.egg-info
*.egg-info
/dist
/build
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@ Changelog
=========


v30.1.0 - 2023-01-16
----------------------

This is a minor release without API changes

- Use latest skeleton (and updated configure script)
- Update license list to latest ScanCode and SPDX 3.19
- Use correct syntax for python_require
- Drop using Travis and Appveyor
- Drop support for Python 3.7 and add Python 3.11


30.0.0 - 2022-05-10
v30.0.0 - 2022-05-10
----------------------

This is a minor release with API changes
Expand Down
86 changes: 86 additions & 0 deletions CODE_OF_CONDUCT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Contributor Covenant Code of Conduct
====================================

Our Pledge
----------

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our
project and our community a harassment-free experience for everyone,
regardless of age, body size, disability, ethnicity, gender identity and
expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

Our Standards
-------------

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual
attention or advances
- Trolling, insulting/derogatory comments, and personal or political
attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or
electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

Our Responsibilities
--------------------

Project maintainers are responsible for clarifying the standards of
acceptable behavior and are expected to take appropriate and fair
corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they
deem inappropriate, threatening, offensive, or harmful.

Scope
-----

This Code of Conduct applies both within project spaces and in public
spaces when an individual is representing the project or its community.
Examples of representing a project or community include using an
official project e-mail address, posting via an official social media
account, or acting as an appointed representative at an online or
offline event. Representation of a project may be further defined and
clarified by project maintainers.

Enforcement
-----------

Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported by contacting the project team at pombredanne@gmail.com
or on the Gitter chat channel at https://gitter.im/aboutcode-org/discuss .
All complaints will be reviewed and investigated and will result in a
response that is deemed necessary and appropriate to the circumstances.
The project team is obligated to maintain confidentiality with regard to
the reporter of an incident. Further details of specific enforcement
policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in
good faith may face temporary or permanent repercussions as determined
by other members of the project’s leadership.

Attribution
-----------

This Code of Conduct is adapted from the `Contributor Covenant`_ ,
version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

.. _Contributor Covenant: https://www.contributor-covenant.org
54 changes: 54 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) nexB Inc. and others. All rights reserved.
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/skeleton for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#

# Python version can be specified with `$ PYTHON_EXE=python3.x make conf`
PYTHON_EXE?=python3
VENV=venv
ACTIVATE?=. ${VENV}/bin/activate;

dev:
@echo "-> Configure the development envt."
./configure --dev

isort:
@echo "-> Apply isort changes to ensure proper imports ordering"
${VENV}/bin/isort --sl -l 100 src tests setup.py

black:
@echo "-> Apply black code formatter"
${VENV}/bin/black -l 100 src tests setup.py

doc8:
@echo "-> Run doc8 validation"
@${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/

valid: isort black

check:
@echo "-> Run pycodestyle (PEP8) validation"
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache .
@echo "-> Run isort imports ordering validation"
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
@echo "-> Run black validation"
@${ACTIVATE} black --check --check -l 100 src tests setup.py

clean:
@echo "-> Clean the Python env"
./configure --clean

test:
@echo "-> Run the test suite"
${VENV}/bin/pytest -vvs

docs:
rm -rf docs/_build/
@${ACTIVATE} sphinx-build docs/ docs/_build/

.PHONY: conf dev check valid black isort clean test docs
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ simplify and normalize license expressions (such as SPDX license expressions)
using boolean logic.

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

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

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


Expand Down
28 changes: 22 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,62 @@ jobs:
parameters:
job_name: ubuntu18_cpython
image_name: ubuntu-18.04
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu20_cpython
image_name: ubuntu-20.04
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu22_cpython
image_name: ubuntu-22.04
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos1015_cpython
image_name: macos-10.15
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos11_cpython
image_name: macos-11
python_versions: ['3.7', '3.8', '3.9', '3.10']
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos12_cpython
image_name: macos-12
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-win.yml
parameters:
job_name: win2019_cpython
image_name: windows-2019
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: venv\Scripts\pytest -n 2 -vvs

- template: etc/ci/azure-win.yml
parameters:
job_name: win2022_cpython
image_name: windows-2022
python_versions: ['3.7', '3.8', '3.9', '3.10']
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: venv\Scripts\pytest -n 2 -vvs
Loading

0 comments on commit 1548127

Please sign in to comment.