Skip to content

ENH: Constants#735

Merged
untzag merged 15 commits into
masterfrom
constants
Sep 22, 2018
Merged

ENH: Constants#735
untzag merged 15 commits into
masterfrom
constants

Conversation

@ksunden
Copy link
Copy Markdown
Member

@ksunden ksunden commented Sep 10, 2018

closes #734

To do:

  • interface to set constants that exist (analogous to transform for axes, but may want to make adding and subtracting individual items the primary way)
  • Add constants in chop/split where appropriate
  • Update constants in remove/rename variable
  • Add constants in relevant from methods (perhaps to be broken up into separate PRs for each)
  • Floating point representation (currently default number of decimals)
  • Tests
  • Documentation

No longer planning on adding constants in from_methods, those will come when they are useful/have good heuristics for what to add.

@ksunden
Copy link
Copy Markdown
Member Author

ksunden commented Sep 11, 2018

Any opinions on how removing variable contained within constants should behave?

Options are:

  • remove the constant
  • raise an error, preventing removal (as happens with axes)

@ddkohler
Copy link
Copy Markdown
Contributor

If I understand constants correctly, they are not as fundamental to the data object as axes are, so I don't think an error is necessary. Nonetheless, I can imagine users removing these variables inadvertently. Perhaps allow users to remove, but raise a warning?

@untzag
Copy link
Copy Markdown
Member

untzag commented Sep 11, 2018

I agree with @p770193 - a visible warning seems appropriate

@ksunden
Copy link
Copy Markdown
Member Author

ksunden commented Sep 13, 2018

Any opinions on how Join should handle constants? (Need to merge from master to make those changes if any are required)

While I haven't tested, I think join would currently inherit constants from the first data's attrs.
options include:

  • Drop all constants
  • Drop constants if the variables involved are in the axes that are being joined over
  • Include all the constants and maybe have some nonsensical ones
  • leave it as is, and see if anybody has issues/desired behavior from experience using

@ksunden ksunden added this to the 3.1.3 milestone Sep 13, 2018
@ksunden ksunden changed the title [WIP] Constants Constants Sep 17, 2018
@ksunden ksunden changed the title Constants ENH: Constants Sep 18, 2018
@untzag untzag merged commit fe66c5f into master Sep 22, 2018
@untzag untzag deleted the constants branch September 22, 2018 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

constants

3 participants