Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

archive custom user code #228

Closed
prjemian opened this issue May 31, 2019 · 3 comments · Fixed by #233
Closed

archive custom user code #228

prjemian opened this issue May 31, 2019 · 3 comments · Fixed by #233
Assignees
Labels
enhancement New feature or request

Comments

@prjemian
Copy link
Contributor

prjemian commented May 31, 2019

Need a plan to be called from users' custom code that will archive that code for posterity. Similar to how the SPEC macros are recorded.

  • Must be simple for user to call: yield from some_name()
  • Must provide some value to user (or else they will not use it).
  • Must copy user's code into posterity archive.
@prjemian prjemian added the enhancement New feature or request label May 31, 2019
@prjemian prjemian added this to the 2019-06 beam time milestone May 31, 2019
@prjemian prjemian self-assigned this May 31, 2019
@prjemian
Copy link
Contributor Author

Not sure this can be robust for upcoming beam time. Consider moving to later milestone.

@prjemian prjemian changed the title record custom user code archive custom user code May 31, 2019
@prjemian
Copy link
Contributor Author

From the proposed plan (support), could identify the caller using introspection. If that caller was defined in a file, archive the entire file contents. Any globals and support routines would thus be archived. How deep to archive (such as archiving some of the imports as well)? Just to file level at first.

Web searches:

They all point to the inspect package and the inspect.getframeinfo() function. We want the object, not the name, since we want to archive source code.

@prjemian
Copy link
Contributor Author

prjemian commented May 31, 2019

Still in 2019-06 milestone hoping that we can decide on the name of this routine and set out some initial actions.

prjemian added a commit that referenced this issue Jun 3, 2019
prjemian added a commit that referenced this issue Jun 3, 2019
jilavsky added a commit that referenced this issue Jun 4, 2019
prjemian added a commit that referenced this issue Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant