Skip to content

Commit

Permalink
Add style guide instructions to developer_guide
Browse files Browse the repository at this point in the history
  • Loading branch information
lbonaldo committed Apr 4, 2024
1 parent 4956f61 commit f57c5d0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/src/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ GenX is an open-source project, and we welcome contributions from the community.

The following sections describe in more detail how to work with GenX resources and how to add a new resource to GenX.

## Style guide
GenX project follows the [SciML Style Guide](https://github.com/SciML/SciMLStyle). We encourage contributors to follow this style guide when submitting code changes to GenX. Before submitting a new PR, please run the following command to format a file or a directory:
```julia
julia> using JuliaFormatter
julia> format("path_to_directory", SciMLStyle(), verbose=true)
```
or
```julia
julia> using JuliaFormatter
julia> format("path_to_file.jl", SciMLStyle(), verbose=true)
```
The GitHub repository of GenX is set up to check the code style of each PR and will automatically create comments to help you format the code according to the style guide.

## GenX resources

In GenX, a resource is defined as an instance of a `GenX resource type`, a subtype of an `AbstractResource`. This allows the code to use multiple dispatch and define a common interface (behavior) for all resources in the code.
Expand Down

0 comments on commit f57c5d0

Please sign in to comment.