Skip to content

Commit

Permalink
Merge branch 'main' into import/add-7z-source
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau authored Jul 18, 2023
2 parents ad06552 + ed20df7 commit 7cae48a
Show file tree
Hide file tree
Showing 238 changed files with 12,813 additions and 1,912 deletions.
6 changes: 3 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.16.0
current_version = 1.23.0
commit = True
tag = True

Expand All @@ -8,8 +8,8 @@ search = release = "{current_version}"
replace = release = "{new_version}"

[bumpversion:file:setup.py]
search = version="{current_version}"
replace = version="{new_version}"
search = VERSION = "{current_version}"
replace = VERSION = "{new_version}"

[bumpversion:file:craft_parts/__init__.py]
search = __version__ = "{current_version}"
Expand Down
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Bug Report
description: File a bug report
labels: "Bug"
body:
- type: markdown
attributes:
value: >
Thanks for taking the time to fill out this bug report! Before
submitting your issue, make sure this has not been already
reported or if it works with the latest version of the library.
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: >
If applicable, add screenshots to help explain your
problem.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: To Reproduce
description: >
Provide a step-by-step instruction of how to reproduce the behavior.
validations:
required: true
- type: textarea
id: part_yaml
attributes:
label: part yaml
description: >
If possible, please paste the yaml spec that causes the
failure. This will be automatically formatted into code, so no
need for backticks.
render: shell
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: >
Please copy and paste any relevant log output. This will be
automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true

12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
blank_issues_enabled: false
contact_links:
- name: Charmcraft Discourse
url: https://discourse.charmhub.io/c/charmcraft/3
about: Issues creating charms
- name: Snapcraft Discourse
url: https://forum.snapcraft.io/c/snapcraft/13
about: Issues creating snaps
- name: Rockcraft Discourse
url: https://discourse.ubuntu.com/c/rocks/117
about: Issues creating ROCKs

27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Task
description: File an enhancement proposal
labels: "Enhancement"
body:
- type: markdown
attributes:
value: >
Thanks for taking the time to fill out this enhancement
proposal! Before submitting your issue, please make sure there
isn't already a prior issue concerning this. If there is,
please join that discussion instead.
- type: textarea
id: enhancement-proposal-what
attributes:
label: What needs to get done
description: >
Describe what needs to get done
validations:
required: true
- type: textarea
id: enhancement-proposal-why
attributes:
label: Why it needs to get done
description: >
Describe why it needs to get done
validations:
required: true
106 changes: 106 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
// Configuration file for RenovateBot: https://docs.renovatebot.com/configuration-options
extends: ["config:base"],
labels: ["dependencies"], // For convenient searching in GitHub
pip_requirements: {
fileMatch: ["^tox.ini$", "(^|/)requirements([\\w-]*)\\.txt$"]
},
pip_setup: {
fileMatch: ["^pyproject.toml$", "(^|/)setup\\.py$"]
},
packageRules: [
{
// Automerge patches, pin changes and digest changes.
// Also groups these changes together.
groupName: "bugfixes",
excludePackageNames: ["ruff"],
matchUpdateTypes: ["patch", "pin", "digest"],
prPriority: 3, // Patches should go first!
automerge: true
},
{
// Update all internal packages in one higher-priority PR
groupName: "internal packages",
matchPackagePrefixes: ["craft-", "snap-"],
matchLanguages: ["python"],
prPriority: 2
},
{
// GitHub Actions are higher priority to update than most dependencies.
groupName: "GitHub Actions",
matchManagers: ["github-actions"],
prPriority: 1
},
// Everything not in one of these rules gets priority 0 and falls here.
{
// Minor changes can be grouped and automerged for dev dependencies, but are also deprioritised.
groupName: "development dependencies (minor and patch)",
groupSlug: "dev-dependencies",
matchPackageNames: [
"black",
"codespell",
"coverage",
"isort",
"mypy",
"pydocstyle",
"pylint",
"pytest",
"tox",
],
matchPackagePatterns: [
".*-mock$"
],
matchPackagePrefixes: [
"pytest-",
"pylint-",
"types-",
],
matchUpdateTypes: ["minor", "patch", "pin", "digest"],
prPriority: -1,
automerge: true
},
{
// Documentation related updates
groupName: "documentation dependencies",
groupSlug: "doc-dependencies",
matchPackageNames: ["Sphinx"],
matchPackagePatterns: ["^[Ss]phinx.*$", "^furo$"]
},
{
// Other major dependencies get deprioritised below minor dev dependencies.
matchUpdateTypes: ["major"],
prPriority: -2
},
{
// Major dev dependencies are stone last, but grouped.
groupName: "development dependencies (major versions)",
groupSlug: "dev-dependencies",
matchDepTypes: ["devDependencies"],
matchUpdateTypes: ["major"],
prPriority: -3
},
{
// Ruff is still unstable, so update it separately.
matchPackageNames: ["ruff"],
prPriority: -3
}
],
regexManagers: [
{
// tox.ini can get updates too if we specify for each package.
fileMatch: ["tox.ini"],
depTypeTemplate: "devDependencies",
matchStrings: [
"# renovate: datasource=(?<datasource>\\S+)\n\\s+(?<depName>.*?)(\\[[\\w]*\\])*[=><]=?(?<currentValue>.*?)\n"
]
}
],
timezone: "Etc/UTC",
automergeSchedule: "every weekend",
schedule: "every weekend",
prConcurrentLimit: 2, // No more than 2 open PRs at a time.
prCreation: "not-pending", // Wait until status checks have completed before raising the PR
prNotPendingHours: 4, // ...unless the status checks have been running for 4+ hours.
prHourlyLimit: 1, // No more than 1 PR per hour.
stabilityDays: 2 // Wait 2 days from release before updating.
}
17 changes: 17 additions & 0 deletions .github/workflows/issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# this workflow requires to provide JIRA webhook URL via JIRA_URL GitHub Secret
# read more: https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Automationtriggers-Incomingwebhook
# original code source: https://github.com/beliaev-maksim/github-to-jira-automation

