Skip to content

Code Formatting Standard #36

@jhalpern30

Description

@jhalpern30

We should implement some kind of code formatting standard that must be adhered to with each new commit. As an example, for contributing to simsopt, part of the development process outlined on their documentation involves running autopep on the source code (https://simsopt.readthedocs.io/latest/contributing.html#code-development-workflow).

It looks like there is an existing Julia package that can do this (https://domluna.github.io/JuliaFormatter.jl/stable/) - being as simple as running

julia> using JuliaFormatter
julia> format(".")

in the top level directory.

Should we include this/some other formatting method as part of the development steps? If so, we'll have to decide on the formatting options to stick to.

Another possibility is adding it to the tests during a PR run (i.e. if the formatter detects changes in files, the run fails), but I am unsure how to do this.

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions