NSLS2 / NSLS2/pyCHX

separate package imports from scripts?

Open
#13 6 comments 0 reactions 5 assignees View on GitHub

@xmchenGH is already working on this.

Since Oct 22, 2020.

Dominant language
Jupyter Notebook
Stars
8
Forks
12
Avg merge
2h 53m
Merged PRs (30d)
6

Description

This is in response to discussion in #8 (thanks for reminder @mrakitin ).

It seems there are two different types of .py files:

  1. Meant to be imported as a package. For ex: from pyCHX.chx_generic_functions import shrink_image
  2. Meant to be edited frequently and run as a script. For example : %run XPCS_SAXS.py
    The latter is more commonly run as a script because some flags are turned on or off. I think one example could be here.

Should we make a separation between the two?
I suggest we move script files in a new folder called /scripts.

As the library is built as a lightsource2 package and we'd like to see a lot of this useful code be used by others (if @yugangzhang is okay with it :-) ) it would be nice to spend some time to think about this.

I would like to hear @yugangzhang 's opinion on this. Also, @danielballan may have better suggestions on how to do this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.