Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

rename environ module to configuration #94

Open
lsloan opened this issue Apr 13, 2020 · 4 comments
Open

rename environ module to configuration #94

lsloan opened this issue Apr 13, 2020 · 4 comments
Labels
📈 enhancement New feature or request

Comments

@lsloan
Copy link
Member

lsloan commented Apr 13, 2020

Based on my earlier comment

The more I use it, the more I think the environ module should be renamed configuration. Because it doesn't represent the actual environment. It's a combination of the environment and configuration settings.

config would also be a good, short name for the module.

@lsloan lsloan added the 📈 enhancement New feature or request label Apr 13, 2020
@lsloan lsloan mentioned this issue Apr 13, 2020
6 tasks
@ssciolla
Copy link
Contributor

We already have a config directory. I thought about putting this environ.py file inside that; now I'm forgetting why I didn't. Anyways, some of this seems like splitting hairs; in a lot of our projects, we use configuration files called env.json. Wouldn't that also be more configuration than environment? I think our team tends to use them synonymously, even if they technically aren't the same thing.

@ssciolla
Copy link
Contributor

Also, this environ.py does allow environment overrides. I guess I tend to think of environment as being more global in meaning than configuration.

@lsloan
Copy link
Member Author

lsloan commented Apr 14, 2020

Anyways, some of this seems like splitting hairs…

Maybe it is splitting hairs. That's why I mentioned it in a comment elsewhere before opening an issue. I opened the issue because you suggested it. Many things about development is splitting hairs (e.g., upper or lower case letters in symbol names, opening and closing parentheses/brackets on the same or separate line, etc.) in order to have a consistency that engenders maintainability of the code.

And, yes, I would also go for renaming env.json to config.json.

I have a pretty clear definition of "environment". It's information that is defined, usually at the OS level, and is available to all programs that operate within it. Programs may alter the environment, but when they do, the information they put there will be available to all programs within that same environment.

On the other hand, information that's defined for use by one or more programs is configuration. Programs often use configuration and environment, but in the way this project uses the two of them, environment variables as defaults for missing configuration values, is to update the configuration.

I guess that's what really made the point for me, seeing that this module uses the standard Python environment module made it feel like this new module is redundant. Someone not as familiar with the code may at first glance think we're referring strictly to the OS' environment, not a special reconfiguration of the environment specifically for this program. That can be confusing.

So, that said, if you disagree with this issue, I really don't mind. I was pointing this out because it seems inconsistent to me and I thought that maybe it was an oversight that needed to be corrected.

@ssciolla
Copy link
Contributor

No, I think you make some good points here, and I think clearly you have a more informed opinion than my relatively green one. I need to think about this a little more. Can we agree that any re-naming can wait until we have more or all of the data-fetching processes in place?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📈 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants