Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
39 changes: 39 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
14 changes: 0 additions & 14 deletions .github/workflows/pre-commit.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# Basic configuration for Packit
# See documentation: https://packit.dev/docs/configuration/

specfile_path: python-configshell-fb.spec

upstream_package_name: configshell-fb
# In Fedora, Python packages are prefixed with 'python-'
downstream_package_name: python3-configshell

# Use hatch to create the source archive
actions:
create-archive:
- hatch build -t sdist
- bash -c "ls -1t ./dist/*.tar.gz | head -n 1"

srpm_build_deps:
- python3-devel
- python3-pip
- hatch
- python3-hatchling
- python3-hatch-vcs

jobs:
# Test PRs in COPR
- job: copr_build
trigger: pull_request
targets:
- fedora-latest-stable
- epel-9

# Run tests
- job: tests
trigger: pull_request
targets:
- fedora-latest-stable
- epel-9

# Sync with Fedora when a new release is created
- job: propose_downstream
trigger: release
dist_git_branches:
- fedora-all
- epel-9
16 changes: 12 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.7.1
rev: v0.11.11
hooks:
- id: ruff
args: [--fix]
Expand All @@ -11,13 +11,21 @@ repos:
- id: check-case-conflict
- id: check-ast
- id: check-docstring-first
- id: check-case-conflict
- id: check-merge-conflict
- id: check-builtin-literals
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/packit/pre-commit-hooks
rev: v1.3.0
hooks:
- id: validate-config

ci:
autofix_commit_msg: |
Auto fixes from pre-commit.com hooks
autofix_prs: false
autoupdate_schedule: monthly
4 changes: 4 additions & 0 deletions ci-tests/sts.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plan:
import:
url: https://gitlab.com/rh-kernel-stqe/sts
name: /plans/lio/core
6 changes: 3 additions & 3 deletions configshell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
from .shell import ConfigShell

__all__ = [
'Console',
'Log',
'ConfigNode',
'ConfigShell',
'Console',
'ExecutionError',
'Log',
'Prefs',
'ConfigShell',
]
55 changes: 55 additions & 0 deletions python-configshell-fb.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
%global upstream_name configshell-fb
%global pkg_name configshell

Name: python-%{pkg_name}
Version: 1.1.29
Release: %autorelease
Summary: A framework to implement simple but nice CLIs
# Note: This is the fb version of configshell

License: Apache-2.0
URL: http://github.com/open-iscsi/%{upstream_name}
Source0: %{pypi_source %{upstream_name}}

BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: hatch
BuildRequires: python3-hatchling
BuildRequires: python3-hatch-vcs

%global _description %{expand:
configshell-fb is a Python library that provides a framework to implement simple
but nice CLI-based applications.
}

%description
%{_description}

%package -n python3-%{pkg_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pkg_name}}

Requires: python3-pyparsing >= 2.4.7

%description -n python3-%{pkg_name}
%{_description}

%prep
%autosetup -n %{upstream_name}-%{version}
ln -sf configshell configshell_fb
rm -rf %{upstream_name}.egg-info

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files configshell configshell_fb

%files -n python3-%{pkg_name} -f %{pyproject_files}
%license COPYING
%doc README.md

%changelog
%autochangelog