Skip to content

New setup working release with aliases#22

Merged
RossanaTat merged 12 commits intoDEV_v2from
use_stamp_rt
Feb 6, 2026
Merged

New setup working release with aliases#22
RossanaTat merged 12 commits intoDEV_v2from
use_stamp_rt

Conversation

@RossanaTat
Copy link
Collaborator

@RossanaTat RossanaTat commented Feb 2, 2026

Updated:

  • setup_working_release to work with stamp alias
  • Tests for working release
  • How logs are saved and loaded to use stamp alias
  • Tests for log save and load
  • Tests for functions interacting with Github

@RossanaTat RossanaTat requested a review from dana89co February 2, 2026 20:44
@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch use_stamp_rt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@dana89co dana89co left a comment

Choose a reason for hiding this comment

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

Hi @RossanaTat, I reviewed it and some of the tests are not passing regarding this file, so maybe we need to check that. However, I tested in pipload and I have made the changes accordingly. I will send you PR in a bit

@RossanaTat
Copy link
Collaborator Author

Hi @RossanaTat, I reviewed it and some of the tests are not passing regarding this file, so maybe we need to check that. However, I tested in pipload and I have made the changes accordingly. I will send you PR in a bit

Sure thanks, fixing the tests now!


# Existing aliases in this stamp project
existing_aliases <- tryCatch(
stamp::st_aliases(),
Copy link

Choose a reason for hiding this comment

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

Hi @RossanaTat, I do not think this function exists. We can use stamp::st_alias_get or stamp::st_alias_list. Maybe we should use the last one here?

i = glue::glue(
"You are trying to re-register it for:\n {root}"
),
i = "This usually happens when switching PIP releases in the same R session.",
Copy link

Choose a reason for hiding this comment

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

@RossanaTat , wait is this actually happening? It should no re-register. If the folder is already created st_init does not do anything. Is that not the case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hey @dana89co, this is happening when you try to initialize the same alias for different folders, which {stamp} by default does not accept. This is because some root folders paths, like the one for aux data, are release specific. For example, if I call setup_working_release("20251211", "TEST") and then setup_working_release("20251205", "TEST") in the same session, {stamp} will error saying that the "aux" alias was already registered for ".../.../aux_data/20251211_TEST" and therefore cannot point now to ".../.../aux_data/20251205_TEST". This is correct behavior in {stamp} and ideally a situation that does not occur often, as we work with one release per session.

However, in order to make it more flexible, I've updated the function in the following way (refer to latest commits):

  • setup_working_release has an additional argument alias_include_release which is by default FALSE. When the user sets it to TRUE, when stamp initializes the aliases, the alias name will contain the release date for those folders which are release specific, so that no conflict arise.

Feel free to give it a try and let me know if you have questions :)

@RossanaTat RossanaTat merged commit 1edf4f5 into DEV_v2 Feb 6, 2026
1 of 2 checks passed
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