Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOP-14482] - release 0.1.5 version #20

Merged
merged 29 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3d1ad22
[DOP-11679] - bump version
maxim-lixakov Feb 14, 2024
1ae74d6
[DOP-11679] - Update license in setup.py
dolfinus Feb 14, 2024
c957565
[DOP-3161] Fix documentation copyright
dolfinus Feb 14, 2024
9131e52
[DOP-11876] - change documentation style to furo (#9)
maxim-lixakov Feb 14, 2024
3b66c35
[DOP-11877] - add github automation (#11)
maxim-lixakov Feb 16, 2024
2be5b7c
[DOP-13156] - add changelog section (#10)
maxim-lixakov Feb 16, 2024
032cfc8
Bump alexwilson/enable-github-automerge-action from 1.0.0 to 2.0.0
dependabot[bot] Feb 19, 2024
b4be289
[DOP-13156] Move development documentation from Readme to Contributin…
dolfinus Feb 19, 2024
41a9cb2
[DOP-13156] Update Readme
dolfinus Feb 19, 2024
4bb5272
[DOP-13156] Add Copy button to docs examples
dolfinus Feb 19, 2024
5a049c6
[DOP-13156] Fix Contributing guide
dolfinus Feb 19, 2024
cd2c99f
[DOP-11877] Group dependabot PRs
dolfinus Feb 19, 2024
6babc29
[DOP-13209] Add labels sync workflow
dolfinus Feb 19, 2024
4e8ba09
[DOP-11877] Run Dependabot weekly
dolfinus Feb 19, 2024
543dd84
[DOP-13209] Add pre-commit.ci badge to Readme
dolfinus Feb 19, 2024
e02b39f
[DOP-13209] Update Readme header
dolfinus Feb 19, 2024
e29a0c1
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Feb 19, 2024
15d114d
[DOP-13337] Add Pydantic v2 support
dolfinus Mar 5, 2024
3b26a40
Bump the github-actions group with 1 update
dependabot[bot] Mar 11, 2024
8619ee7
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 12, 2024
d50d84d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 18, 2024
9c794d7
[DOP-13779] Update blacken-docs
dolfinus Mar 20, 2024
423d37a
[DOP-13779] Add robots.txt to documentation
dolfinus Mar 20, 2024
c00246f
[DOP-13779] Add CHANGELOG entries for previous releases
dolfinus Mar 20, 2024
6deee00
[DOP-13779] Add CHANGELOG entries for 0.1.4
dolfinus Mar 20, 2024
ae9b35e
[DOP-13779] Fix CHANGELOG
dolfinus Mar 20, 2024
aec6eca
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 25, 2024
c019636
[DOP-14482] - enlarge data-horizon version (#19)
maxim-lixakov Mar 27, 2024
3392a20
Prepare for release 0.1.5
maxim-lixakov Mar 27, 2024
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
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Set update schedule for GitHub Actions

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- type:ci
# https://til.simonwillison.net/github/dependabot-python-setup
groups:
github-actions:
patterns:
- '*'
61 changes: 61 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# config for https://github.com/marketplace/actions/github-labeler

- name: attention:help wanted
description: Extra attention is needed
color: bfdadc
from_name: help wanted

- name: attention:invalid
description: This doesn't seem right
color: ea2357
from_name: invalid

- name: ci:skip-changelog
description: Add this label to skip changelog file check
color: 04990f

- name: kind:bug
description: Something isn't working
color: d73a4a
from_name: bug

- name: kind:feature
description: New feature or request
color: 389a3f

- name: kind:improvement
description: Improvement of some existing feature
color: 1a92c2
from_name: enhancement

- name: kind:question
description: Further information is requested
color: 0e857c
from_name: question

- name: resolution:duplicate
description: This issue or pull request already exists
color: cfd3d7
from_name: duplicate

- name: resolution:wontfix
description: This will not be worked on
color: ec103b
from_name: wontfix

- name: type:ci
description: CI-related changes
color: cdb0bd

- name: type:dependency
description: Dependency-related changes
color: 214efe

- name: type:documentation
description: Improvements or additions to documentation
color: 6b9f54
from_name: documentation

- name: type:tests
description: Tests-related changes
color: 5cca5b
27 changes: 27 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Automerge

on:
pull_request_target:

jobs:
automerge:
name: Enable pull request automerge
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]'

steps:
- uses: alexwilson/[email protected]
with:
github-token: ${{ secrets.AUTOMERGE_TOKEN }}
merge-method: REBASE

autoapprove:
name: Automatically approve pull request
needs: [automerge]
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]'

steps:
- uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.AUTOMERGE_TOKEN }}
62 changes: 62 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Changelog

on:
pull_request:
types: [opened, synchronize, labeled, unlabeled, reopened]
branches-ignore:
- master

env:
DEFAULT_PYTHON: '3.12'

permissions:
contents: read

jobs:
check-changelog:
name: Changelog Entry Check
runs-on: ubuntu-latest
timeout-minutes: 10
if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-changelog') && github.event.pull_request.user.login != 'pre-commit-ci[bot]' && github.event.pull_request.user.login != 'dependabot[bot]'"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements/core.txt', 'requirements/docs.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements/core.txt', 'requirements/docs.txt') }}
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-

- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools wheel

- name: Install dependencies
run: |
pip install -I -r requirements.txt -r requirements-docs.txt

- name: Check changelog entry exists
run: |
if [ ! -s docs/changelog/next_release/${{ github.event.pull_request.number }}.*.rst ]; then
echo "Please add corresponding file 'docs/changelog/next_release/<issue number>.<change type>.rst' with changes description"
exit 1
fi

- name: Validate changelog
run: |
# Fetch the pull request' base branch so towncrier will be able to
# compare the current branch with the base branch.
git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
towncrier check --compare-with origin/${{ github.base_ref }}
towncrier --draft
48 changes: 47 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,59 @@ jobs:
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1

- name: Get changelog
run: |
cat docs/changelog/$GITHUB_REF_NAME.rst > changelog.rst

- name: Prepare rST syntax for conversion to Markdown
run: |
# Replace Github links from Sphinx syntax with Markdown
sed -i -E 's/:github:issue:`(.*)`/#\1/g' changelog.rst
sed -i -E 's/:github:pull:`(.*)`/#\1/g' changelog.rst
sed -i -E 's/:github:user:`(.*)`/@\1/g' changelog.rst
sed -i -E 's/:github:org:`(.*)`/@\1/g' changelog.rst

- name: Convert rST to Markdown
uses: docker://pandoc/core:2.9
with:
args: >-
--output=changelog.md
--from=rst
--to=gfm
--wrap=none
changelog.rst

- name: Fixing Markdown syntax after conversion
run: |
# Replace ``` {.python caption="abc"} with ```python caption="abc"
sed -i -E 's/``` \{\.(.*)\}/```\1/g' changelog.md

# Replace ``` python with ```python
sed -i -E 's/``` (\w+)/```\1/g' changelog.md

# Replace \# with #
sed -i -E 's/\\#/#/g' changelog.md

- name: Get release name
id: release-name
run: |
# Release name looks like: 0.7.0 (2023-05-15)
echo -n name= > "$GITHUB_OUTPUT"
cat changelog.md | head -1 | sed -E "s/#+\s*//g" >> "$GITHUB_OUTPUT"

- name: Fix headers
run: |
# Remove header with release name
sed -i -e '1,2d' changelog.md

- name: Create Github release
id: create_release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
name: ${{ steps.release-name.outputs.name }}
body_path: changelog.md
files: |
dist/*
27 changes: 27 additions & 0 deletions .github/workflows/repo-labels-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Repo labels sync

on:
push:
branches:
- develop
paths:
- .github/labels.yml
- .github/workflows/repo-labels-sync.yml
pull_request:
paths:
- .github/labels.yml
- .github/workflows/repo-labels-sync.yml

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
dry-run: ${{ github.event_name == 'pull_request' }}
23 changes: 15 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@ env:

jobs:
tests:
name: Run ${{ matrix.mark }} tests (Python ${{ matrix.python-version }} on ${{ matrix.os }})
name: Run tests (Python ${{ matrix.python-version }}, Pydantic ${{ matrix.pydantic-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.12']
os: [ubuntu-latest]
include:
- python-version: '3.7'
pydantic-version: '1'
os: ubuntu-latest

- python-version: '3.12'
pydantic-version: '2'
os: ubuntu-latest

steps:
- name: Checkout code
Expand All @@ -47,18 +53,18 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-${{ matrix.python-version }}-tests-${{ hashFiles('requirements*.txt') }}
key: ${{ runner.os }}-python-${{ matrix.python-version }}-pydantic-${{ matrix.pydantic-version}}-tests-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ matrix.python-version }}-tests-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-python-${{ matrix.python-version }}-tests-
${{ runner.os }}-python-${{ matrix.python-version }}-pydantic-${{ matrix.pydantic-version}}-tests-${{ hashFiles('requirements*.txt') }}
${{ runner.os }}-python-${{ matrix.python-version }}-pydantic-${{ matrix.pydantic-version}}-tests-
${{ runner.os }}-python
${{ runner.os }}-

- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools wheel

- name: Install dependencies
run: pip install -I -r requirements.txt -r requirements-test.txt
run: pip install -I -r requirements.txt -r requirements-test.txt "pydantic==${{ matrix.pydantic-version }}.*"

- name: Build package
run: |
Expand All @@ -68,14 +74,15 @@ jobs:
- name: Run tests
run: |
mkdir reports/ || echo "Directory exists"
# required to register package in etl-entities
pip install -e . --no-build-isolation
source .env.local
./run_tests.sh

- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}-os-${{ matrix.os }}
name: coverage-python-${{ matrix.python-version }}-pydantic-${{ matrix.pydantic-version }}-os-${{ matrix.os }}
path: reports/*

- name: Shutdown Backend Container
Expand Down
Loading