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

Require Python >= 3.6, since 3.5 no longer works #641

Merged
merged 2 commits into from
Jan 12, 2020

Conversation

huonw
Copy link
Member

@huonw huonw commented Jan 9, 2020

In #638, it was observed that stellargraph no longer supports Python 3.5, due to use of 3.6 features like f-strings.

This makes this requirement formal, in setup.py.

This may have been accidental, so maybe we want to not land this and instead fix our support for 3.5?

@codeclimate
Copy link

codeclimate bot commented Jan 9, 2020

Code Climate has analyzed commit 1a80851 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Contributor

@timpitman timpitman left a comment

Choose a reason for hiding this comment

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

Looking good. Will we need to be mindful of this when we next release on pypi, or does that automatically pickup this change?

@huonw
Copy link
Member Author

huonw commented Jan 9, 2020

I can't see any other relevant instances of "3.5" in the repo:

% git grep '3\.5' -- '*.py'
tests/utils/test_calibration.py:    x_train = [[1, 1], [2, 3.5]]
tests/utils/test_calibration.py:    x_train = np.array([[1, 1], [2, 3.5]])
tests/utils/test_calibration.py:    x_train = np.array([1, 3.5])
tests/utils/test_calibration.py:    x_train = [[1, 1], [2, 3.5]]
tests/utils/test_calibration.py:    x_train = np.array([[1, 1], [2, 3.5]])

So I guess the Meta section in the sidebar of pypi is populated from here automatically, however I do not know for sure.

@huonw huonw merged commit 9752f1f into develop Jan 12, 2020
@huonw huonw deleted the feature/min-version-3.6 branch January 12, 2020 22:19
huonw added a commit that referenced this pull request Jan 15, 2020
Now (after #641), we only support Python 3.6 and 3.7, and so we can use newer
standard library functions, like `random.choices` instead of `random.choice` in
a loop.

`SampledBreadthFirstWalk` is ~1.3x faster:

| commit  | min |  max | mean | stddev | median |  iqr | outliers | ops (/s) | rounds | iterations |
|---------|----:|-----:|-----:|-------:|-------:|-----:|---------:|---------:|-------:|-----------:|
| this PR | 373 | 1130 |  446 |   86.4 |    413 | 75.4 |  181;115 |     2241 |   1831 |          1 |
| develop | 450 | 1280 |  542 |   73.0 |    525 | 68.0 |    62;20 |     1842 |    557 |          1 |


`SampledHeterogeneousBreadthFirstWalk` is ~1.5x faster:

| commit  | min |  max | mean | stddev | median |  iqr | outliers | ops (/s) | rounds | iterations |
|---------|----:|-----:|-----:|-------:|-------:|-----:|---------:|---------:|-------:|-----------:|
| this PR | 305 |  984 |  347 |   74.4 |    312 | 42.8 |  213;229 |     2878 |   2098 |          1 |
| develop | 453 | 1330 |  515 |   89.3 |    478 | 62.4 |   102;84 |     1939 |   1271 |          1 |

`DirectedBreadthFirstNeighbours` is ~1.2x faster:

| commit  |  min |  max | mean | stddev | median | iqr | outliers | ops (/s) | rounds | iterations |
|---------|-----:|-----:|-----:|-------:|-------:|----:|---------:|---------:|-------:|-----------:|
| this PR | 1350 | 3230 | 1620 |    195 |   1610 | 231 |   174;10 |      616 |    550 |          1 |
| develop | 1670 | 3370 | 2010 |    187 |   2000 | 174 |   132;19 |      495 |    465 |          1 |


Times in microseconds; speed-ups estimated from median column.
timpitman added a commit that referenced this pull request Jan 29, 2020
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.

3 participants