Skip to content

Coding practices

Oakley Brunt edited this page Apr 7, 2025 · 8 revisions

Requirements

PSyclone developer practices

This repo follows PSyclone's developer practices. Please read the PSyclone documentation page for details of what this means.

Copyright

All files must start with the following copyright statement:

# (C) Crown Copyright 20XX, Met Office. All rights reserved.
#
# This file is part of PSyACC and is released under the BSD 3-Clause license.
# See LICENSE in the root of the repository for full licensing details.

where 20XY is the year the file was created.

PSyTran developer practices

PSyTran uses release branches to manage parallel development with LFRic. Each PSyclone release used in LFRic has a dedicated feature branch - for example, psyclone-3.1.0.

LFRIC PSYCLONE VERSION = 3.1.0

Developing for a specific PSyclone release

When developing changes that you wish to use as part of the current LFRic release, you should cut branches from the PSyTran release branch that corresponds to the current PSyclone version used by LFRic.

On push/opening a PR, the test-suite will detect which release branch you are trying to merge changes into and run tests against that PSyclone version and the PSyclone HEAD. For example, if you ae trying to merge changes into psyclone-3.1.0 via a pull request, the test-suite will run tests for PSyclone 3.1.0 and PSyclone HEAD. Your changes should pass the tests against the PSyclone version you are targeting and PSyclone HEAD. Your changes will not be accepted if only one of these conditions is true.

Merging your changes

When your changes are accepted they will be merged into the feature branch you cut from and a new PR can be opened to merge the new changes into main. This new PR is automatically suggested by GitHub so just go to the Pull Requests tab and open the PR.

Clone this wiki locally