Skip to content

Commit 7b6f41f

Browse files
committed
Merge branch 'add-code-style-checks' of https://github.com/nexB/skeleton
into add-code-style-checks Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
2 parents 5b0f4d6 + f3a8aa6 commit 7b6f41f

File tree

5 files changed

+180
-4
lines changed

5 files changed

+180
-4
lines changed

README.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Usage
1414

1515
A brand new project
1616
-------------------
17+
1718
.. code-block:: bash
1819
1920
git init my-new-repo
@@ -27,6 +28,7 @@ From here, you can make the appropriate changes to the files for your specific p
2728

2829
Update an existing project
2930
---------------------------
31+
3032
.. code-block:: bash
3133
3234
cd my-existing-project
@@ -42,10 +44,49 @@ More usage instructions can be found in ``docs/skeleton-usage.rst``.
4244
Release Notes
4345
=============
4446

47+
- 2025-03-31:
48+
49+
- Use ruff as the main code formatting tool, add ruff rules to pyproject.toml
50+
51+
- 2025-03-29:
52+
53+
- Add support for beta macOS-15
54+
- Add support for beta windows-2025
55+
56+
- 2025-02-14:
57+
58+
- Drop support for Python 3.8, add support in CI for Python 3.13, use Python 3.12 as default
59+
version.
60+
61+
- 2025-01-17:
62+
63+
- Drop support for macOS-12, add support for macOS-14
64+
- Add support in CI for ubuntu-24.04
65+
- Add support in CI for Python 3.12
66+
67+
- 2024-08-20:
68+
69+
- Update references of ownership from nexB to aboutcode-org
70+
71+
- 2024-07-01:
72+
73+
- Drop support for Python 3.8
74+
- Drop support for macOS-11, add support for macOS-14
75+
76+
- 2024-02-19:
77+
78+
- Replace support in CI of default ubuntu-20.04 by ubuntu-22.04
79+
80+
- 2023-10-18:
81+
82+
- Add dark mode support in documentation
83+
4584
- 2023-07-18:
85+
4686
- Add macOS-13 job in azure-pipelines.yml
4787

4888
- 2022-03-04:
89+
4990
- Synchronize configure and configure.bat scripts for sanity
5091
- Update CI operating system support with latest Azure OS images
5192
- Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party

azure-pipelines.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,27 @@ jobs:
2626
- template: etc/ci/azure-posix.yml
2727
parameters:
2828
job_name: macos13_cpython
29+
image_name: macOS-13-xlarge
30+
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
31+
test_suites:
32+
all: venv/bin/pytest -n 2 -vvs
33+
34+
- template: etc/ci/azure-posix.yml
35+
parameters:
36+
job_name: macos13_cpython_arm64
2937
image_name: macOS-13
3038
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
3139
test_suites:
3240
all: venv/bin/pytest -n 2 -vvs
3341

42+
- template: etc/ci/azure-posix.yml
43+
parameters:
44+
job_name: macos14_cpython
45+
image_name: macOS-14-large
46+
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
47+
test_suites:
48+
all: venv/bin/pytest -n 2 -vvs
49+
3450
- template: etc/ci/azure-posix.yml
3551
parameters:
3652
job_name: macos14_cpython_arm64
@@ -41,8 +57,16 @@ jobs:
4157

4258
- template: etc/ci/azure-posix.yml
4359
parameters:
44-
job_name: macos14_cpython
45-
image_name: macOS-14-large
60+
job_name: macos15_cpython
61+
image_name: macOS-15
62+
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
63+
test_suites:
64+
all: venv/bin/pytest -n 2 -vvs
65+
66+
- template: etc/ci/azure-posix.yml
67+
parameters:
68+
job_name: macos15_cpython_arm64
69+
image_name: macOS-15-large
4670
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
4771
test_suites:
4872
all: venv/bin/pytest -n 2 -vvs
@@ -62,3 +86,11 @@ jobs:
6286
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
6387
test_suites:
6488
all: venv\Scripts\pytest -n 2 -vvs
89+
90+
- template: etc/ci/azure-win.yml
91+
parameters:
92+
job_name: win2025_cpython
93+
image_name: windows-2025
94+
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
95+
test_suites:
96+
all: venv\Scripts\pytest -n 2 -vvs

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
88
SPHINXAUTOBUILD = sphinx-autobuild
99
SOURCEDIR = source
10-
BUILDDIR = build
10+
BUILDDIR = _build
1111

