Skip to content

Feature/cft 3479 run from git#12

Merged
soustruh merged 31 commits intomainfrom
feature/CFT-3479-run-from-git
Jul 10, 2025
Merged

Feature/cft 3479 run from git#12
soustruh merged 31 commits intomainfrom
feature/CFT-3479-run-from-git

Conversation

@soustruh
Copy link
Copy Markdown
Contributor

No description provided.

@soustruh soustruh force-pushed the feature/CFT-3479-run-from-git branch from bdbd16f to 2cab8dd Compare June 17, 2025 15:10
@soustruh soustruh force-pushed the feature/CFT-3479-run-from-git branch from 19cca38 to d38f02c Compare June 17, 2025 15:23
@soustruh soustruh force-pushed the feature/CFT-3479-run-from-git branch 9 times, most recently from 1b4eb93 to 137b2a1 Compare June 18, 2025 11:14
@soustruh soustruh force-pushed the feature/CFT-3479-run-from-git branch from 137b2a1 to ff2312d Compare June 18, 2025 12:10
@soustruh soustruh force-pushed the feature/CFT-3479-run-from-git branch from 6ab5ac8 to ff02d70 Compare June 23, 2025 08:09
@soustruh soustruh requested review from a team and removed request for AlbSed and kudj June 25, 2025 22:14
Copy link
Copy Markdown

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 adds support for running Python code from a Git repository (in addition to inline code), including authentication, cloning, package installation, and UI integration for branch/file selection.

  • Introduces GitHandler to clone repositories, list branches, and list Python files
  • Refactors component entrypoint to handle SourceEnum.CODE vs SourceEnum.GIT
  • Adds PackageInstaller for dependency installation and updates configuration schema, docs, and Dockerfile to support Git workflows

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/source_git.py New class to handle Git cloning, SSH/PAT auth, branch/file listing
src/source_file.py Static helper to write inline code to script.py
src/package_installer.py New installer using uv CLI for package installation
src/configuration.py Data models for configuration (SourceEnum, GitConfiguration)
src/component.py Main component logic updated for Git, sync actions, DACite parsing
component_config/configSchema.json Schema extended with Git settings, async branch/file actions
README.md Updated documentation for Git support and examples
Dockerfile Adds known_hosts setup for SSH
pyproject.toml Adds dacite dependency
flake8.cfg Ignores E203,W503
Comments suppressed due to low confidence (3)

src/component.py:119

  • The docstring for get_repository_files incorrectly refers to branches; it should mention files.
        Returns a list of branches in the git repository.

src/component.py:105

  • The json module is not imported in this file, which will cause a NameError. Please add import json at the top.
            json.dump(config_data, inp)

Dockerfile:21

  • The ${USERNAME} environment variable is not defined. Consider using a known home directory (e.g., /home/default) or define USERNAME.
RUN mkdir /home/${USERNAME}/.ssh

Comment thread src/package_installer.py Outdated
Comment thread src/package_installer.py Outdated
Comment thread src/source_git.py
Comment thread src/source_git.py Outdated
Comment thread .github/workflows/push.yml Outdated
Comment thread src/component.py
Comment thread src/source_git.py
Comment thread .github/workflows/push.yml Outdated
Comment thread src/component.py
Copy link
Copy Markdown
Collaborator

@ZdenekSrotyr ZdenekSrotyr left a comment

Choose a reason for hiding this comment

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

Also please remove unused files in repo, please

@soustruh soustruh force-pushed the feature/CFT-3479-run-from-git branch from c9a98db to 0839b9b Compare July 8, 2025 07:19
@soustruh soustruh force-pushed the feature/CFT-3479-run-from-git branch from 6cb6209 to a30828f Compare July 9, 2025 01:09
@soustruh soustruh requested a review from a team July 10, 2025 07:13
@soustruh soustruh marked this pull request as ready for review July 10, 2025 07:13
Copy link
Copy Markdown

@kudj kudj left a comment

Choose a reason for hiding this comment

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

nice! UV and isolated envs are top!

@soustruh soustruh merged commit afab838 into main Jul 10, 2025
7 checks passed
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.

4 participants