Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Change known_config_types to dict #11166

Merged
merged 12 commits into from
May 3, 2023

Conversation

cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Sep 15, 2022

Fixes #11164. I think this is all that's needed structurally, now the only problem I have is that I don't know what even half of these options mean. In addition, we should use a consistent style when describing each option, mentioning the default and the type of each value. Finally, I am not sure how we should best deal with those long lines, because wrapping them to 79 chars will be a mess.

So if anyone wants to take over I'd be more than happy!

Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few, as a way of suggesting a consistent format for each entry. Once we settle on the format/style, let's crowdsource the remainder and chip away at them.

@cbrnr
Copy link
Contributor Author

cbrnr commented Sep 16, 2022

I've wrapped the lines black-style. I'm OK with the proposed description style, the only thing I'd add is the default at the end.

@cbrnr
Copy link
Contributor Author

cbrnr commented Sep 16, 2022

I'm also wondering why almost all keys are prefixed with MNE_ – why? It would be easier if we just removed this prefix.

@drammock
Copy link
Member

I'm also wondering why almost all keys are prefixed with MNE_ – why? It would be easier if we just removed this prefix.

because these are also used as environment variables. If we call our environment variables things like CACHE_DIR or DATA we can't safely assume that other programs won't mess with them.

@cbrnr
Copy link
Contributor Author

cbrnr commented Sep 16, 2022

Re MNE_ prefix, what about SUBJECTS_DIR?

@larsoner
Copy link
Member

That one we adopted from FreeSurfer so it wasn't ours to name

Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just thought I'd chip away at a few of these in between meetings.

Co-authored-by: Daniel McCloy <[email protected]>
@larsoner larsoner added this to the 1.4 milestone May 3, 2023
Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged with main and pushed a couple of commits to fill out the remaining entries and remove some cruft. Feel free to push any further fixes or merge if this is good enough @drammock !

@larsoner larsoner changed the title Change known_config_types to dict ENH: Change known_config_types to dict May 3, 2023
Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple small tweaks, thanks @larsoner for pushing this over the finish line

@drammock drammock enabled auto-merge (squash) May 3, 2023 18:18
@drammock drammock merged commit da3823f into mne-tools:main May 3, 2023
larsoner added a commit to larsoner/mne-python that referenced this pull request May 4, 2023
* upstream/main:
  ENH: Change known_config_types to dict (mne-tools#11166)
  MAINT: Improve README (mne-tools#11673)
larsoner added a commit to larsoner/mne-python that referenced this pull request May 18, 2023
* upstream/main: (32 commits)
  MAINT: Update download buttons [skip azp] [skip actions] [skip cirrus]
  Fix canvas.draw() in callback (mne-tools#11697)
  Remove recursion in plot_ica_components and use context manager for plt.ion/plt.ioff (mne-tools#11696)
  Update affiliation (mne-tools#11695)
  BUG: Fix bug with fwd restriction (mne-tools#11694)
  MRG: Suggest using "conda rename" in MNE updating instructions (mne-tools#11692)
  FIX: Regex [ci skip]
  MAINT: Apply deprecations [circle deploy] (mne-tools#11687)
  MAINT: Release 1.4.0 (mne-tools#11686)
  Trap music (mne-tools#11679)
  Fix call to plot_tfr_topomap from interactive AverageTFR.plot_topo function (mne-tools#11683)
  silence spectrum plot warning in examples/tutorials [circle full] (mne-tools#11682)
  Spectrum plot picks (mne-tools#11680)
  Update website conf (mne-tools#11675)
  BUG: Fix bug with MF LCMV rank (mne-tools#11664)
  ENH: Change known_config_types to dict (mne-tools#11166)
  MAINT: Improve README (mne-tools#11673)
  MAINT: Add to git-blame-ignore-revs [circle front]
  MAINT: Run black on codebase
  MAINT: Use black
  ...
@cbrnr cbrnr deleted the config-description branch December 11, 2023 12:56
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.

Extend mne.get_config("") to return a dict
3 participants