Skip to content

IEBH-353: Sync with the latest changes#7

Merged
vmoshynskyi merged 2 commits intomainfrom
IEBH-353
Nov 21, 2025
Merged

IEBH-353: Sync with the latest changes#7
vmoshynskyi merged 2 commits intomainfrom
IEBH-353

Conversation

@vmoshynskyi
Copy link
Member

Add the latest changes from the pilot repo.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR synchronizes the codebase with the latest changes from the pilot repository, introducing significant refactoring and new features. The main changes include:

  • Migration to modern Python type hints (PEP 604 style with | for unions)
  • Refactoring dependency injection for Kafka, database sessions, and activity log services
  • Introduction of a new version sharing feature with complete CRUD operations
  • Updates to test fixtures for better isolation and consistency
  • Database schema migrations for version sharing and project_id constraints
  • Package version updates and infrastructure improvements

Reviewed changes

Copilot reviewed 147 out of 149 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/services/test_file_folder_activity_log_service.py Updated to use kafka_producer_client fixture and removed pytest fixtures
tests/services/test_dataset_activity_log_service.py Updated tests to use kafka_producer_client and refactored parametrized tests
tests/resources/test_locks.py Added settings fixture parameter
tests/fixtures/services/base.py Enhanced authorization_header to generate JWT tokens
tests/fixtures/s3.py Updated MinIO Docker image to use internal registry
tests/fixtures/redis.py Changed to use pytest fixture instead of pytest_asyncio
tests/fixtures/policy.py Added settings parameter to minio_client fixture
tests/fixtures/kafka.py Added kafka_producer_client fixture and updated scopes
tests/fixtures/jq.py Changed return type from Iterable to Sequence
tests/fixtures/fake.py New file introducing Faker fixture with custom methods
tests/fixtures/db.py Refactored database setup with improved session management
tests/fixtures/components/version_sharing.py New file for version sharing test fixtures
tests/fixtures/components/version.py Updated factory pattern and added dataset_factory dependency
tests/fixtures/components/schema_template.py Updated to use CRUDFactory base class
tests/fixtures/components/schema.py Updated factory with fixed parameter ordering
tests/fixtures/components/dataset.py Updated to use CRUDFactory base class
tests/fixtures/components/bids_result.py Updated to use modern type hints
tests/fixtures/components/_factories.py New file introducing CRUDFactory base class
tests/fixtures/components/_base_factory.py Removed legacy base factory file
tests/fixtures/components/init.py Added exports for factory classes
tests/fixtures/app.py Refactored app fixtures with better settings handling
tests/dependencies/test_db.py Added settings parameter to test
tests/conftest.py Updated plugin list and environment setup
tests/components/version_sharing/*.py New test files for version sharing feature
tests/components/version/test_versions.py Updated tests with new endpoints and authorization
tests/components/test_*.py Updated to use fake fixture instead of faker
tests/components/schema_template/test_api_schema_template.py Fixed test data setup and assertions
tests/components/schema/test_api_schema.py Added settings fixture and improved test isolation
tests/components/request/*.py New test files for request network handling
tests/components/preview/test_api_preview.py Added settings parameter
tests/components/health/test_health.py Refactored health check tests with mocking
tests/components/folder/test_api_dataset_folder.py Updated to use fake fixture
tests/components/file/*.py Updated type hints and removed unused imports
tests/components/dataset/*.py Updated tests with query parameter changes
tests/components/bids_result/test_views.py Removed unused imports
pyproject.toml Updated package versions and dependencies
migrations/versions/*.py Added new migrations and formatting fixes
docker-compose.yaml Updated volume paths and service configurations
dataset/startup/*.py Added version_sharing router and exception logging
dataset/services/*.py Updated type hints to modern style
dataset/dependencies/*.py Refactored Kafka and DB dependencies with proper initialization
dataset/config.py Removed vault configuration and added APP_NAME
dataset/components/version_sharing/*.py New component for version sharing feature
dataset/components/version/*.py Added download event tracking and new endpoints
dataset/components/request/*.py New component for network origin detection
dataset/components//.py Updated type hints and dependency injection patterns
dataset/components/activity_log/*.avsc Updated Avro schemas with network_origin field
dataset/app.py Updated tracer provider to use APP_NAME
README.md Removed trailing newline
Dockerfile Updated base image version
.pre-commit-config.yaml Updated hook versions and pip-audit configuration
.github/workflows/hdc-pipeline.yml New GitHub Actions workflow file
.env.example Removed VAULT_TOKEN configuration
Comments suppressed due to low confidence (4)

dataset/components/file/locks.py:82

  • This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
    This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
    This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
                    bucket, minio_obj_path = None, None

dataset/components/file/locks.py:147

  • This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
    This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
                    bucket, minio_obj_path = None, None

dataset/components/file/locks.py:207

  • This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
    This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
    This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
                    bucket, minio_obj_path = None, None

dataset/components/file/locks.py:278

  • This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
    This assignment to 'minio_obj_path' is unnecessary as it is redefined before this value is used.
                    bucket, minio_obj_path = None, None

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py00100% 
__main__.py050%7, 9–10, 12, 14
app.py0785%75, 84–85, 87, 91, 93–94
config.py00100% 
logger.py00100% 
components
   __init__.py00100% 
   crud.py0496%98–99, 136, 144
   db_model.py00100% 
   exceptions.py0691%56, 60, 64, 120, 124, 128
   filtering.py00100% 
   models.py0291%19–20
   pagination.py00100% 
   parameters.py00100% 
   schemas.py00100% 
   sorting.py00100% 
   types.py0190%14
components/activity_log
   __init__.py00100% 
   dataset_activity_log.py00100% 
   file_folder_activity_log.py00100% 
   schemas.py00100% 
components/bids_result
   __init__.py00100% 
   crud.py00100% 
   dependencies.py00100% 
   models.py00100% 
   schemas.py00100% 
   views.py00100% 
components/dataset
   __init__.py00100% 
   activity_log.py00100% 
   crud.py00100% 
   dependencies.py00100% 
   exceptions.py00100% 
   filtering.py00100% 
   models.py00100% 
   object_storage_manager.py0868%28, 31–32, 38–42
   parameters.py0197%46
   schemas.py00100% 
   views.py0591%58–62
components/file
   __init__.py00100% 
   activity_log.py00100% 
   crud.py01292%44–45, 53, 71–72, 175–177, 213, 226, 275, 278
   dependencies.py00100% 
   locks.py02287%41, 55, 76, 92–93, 96, 105, 123–124, 141, 180–181, 201, 253–254, 272, 283–284, 293, 296, 303–304
   schemas.py0197%97
   tasks.py01393%69, 144, 207, 266, 296–300, 324, 344–345, 412
   types.py00100% 
   views.py0298%179–180
components/folder
   __init__.py00100% 
   activity_log.py00100% 
   crud.py00100% 
   dependencies.py00100% 
   exceptions.py0183%17
   schemas.py00100% 
   views.py00100% 
components/health
   __init__.py00100% 
   dependencies.py0486%35, 39–41
   views.py00100% 
components/object_storage
   __init__.py00100% 
   policy.py00100% 
   policy_templates.py00100% 
   s3.py0197%57
components/preview
   __init__.py00100% 
   schemas.py00100% 
   views.py00100% 
components/request
   __init__.py00100% 
   network.py00100% 
components/schema
   __init__.py00100% 
   activity_log.py00100% 
   crud.py00100% 
   dependencies.py00100% 
   exceptions.py00100% 
   models.py00100% 
   schemas.py00100% 
   views.py00100% 
components/schema_template
   __init__.py00100% 
   activity_log.py00100% 
   crud.py00100% 
   dependencies.py00100% 
   models.py00100% 
   schemas.py00100% 
   views.py00100% 
components/version
   __init__.py00100% 
   activity_log.py00100% 
   crud.py00100% 
   dependencies.py00100% 
   filtering.py00100% 
   models.py00100% 
   parameters.py00100% 
   publisher.py01487%65–67, 91, 101–102, 105–106, 118–119, 139–142
   schemas.py00100% 
   views.py0495%85, 135–137
components/version_sharing
   __init__.py00100% 
   activity_log.py00100% 
   crud.py00100% 
   filtering.py00100% 
   models.py00100% 
   parameters.py00100% 
   schemas.py00100% 
   views.py0296%120, 123
dependencies
   __init__.py00100% 
   db.py01360%35–36, 44–53, 55
   kafka.py0389%27–29
   redis.py00100% 
   s3.py00100% 
   services.py00100% 
resources
   __init__.py00100% 
services
   __init__.py00100% 
   activity_log.py0385%29–31
   base.py0196%25
   metadata.py0890%68, 84, 97, 104–108
   project.py00100% 
   queue.py00100% 
   task_stream.py0198%33
startup
   __init__.py00100% 
   api_registry.py00100% 
   exception_handlers.py0288%25–26
   middlewares.py00100% 
TOTAL321014695% 

@vmoshynskyi vmoshynskyi merged commit a8b2928 into main Nov 21, 2025
7 checks passed
@vmoshynskyi vmoshynskyi deleted the IEBH-353 branch November 21, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant