Skip to content

Response to Issue #2198: loadup and medley scripts can now store/retrieve loadup files to/from named subdirectories of MEDLEYDIR/loadups #2200

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

Merged
merged 6 commits into from
Jul 14, 2025

Conversation

fghalasz
Copy link
Member

@fghalasz fghalasz commented Jul 2, 2025

  1. This PR updates both the loadup and medley scripts (and their man-pages) to enable loadup products to be stored into and retrieved from named subdirectories under MEDLEYDIR/loadups. By default the subdirectory is named for the git branch current when loadup is run. But the name can also be specified as a argument to the loadup script.

    For the loadup script: ./loadup --branch [BRANCH | -] ... will store the loadup outputs (and work subdirectories) into a subdirectory named MEDLEYDIR/loadups/branches/BRANCH. If BRANCH is not specified or is "-" then the name of the currently active git branch is used, except if no git or MEDLEYDIR is not a git directory, then the --branch flag is ignored. BRANCH can contain alphanumerics, dashes, underscores and periods. Any other character is coerced to an underscore. This holds for git branch names as well as BRANCHes specified on the command line. -br is a synonyms of --branch. If no --branch is specified, then files are stored in the top level of MEDLEYDIR/loadups as before.

    For the medley script: ./medley --branch [ BRANCH | -] ... will run the sysouts from the MEDLEYDIR/loadups/branches/BRANCH directory. Also the env variable MEDLEY_LOADUPS_DIR will be set to this directory for ease of finding, e.g., exports.all, from Lisp. If BRANCH is specified as "-", then the name of the currently active git branch will be used as BRANCH. As for the loadup script, BRANCH can contain alphanumerics, dashes, underscores and periods. Any other character is coerced to an underscore. -br is a synonym for --branch.

    Man-pages have been updated accordingly.

  2. This PR adds to the loadup script the the feature that if MEDLEYDIR is a git directory, then a file named gitinfo will be placed in the LOADUP_OUTDIR. gitinfo contains the git commit, git branch name and git status at the time the loadup is run.

  3. Merged in PR#2208: Use the loadup step script names as the --id string.

…adup outputs are stored in MEDLEYDIR/loadups/branches/BRANCH, where BRANCH is the name of the currently active git branch of MEDLEYDIR (for loadup) or the name of a BRANCH whereby which a loadup had been run with the --branch option (for medley). Man pages updated accordingly.
@fghalasz fghalasz requested a review from rmkaplan July 2, 2025 07:16
@fghalasz fghalasz self-assigned this Jul 2, 2025
@fghalasz fghalasz added the enhancement New feature or request label Jul 2, 2025
@pamoroso pamoroso linked an issue Jul 2, 2025 that may be closed by this pull request
… scripts. Added optional BRANCH argument to --branch in loadup script. If BRANCH is specified iot is used as the (pseudo)branch name instead of the current active git branch of MEDLEYDIR. If BRANCH is "-", the current git branch name is used.
@rmkaplan
Copy link
Contributor

rmkaplan commented Jul 3, 2025

Worked well on first test: loadup --branch master.

Minor embellishments would be to put the branch in the window title, along with the id. And perhaps MEDLEY_LOADUPS_DIR could be set as one of the MEDLEY-INIT-VARS

@rmkaplan
Copy link
Contributor

rmkaplan commented Jul 3, 2025

Should loadups/branches/ be added to .gitignore?

fghalasz added 4 commits July 14, 2025 00:26
…TDIR that contains the git commit, git branch and git status of MEDLEYDIR at the time of the loadup. Branch names in loadup and medley scripts now contain only alphanumerics, dahes, underscores, periods. Any other character is coerced to underscore. The branch name is now included in the window title.
@fghalasz
Copy link
Member Author

PR modified modestly. New features/changes described in edited first comment above. Added branch names to window title. Added new loadups files to .gitignore. Merged with current master.

@fghalasz fghalasz changed the title Response to Issue #2198: loadup and medley scripts can now store/retrieve loadup files from subdirectories named for git branches Response to Issue #2198: loadup and medley scripts can now store/retrieve loadup files to/from named subdirectories of MEDLEYDIR/loadups Jul 14, 2025
Copy link
Contributor

@rmkaplan rmkaplan left a comment

Choose a reason for hiding this comment

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

Approved in 7/14/2025 meeting

@rmkaplan rmkaplan merged commit d6cb62a into master Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for loadups to go into subdirectories according to branch/pr
2 participants