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 Pkg and CI Template Creation #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Added Pkg and CI Template Creation #10

wants to merge 3 commits into from

Conversation

Joschi3
Copy link
Member

@Joschi3 Joschi3 commented Jan 30, 2025

Allows the creation of cpp_pkgs, python_pkgs, and msgs_pkgs using a copier.
Additionally, you can create CI Templates for github and gitlab.

Usage:

  • hector create to create pkgs directly in the workspace src folder
  • hector create -d <repository_name> to create Pkgs / Continous Integration Pipelines in a repository in the src folder

Copier will lead you through a questionnaire, allowing you to select further options easily.
The author name and email are extracted from the global git config.

@Joschi3 Joschi3 requested a review from StefanFabian January 30, 2025 14:21
@Joschi3 Joschi3 self-assigned this Jan 30, 2025
try:
import copier
except ImportError:
print("GitPython is required! Install using 'pip3 install --user copier'")
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work on Ubuntu 24. Is there no system package?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. Unfortunately, there is no apt package ...

Copy link
Member

Choose a reason for hiding this comment

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

rosdep should also support pip packages, might make sense to check if there is already a key and if not make a PR so it can be listed in the dependencies of the package and installed automatically.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have created a pull request for adding copier to rosdep.

scripts/create.py Outdated Show resolved Hide resolved
scripts/create.py Outdated Show resolved Hide resolved
@Joschi3 Joschi3 requested a review from StefanFabian January 31, 2025 09:20
import copier
except ImportError:
print(
"Copier is required! Install using 'pip3 install copier --break-system-packages'"
Copy link
Member

Choose a reason for hiding this comment

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

Why did you drop the --user?

help="CI type",
)
parser.add_argument(
"--add_pre_commit",
Copy link
Member

Choose a reason for hiding this comment

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

This is the only argument using _ in its name.

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.

2 participants