Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
support for updating axis ticks for categorical data #6889
Conversation
story645
added needs_review categorical
labels
Aug 3, 2016
story645
commented on an outdated diff
Aug 3, 2016
| + def __init__(self, data): | ||
| + """Create mapping between unique categorical values | ||
| + and numerical identifier | ||
| + Paramters | ||
| + --------- | ||
| + data: iterable | ||
| + sequence of values | ||
| + """ | ||
| + self.seq, self.locs = [], [] | ||
| + self._set_seq(data) | ||
| + self._set_locs(0) | ||
| + | ||
| + def update(self, new_data): | ||
| + self._set_seq(new_data) | ||
| + value = max(self.locs) | ||
| + self._set_locs(value + 1) |
|
|
|
I may have to spin off a PR on supporting both pytest and nosetest on appveyor/travis if I ever want my tests to pass again - help @Kojoley? |
Unfortunately, yes. It is nice to hear that there is a demand in pytest, and I am sorry for my slowness. You can rebase on top of #6730 for pytest support (but it is a bit out of sync, and you need to remove |
|
I would like to keep this PR mergeable independent of the pytest PR @Kojoley You are making more progress on this in the last few weeks than we have made in the last ~ year |
tacaswell
added this to the
2.1 (next point release)
milestone
Aug 4, 2016
|
then what should I do? I'd rather not have to rewrite all my tests only to rewrite them again, but travis and appveyor won't work with them. @Kojoley does it make sense to factor out just the py.test & nosetest can both run stuff out of your PR into a separate pull request? I don't want to step on your toes/your PR, but it also may make it easier for other people to adopt py.test in their testing and that not have to wait on full py.test conversion. |
|
maybe pull the tests out, merge this to master with no CI (but running the tests locally), and the put a PR on top of #6730 adding the tests there? |
|
Ugh, 'specially as this will only get worse as I write more tests and my coverage will sink really badly. I really think a relatively small PR that just lets nose and pytest work together might be a better solution unless @Kojoley has an argument against. |
I agree. We can comment out this line or make a new list of pytest only tests.
You can still look at the coverage locally.
My primary goal is to make current test suite both nose & pytest compatible with minimal changes. Just do not use |
|
It will be in the same PR. I have just temporary disabled nose because otherwise travis and appveyor will run hundred times and spend hours of my life, forcing me to wait for nose while the results does not matter, because all the places that touches nose already tested many times and I want simply know is it all right with pytest or not. |
I think we may be on different pages here. I'm proposing really small PR that just adds support for py.test (nose can still do it's thing) that can hopefully be merged into master fairly quickly. My reason for proposing it is lets people like me write py.test code without having to wait on the full conversion PR getting merged in. |
PR #6730 is only about pytest compatibility with current test suit. It will not growth beyond that. The full conversion is something that I do not expect in the near future. I think we can do following thing:
But I should warn you about unexpected problems. I really hope #6899 is the last stopper for pytest, but I cannot guarantee this. So if you can wait until weekend with this PR I think it will be the best choice. |
|
Sounds good to me, and can totally wait on the weekend. Thanks |
|
@story645 What is going on with this branch? This mostly rebases cleanly on to current master (see the |
tacaswell
commented on the diff
Aug 21, 2016
| @@ -4,7 +4,7 @@ | ||
| # and then run "tox" from this directory. | ||
| [tox] | ||
| -envlist = py26, py27, py31, py32 |
tacaswell
Owner
|
|
@story645 please remove the test from |
|
Passes travis mostly 'cause this new code is no longer tested as part of this PR. But, all these tests are in #6934 anyway. |
tacaswell
and 1 other
commented on an outdated diff
Aug 23, 2016
tacaswell
closed this
Aug 23, 2016
tacaswell
reopened this
Aug 23, 2016
tacaswell
added needs_review and removed needs_review
labels
Aug 23, 2016
|
@story645 this needs a rebase (again). I suspect it is in the travis config files. |
|
Yup, travis and appveyor and the like 'cause of #6730, updated now. |
|
Pretty sure coverage failure isn't my fault since coverage is up/neutral on the files that are part of this PR. |
story645
referenced
this pull request
Aug 23, 2016
Closed
Include test files in coverage report #6902
|
I have opened a PR #6974 for the issue |
story645 commentedAug 3, 2016
Now supports updating axis:
Which as a sidenote, it didn't work before because apparently FixedLocator converts to an array as soon as it's passed in (and also apparently it doesn't need to...)
UnitData was also changed into an object to facilitate the updating and as a precursor to adding more functionality. And the tests should now be py.test compliant @Kojoley