Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimalist Git & Github support via CLI #407

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

GatlenCulp
Copy link

@GatlenCulp GatlenCulp commented Dec 28, 2024

Overview

This PR adds extremely basic + minimalist functionality to initialize and optionally upload a git repository to a public or private GitHub using the git and gh command line tools in a hook. If these tools are not found, the user is informed that they need to be downloaded for this feature to work.

GatScreen_2024-12-28_00 35 32@2x

Made with VHS

I've read discussion #380 and while this PR is for Git/GitHub (since I used those tools), this could be extended to other version control systems or repository hosts. The need for the external CLI dependencies could be made internal by using some existing PyPi package included in the CCDS distribution.

Tests

  • Added tests for git (local) which simply checks whether the expected files/directories exist.
  • Set none and git (local) to be included in the test suite by default.
  • NO TESTS for git (github public) or git (github private). However these have been tested manually.

Misc

  • Updated tests/test_creation to use sets instead of lists. This keeps the syntax simple yet allows easily ignoring files by subtracting the ignored files selected via glob from the existing files. This is helpful for git tracking which uses hashes for dirs/file names
  • Added a few pytest options to pyproject.toml to get it to play better with VSCode's built-in testing ui.

@GatlenCulp GatlenCulp changed the title Added options to cookiecutter cli for version control, no changes mad… Minimalist Git & Github support via CLI Dec 28, 2024
@GatlenCulp GatlenCulp marked this pull request as ready for review December 28, 2024 05:50
… Fixed tests to match. Set tests to use git (local) and none by default
@GatlenCulp GatlenCulp marked this pull request as draft December 28, 2024 05:59
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