1212
# Put it first so that "make" without argument is like "make help".
1313
help:

etc/scripts/update_skeleton.py

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#!/usr/bin/env python
2+
#
3+
# Copyright (c) nexB Inc. AboutCode, 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/aboutcode-org/skeleton for support or download.
8+
# See https://aboutcode.org for more information about nexB OSS projects.
9+
#
10+
11+
from pathlib import Path
12+
import os
13+
import subprocess
14+
15+
import click
16+
17+
18+
ABOUTCODE_PUBLIC_REPO_NAMES=[
19+
"aboutcode-toolkit",
20+
"ahocode",
21+
"bitcode",
22+
"clearcode-toolkit",
23+
"commoncode",
24+
"container-inspector",
25+
"debian-inspector",
26+
"deltacode",
27+
"elf-inspector",
28+
"extractcode",
29+
"fetchcode",
30+
"gemfileparser2",
31+
"gh-issue-sandbox",
32+
"go-inspector",
33+
"heritedcode",
34+
"license-expression",
35+
"license_copyright_pipeline",
36+
"nuget-inspector",
37+
"pip-requirements-parser",
38+
"plugincode",
39+
"purldb",
40+
"pygmars",
41+
"python-inspector",
42+
"sanexml",
43+
"saneyaml",
44+
"scancode-analyzer",
45+
"scancode-toolkit-contrib",
46+
"scancode-toolkit-reference-scans",
47+
"thirdparty-toolkit",
48+
"tracecode-toolkit",
49+
"tracecode-toolkit-strace",
50+
"turbo-spdx",
51+
"typecode",
52+
"univers",
53+
]
54+
55+
56+
@click.command()
57+
@click.help_option("-h", "--help")
58+
def update_skeleton_files(repo_names=ABOUTCODE_PUBLIC_REPO_NAMES):
59+
"""
60+
Update project files of AboutCode projects that use the skeleton
61+
62+
This script will:
63+
- Clone the repo
64+
- Add the skeleton repo as a new origin
65+
- Create a new branch named "update-skeleton-files"
66+
- Merge in the new skeleton files into the "update-skeleton-files" branch
67+
68+
The user will need to save merge commit messages that pop up when running
69+
this script in addition to resolving the merge conflicts on repos that have
70+
them.
71+
"""
72+
73+
# Create working directory
74+
work_dir_path = Path("/tmp/update_skeleton/")
75+
if not os.path.exists(work_dir_path):
76+
os.makedirs(work_dir_path, exist_ok=True)
77+
78+
for repo_name in repo_names:
79+
# Move to work directory
80+
os.chdir(work_dir_path)
81+
82+
# Clone repo
83+
repo_git = f"git@github.com:aboutcode-org/{repo_name}.git"
84+
subprocess.run(["git", "clone", repo_git])
85+
86+
# Go into cloned repo
87+
os.chdir(work_dir_path / repo_name)
88+
89+
# Add skeleton as an origin
90+
subprocess.run(["git", "remote", "add", "skeleton", "git@github.com:aboutcode-org/skeleton.git"])
91+
92+
# Fetch skeleton files
93+
subprocess.run(["git", "fetch", "skeleton"])
94+
95+
# Create and checkout new branch
96+
subprocess.run(["git", "checkout", "-b", "update-skeleton-files"])
97+
98+
# Merge skeleton files into the repo
99+
subprocess.run(["git", "merge", "skeleton/main", "--allow-unrelated-histories"])
100+
101+
102+
if __name__ == "__main__":
103+
update_skeleton_files()

tests/test_skeleton_codestyle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_skeleton_codestyle(self):
2323
return
2424

2525
commands = [
26-
["venv/bin/ruff", "--check"],
26+
["venv/bin/ruff", "check"],
2727
["venv/bin/ruff", "format", "--check"],
2828
]
2929
command = None

0 commit comments

Comments
 (0)