name: Issues to JIRA

on:
issues:
# available via github.event.action
types: [opened, reopened, closed]

jobs:
update:
name: Update Issue
uses: beliaev-maksim/github-to-jira-automation/.github/workflows/issues_to_jira.yaml@master
secrets:
JIRA_URL: ${{ secrets.JIRA_URL }}
41 changes: 23 additions & 18 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,23 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install python packages and dependencies
run: |
sudo apt update
sudo apt install -y libapt-pkg-dev
pip install -U \
https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-distutils-extra/2.43/python-distutils-extra_2.43.tar.xz \
https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.0.0ubuntu0.20.04.6/python-apt_2.0.0ubuntu0.20.04.6.tar.xz \
.[dev]
pip install -U -e .[dev]
- name: Run black
run: |
make test-black
- name: Run codespell
run: |
make test-codespell
- name: Run flake8
- name: Run ruff
run: |
make test-flake8
make test-ruff
- name: Run isort
run: |
make test-isort
Expand Down Expand Up @@ -63,29 +60,24 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install apt build dependencies
run: |
sudo apt update
sudo apt install -y libapt-pkg-dev intltool fuse-overlayfs
- name: Install python-apt dependencies
run: |
pip install https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-distutils-extra/2.43/python-distutils-extra_2.43.tar.xz
pip install https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.0.0ubuntu0.20.04.6/python-apt_2.0.0ubuntu0.20.04.6.tar.xz
- name: Install general python dependencies
run: |
pip install .[dev]
pip install -e .
pip install -e .[dev,${{ matrix.adjective }}-dev]
- name: Install additional test dependencies
run: |
sudo apt install -y ninja-build cmake p7zip-full
# Build Chisel: needs a version of go than is available in Ubuntu 20.04
sudo apt install -y ninja-build cmake scons p7zip-full
# Build Chisel: needs a newer version of go than is available in Ubuntu 20.04
sudo snap install --classic --channel=latest/stable go
git clone https://github.com/canonical/chisel.git chisel-tmp
cd chisel-tmp && git checkout f0bff5a30dfdcb400b # known "good" commit until Chisel has versions
Expand All @@ -95,14 +87,27 @@ jobs:
# Remove newer go and install regular version for 20.04
sudo snap remove go
sudo apt install -y golang
# Install RPM dependencies for RPM tests
sudo apt install rpm
# Ensure we don't have dotnet installed, to properly test dotnet-deps
# Based on https://github.com/actions/runner-images/blob/main/images/linux/scripts/installers/dotnetcore-sdk.sh
sudo apt remove -y dotnet-* || true
# Remove manually-installed dotnet from tarballs
sudo rm -rf /usr/share/dotnet
# Remove dotnet tools
rm -rf $HOME/.dotnet
- name: specify node version
uses: actions/setup-node@v3
with:
node-version: 16
- name: Run unit tests
run: |
make test-units
- name: Run integration tests
run: |
make test-integrations
- name: Run overlay smoke test
if: ${{ matrix.adjective == 'focal' }} #TODO: fix this smoke test for jammy
if: ${{ matrix.adjective == 'focal' }} # TODO: fix this smoke test for jammy
run: |
wget -q https://cloud-images.ubuntu.com/${{ matrix.adjective }}/current/${{ matrix.adjective }}-server-cloudimg-amd64.squashfs
mkdir base
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,6 @@ ENV/
parts/
stage/
prime/

# Tox environments
/.tox/
12 changes: 12 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
ignore-from-file: [.gitignore]

extends: default

rules:
document-start: disable
float-values: enable
line-length: disable
octal-values: enable
truthy:
check-keys: false
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ install: clean ## Install python package.
python setup.py install

.PHONY: lint
lint: test-black test-codespell test-flake8 test-isort test-mypy test-pydocstyle test-pylint test-pyright ## Run all linting tests
lint: test-black test-codespell test-ruff test-isort test-mypy test-pydocstyle test-pylint test-pyright ## Run all linting tests

.PHONY: release
release: dist ## Release with twine.
Expand All @@ -72,8 +72,13 @@ test-codespell:

.PHONY: test-flake8
test-flake8:
echo "\033[0;31mWARNING\033[0m: Did you mean to run \`make ruff\`?"
flake8 $(SOURCES)

.PHONY: test-ruff
test-ruff:
ruff $(SOURCES)

.PHONY: test-integrations
test-integrations: ## Run integration tests.
pytest tests/integration
Expand Down
Loading

0 comments on commit 7cae48a

Please sign in to comment.