Coder Social home page Coder Social logo

Comments (1)

Javagedes avatar Javagedes commented on May 27, 2024

Working on this.

Here is the current situation:

File Relies on
edk2_git.py N/A - Basis of repo functionality
repo_resolver.py edk2_git.py
self_describing_environment.py PyGit2
git_dependency.py repo_resolver.py
edk2_ci_setup.py repo_resolver.py
edk2_setup.py Uses raw RunCmd git commands

Here is the end state plan:

File Relies on Changes
edk2_git.py N/A - Basis of repo functionality Use PyGit2 as basis of Repo management
edk2_git_resolver.py edk2_git.py repo_resolver + submodule resolve capability
self_describing_environment.py edk2_git.py Use edk2_git for worktrees
git_dependency.py edk2_git_resolver.py resolve() -> resolve_repo()
edk2_ci_setup.py edk2_git_resolver.py resolve_submodule_all()
edk2_setup.py edk2_git_resolver.py resolve_all() -> resolve_repo_all()

Main issues

  • edk2_git.py Repo() is currently static. No values change once the class is created, regardless of if the physical repo changes. Additionally, it uses way more "RunCmd"s then necessary, as PyGit2 can quickly read the git database rather than run git commands themselves. edk2_git will be updated to rely on PyGit2 where possible to reduce the amount of RunCmd's used. As a side effect, it allows attributes to change depending on repo state (As an example, if say a file is updated, repo.dirty will be updated also).
  • edk2_git_resolver.py (changed from repo_resolver) currently provides a few functions to ensure a repo meets the dependency requirements. I plan on adding new functions to do the same but based off the submodule requirements of the base repo. I.e. resolve() -> resolve_repo() and add a new resolve_submodule() function
  • self_describing_environmept.py uses raw PyGit2 for discovering subtrees. This will simply be abstracted away behind edk2_git.py
  • git_dependency.py only needs API changes based on edk2_git_resolver.py
  • edk2_ci_setup.py only needs API changes based on edk2_git_resolver.py
  • edk2_setup.py's core logic will be used as the basis for resolve_submodule(), using edk2_git.py Repo commands rather than RunCmd and edk2_setup.py will just need to call resolve_submodule() or resolve_submodule_all()

Overall, here is the current status of the project:

File` Relies on Updated?
edk2_git.py N/A - Basis of repo functionality Yes - #377
edk2_git_resolver.py edk2_git.py No
self_describing_environment.py edk2_git.py Yes - #377
git_dependency.py edk2_git_resolver.py No
edk2_ci_setup.py edk2_git_resolver.py No
edk2_setup.py edk2_git_resolver.py No

from edk2-pytool-extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.