Skip to content

refactor: relocate devutil? #67

Closed

Description

@ycexiao

Problem

There is a subpackage devutils in this repo. In diffpy.structure, it's devutils is moved out from the code distribution. We are not sure if we should do it in this repo.

Proposed solution

Move devutils to the top-level directory, like in diffpy.structure?

Activity

  1. ycexiao commented on Jul 30, 2025

    @ycexiao
    ContributorAuthor

    In diffpy.srreal, there is only one module tunePeakPrecision.py inside devutils, its docstring:

    """Tune the peak precision parameter so that PDFCalculator gives
    equivalent results to diffpy.pdffit2.
    
    Usage: tunePeakPrecision.py [qmax] [peakprecision] [createplot]
    """
    

    In diffpy.structure, there is also only one module sgtbx_extra_groups.py inside devutils, its docstring:

    """Quick and extremely dirty script for generating code for SpaceGroup
    that are defined in cctbx, but not in mmLib.  It was used to generate
    module sgtbxspacegroups.
    
    This is a utility script that should not be included with code
    distribution.
    
    Not to be included with code distributions.
    """
    
  2. ycexiao commented on Jul 30, 2025

    @ycexiao
    ContributorAuthor

    They seem to be extra scripts that can help the users do something. I think we should not include them in the src, but we can provide them in the documentation. Users can copy and paste these scripts when they need these scripts.

  3. ycexiao commented on Jul 31, 2025

    @ycexiao
    ContributorAuthor

    @sbillinge , do we want to relocate the devutil?

  4. sbillinge commented on Aug 1, 2025

    @sbillinge
    Contributor

    looking at these, and looking at the name devutils, I now understand that these were scripts that Pavol or someone wrote to do some task and they just wanted to keep them around in case they needed them again. With this in mind, they are not user-facing so we don't want them in the docs. We also don't need them in the src packages as they will never be imported as far as I can tell. So my suggestion would be, in each case, to move them somewhere outside the package but within hte repo. It would be nice if we always put them in the same place when they exist (perhaps a directory at the top level called devutils?) and put a lightweight README.md that just says something like, "Library of scripts used as part of the code develpment" or sthg like that.

    Since it is in top-level directory in diffpy.structure, and that was my first instinct above, let's do that as a matter of course. If you would after you make the readme, please could you also put a PR into diffpy.structure adding the same readme to that devutils directory over there too? Thanks!

  5. added this to the v1.4.0rc pre-release milestone on Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions