Skip to content

DRAFT: add some usage info and a workspace command to make.py #740

New issue

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

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

Already on GitHub? # to your account

Draft
wants to merge 3 commits into
base: maintenance/gramps60
Choose a base branch
from

Conversation

ahs3
Copy link
Contributor

@ahs3 ahs3 commented Jun 6, 2025

I kept trying to invoke "make.py --help" and nothing useful happened. So, I fixed that based on the commentary in make.py and some code reading. This will now at least provide some usage info.

More experimental is the "make.py workspace" command that was added. The intent of this command is to do the initial git repository setup for development of an addon, or maintaining the addons repo. Given a directory, it will clone the necessary repositories into the proper place under that directory, checking that forks have been made in a user's github account as well. If this is useful, excellent. If not, it is not essential to addons-source for the long term even if it is handy for some of us lazier folks.

ahs3 added 3 commits June 6, 2025 10:50
Typing ./make.py (with no arguments) used to just result in error messages
about missing values in sys.argv.  Added a little bit of parameter checking,
and a usage() function so that providing no arguments, or by using any of
{-h|--help|help} as parameters will produce a message describing available
commands and options.

Signed-off-by: Al Stone <ahs3@ahs3.net>
The command "./make.py gramps60 workplace MyAddon somepath" will
create the directory 'somepath', git clone the gramps, addons-source,
and addons into 'somepath', create the needed 'MyAddOn' directory in
addons-source, and populate it with templates for the required files.

This does not handle localization yet.

A small config file is created and used to track git user info,
as well.

Signed-off-by: Al Stone <ahs3@ahs3.net>
Instead of the workspace command duplicating the init command, make it
a method that can be called instead.  It doesn't really simplify the
init function, but it also doesn't have to be written twice and possibly
not stay in sync over time.

Signed-off-by: Al Stone <ahs3@ahs3.net>
Copy link
Member

@hgohel hgohel left a comment

Choose a reason for hiding this comment

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

Helpful change, thanks!

print(f"usage: {sys.argv[0]} <version> <command> [<options>]")
print("where:")
print(" <version> => Gramps maintenance branch name: one of")
print(" {gramps42 | gramps50 } gramps51 | gramps52 | gramps60}" )
Copy link
Member

Choose a reason for hiding this comment

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

Typo: should be gramps50 | as opposed to gramps50 }

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants