Skip to content

Commit bbfc52a

Browse files
committed
merge from tip into issue2550923_computed_property
2 parents 068ad3a + 692aa3d commit bbfc52a

File tree

159 files changed

+30517
-23058
lines changed

Some content is hidden

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

159 files changed

+30517
-23058
lines changed

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# To get started with Dependabot version updates, you'll need to
2+
# specify which
3+
# package ecosystems to update and where the package manifests are
4+
# located.
5+
# Please see the documentation for all configuration options:
6+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
7+
8+
version: 2
9+
updates:
10+
- package-ecosystem: "pip"
11+
directory: "/" # Location of package manifests
12+
schedule:
13+
interval: "weekly"
14+
15+
- package-ecosystem: "github-actions"
16+
# Workflow files stored in the
17+
# default location of `.github/workflows`
18+
directory: "/"
19+
schedule:
20+
interval: "weekly"
21+
- package-ecosystem: "docker"
22+
directory: "/scripts/Docker"
23+
target-branch: "master"
24+
schedule:
25+
interval: "weekly"

.github/workflows/anchore.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,31 @@ concurrency:
2929

3030
jobs:
3131
Anchore-Build-Scan:
32+
if: "!contains(github.event.head_commit.message, 'no-github-ci')"
3233
permissions:
3334
contents: read # for actions/checkout to fetch code
3435
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
3536
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
3637
runs-on: ubuntu-latest
3738
steps:
3839
- name: Checkout the code
39-
uses: actions/checkout@v3
40+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4041
- name: Build the Docker image
41-
run: docker build . --file scripts/Docker/Dockerfile --tag localbuild/testimage:latest
42+
run: docker pull python:3-alpine; docker build . --file scripts/Docker/Dockerfile --tag localbuild/testimage:latest
43+
- name: List the Docker image
44+
run: docker image ls
4245
- name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled
43-
uses: anchore/scan-action@v3
46+
uses: anchore/scan-action@4be3c24559b430723e51858969965e163b196957 # v3.3.5
4447
id: scan
4548
with:
4649
image: "localbuild/testimage:latest"
47-
acs-report-enable: true
48-
fail-build: false
50+
fail-build: true
4951
- name: Upload Anchore Scan Report
50-
uses: github/codeql-action/upload-sarif@v2
52+
if: always()
53+
uses: github/codeql-action/upload-sarif@83f0fe6c4988d98a455712a27f0255212bba9bd4
54+
# v2.3.6
5155
with:
5256
sarif_file: ${{ steps.scan.outputs.sarif }}
5357
- name: Inspect action SARIF report
58+
if: always()
5459
run: cat ${{ steps.scan.outputs.sarif }}

.github/workflows/ci-test.yml

Lines changed: 50 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# merged in python-package.yml workflow
22

3+
# reference docs:
4+
# https://blog.deepjyoti30.dev/tests-github-python
5+
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
6+
# https://github.com/pypa/twine/blob/main/.github/workflows/main.yml
7+
38
name: roundup-ci
49

510
on:
@@ -28,42 +33,48 @@ jobs:
2833
name: CI build test
2934

3035
# run the finalizer for coveralls even if one or more
31-
# matrix runs fail.
32-
continue-on-error: true
36+
# experimental matrix runs fail.
37+
# continue-on-error: ${{ matrix.experimental }}
3338

3439
#runs-on: ubuntu-latest
3540
# use below if running on multiple OS's.
3641
runs-on: ${{ matrix.os }}
3742

43+
if: "!contains(github.event.head_commit.message, 'no-github-ci')"
44+
3845
strategy:
3946
fail-fast: false
4047
max-parallel: 4
4148
matrix:
4249
# Run in all these versions of Python
43-
python-version: [ "2.7", "3.10", "3.9", "3.8", "3.6", "3.11-dev" ]
50+
python-version:
51+
- "2.7"
52+
- "3.10"
53+
# - "3.9"
54+
- "3.8"
55+
# - "3.7"
56+
- "3.11"
4457

4558
# use for multiple os or ubuntu versions
4659
#os: [ubuntu-latest, macos-latest, windows-latest]
47-
os: [ubuntu-latest, ubuntu-22.04]
60+
# ubuntu latest 22.04 12/2022
61+
os: [ubuntu-latest, ubuntu-20.04]
4862

4963
# if the ones above fail. fail the build
5064
experimental: [false]
5165

5266
include:
53-
# example: if 3.12 fails the jobs still succeeds
54-
# - python-version: 3.12
55-
# experimental: [true]
56-
# version 2.7 not available on unbuntu-22.04 github
57-
# - python-version: 2.7
58-
# os: ubuntu-22.04
59-
# experimental: true
60-
- python-version: 3.11-dev
67+
# example: if 3.12 fails the jobs still succeeds
68+
- python-version: 3.12
6169
os: ubuntu-22.04
6270
experimental: [true]
71+
# 3.6 not available on new 22.04 runners, so run on 20.04 ubuntu
72+
- python-version: 3.6
73+
os: ubuntu-20.04
6374

6475
exclude:
65-
# skip all python versions on 22.04 except explicitly included
66-
- os: ubuntu-22.04
76+
# skip all python versions on 20.04 except explicitly included
77+
- os: ubuntu-20.04
6778

6879
env:
6980
# get colorized pytest output even without a controlling tty
@@ -79,20 +90,25 @@ jobs:
7990
# if: {{ false }}
8091
# continue running if step fails
8192
# continue-on-error: true
82-
uses: actions/checkout@v3
93+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
8394

8495
# Setup version of Python to use
8596
- name: Set Up Python ${{ matrix.python-version }}
86-
uses: actions/setup-python@v4
97+
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
8798
with:
8899
python-version: ${{ matrix.python-version }}
100+
allow-prereleases: true
89101
cache: 'pip'
90102

103+
- name: Install build tools - setuptools
104+
run: pip install setuptools
105+
91106
# Display the Python version being used
92107
- name: Display Python and key module versions
93108
run: |
94109
python -c "import sys; print('python version: ', sys.version)"
95-
python -c "import sqlite3; print('sqlite3 version, sqlite version: ', sqlite3.version, sqlite3.sqlite_version)"
110+
python -c "import sqlite3; print('sqlite version: ', sqlite3.sqlite_version)"
111+
python -c "import setuptools; print('setuptools version: ', setuptools.__version__);"
96112
97113
# Install the databases
98114
- name: Install mysql/mariadb
@@ -114,7 +130,7 @@ jobs:
114130
115131
- name: Install postgres
116132
run: |
117-
sudo apt-get install postgresql
133+
sudo apt-get update && sudo apt-get install postgresql
118134
# Disable fsync for speed, don't care about data durability
119135
# when testing
120136
sudo sed -i -e '$a\fsync = off' /etc/postgresql/*/*/postgresql.conf
@@ -157,7 +173,11 @@ jobs:
157173
# older python and newest on newer.
158174
if [[ $PYTHON_VERSION == "2."* ]]; then pip install sphinx==1.8.5; fi
159175
if [[ $PYTHON_VERSION == '3.'* ]] ; then pip install sphinx; fi
160-
XAPIAN_VER=$(dpkg -l libxapian-dev | tail -n 1 | awk '{print $3}' | cut -d '-' -f 1); echo $XAPIAN_VER
176+
if [[ $PYTHON_VERSION == '3.12'* ]] ; then \
177+
XAPIAN_VER=1.4.22; \
178+
else
179+
XAPIAN_VER=$(dpkg -l libxapian-dev | tail -n 1 | awk '{print $3}' | cut -d '-' -f 1); echo $XAPIAN_VER; \
180+
fi
161181
cd /tmp
162182
curl -s -O https://oligarchy.co.uk/xapian/$XAPIAN_VER/xapian-bindings-$XAPIAN_VER.tar.xz
163183
tar -Jxvf xapian-bindings-$XAPIAN_VER.tar.xz
@@ -169,10 +189,10 @@ jobs:
169189
# Change distutils.sysconfig... to just sysconfig and SO
170190
# to EXT_SUFFIX to get valid value.
171191
if [[ $PYTHON_VERSION == "3."* ]]; then sed -i -e '/PYTHON3_SO=/s/distutils\.//g' -e '/PYTHON3_SO=/s/"SO"/"EXT_SUFFIX"/g' configure; ./configure --prefix=$VIRTUAL_ENV --with-python3 --disable-documentation; fi
172-
case "$PYTHON_VERSION" in nightly) echo skipping xapian build;; *) make && sudo make install; esac
192+
case "$PYTHON_VERSION" in nightly|3.12*) echo skipping xapian build;; *) make && sudo make install; esac
173193
174194
- name: Install pytest and other packages needed for running tests
175-
run: pip install codecov flake8 mock pytest pytest-cov requests
195+
run: pip install flake8 mock pytest pytest-cov requests
176196

177197
- name: Test build roundup and install locale so lang tests work.
178198
run: |
@@ -194,6 +214,7 @@ jobs:
194214
run: |
195215
if [[ "$PYTHON_VERSION" != "2."* ]]; then
196216
pytest -r a \
217+
--durations=20 \
197218
-W default \
198219
-W "ignore:SelectableGroups:DeprecationWarning" \
199220
-W "ignore:the imp module:DeprecationWarning:gpg.gpgme:15" \
@@ -207,20 +228,20 @@ jobs:
207228
fi
208229
else
209230
# python2 case
210-
pytest -v -r a test/ --cov=roundup
231+
pytest -v -r a --durations=20 test/ --cov=roundup
211232
fi
212233
213234
- name: Upload coverage to Codecov
214235
# see: https://github.com/codecov/codecov-action#usage
215-
uses: codecov/codecov-action@v3
236+
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
216237
with:
217238
verbose: true
218239
token: ${{ secrets.CODECOV_TOKEN }}
219240

220241
- name: Upload coverage to Coveralls
221242
# python 2.7 and 3.6 versions of coverage can't produce lcov files.
222243
if: matrix.python-version != '2.7' && matrix.python-version != '3.6'
223-
uses: coverallsapp/github-action@master
244+
uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d # master
224245
with:
225246
github-token: ${{ secrets.GITHUB_TOKEN }}
226247
path-to-lcov: coverage.lcov
@@ -247,13 +268,16 @@ jobs:
247268
# -f scripts/Docker/Dockerfile .
248269

249270

250-
# in parallel build codecov requires a finish step
271+
# in parallel build coveralls requires a finish step
251272
finish:
252273
needs: test
253274
runs-on: ubuntu-latest
275+
276+
if: "!contains(github.event.head_commit.message, 'no-github-ci')"
277+
254278
steps:
255279
- name: Coveralls Finished
256-
uses: coverallsapp/github-action@master
280+
uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d # master
257281
with:
258282
github-token: ${{ secrets.github_token }}
259283
parallel-finished: true

.github/workflows/codeql-analysis.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
schedule:
2222
- cron: '28 17 * * 1'
2323

24+
permissions:
25+
contents: read
26+
2427
concurrency:
2528
group: ${{ github.workflow }}-${{ github.ref }}
2629
cancel-in-progress: true
@@ -30,6 +33,12 @@ jobs:
3033
name: Analyze
3134
runs-on: ubuntu-latest
3235

36+
if: "!contains(github.event.head_commit.message, 'no-github-ci')"
37+
38+
permissions:
39+
contents: read
40+
security-events: write
41+
3342
strategy:
3443
fail-fast: false
3544
matrix:
@@ -40,11 +49,11 @@ jobs:
4049

4150
steps:
4251
- name: Checkout repository
43-
uses: actions/checkout@v2
52+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v2.6.0
4453

4554
# Initializes the CodeQL tools for scanning.
4655
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
56+
uses: github/codeql-action/init@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6
4857
with:
4958
languages: ${{ matrix.language }}
5059
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -55,7 +64,7 @@ jobs:
5564
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5665
# If this step fails, then you should remove it and run the build manually (see below)
5766
- name: Autobuild
58-
uses: github/codeql-action/autobuild@v2
67+
uses: github/codeql-action/autobuild@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6
5968

6069
# ℹ️ Command-line programs to run using the OS shell.
6170
# 📚 https://git.io/JvXDl
@@ -69,4 +78,4 @@ jobs:
6978
# make release
7079

7180
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
81+
uses: github/codeql-action/analyze@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6

.github/workflows/ossf-scorecard.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '25 21 * * 5'
14+
push:
15+
branches: [ "master" ]
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecard analysis
23+
runs-on: ubuntu-latest
24+
25+
if: "!contains(github.event.head_commit.message, 'no-github-ci')"
26+
27+
permissions:
28+
# Needed to upload the results to code-scanning dashboard.
29+
security-events: write
30+
# Needed to publish results and get a badge (see publish_results below).
31+
id-token: write
32+
# Uncomment the permissions below if installing in a private repository.
33+
# contents: read
34+
# actions: read
35+
36+
steps:
37+
- name: "Checkout code"
38+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.1.0
39+
with:
40+
persist-credentials: false
41+
42+
- name: "Run analysis"
43+
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3
44+
with:
45+
results_file: results.sarif
46+
results_format: sarif
47+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
48+
# - you want to enable the Branch-Protection check on a *public* repository, or
49+
# - you are installing Scorecard on a *private* repository
50+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
51+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
52+
53+
# Public repositories:
54+
# - Publish results to OpenSSF REST API for easy access by consumers
55+
# - Allows the repository to include the Scorecard badge.
56+
# - See https://github.com/ossf/scorecard-action#publishing-results.
57+
# For private repositories:
58+
# - `publish_results` will always be set to `false`, regardless
59+
# of the value entered here.
60+
publish_results: true
61+
62+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
63+
# format to the repository Actions tab.
64+
- name: "Upload artifact"
65+
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
66+
with:
67+
name: SARIF file
68+
path: results.sarif
69+
retention-days: 5
70+
71+
# Upload the results to GitHub's code scanning dashboard.
72+
- name: "Upload to code-scanning"
73+
uses: github/codeql-action/upload-sarif@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.1.27
74+
with:
75+
sarif_file: results.sarif

.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,4 @@ c90104abe508e3886917243e4acd069c8ef7a1a4 2.2.0
141141
0000000000000000000000000000000000000000 2.2.0
142142
0000000000000000000000000000000000000000 2.2.0
143143
239d9542b02062c56f88fd1de8b87c4d88d700ad 2.2.0
144+
51fc06fabcee043db116e2fbdcdcf5e86b67ed3d 2.3.0b2

0 commit comments

Comments
 (0)