POSYDON-code / POSYDON-code/POSYDON

Consistent dunder main usage

Open
#463 3 comments 0 reactions 2 assignees View on GitHub

@sgossage is already working on this.

Since May 28, 2025.

enhancement
Dominant language
Python
Stars
45
Forks
37
Avg merge
8d 20h
Merged PRs (30d)
5

Description

As discussed in #436, the use of dunder main for command line calls to python files is not consistent across the codebase. The changes added in #436 uses the function protocol while other instances may put the check for dunder main at some unspecified location within the file above the code intended to be executed.

Since the functional use is recommended in the python documentation with rational described there, this issue is to the transition all dunder main calls to match for logical consistency (e.g. bin/posydon-run-grid).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.