Skip to content

Add formatting env and script - #79

Merged
sreichl merged 1 commit into
mainfrom
add-formatting-env
Mar 22, 2026
Merged

Add formatting env and script#79
sreichl merged 1 commit into
mainfrom
add-formatting-env

Conversation

@hoferand

Copy link
Copy Markdown
Collaborator

After merging add the following to the wiki:

  • Follow Best Practices
    • Follow the official best practices guidelines.
    • For code formatting use:
    • For local formatting, we provide a Conda environment: [LINK TO FILE AFTER MERGE]
    • After creating the Conda environment locally (conda env create -f formatting.yml), you can use the provided shell script for formatting: [LINK TO FILE AFTER MERGE]
    • For automated GitHub workflow checks, see our exmaple workflow.

@hoferand
hoferand requested a review from sreichl March 20, 2026 09:48
@sreichl
sreichl merged commit c04bfff into main Mar 22, 2026
4 checks passed
@sreichl

sreichl commented Mar 22, 2026

Copy link
Copy Markdown
Collaborator

Great, thanks I have added it now to the wiki.

Feedback (feel free to comment on it, maybe there were reasons):

  • prettier requires a config file (added to doc/wiki entry)
  • prettier was not in the conda env
  • conda env did not specify any versions (apart from python)

-> I have addressed all of them already, so no action required (and tested)

@hoferand

Copy link
Copy Markdown
Collaborator Author

Thanks for adding this to the wiki!

Regarding your feedback:

  • The Prettier config file is optional, I would leave that up to the user. However, it makes sense to at least mention it in the wiki, so thanks for that.
  • Prettier doesn’t need to be installed in the conda environment; npx can run it directly.
  • This was intentional and based on personal preference: libraries that don’t risk breaking the product don’t need to be pinned. I generally prefer using the latest versions (for dev tools), but I understand this is subjective.

@sreichl

sreichl commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator
  • The Prettier config file is optional, I would leave that up to the user. However, it makes sense to at least mention it in the wiki, so thanks for that.

How do you ensure then that every MrBiomics module would be formatted the same, and what is actually the default? Do we use the default or something specific? If we use the default, we can remove it for maximum simplicity.

  • Prettier doesn’t need to be installed in the conda environment; npx can run it directly.

not for me (on our linux HPC). it requested to be installed while running and I didn't want it to be installed using non-conda ways.

  • This was intentional and based on personal preference: libraries that don’t risk breaking the product don’t need to be pinned. I generally prefer using the latest versions (for dev tools), but I understand this is subjective.

oh okay, I am just used to the best practice to pin for reproducibility/portability

@hoferand

Copy link
Copy Markdown
Collaborator Author

The Prettier config file is optional, I would leave that up to the user. However, it makes sense to at least mention it in the wiki, so thanks for that.

The default is the same as in our current config file. So removing is probably easier for most users. (I just added the config file so my VS code extension works properly)

not for me (on our linux HPC). it requested to be installed while running and I didn't want it to be installed using non-conda ways.

You are right, I double checked and its better to have it in the conda env file directly, sorry for that.

oh okay, I am just used to the best practice to pin for reproducibility/portability

Yeah, for workflow environments it absolutely makes sense to pin/lock versions.

Just as an aside: in ecosystems like Rust (Cargo) or JS/TS (npm), strict pinning can sometimes lead to multiple versions of the same dependency being included (if your pinned version differs from what a dependency requires), which can increase build size.

In PHP (Composer), it’s even stricter—if dependencies can’t be resolved to a compatible set of versions, the install fails entirely.

@sreichl
sreichl deleted the add-formatting-env branch March 24, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants