tox-dev / pyproject-fmt

https://pyproject-fmt.readthedocs.io/en/latest/
MIT License
171 stars 28 forks source link

Undo automatic collapse of project sub-tables to be inline within the project table #247

Closed tieneupin closed 2 months ago

tieneupin commented 2 months ago

Is there a configurable setting in the latest version of pyproject-fmt that we can use to stop the collapse of the project sub-tables to be inline within the project table? Our project has a lot of CLIs and entry points, so the option to group them up thematically under sub-tables was very much appreciated in the v1.x iterations of pyproject-fmt.

With v2.2.1 of pyproject-fmt:

optional-dependencies.dev = [
    "bump2version",
    "ipykernel",
    "pre-commit",
    "pytest",
]
urls.Bug-Tracker = "https://github.com/DiamondLightSource/cryoem-services/issues"
urls.GitHub = "https://github.com/DiamondLightSource/cryoem-services"
scripts."clem.lif_to_stack" = "cryoemservices.cli.lif_to_stack:run"
scripts."clem.tiff_to_stack" = "cryoemservices.cli.tiff_to_stack:run"
scripts."combine_star_files" = "cryoemservices.pipeliner_plugins.combine_star_files:main"
scripts."cryoemservices.reextract" = "cryoemservices.pipeliner_plugins.reextract:run"
scripts."cryoemservices.resubmit_wrapper" = "cryoemservices.cli.resubmit_wrapper:run"
entry-points."ccpem_pipeliner.jobs"."combine_star_files_job" = "cryoemservices.pipeliner_plugins.combine_star_job:ProcessStarFiles"
entry-points."cryoemservices.services.cluster.schedulers".slurm = "cryoemservices.services.cluster_submission:submit_to_slurm"
entry-points."cryoemservices.services.images.plugins"."mrc_central_slice" = "cryoemservices.services.images_plugins:mrc_central_slice"
entry-points."cryoemservices.services.images.plugins"."mrc_to_apng" = "cryoemservices.services.images_plugins:mrc_to_apng"
entry-points."cryoemservices.services.images.plugins"."mrc_to_jpeg" = "cryoemservices.services.images_plugins:mrc_to_jpeg"
entry-points."cryoemservices.services.images.plugins"."picked_particles" = "cryoemservices.services.images_plugins:picked_particles"
entry-points."workflows.services".BFactor = "cryoemservices.services.bfactor_setup:BFactor"
entry-points."workflows.services".ClusterSubmission = "cryoemservices.services.cluster_submission:ClusterSubmission"
entry-points."workflows.services".CrYOLO = "cryoemservices.services.cryolo:CrYOLO"
entry-points."workflows.services".CTFFind = "cryoemservices.services.ctffind:CTFFind"
entry-points."workflows.services".DenoiseSlurm = "cryoemservices.services.denoise_slurm:DenoiseSlurm"
entry-points."workflows.services".Extract = "cryoemservices.services.extract:Extract"
entry-points."workflows.services".ExtractClass = "cryoemservices.services.extract_class:ExtractClass"
entry-points."workflows.services".IceBreaker = "cryoemservices.services.icebreaker:IceBreaker"
entry-points."workflows.services".Images = "cryoemservices.services.images:Images"
entry-points."workflows.services".ISPyB = "cryoemservices.services.ispyb:EMISPyB"
entry-points."workflows.services".MembrainSeg = "cryoemservices.services.membrain_seg:MembrainSeg"
entry-points."workflows.services".MotionCorr = "cryoemservices.services.motioncorr:MotionCorr"
entry-points."workflows.services".MotionCorrSlurm = "cryoemservices.services.motioncorr_slurm:MotionCorrSlurm"
entry-points."workflows.services".NodeCreator = "cryoemservices.services.node_creator:NodeCreator"
entry-points."workflows.services".PostProcess = "cryoemservices.services.postprocess:PostProcess"
entry-points."workflows.services".SelectClasses = "cryoemservices.services.select_classes:SelectClasses"
entry-points."workflows.services".SelectParticles = "cryoemservices.services.select_particles:SelectParticles"
entry-points."workflows.services".TomoAlign = "cryoemservices.services.tomo_align:TomoAlign"
entry-points."workflows.services".TomoAlignSlurm = "cryoemservices.services.tomo_align_slurm:TomoAlignSlurm"
entry-points."zocalo.services.dispatcher.filters".ispyb = "cryoemservices.util.dispatcher_tools:ispyb_filter"
entry-points."zocalo.services.dispatcher.ready_for_processing".ispyb = "cryoemservices.util.dispatcher_tools:ready_for_processing"
entry-points."zocalo.wrappers".Class2D = "cryoemservices.wrappers.class2d_wrapper:Class2DWrapper"
entry-points."zocalo.wrappers".Class3D = "cryoemservices.wrappers.class3d_wrapper:Class3DWrapper"
entry-points."zocalo.wrappers".Refine3D = "cryoemservices.wrappers.refine3d_wrapper:Refine3DWrapper"

