Skip to content

Commit

Permalink
Removed __init__.py file and corrected certify functions
Browse files Browse the repository at this point in the history
Signed-off-by: noopur <[email protected]>
  • Loading branch information
noopurintel committed Nov 11, 2024
1 parent 62005fc commit 67eb6cd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/task_runner_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
name: Task Runner E2E

on:
pull_request: # To be removed once the tests are stable
branches: [ develop ]
types: [opened, synchronize, reopened, ready_for_review]
schedule:
- cron: '0 0 * * *' # Run every day at midnight
workflow_dispatch:
Expand Down Expand Up @@ -76,7 +79,7 @@ jobs:
- name: Run Task Runner E2E tests
id: run_task_runner_tests
run: |
pytest -v tests/end_to_end/test_suites/task_runner_tests.py -m ${{ env.MODEL_NAME }} -s --num_rounds $NUM_ROUNDS --num_collaborators $NUM_COLLABORATORS --model_name ${{ env.MODEL_NAME }}
python -m pytest -s tests/end_to_end/test_suites/task_runner_tests.py -m ${{ env.MODEL_NAME }} --num_rounds $NUM_ROUNDS --num_collaborators $NUM_COLLABORATORS --model_name ${{ env.MODEL_NAME }}
echo "Task runner end to end test run completed"
env:
NO_PROXY: localhost,127.0.0.1,aggregator
Expand All @@ -85,6 +88,7 @@ jobs:
id: print_test_summary
if: steps.run_task_runner_tests.outcome == 'success' || steps.run_task_runner_tests.outcome == 'failure'
run: |
export PYTHONPATH="$PYTHONPATH:."
python tests/end_to_end/utils/xml_helper.py
echo "Test summary printed"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ venv/*
.eggs
eggs/*
*.pyi
results/*
1 change: 0 additions & 1 deletion tests/end_to_end/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ tests/end_to_end
├── models # Central location for all model-related code for testing purpose
├── test_suites # Folder containing test files
├── utils # Folder containing helper files
├── __init__.py # To mark test directory as a Python package
├── conftest.py # Pytest framework configuration file
├── pytest.ini # Pytest initialisation file
└── README.md # Readme file
Expand Down
3 changes: 0 additions & 3 deletions tests/end_to_end/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/end_to_end/models/participants.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_workspace_path(self, results_dir, workspace_name):
raise FileNotFoundError(f"Workspace {workspace_name} does not exist in {results_dir}")
return self.workspace_path

def setup_pki(self, collaborator_name):
def certify_collaborator(self, collaborator_name):
"""
Sign the CSR for the collaborator
Args:
Expand Down Expand Up @@ -179,7 +179,7 @@ def certify_workspace(self):
raise e
return True

def certify_agg_request(self, agg_domain_name):
def certify_aggregator(self, agg_domain_name):
"""
Certify the aggregator request
Args:
Expand Down
4 changes: 2 additions & 2 deletions tests/end_to_end/utils/federation_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setup_pki(fed_obj):
try:
log.info(f"Performing operations for {fed_obj.aggregator.name}")
fed_obj.aggregator.generate_sign_request()
fed_obj.model_owner.certify_agg_request(fed_obj.aggregator.agg_domain_name)
fed_obj.model_owner.certify_aggregator(fed_obj.aggregator.agg_domain_name)
except Exception as e:
log.error(f"Failed to perform aggregator operations: {e}")
raise e
Expand All @@ -34,7 +34,7 @@ def setup_pki(fed_obj):
collaborator.create_collaborator()
collaborator.generate_sign_request()
# Below step will add collaborator entries in cols.yaml file.
fed_obj.model_owner.setup_pki(collaborator.collaborator_name)
fed_obj.model_owner.certify_collaborator(collaborator.collaborator_name)
collaborator.import_pki()
except Exception as e:
log.error(f"Failed to perform collaborator operations: {e}")
Expand Down

0 comments on commit 67eb6cd

Please sign in to comment.