Skip to content

WaterTAP Project Template CLI #1577

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

zacharybinger
Copy link
Contributor

@zacharybinger zacharybinger commented Apr 30, 2025

Fixes/Resolves:

Adds a CLI utility for initializing new WaterTAP project templates using Cookiecutter. If no issue exists, this PR introduces a new developer feature for rapidly scaffolding standardized project directories.

Summary/Motivation:

To improve the developer experience and promote consistency across new WaterTAP projects, this PR introduces a watertap project command-line interface. It allows users to generate project folders from a GitHub-hosted Cookiecutter template with automatic fallback to a local template when offline.

A predesigned project template can be automatically created by running the following in the terminal:
watertap project

Additions to the project structure can be added here:
https://github.com/watertap-org/watertap_project_template

Changes proposed in this PR:

  • Adds watertap_cli.py with a project subcommand
  • Integrates GitHub template fetching with fallback to a local template directory
  • Automatically deletes the cached Cookiecutter template to avoid prompts
  • Supports both interactive and --no-input project generation
  • Allows --extra-context injection for scripting or automation

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label May 1, 2025
@adam-a-a
Copy link
Contributor

adam-a-a commented May 8, 2025

@zacharybinger this looks like an interesting PR. I can imagine what the intention is here, but I am unclear on the motivation behind the PR, how it arose, and what the vision for its usage would be. Would be good to discuss on the dev call

@adam-a-a
Copy link
Contributor

adam-a-a commented May 8, 2025

@zacharybinger I would also add that if we are to bring this in, we should add documentation on this along with perhaps a brief how-to to clarify the value of using it

@adam-a-a
Copy link
Contributor

one thought that comes to mind is that perhaps a feature like this should be reflected in the UI (though separate from this PR).

That is, I should be able to click on "Create new project" in the UI, which would then create some of the folder structure shown here. Then, while setting up/generating results in the UI, the user could save data/outputs on the go, which would point to relevant folders for saving

@ksbeattie ksbeattie requested a review from dangunter June 5, 2025 20:53
@adam-a-a
Copy link
Contributor

@dangunter @MichaelPesce do you think we can make the case for including this in the UI work for PrOMMiS (and other projects)? I think this is something that any project in the IDAES+ world could use, and I am curious to hear your thoughts on how we could implement this so that any IDAES+ project could use this--via CLI as well as the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants