Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2151692
support python v2
AkankshaAcharya Sep 22, 2025
7a0fa06
Update generate-sdk.sh
AkankshaAcharya Sep 22, 2025
f88e3d9
Update docker-compose.generate.yml
AkankshaAcharya Sep 25, 2025
af69cf0
commenting out golang
AkankshaAcharya Oct 1, 2025
d4c5afd
fix 404 error
AkankshaAcharya Oct 1, 2025
fc600cd
update dotnet scripts
AkankshaAcharya Oct 1, 2025
9c7294d
update java scripts
AkankshaAcharya Oct 1, 2025
eb3b8be
Update Dockerfile.generate
AkankshaAcharya Oct 1, 2025
7d8154b
Update Dockerfile.generate
AkankshaAcharya Oct 1, 2025
698c236
Update Dockerfile.generate
AkankshaAcharya Oct 1, 2025
4910eb6
Update Dockerfile.generate
AkankshaAcharya Oct 1, 2025
462d9c9
Update Dockerfile.generate
AkankshaAcharya Oct 1, 2025
f3c56ee
Update Dockerfile.generate
AkankshaAcharya Oct 1, 2025
b50b7f7
updating go scripts
AkankshaAcharya Oct 1, 2025
7dc888c
Update Dockerfile.generate
AkankshaAcharya Oct 1, 2025
e468996
Update docker-compose.generate.yml
AkankshaAcharya Oct 1, 2025
0342d97
Update generate-sdk.sh
AkankshaAcharya Oct 1, 2025
883e9b3
Update generate-sdk.sh
AkankshaAcharya Oct 3, 2025
5cc76bf
Update docker-compose.generate.yml
AkankshaAcharya Oct 3, 2025
9f9fcb3
Update Dockerfile.generate
AkankshaAcharya Oct 3, 2025
bf8d5b1
Update Dockerfile.generate
AkankshaAcharya Oct 3, 2025
427e446
Update docker-compose.generate.yml
AkankshaAcharya Oct 3, 2025
03b6c80
Update generate-sdk.sh
AkankshaAcharya Oct 6, 2025
556008e
Update docker-compose.generate.yml
AkankshaAcharya Oct 6, 2025
923b29a
Update generate-sdk.sh
AkankshaAcharya Oct 6, 2025
8831d96
Update generate-sdk.sh
AkankshaAcharya Oct 6, 2025
89b3943
Update generate-sdk.sh
AkankshaAcharya Oct 7, 2025
af84090
clean up
AkankshaAcharya Oct 9, 2025
93ce80b
Update generate-sdk.sh
AkankshaAcharya Oct 9, 2025
bc468aa
Update generate-sdk.sh
AkankshaAcharya Oct 9, 2025
23b57fe
Update Dockerfile.generate
AkankshaAcharya Oct 9, 2025
a43e822
Update docker-compose.generate.yml
AkankshaAcharya Oct 10, 2025
43c12e9
addressing review comments
AkankshaAcharya Oct 14, 2025
86ef37c
Update generate-sdk.sh
AkankshaAcharya Oct 14, 2025
5f7dc93
Update generate-sdk.sh
AkankshaAcharya Oct 14, 2025
7f8f8e7
Update pom.xml
AkankshaAcharya Oct 14, 2025
ac8822a
reverting pom changes and updating script
AkankshaAcharya Oct 14, 2025
47e3d50
Update generate-sdk.sh
AkankshaAcharya Oct 14, 2025
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
37 changes: 34 additions & 3 deletions .github/workflows/release-older-version-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ env:
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD_2024OCT }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
JAVA_SDK_LOCATION_v1: "java/v1"
JAVA_SDK_LOCATION_v2: "java/v2"
JAVA_SDK_LOCATION_v2: "java/v2"
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PYTHON_SDK_LOCATION_v2: "python/fds.protobuf.stach.v2"

on:
workflow_dispatch:
inputs:
SDKs:
description: 'Which SDK to release? Options are "java-v1" and "java-v2"'
description: 'Which SDK to release? Options are "java-v1", "java-v2" and "python-v2"'
required: true
default: all

Expand Down Expand Up @@ -68,4 +72,31 @@ jobs:
- name: Publish to Apache Maven Central
run: |
cd ${{ env.JAVA_SDK_LOCATION_v2 }}
mvn -Psign-artifacts verify deploy
mvn -Psign-artifacts verify deploy

python-v2:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
&& github.event.inputs.SDKs == 'python-v2'

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Build and publish to PyPI
env:
TWINE_USERNAME: ${{ env.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ env.PYPI_PASSWORD }}
run: |
cd ${{ env.PYTHON_SDK_LOCATION_v2 }}
python setup.py sdist bdist_wheel
twine upload dist/* --verbose
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ node_modules/
js/node_modules/
python/fds.protobuf.stach/dist/*.*
python/fds.protobuf.stach/fds.protobuf.stach.egg-info
python/fds.protobuf.stach.v2/dist/*.*
python/fds.protobuf.stach.v2/fds.protobuf.stach.v2.egg-info
python/fds.protobuf.stach.v3/dist/*.*
python/fds.protobuf.stach.v3/fds.protobuf.stach.v3.egg-info
r/*.tar.gz
r/.RData
r/.Rhistory
Expand All @@ -21,4 +25,4 @@ js/.yarn/*
!js/.yarn/versions
.DS_Store
go/pkg/
artifacts
artifacts
47 changes: 37 additions & 10 deletions python/CI/generate-sdk.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,47 @@
#!/bin/bash
set -e
# --- Add these variables ---
GIT_REPO_URL="https://github.com/factset/stachschema.git"
LOCAL_SCHEMA_PATH="./tmp"
BRANCH_NAME="feat/sdks/support-versions"

SCHEMA_PATH=/schema # Location of Protobuf schema
BASE_PATH=/python/fds.protobuf.stach.v3 # Base location of Python generated classes
PACKAGE_PATH=fds/protobuf/stach/v3
# Clone or update the repo
if [ -d "$LOCAL_SCHEMA_PATH/.git" ]; then
git -C "$LOCAL_SCHEMA_PATH" pull origin "$BRANCH_NAME"
git -C "$LOCAL_SCHEMA_PATH" checkout "$BRANCH_NAME"
else
if [ -d "$LOCAL_SCHEMA_PATH" ]; then
echo "Directory $LOCAL_SCHEMA_PATH exists but is not a git repo. Removing..."
rm -rf "$LOCAL_SCHEMA_PATH"
fi
git clone -b "$BRANCH_NAME" "$GIT_REPO_URL" "$LOCAL_SCHEMA_PATH"
fi

rm -f $BASE_PATH/$PACKAGE_PATH/**/*_pb2.py
SCHEMA_PATH="$LOCAL_SCHEMA_PATH/proto" # Location of Protobuf schema
BASE_PATH_V3=../fds.protobuf.stach.v3 # Base location of Python generated classes
BASE_PATH_V2=../fds.protobuf.stach.v2 # Base location of Python generated classes
PACKAGE_PATH_V3=v3/fds/protobuf/stach/v3
PACKAGE_PATH_V2=v2/fds/protobuf/stach/v2

echo Removed old generated code
# echo Removed old generated code
rm -f $BASE_PATH_V2/$PACKAGE_PATH_V2/**/*_pb2.py
rm -f $BASE_PATH_V3/$PACKAGE_PATH_V3/**/*_pb2.py

PROTOFILES=$(find $SCHEMA_PATH/$PACKAGE_PATH -iname "*.proto")
protoc --proto_path $SCHEMA_PATH --python_out $BASE_PATH $PROTOFILES
mkdir -p "$BASE_PATH_V3"
mkdir -p "$BASE_PATH_V2"

for f in $(find $BASE_PATH/fds/protobuf/stach/v3 -type d -maxdepth 10); do
cd "$f"
touch __init__.py
PROTOFILES=$(find $SCHEMA_PATH/$PACKAGE_PATH_V3 -iname "*.proto")
protoc --proto_path $SCHEMA_PATH/v3 --python_out $BASE_PATH_V3 $PROTOFILES

for f in $(find $BASE_PATH_V3/fds/protobuf/stach/v3 -type d -maxdepth 10); do
touch "$f/__init__.py"
done;

PROTOFILES=$(find $SCHEMA_PATH/$PACKAGE_PATH_V2 -iname "*.proto")
protoc --proto_path $SCHEMA_PATH/v2 --python_out $BASE_PATH_V2 $PROTOFILES

for f in $(find $BASE_PATH_V2/fds/protobuf/stach/v2 -type d -maxdepth 10); do
touch "$f/__init__.py"
done;

echo Produced new generated code
12 changes: 12 additions & 0 deletions python/fds.protobuf.stach.v2/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from setuptools import setup, find_packages

setup(name='fds.protobuf.stach.v2',
version='1.0.3',
description='Stach library in python',
url='',
author='analytics-reporting',
author_email='[email protected]',
license='Apache License 2.0',
install_requires=["protobuf>=3.19.4"],
packages=find_packages(),
zip_safe=False)
4 changes: 2 additions & 2 deletions python/fds.protobuf.stach.v3/setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from setuptools import setup, find_packages

setup(name='fds.protobuf.stach.v3',
version='1.0.0',
version='1.0.1',
description='Stach library in python',
url='',
author='analytics-reporting',
author_email='[email protected]',
license='Apache License 2.0',
install_requires=["protobuf==3.19.4"],
install_requires=["protobuf>=3.19.4"],
packages=find_packages(),
zip_safe=False)