-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 3.1.0.1 - th2 5191 cherry pick (#94)
* Release 3.1.0.1 - [TH2-5193] Bug fixes * TH2-5191 fix with new orjson * Update CI python test versions * Fix readme and related script * Fix CI build * Improve release notes (cherry picked from commit 07dec2a) * Ruff improvements
- Loading branch information
1 parent
c1a223b
commit 32f7cbd
Showing
14 changed files
with
131 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,16 +8,17 @@ on: | |
|
||
jobs: | ||
build-n-publish: | ||
name: Dev build and Python distributions to PyPI | ||
name: Dev build and publish Python distributions to PyPI | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Wait for tests to succeed | ||
uses: lewagon/[email protected].1 | ||
uses: lewagon/[email protected].2 | ||
with: | ||
ref: ${{ github.ref }} | ||
running-workflow-name: 'Dev build and Python distributions to PyPI' | ||
# check-name: 'Run tests' | ||
running-workflow-name: 'Dev build and publish Python distributions to PyPI' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 10 | ||
allowed-conclusions: success | ||
|
@@ -45,10 +46,10 @@ jobs: | |
value: ${{ steps.release_ver.outputs.value }} | ||
|
||
# Build and publish | ||
- name: Set up Python 3.7 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
function get_line_number () { | ||
local text=$1; | ||
local file=$2; | ||
grep "$text" $file -n -m1 | cut -d':' -f1 | ||
} | ||
|
||
attachable_file=$1 | ||
attachable_file_path=$(find "$PWD" -name "$attachable_file") | ||
output_file_path=$PWD"/"$2 | ||
|
||
echo $attachable_file_path | ||
attach_to=$2 | ||
|
||
function main() { | ||
status=$(git status) | ||
|
||
# if [[ "$status" =~ .*"$attachable_file".* ]]; then | ||
count=0 | ||
start_line=0 | ||
end_line=0 | ||
|
||
exec 0<"$output_file_path" | ||
while read -r line | ||
do | ||
count=$((count+1)) | ||
|
||
if [[ $line =~ "<!--".*"start".*"$attachable_file" ]]; then | ||
start_line=$count | ||
fi | ||
|
||
if [[ $line =~ "<!--".*"end".*"$attachable_file" ]]; then | ||
end_line=$count | ||
fi | ||
done | ||
|
||
echo $start_line | ||
echo $end_line | ||
|
||
head -n $start_line "$output_file_path" > buffer | ||
{ | ||
printf '```python\n' | ||
cat "$attachable_file_path" | ||
printf '\n```\n' | ||
tail -n $((count - end_line + 1)) "$output_file_path" | ||
}>> buffer | ||
rm "$output_file_path" | ||
mv -f buffer "$output_file_path" | ||
git add "$output_file_path" | ||
# fi | ||
|
||
exit 0 | ||
local status=$(git status) | ||
|
||
# Check If Update Is Needed | ||
if ! [[ "$status" =~ .*"$attachable_file".* ]]; then return; fi; | ||
|
||
# Get Start & End Indexes Of Code Block | ||
local start=$(get_line_number "<!-- start $attachable_file" $attach_to); | ||
local end=$(get_line_number "<!-- end $attachable_file" $attach_to); | ||
|
||
((start+=2)); # Increment By 2, Start After "```" | ||
((end-=2)); # Decrement By 2, End Before "```" | ||
|
||
# Delete Code Block Lines | ||
sed -i -e "${start},${end}d;" $attach_to; | ||
|
||
((start-=1)); # Increment By 2, Start After "```" | ||
|
||
# Add Code Block Lines | ||
sed -i "${start}r $attachable_file_path" $attach_to; | ||
} | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"package_name": "th2-data-services-lwdp", | ||
"package_version": "3.1.0.0" | ||
"package_version": "3.1.0.1" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Uncomment it when ds libe v2 will be released | ||
# TODO - Uncomment it when ds libe v2 will be released | ||
#th2-data-services>=2,<3 # ds core 2.* | ||
|
||
th2-data-services~=2.0.0.dev8154123929 | ||
th2-data-services~=2.0.0.dev8779326749 | ||
# We don't need it now, because we don't suport grpc now | ||
# th2_grpc_lw_data_provider==2.0.0.dev3656626108 | ||
orjson>=3,<4 | ||
aiohttp>=3,<4 | ||
orjson>=3.10,<4 | ||
aiohttp>=3.9.5,<4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
author_email="[email protected]", | ||
url="https://github.com/th2-net/th2-ds-source-lwdp", | ||
license="Apache License 2.0", | ||
python_requires=">=3.7", | ||
python_requires=">=3.8", | ||
install_requires=requirements, | ||
packages=find_namespace_packages(include=["th2_data_services", "th2_data_services.*"]), | ||
include_package_data=True, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.