cookiecutter-data-science icon indicating copy to clipboard operation
cookiecutter-data-science copied to clipboard

The v2.2.0 branch not found

Open senovr opened this issue 7 months ago • 4 comments
trafficstars

Hi everyone,

I hope you're doing well!

I've been using CCDS (Cookiecutter Data Science) within my data science team since version 1, and it has been an integral part of our workflow. Recently, I decided to upgrade to version 2+ to leverage its improvements. Along the way, I wanted to customize the template—after discussing with my team—to better align with our specific processes and workflow requirements.

Here’s what I’ve done so far:

  • Cloned the original CCDS Git repository.

  • Removed the .git folder to detach it from the original repository.

  • Made adjustments, such as reorganizing the folder structure and tweaking the Makefiles.

  • Pushed the customized version to a private Git repository hosted on our GitLab instance.

However, I’ve encountered an issue that I didn’t anticipate based on my experience with CCDS v1. When I execute the following command:

bash
python -m ccds https://my-private-gitlab-instance/ccds_v2.git  

I receive the following error:

The v2.2.0 branch of repository ... could not found, have you made a typo?  

From what I can tell, CCDS seems tightly coupled to the original repository’s structure or branch naming conventions.

Could anyone advise me on how best to proceed? Specifically:

How can I ensure that my customized template works seamlessly with CCDS moving forward?

Is there a way to decouple CCDS from its strict dependency on the original repo structure?

Additionally, I plan to update this template periodically to reflect evolving team needs. My goal is to maintain a smooth developer experience—where team members can simply run the command again, accept updates, and continue working without disruptions.

Any insights or guidance would be greatly appreciated! Thank you in advance for your help!

senovr avatar Apr 08 '25 18:04 senovr

Hi @senovr,

I think you should be able to add a command-line flag -c master or something like that to check out the correct branch or commit in your custom repository.

The ccds CLI is a wrapper around cookiecutter and so many of the typical cookiecutter mechanisms still work and apply. You can do ccds --help to see more details and documentation.

The reason that CCDS is trying to check out the v2.2.0 ref is because we've injected logic that will use the current version of CCDS installed instead of the default branch.

From what I can tell, CCDS seems tightly coupled to the original repository’s structure or branch naming conventions.

Yes, this is something that has happened over time in order to support some of the more advanced customization features we've implemented. Thanks for reporting this to us—your feedback on how you're using CCDS is helpful to us for navigating the tradeoffs in the design.

jayqi avatar Apr 08 '25 18:04 jayqi

indeed, I committed my modified template to master. But when I am executed python -m ccds -с master https://my-private-gitlab-instance/ccds_v2.git it throw an error: Error: No such option: -с

senovr avatar Apr 08 '25 19:04 senovr

Hi @senovr, can you provide more information on how you've set up your environment, what version of ccds you have installed, any other error messages, etc.? I am not able to reproduce your error.

The following set of commands, which to my best understanding are equivalent-ish to what you are doing, work without any error for me.

❯ uv venv .venv
❯ source .venv/bin/activate
❯ uv pip install cookiecutter-data-science
❯ python -m ccds -c v2.1.0 https://github.com/drivendataorg/cookiecutter-data-science.git

jayqi avatar Apr 09 '25 14:04 jayqi

If I am executing this row: python -m ccds -c master my-git it shows an error To fix that, I need to change python -m ccds my-git -c master

senovr avatar Apr 10 '25 08:04 senovr