question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Naming convention for config files

See original GitHub issue

As it stands right now the code looks for a .manim.cfg in the user directory, and a manim.cfg in the current working directory. Note the difference in the leading dot.

The initial reason for this was the convention to hide configuration files that go in the user directory, which is far as I get is only a Linux relevant convention, since Windows uses file attributes to hide files, not leading dots.

I’m opposed to this mixed naming for two reasons.

  1. The smaller reason is copypastability, as like this either file could almost directly be used as a template for the other, but with the additional hoop of having to add/remove a dot.
  2. The bigger reason is the potential for confusion. Having the naming convention differ in just one character, and a dot at that, is a sure fire recipe for some people to forget this small difference at times, leading to wrongly named and hence not working config files, or even completely missing that difference in the first place, since it’s easy to miss the addition/subtraction of a dot on a file name when already primed for one or the other convention. Point in case, despite carefully reading @leotrs post in #178 2 mentions of .manim.cfg made me completely miss that on the third time it was intentionally manim.cfg.

With that said I have no strong opinion on what the convention is, so long as it is consistent. With dot, without, or accepting with/without in both places are all fine.

Probably allowing both presence and lack of a leading dot is the best approach simply to allow Linux users to hide their config files or not while also making sure that config files can’t that easily be misnamed.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
XorUnisoncommented, Jul 8, 2020

For Windows that’d most likely be %appdata%, which means: \[Username]\AppData\Roaming\ And then to be specific: \[Username]\AppData\Roaming\Manim\manim.cfg

In this case AppData is the hidden folder. And now that you made me think of it… very yes. Although newbie users might not know about the AppData folder, it’s indeed were programs should store their configuration, so that migrating it to a different machine/user makes all of the programs using it behave the same. I’m in favor of this too then as it would definitely be good practice, now we’re just missing the according place for Mac.

1reaction
naveen521kkcommented, Jul 14, 2020

No, I myself have tested it on Windows. So, no problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Standard config file naming pattern and locations?
I want to install a default/systemwide config file, which I infer would go under /etc/foo.conf , and possible /etc/foo-gtk.conf for default ...
Read more >
YAML Configuration files | Coding standards - Drupal
The configuration file name is equal to the unique configuration name with .yml extension. The unique configuration name cannot exceed 250 ...
Read more >
What's the standard config file name and extension in Python?
First, consider using ConfigParser (configparser in 3.0, so the documentation says). That doesn't solve the naming problem, but it is a readable alternative ......
Read more >
File Naming Conventions | Data Management
A file naming convention is a framework for naming your files in a way that describes what they contain and how they relate...
Read more >
Naming Convention for some conf files - linux - Server Fault
What i am confused at is the naming configuration of some conf files. The following are the files, What's with the naming convention...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found