Skip to content

Commit

Permalink
General repo updates post OWF move. (#3267)
Browse files Browse the repository at this point in the history
* Change source code directory name

Signed-off-by: Jamie Hale <jamiehalebc@gmail.com>

* Change github actions and devcontainer naming

Signed-off-by: Jamie Hale <jamiehalebc@gmail.com>

* Update project description and authors

Signed-off-by: Jamie Hale <jamiehalebc@gmail.com>

* Update aries-cloudagent references

Signed-off-by: Jamie Hale <jamiehalebc@gmail.com>

* Move vc data_integrity module

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update github actions with openeallet-foundation

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Fix sonar cloud test coverage namspace

Signed-off-by: jamshale <jamiehalebc@gmail.com>

---------

Signed-off-by: Jamie Hale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
  • Loading branch information
jamshale authored Oct 9, 2024
1 parent 2dbea90 commit 5e1b10b
Show file tree
Hide file tree
Showing 1,419 changed files with 850 additions and 865 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "aries_cloudagent",
"name": "acapy_agent",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
Expand All @@ -18,7 +18,7 @@
],
"settings": {
"python.testing.pytestArgs": [
"aries_cloudagent",
"acapy_agent",
"--no-cov"
],
"python.testing.autoTestDiscoverOnSaveEnabled": true,
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ WORKSPACE_DIR=$(pwd)
python -m pip install --upgrade pip
pip3 install -r demo/requirements.txt -r demo/requirements.behave.txt

# install a version of aries-cloudagent so the pytests can pick up a version
pip3 install aries-cloudagent
# install a version of acapy-agent so the pytests can pick up a version
pip3 install acapy-agent

# hack/workaround to allow `pytest .` and `poetry run pytest` work.
# need to not run ruff...
Expand All @@ -19,7 +19,7 @@ cat > .pytest.ini <<EOF
# remove this file for normal operations outside of the devcontainer.
# basically we cannot have ruff (--ruff) in the pytest configuration as it breaks the Testing View.
[pytest]
testpaths = "aries_cloudagent"
testpaths = "acapy_agent"
addopts = --quiet
markers = [
"anoncreds: Tests specifically relating to AnonCreds support",
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/is-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
continue-on-error: true
run: |
# Get the diff between the current commit and the last merge commit on the upstream/main branch
git remote add upstream https://github.com/hyperledger/aries-cloudagent-python.git
git remote add upstream https://github.com/openwallet-foundation/acapy.git
git fetch upstream
last_merge=$(git rev-list --no-merges -n 1 upstream/main)
Expand All @@ -29,11 +29,11 @@ runs:
changes=$(git diff "${{ github.sha }}" "$last_merge" pyproject.toml)
# Extract the version of aries-cloudagent from the diff of pyproject.toml
version=$(echo "$changes" | grep -A1 'name = "aries_cloudagent"' | head -n 2 | tail -n 1 | awk '{print $3}' | tr -d '"')
# Extract the version of acapy-agent from the diff of pyproject.toml
version=$(echo "$changes" | grep -A1 'name = "acapy_agent"' | head -n 2 | tail -n 1 | awk '{print $3}' | tr -d '"')
echo "$version"
if [ "$version" ]; then
echo "This is a release because the aries-cloudagent version in pyproject.toml has changes"
echo "This is a release because the acapy-agent version in pyproject.toml has changes"
echo is_release=true >> $GITHUB_OUTPUT
fi
2 changes: 1 addition & 1 deletion .github/actions/run-unit-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
- name: Tests
shell: bash
run: |
poetry run pytest --cov=aries_cloudagent --cov-report term-missing --cov-report xml --ignore-glob=/tests/* --ignore-glob=demo/* --ignore-glob=docker/* --ignore-glob=docs/* --ignore-glob=scripts/* --ignore-glob=scenarios/* 2>&1 | tee pytest.log
poetry run pytest --cov=acapy_agent --cov-report term-missing --cov-report xml --ignore-glob=/tests/* --ignore-glob=demo/* --ignore-glob=docker/* --ignore-glob=docs/* --ignore-glob=scripts/* --ignore-glob=scenarios/* 2>&1 | tee pytest.log
PYTEST_EXIT_CODE=${PIPESTATUS[0]}
if grep -Eq "RuntimeWarning: coroutine .* was never awaited" pytest.log; then
echo "Failure: Detected unawaited coroutine warning in pytest output."
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bdd-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ defaults:
jobs:
test:
runs-on: ubuntu-latest
# Run on hyperledger and non-draft PRs or on non-PR events
if: (github.repository == 'hyperledger/aries-cloudagent-python') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
# Run on openwallet-foundation and non-draft PRs or on non-PR events
if: (github.repository == 'openwallet-foundation/acapy') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
outputs:
is_release: ${{ steps.check_if_release.outputs.is_release }}
steps:
Expand All @@ -35,7 +35,7 @@ jobs:
with:
files_yaml: |
src:
- aries_cloudagent/**/*
- acapy_agent/**/*
- poetry.lock
- pyproject.toml
demo: "demo/**/*"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/bdd-interop-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ defaults:
jobs:
test:
runs-on: ubuntu-latest
# Run on hyperledger and non-draft PRs or on non-PR events
if: (github.repository == 'hyperledger/aries-cloudagent-python') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
# Run on openwallet-foundation and non-draft PRs or on non-PR events
if: (github.repository == 'openwallet-foundation/acapy') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
outputs:
is_release: ${{ steps.check_if_release.outputs.is_release }}
steps:
Expand All @@ -35,7 +35,7 @@ jobs:
with:
files_yaml: |
src:
- aries_cloudagent/**/*
- acapy_agent/**/*
- poetry.lock
- pyproject.toml
- name: Check if src files changed
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
if [ ${{ github.event_name }} == 'pull_request' ]; then
echo ${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }}
echo ${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}
sed -i 's|@git+https://github.com/hyperledger/aries-cloudagent-python@main|@git+${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }}@${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}|g' ./aries-agent-test-harness/aries-backchannels/acapy/requirements-main.txt
sed -i 's|@git+https://github.com/openwallet-foundation/acapy@main|@git+${{ fromJson(steps.get_pr_data.outputs.data).head.repo.html_url }}@${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}|g' ./aries-agent-test-harness/aries-backchannels/acapy/requirements-main.txt
fi
cat aries-agent-test-harness/aries-backchannels/acapy/requirements-main.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest
if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request')
if: (github.event_name == 'pull_request' && github.repository == 'openwallet-foundation/acapy') || (github.event_name != 'pull_request')

permissions:
security-events: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nigthly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.12"]
if: github.repository == 'hyperledger/aries-cloudagent-python' || github.event_name == 'workflow_dispatch'
if: github.repository == 'openwallet-foundation/acapy' || github.event_name == 'workflow_dispatch'
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pip-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
jobs:
selftest:
runs-on: ubuntu-latest
if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request')
if: (github.event_name == 'pull_request' && github.repository == 'openwallet-foundation/acapy') || (github.event_name != 'pull_request')
steps:
- uses: actions/checkout@v4
- name: install
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on:
type: string

env:
# linux/386 platform support has been disabled pending a permanent fix for https://github.com/hyperledger/aries-cloudagent-python/issues/2124
# linux/386 platform support has been disabled pending a permanent fix for https://github.com/openwallet-foundation/acapy/issues/2124
# PLATFORMS: ${{ inputs.platforms || 'linux/amd64,linux/arm64,linux/386' }}
PLATFORMS: ${{ inputs.platforms || 'linux/amd64,linux/arm64' }}

Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
ghcr.io/${{ steps.info.outputs.repo-owner }}/acapy-agent
tags: |
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
Expand All @@ -108,7 +108,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-bbs
ghcr.io/${{ steps.info.outputs.repo-owner }}/acapy-agent-bbs
tags: |
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
Expand All @@ -123,13 +123,13 @@ jobs:
target: main
build-args: |
python_version=${{ matrix.python-version }}
acapy_name=aries-cloudagent-bbs
acapy_name=acapy-agent-bbs
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
acapy_reqs=[askar,bbs,didcommv2]
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Because of BBS, only linux/amd64 is supported for the extended image
# https://github.com/hyperledger/aries-cloudagent-python/issues/2124#issuecomment-2293569659
# https://github.com/openwallet-foundation/acapy/issues/2124#issuecomment-2293569659
platforms: linux/amd64

# Temp fix
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scenario-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ defaults:
jobs:
test:
runs-on: ubuntu-latest
# Run on hyperledger and non-draft PRs or on non-PR events
if: (github.repository == 'hyperledger/aries-cloudagent-python') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
# Run on openwallet-foundation and non-draft PRs or on non-PR events
if: (github.repository == 'openwallet-foundation/acapy') && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name != 'pull_request'))
steps:
- name: checkout-acapy
uses: actions/checkout@v4
Expand All @@ -34,7 +34,7 @@ jobs:
files_yaml: |
scenarios: "scenarios/**/*"
src:
- aries_cloudagent/**/*
- acapy_agent/**/*
- poetry.lock
- pyproject.toml
- name: Check if scenarios or src files changed
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/snyk-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ on:
- 0.12.lts
- 0.11.lts
paths:
- aries_cloudagent/**
- acapy_agent/**
- docker/**

jobs:
snyk:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'hyperledger' }}
if: ${{ github.repository_owner == 'openwallet-foundation' }}
steps:
- uses: actions/checkout@v4

- name: Build a Docker image
run: docker build -t aries-cloudagent -f docker/Dockerfile .
run: docker build -t acapy-agent -f docker/Dockerfile .

- name: Run Snyk to check Docker image for vulnerabilities
# Snyk can be used to break the build when it detects vulnerabilities.
Expand All @@ -31,7 +31,7 @@ jobs:
# or you can signup for free at https://snyk.io/login
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: aries-cloudagent
image: acapy-agent
args: --file=docker/Dockerfile
# Adding a snyk monitor command which continuously monitors the image for vulnerabilities
# See https://support.snyk.io/hc/en-us/articles/360000920818-What-are-the-differences-among-snyk-test-monitor-and-protect for more details
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
branches:
- main
paths:
- aries_cloudagent/**
- acapy_agent/**
- docker/**

jobs:
snyk:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'hyperledger' }}
if: ${{ github.repository_owner == 'openwallet-foundation' }}
steps:
- uses: actions/checkout@v4

- name: Build a Docker image
run: docker build -t aries-cloudagent -f docker/Dockerfile .
run: docker build -t acapy-agent -f docker/Dockerfile .

- name: Run Snyk to check Docker image for vulnerabilities
# Snyk can be used to break the build when it detects vulnerabilities.
Expand All @@ -28,7 +28,7 @@ jobs:
# or you can signup for free at https://snyk.io/login
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: aries-cloudagent
image: acapy-agent
args: --file=docker/Dockerfile

# Replace any "null" security severity values with 0. The null value is used in the case
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonar-merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
if: github.repository == 'hyperledger/aries-cloudagent-python'
if: github.repository == 'openwallet-foundation/acapy'
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Adjust Test Coverage Source
run: |
# Need to change source in coverage report because it was generated from another context
sed -i 's/\/home\/runner\/work\/aries-cloudagent-python\/aries-cloudagent-python\//\/github\/workspace\//g' test-reports/coverage.xml
sed -i 's/\/home\/runner\/work\/acapy\/acapy\//\/github\/workspace\//g' test-reports/coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonar-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
SonarCloud:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' && github.repository == 'hyperledger/aries-cloudagent-python'
if: github.event.workflow_run.conclusion == 'success' && github.repository == 'openwallet-foundation/acapy'
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
mkdir test-reports
mv coverage.xml test-reports
# Need to change source in coverage report because it was generated from another context
sed -i 's/\/home\/runner\/work\/aries-cloudagent-python\/aries-cloudagent-python\//\/github\/workspace\//g' test-reports/coverage.xml
sed -i 's/\/home\/runner\/work\/acapy\/acapy\//\/github\/workspace\//g' test-reports/coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
Loading

0 comments on commit 5e1b10b

Please sign in to comment.