Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

pip install -r requirements.txt

export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/"
unset PIP_EXTRA_INDEX_URL

pip install -r requirements.txt
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ The general flow for making a change to the library is:

## Development Setup

Repository development dependency installs use the Central Feed Service:

```bash
export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/"
unset PIP_EXTRA_INDEX_URL
```

The repository `NuGet.config` routes .NET package restores through the corresponding CFS feed.

### Visual Studio Code Extensions

The following extensions should be installed if using Visual Studio Code for debugging:
Expand Down Expand Up @@ -119,7 +128,7 @@ Note: Conda based environments are not yet supported in Azure Functions.
6. For debugging, install the code using an editable pip install like this, in the VS Code Terminal:

```
pip install -e $REPOSITORY_ROOT/
pip install -e "$REPOSITORY_ROOT/"
```
where REPOSITORY_ROOT is the root folder of the azure-functions-durable-python repository

Expand Down Expand Up @@ -186,4 +195,3 @@ This project uses a combination of Azure DevOps and GitHub Actions for CI/CD.
### Requesting a release
- If you need a release into PyPI, request it by raising an issue and tagging @anthonychu or @davidmrdavid


4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include ./_manifest/*
include ./_manifest/*
exclude NuGet.config
global-exclude .npmrc pip.conf pip.ini
7 changes: 7 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="CFS" value="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/nuget/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
5 changes: 5 additions & 0 deletions azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
demands:
- ImageOverride -equals MMSUbuntu20.04TLS
steps:
- task: PipAuthenticate@1
displayName: "Authenticate to CFS PyPI feed"
inputs:
artifactFeeds: 'public/upstream-public'
onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
Expand Down
11 changes: 10 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ stages:
demands:
- ImageOverride -equals MMSUbuntu20.04TLS
steps:
- task: PipAuthenticate@1
displayName: 'Authenticate to CFS PyPI feed'
inputs:
artifactFeeds: 'public/upstream-public'
onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
Expand Down Expand Up @@ -85,6 +90,11 @@ stages:
demands:
- ImageOverride -equals MMSUbuntu20.04TLS
steps:
- task: PipAuthenticate@1
displayName: 'Authenticate to CFS PyPI feed'
inputs:
artifactFeeds: 'public/upstream-public'
onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
Expand All @@ -99,4 +109,3 @@ stages:
pytest --ignore=samples-v2
displayName: 'pytest'


10 changes: 10 additions & 0 deletions eng/templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
sbomPackageName: 'Durable Functions Python'

steps:
- task: PipAuthenticate@1
displayName: 'Authenticate to CFS PyPI feed'
inputs:
artifactFeeds: 'public/upstream-public'
onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
Expand Down Expand Up @@ -57,6 +62,11 @@ jobs:
# TODO: change the override to 'azure-functions>=2.2.0' once 2.2.0 GA
# ships, and drop the explicit install step.
steps:
- task: PipAuthenticate@1
displayName: 'Authenticate to CFS PyPI feed'
inputs:
artifactFeeds: 'public/upstream-public'
onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
Expand Down
16 changes: 15 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import nox

CFS_PYPI_INDEX = (
"https://pkgs.dev.azure.com/azfunc/public/"
"_packaging/upstream-public/pypi/simple/"
)

# Mirror the supported range exercised by CI (.github/workflows/validate.yml).
# nox automatically skips interpreters that aren't installed locally.
SUPPORTED_PYTHONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
Expand All @@ -10,8 +15,14 @@
CANONICAL_PYTHON = "3.10"


def use_cfs(session):
session.env["PIP_INDEX_URL"] = CFS_PYPI_INDEX
session.env.pop("PIP_EXTRA_INDEX_URL", None)


@nox.session(python=SUPPORTED_PYTHONS)
def tests(session):
use_cfs(session)
# same as pip install -r -requirements.txt
session.install("-r", "requirements.txt")
session.install("pytest")
Expand All @@ -20,17 +31,20 @@ def tests(session):

@nox.session(python=CANONICAL_PYTHON)
def lint(session):
use_cfs(session)
session.install("flake8")
session.install("flake8-docstrings")
session.run("flake8", "./azure/")

@nox.session(python=SUPPORTED_PYTHONS)
def typecheck(session):
use_cfs(session)
session.install("-r", "requirements.txt")
session.install("mypy")
session.run("mypy", "./azure/")

@nox.session(python=CANONICAL_PYTHON)
def autopep(session):
use_cfs(session)
session.install("-r", "requirements.txt")
session.run("autopep8", "--in-place --aggressive --aggressive --recursive \"./azure/\"")
session.run("autopep8", "--in-place --aggressive --aggressive --recursive \"./azure/\"")
19 changes: 12 additions & 7 deletions scripts/sample_deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
#!/bin/bash

REPOSITORY_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
CFS_PYPI_INDEX="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/"
export PIP_INDEX_URL="$CFS_PYPI_INDEX"
unset PIP_EXTRA_INDEX_URL

echo "Checking for prerequisites..."
if ! type npm > /dev/null; then
Expand All @@ -21,21 +26,21 @@ echo "Pre-requisites satisfied..."
echo "Creating sample folders..."
DIRECTORY=/tmp/df_test
if [ ! -d "$DIRECTORY" ]; then
mkdir /tmp/df_test
mkdir "$DIRECTORY"
else
rm -rf /tmp/df_test/*
rm -rf "$DIRECTORY"/*
fi

SAMPLE=function_chaining
cp -r ../samples/$SAMPLE $DIRECTORY/
cd $DIRECTORY/$SAMPLE
cp -r "$REPOSITORY_ROOT/samples/$SAMPLE" "$DIRECTORY/"
cp "$REPOSITORY_ROOT/NuGet.config" "$DIRECTORY/NuGet.config"
cd "$DIRECTORY/$SAMPLE"
python -m venv env
source env/bin/activate

echo "Provide local path to azure-functions-durable-python clone:"
read lib_path
pip install $lib_path/azure-functions-durable-python
pip install "$lib_path/azure-functions-durable-python"
func init .
func extensions install
echo "Done"

Loading