Previously with v1.8.0:

[project.optional-dependencies]
dev = [
    "bump2version",
    "ipykernel",
    "pre-commit",
    "pytest",
]
[project.urls]
Bug-Tracker = "https://github.com/DiamondLightSource/cryoem-services/issues"
GitHub = "https://github.com/DiamondLightSource/cryoem-services"
[project.scripts]
    "clem.lif_to_stack" = "cryoemservices.cli.lif_to_stack:run"
    "clem.tiff_to_stack" = "cryoemservices.cli.tiff_to_stack:run"
    "combine_star_files" = "cryoemservices.pipeliner_plugins.combine_star_files:main"
    "cryoemservices.reextract" = "cryoemservices.pipeliner_plugins.reextract:run"
    "cryoemservices.resubmit_wrapper" = "cryoemservices.cli.resubmit_wrapper:run"
[project.entry-points."ccpem_pipeliner.jobs"]
    "combine_star_files_job" = "cryoemservices.pipeliner_plugins.combine_star_job:ProcessStarFiles"
[project.entry-points."cryoemservices.services.cluster.schedulers"]
    slurm = "cryoemservices.services.cluster_submission:submit_to_slurm"
[project.entry-points."cryoemservices.services.images.plugins"]
    "mrc_central_slice" = "cryoemservices.services.images_plugins:mrc_central_slice"
    "mrc_to_apng" = "cryoemservices.services.images_plugins:mrc_to_apng"
    "mrc_to_jpeg" = "cryoemservices.services.images_plugins:mrc_to_jpeg"
    "picked_particles" = "cryoemservices.services.images_plugins:picked_particles"
[project.entry-points."workflows.services"]
    BFactor = "cryoemservices.services.bfactor_setup:BFactor"
    CTFFind = "cryoemservices.services.ctffind:CTFFind"
    ClusterSubmission = "cryoemservices.services.cluster_submission:ClusterSubmission"
    CrYOLO = "cryoemservices.services.cryolo:CrYOLO"
    DenoiseSlurm = "cryoemservices.services.denoise_slurm:DenoiseSlurm"
    Extract = "cryoemservices.services.extract:Extract"
    ExtractClass = "cryoemservices.services.extract_class:ExtractClass"
    ISPyB = "cryoemservices.services.ispyb:EMISPyB"
    IceBreaker = "cryoemservices.services.icebreaker:IceBreaker"
    Images = "cryoemservices.services.images:Images"
    MembrainSeg = "cryoemservices.services.membrain_seg:MembrainSeg"
    MotionCorr = "cryoemservices.services.motioncorr:MotionCorr"
    MotionCorrSlurm = "cryoemservices.services.motioncorr_slurm:MotionCorrSlurm"
    NodeCreator = "cryoemservices.services.node_creator:NodeCreator"
    PostProcess = "cryoemservices.services.postprocess:PostProcess"
    SelectClasses = "cryoemservices.services.select_classes:SelectClasses"
    SelectParticles = "cryoemservices.services.select_particles:SelectParticles"
    TomoAlign = "cryoemservices.services.tomo_align:TomoAlign"
    TomoAlignSlurm = "cryoemservices.services.tomo_align_slurm:TomoAlignSlurm"
[project.entry-points."zocalo.services.dispatcher.filters"]
    ispyb = "cryoemservices.util.dispatcher_tools:ispyb_filter"
[project.entry-points."zocalo.services.dispatcher.ready_for_processing"]
    ispyb = "cryoemservices.util.dispatcher_tools:ready_for_processing"
[project.entry-points."zocalo.wrappers"]
    Class2D = "cryoemservices.wrappers.class2d_wrapper:Class2DWrapper"
    Class3D = "cryoemservices.wrappers.class3d_wrapper:Class3DWrapper"
    Refine3D = "cryoemservices.wrappers.refine3d_wrapper:Refine3DWrapper"

Additionally, is there an option to retain newlines between project sub-tables? Looking forward to hearing back from you soon! Thanks!

gaborbernat commented 2 months ago

No, there is not. Similar to some other popular formatters, we aim to have as few configurations as possible.

gaborbernat commented 2 months ago

This issue is duplicate of https://github.com/tox-dev/toml-fmt/issues/5

tieneupin commented 2 months ago

No worries, @gaborbernat . Thanks for clarifying the situation with the formatting options available for pyproject-fmt!