Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
vmsh0 authored Aug 11, 2024
2 parents 80cf4f0 + e84b26d commit 13cdc2e
Show file tree
Hide file tree
Showing 1,320 changed files with 771,695 additions and 624,889 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Migrate code style to Black
41720c5a7e736587088d25140f7eee7af540f668
10 changes: 10 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
97 changes: 97 additions & 0 deletions .github/workflows/build_deb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2021 Nick Hall
# Copyright (C) 2024 Jean Michault
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

name: Build Debian packages

on:
workflow_dispatch:
inputs:
build-number:
description: 'Build number'
type: string
default: '1'

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]


steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gir1.2-pango-1.0
sudo apt-get install gir1.2-gtk-3.0
sudo apt-get install xdg-utils
sudo apt-get install librsvg2-common
sudo apt-get install libglib2.0-dev
sudo apt-get install intltool
sudo apt-get install python3-gi
sudo apt-get install python3-cairo
sudo apt-get install python3-gi-cairo
sudo apt-get install python3-bsddb3
sudo apt-get install python3-dev
sudo apt-get install python3-nose
sudo apt-get install python3-mock
sudo apt-get install python3-icu
sudo apt-get install python3-coverage
sudo apt-get install python3-jsonschema
sudo apt-get install libxml2-utils
sudo apt-get install python3-lxml
sudo apt-get install python3-libxml2
sudo apt-get install zlib1g-dev
sudo apt-get install python3-setuptools
sudo apt-get install devscripts debhelper dh-python python3-all python3-nose-exclude
- name: Build deb package
run: |
python3 setup.py egg_info
VERSION=$(grep "^Version:" gramps.egg-info/PKG-INFO|sed 's/Version: *//')
if grep -q '^DEV_VERSION\s*=\s*True' gramps/version.py; then
appbuild=$(git rev-parse --short $GITHUB_SHA)
else
appbuild=${{ inputs.build-number }}
fi
# create entry in debian/changelog, if needed :
if ! grep "^gramps ($VERSION" debian/changelog ; then
DEBFULLNAME="Gramps Project" DEBEMAIL="[email protected]" debchange -D UNRELEASED -v "$VERSION"-"$appbuild" "New release"
fi
python3 setup.py sdist
cd dist
tar zxf gramps-"$VERSION".tar.gz
mv gramps-"$VERSION".tar.gz gramps_"$VERSION".orig.tar.gz
cd gramps-"$VERSION"
# to allow resourcepath detection :
mkdir .git
# to make mediapath test successful :
mkdir -p build/.gramps
export LANG=en_US.utf8
debuild --no-sign
cd /home/runner/work/gramps/gramps/dist
mv gramps_${VERSION}-${appbuild}_all.deb gramps_${VERSION}-${appbuild}_all.${{ matrix.os }}.deb
- uses: actions/upload-artifact@v4
with:
name: Gramps_deb_${{ matrix.os }}
path: /home/runner/work/gramps/gramps/dist/*.deb
retention-days: 7
3 changes: 2 additions & 1 deletion .github/workflows/gramps-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -68,6 +68,7 @@ jobs:
python3 setup.py build
- name: Run unit test suite
run: |
export GDK_BACKEND=-
python3 setup.py test
- name: Trailing whitespace check
run: |
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/pypi-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PyPI upload

on: workflow_dispatch

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Build package distributions
run: |
python3 setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
46 changes: 46 additions & 0 deletions .github/workflows/windows-aio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2023 Jean Michault
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

name: Windows AIO

on: workflow_dispatch

jobs:
build:

runs-on: windows-latest
defaults:
run:
shell: msys2 {0}

steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
- name: Build
run: |
cd aio
./build.sh
- uses: actions/upload-artifact@v4
with:
name: GrampsAIO
path: D:\a\gramps\gramps\aio\mingw64\src\GrampsAIO-*.exe
retention-days: 7
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ dist/
# Gramps
docs/_build/

# Gramps AIO build artifacts
aio/grampsaio64.nsi
aio/mingw-w64-x86_64-db-*.pkg.tar.xz
aio/mingw64
gramps.egg-info

# Editing
tags
*.swp
Expand All @@ -25,3 +31,7 @@ ehthumbs.db

# Glade temp files
*~

# Python metadata
.venv*/

57 changes: 2 additions & 55 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ unsafe-load-any-extension=no
# run arbitrary code
extension-pkg-whitelist=

# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality.
optimize-ast=no


[MESSAGES CONTROL]

# Only show warnings with the listed confidence levels. Leave empty to show
Expand All @@ -59,7 +50,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=suppressed-message,intern-builtin,round-builtin,unicode-builtin,range-builtin-not-iterating,long-builtin,basestring-builtin,setslice-method,print-statement,reload-builtin,metaclass-assignment,raising-string,next-method-called,import-star-module-level,xrange-builtin,getslice-method,zip-builtin-not-iterating,reduce-builtin,dict-iter-method,delslice-method,using-cmp-argument,hex-method,buffer-builtin,old-ne-operator,nonzero-method,backtick,parameter-unpacking,indexing-exception,file-builtin,filter-builtin-not-iterating,raw_input-builtin,execfile-builtin,oct-method,cmp-method,coerce-builtin,long-suffix,cmp-builtin,input-builtin,dict-view-method,standarderror-builtin,apply-builtin,old-raise-syntax,unichr-builtin,old-division,coerce-method,unpacking-in-except,useless-suppression,no-absolute-import,map-builtin-not-iterating,old-octal-literal
disable=suppressed-message,useless-suppression


[REPORTS]
Expand All @@ -69,11 +60,6 @@ disable=suppressed-message,intern-builtin,round-builtin,unicode-builtin,range-bu
# mypackage.mymodule.MyReporterClass.
output-format=text

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no

# Tells whether to display a full report or only the messages
reports=yes

Expand All @@ -91,9 +77,6 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme

[BASIC]

# List of builtins function names that should not be used, separated by a comma
bad-functions=map,filter

# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_,db

Expand All @@ -110,63 +93,33 @@ include-naming-hint=no
# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for argument names
argument-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Regular expression matching correct function names
function-rgx=(([a-z_][a-z0-9_]{2,30})|(_T_))$

# Naming hint for function names
function-name-hint=(([a-z_][a-z0-9_]{2,30})|(_T_))$

# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$

# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$

# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Regular expression matching correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for method names
method-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$

# Naming hint for class names
class-name-hint=[A-Z_][a-zA-Z0-9]+$

# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for variable names
variable-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for attribute names
attr-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
Expand Down Expand Up @@ -253,7 +206,7 @@ ignore-imports=no
[FORMAT]

# Maximum number of characters on a single line.
max-line-length=80
max-line-length=88

# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
Expand All @@ -262,12 +215,6 @@ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# else.
single-line-if-stmt=no

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator

# Maximum number of lines in a module
max-module-lines=1000

Expand Down
Loading

0 comments on commit 13cdc2e

Please sign in to comment.