Skip to content

Commit

Permalink
changes on pdm lock automation
Browse files Browse the repository at this point in the history
  • Loading branch information
kirtimanmishrazipstack committed Jul 26, 2024
1 parent 0861169 commit 13e51ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/pdm-lock-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ jobs:
if: steps.check.outputs.changed == 'true'
run: python -m pip install pdm==2.16.1

- name: Update and add pdm.lock
- name: Update and push pdm.lock
if: steps.check.outputs.changed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ matrix.directory }}" != "root" ]; then
cd ${{ matrix.directory }}
Expand All @@ -66,30 +68,15 @@ jobs:
fi
source .venv/bin/activate
pdm lock -G :all
git add pdm.lock
- name: Commit and push pdm.lock
if: steps.check.outputs.changed == 'true'
id: check_commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ ! -d ".venv" ]; then
echo "Creating virtual environment inside root"
pdm venv create -w virtualenv --with-pip
else
echo "Virtual environment already exists."
fi
source .venv/bin/activate
pip install pre-commit~=3.6.2
pre-commit run pdm-lock-check
echo "**** View pdm.lock ****"; sh -c "cat pdm.lock";
if git diff --quiet; then
echo "No changes in compared to the SELF branch."
echo "Nothing to commit"
else
echo "Changes detected in compared to the SELF branch."
git add pdm.lock
pip install pre-commit~=3.6.2
pre-commit run pdm-lock-check
git commit -m "Update pdm.lock for ${{ matrix.directory }}"
git push origin ${{ github.ref_name }}
fi
2 changes: 1 addition & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
dependencies = [
"Authlib==1.2.1", # For Auth plugins
"boto3~=1.28.17", # For Unstract-cloud-storage
"celery>=5.3.3", # For Celery
"celery>=5.3.4", # For Celery
"flower>=2.0.1", # Celery Monitoring
"cron-descriptor==1.4.0", # For cron string description
"cryptography>=41.0.7",
Expand Down
4 changes: 2 additions & 2 deletions prompt-service/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ authors = [
]
dependencies = [
"peewee~=3.16",
"nltk~=3.7",
"nltk~=3.8",
"flask~=3.0",
"llama-index==0.10.38",
"python-dotenv==1.0.0",
"unstract-sdk~=0.39.0",
"redis==5.0.1",
"redis>=5.0.3",
"unstract-core @ file:///${PROJECT_ROOT}/../unstract/core",
"unstract-flags @ file:///${PROJECT_ROOT}/../unstract/flags",
]
Expand Down

0 comments on commit 13e51ad

Please sign in to comment.