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

Added Git Initialisation Hooks #32

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Conversation

santacodes
Copy link
Collaborator

@santacodes santacodes commented Jul 23, 2024

  • Added git initialisation hooks in the template to automatically initialise a git repository when a generated project is created by cookiecutter.
  • Added a default main branch parameter for git repository initialisation.

Subtask - #26

Copy link
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @santacodes! I haven't tested this locally but could you confirm if this is working locally?

Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

Thanks, @santacodes! While I shall approve this PR now so that it gets your other PR going, I would suggest that we provide an option in the template to not require hatch-vcs by default. Making this it an opt-in piece of functionality would be great, this way, this script would not be needed for installing the package. Moreover, I feel that new users of PyBaMM and newcomers to Python packaging would like to hardcode the package version in a string instead of trying to wrap their heads around version control systems.

@santacodes
Copy link
Collaborator Author

Looks good, thanks @santacodes! I haven't tested this locally but could you confirm if this is working locally?

Yes it does, I tested it locally before pushing it.

@arjxn-py
Copy link
Member

I'm also testing it quick locally

@santacodes
Copy link
Collaborator Author

Thanks, @santacodes! While I shall approve this PR now so that it gets your other PR going, I would suggest that we provide an option in the template to not require hatch-vcs by default. Making this it an opt-in piece of functionality would be great, this way, this script would not be needed for installing the package. Moreover, I feel that new users of PyBaMM and newcomers to Python packaging would like to hardcode the package version in a string instead of trying to wrap their heads around version control systems.

I completely agree, I will add a new prompt for that to opt-in hatch-vcs and make it false by default so that they don't have to go through that hassle. Perhaps as you said the versions could be hardcoded in the _version.py file and can be configured through tool.hatch.version. I am working on the patch and will push that commit in #29, it should possibly resolve all the failing tests as well. Thank you for the insights!

Copy link
Member

@arjxn-py arjxn-py left a comment

Choose a reason for hiding this comment

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

Works well, I'd now need to re-configure my git name & mail 😆

@arjxn-py arjxn-py merged commit db24f92 into pybamm-team:main Jul 23, 2024
19 checks passed
@santacodes santacodes deleted the hooks branch July 23, 2024 17:05
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