Skip to content

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

Draft
ahs3 wants to merge 3 commits into
gramps-project:maintenance/gramps60from
ahs3:make
Draft

DRAFT: add some usage info and a workspace command to make.py#740
ahs3 wants to merge 3 commits into
gramps-project:maintenance/gramps60from
ahs3:make

Conversation

@ahs3
Copy link
Copy Markdown
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Copy link
Copy Markdown
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!

Comment thread make.py
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
Copy Markdown
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 }

@emyoulation
Copy link
Copy Markdown
Contributor

Prompted Claude AI to make a GUI for a subset of the make.py utility option. This runs within Gramps as an 'expert' 'Utilities' Tool. Perhaps we could collaborate?

"Addon Pack and Ship" creates the "Project" directory within its own addon subdirectory in the Gramps User Directory. This can be tested as a local "Project" before posting to your GitHub online repo.

Only successfully registered addons can be 'packed'. (There is a filter which includes searching authors and authors_email registrations. (But Maintainers are not searchable as the Gramps registration does not seem to store those.)
image

Claude integrated the make.py into the addon instead of using it as a external module. Which creates an extra maintenance hassle.

https://raw.githubusercontent.com/emyoulation/CuratedGrampsPlugins/master/gramps60/
https://raw.githubusercontent.com/emyoulation/CuratedGrampsPlugins/master/gramps52/

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.

3 participants