Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisAlejandro committed Apr 25, 2022
2 parents 8ca1ade + a84df66 commit 75a71fd
Show file tree
Hide file tree
Showing 47 changed files with 2,281 additions and 2,164 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
virtualenv/
37 changes: 20 additions & 17 deletions .gitchangelog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
##
## Description
##
## ACTION is one of '[REF]', '[FIX]', '[ADD]'
## ACTION is one of '[REF]', '[FIX]', '[ADD]', '[DEL]'
##
## Is WHAT the change is about.
##
Expand Down Expand Up @@ -39,8 +39,19 @@
## will be ignored and won't be reported in the changelog.
##
ignore_regexps = [
r'^(.{3,3}\s*:)?\s*[Uu]pdating [Cc]hangelog and version.?\s*$',
r'^(.{3,3}\s*:)?\s*[Uu]pdating [Cc]hangelog and [Vv]ersion.?\s*$',
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
r'@minor', r'!minor',
r'@cosmetic', r'!cosmetic',
r'@refactor', r'!refactor',
r'@wip', r'!wip',
r'^[Cc][Ii]\s*:', ## ignore Ci-related commits
r'^.*:\s*[Cc][Ii]\s*:', ## ignore Ci-related commits
r'^.*[Cc]ircle[Cc][Ii]\s*', ## ignore Ci-related commits
r'^.*:github:.*$',
r'^.*:changelog:.*$',
r'^Git-svn-id',
r'^$', ## ignore commits with empty messages
]


Expand All @@ -57,18 +68,10 @@ ignore_regexps = [
## whenever you are tweaking this variable.
##
section_regexps = [
('New', [
r'^\[ADD\]\s*([^\n]*)$',
]),

('Changes', [
r'^\[REF\]\s*([^\n]*)$',
]),

('Fix', [
r'^\[FIX\]\s*([^\n]*)$',
]),

('Added', [r'^\[ADD\]\s*([^\n]*)$']),
('Changed', [r'^\[REF\]\s*([^\n]*)$']),
('Fixed', [r'^\[FIX\]\s*([^\n]*)$']),
('Removed', [r'^\[DEL\]\s*([^\n]*)$']),
('Other', None),
]

Expand Down Expand Up @@ -129,7 +132,7 @@ tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$'
##
## This label will be used as the changelog Title of the last set of changes
## between last valid tag and HEAD if any.
unreleased_version_label = "%%version%% (unreleased)"
unreleased_version_label = "(unreleased)"


## ``output_engine`` is a callable
Expand Down Expand Up @@ -160,10 +163,10 @@ unreleased_version_label = "%%version%% (unreleased)"
## Examples:
## - makotemplate("restructuredtext")
##
output_engine = rest_py
#output_engine = rest_py
#output_engine = mustache("restructuredtext")
#output_engine = mustache("markdown")
#output_engine = makotemplate("restructuredtext")
output_engine = makotemplate(".gitchangelog.tpl")


## ``include_merge`` is a boolean
Expand Down
22 changes: 22 additions & 0 deletions .gitchangelog.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
% if data["title"]:
${data["title"]}
============
% endif

% for version in data["versions"]:

<% title = "%s (%s)\n------------" % (version["tag"], version["date"]) if version["tag"] else "%s\n------------" % opts["unreleased_version_label"] %>${title}
% for section in version["sections"]:

<% lbl = "%s\n~~~~~~~~~~~~" % section["label"] %>${lbl}

% for commit in section["commits"]:
<%
author = commit["author"].replace('_', '\_')
subject = "%s [%s]" % (commit["subject"], author)
entry = indent(subject, first=" * ").strip()
%>${entry}

% endfor
% endfor
% endfor
4 changes: 4 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: CodeQL config

paths-ignore:
- virtualenv
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
day: thursday
time: "01:00"
open-pull-requests-limit: 99
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: thursday
time: "01:00"
open-pull-requests-limit: 99
- package-ecosystem: docker
directory: "/"
schedule:
interval: weekly
day: thursday
time: "01:00"
open-pull-requests-limit: 99
ignore:
- dependency-name: dockershelf/python
versions:
- "> 3.10"
23 changes: 23 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Code Quality

on:
schedule:
- cron: '00 6 * * 4'

jobs:
build:
name: Generating code quality report
runs-on: ubuntu-20.04
if: github.repository == 'LuisAlejandro/pipsalabim'
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: develop
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: python
config-file: ./.github/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
126 changes: 126 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Pull Request

on:
pull_request_target:
types:
- opened
- ready_for_review
- synchronize
- reopened
branches:
- develop

jobs:
build:
name: Build
runs-on: ubuntu-20.04
if: github.repository == 'LuisAlejandro/pipsalabim'
strategy:
matrix:
include:
- python-version: "3.8"
toxenv: "py38"
- python-version: "3.9"
toxenv: "py39"
- python-version: "3.10"
toxenv: "py310"
- python-version: "3.11.0-alpha.5"
toxenv: "py311"
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: develop
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Installing dependencies
run: |
sudo apt-get install libxml2-dev libxslt-dev
pip install -r requirements.txt -r requirements-dev.txt
- name: Measuring coverage
env:
TOXENV: ${{ matrix.toxenv }}
PYTHON_VERSION: ${{ matrix.python-version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tox -e ${TOXENV}
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-py${{ matrix.python-version }}
path-to-lcov: ./.lcov
parallel: true
- name: Functional test
env:
TOXENV: ${{ matrix.toxenv }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
if [ "${TOXENV}" == "py311" ]; then
PYTHON_VERSION="3.11"
fi
docker run -v ${PWD}:${PWD} -w ${PWD} \
dockershelf/python:${PYTHON_VERSION} bash -c \
"pip install . && \
python${PYTHON_VERSION} -m pipsalabim.cli update"
finish:
name: Finish
runs-on: ubuntu-20.04
if: github.repository == 'LuisAlejandro/pipsalabim'
needs: build
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

approve:
name: Approve pull request
runs-on: ubuntu-20.04
if: github.repository == 'LuisAlejandro/pipsalabim'
needs: finish
steps:
- name: Approve
uses: hmarr/[email protected]
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
- name: Approve
uses: hmarr/[email protected]
if: github.actor == 'LuisAlejandro'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

merge:
name: Merge pull request
runs-on: ubuntu-20.04
if: github.repository == 'LuisAlejandro/pipsalabim'
needs: approve
steps:
- name: Merge
uses: actions/github-script@v6
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
script: |
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
})
- name: Merge
uses: actions/github-script@v6
if: github.actor == 'LuisAlejandro'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
})
64 changes: 64 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Push

on:
push:
branches:
- master
- develop

jobs:
build:
name: Build
runs-on: ubuntu-20.04
if: github.repository == 'LuisAlejandro/pipsalabim'
strategy:
matrix:
include:
- python-version: "3.8"
toxenv: "py38"
- python-version: "3.9"
toxenv: "py39"
- python-version: "3.10"
toxenv: "py310"
- python-version: "3.11.0-alpha.5"
toxenv: "py311"
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: develop
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Installing dependencies
run: |
sudo apt-get install libxml2-dev libxslt-dev
pip install -r requirements.txt -r requirements-dev.txt
- name: Measuring coverage
env:
TOXENV: ${{ matrix.toxenv }}
PYTHON_VERSION: ${{ matrix.python-version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tox -e ${TOXENV}
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-py${{ matrix.python-version }}
path-to-lcov: ./.lcov
parallel: true
- name: Functional test
env:
TOXENV: ${{ matrix.toxenv }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
if [ "${TOXENV}" == "py311" ]; then
PYTHON_VERSION="3.11"
fi
docker run -v ${PWD}:${PWD} -w ${PWD} \
dockershelf/python:${PYTHON_VERSION} bash -c \
"pip install . && \
python${PYTHON_VERSION} -m pipsalabim.cli update"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ target/

# virtualenv
virtualenv/

# VSCode
.vscode/
2 changes: 0 additions & 2 deletions .pyup.yml

This file was deleted.

Loading

0 comments on commit 75a71fd

Please sign in to comment.