Skip to content

Ticket #122#123

Merged
olwmc merged 10 commits intodev-1.0.0from
tik-122
Feb 9, 2022
Merged

Ticket #122#123
olwmc merged 10 commits intodev-1.0.0from
tik-122

Conversation

@olwmc
Copy link
Copy Markdown
Collaborator

@olwmc olwmc commented Feb 8, 2022

This PR solves issue #122 by

A) Disallowing negative step values for list comprehensions

B) Inferring step direction by range start and end

Because I'm using python ranges to accomplish this functionality I had to do a little bit of work to get the offset correct. Regardless, this should work as intended.

Please break this PR if you can, I'd love to improve it.

Copy link
Copy Markdown
Collaborator

@lutzhamel lutzhamel left a comment

Choose a reason for hiding this comment

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

did we want to change the syntax from step to stride in order to highlight the fact this is not your Python step but something else?

@olwmc
Copy link
Copy Markdown
Collaborator Author

olwmc commented Feb 8, 2022

Oh I'd be happy to do that in this PR. I was going to open a syntax change issue after this was merged. I'll get on that tomorrow morning.

@lutzhamel
Copy link
Copy Markdown
Collaborator

I think implementing stride as part of #122 makes sense given that the discussion on stride happened in issue #122.

@olwmc
Copy link
Copy Markdown
Collaborator Author

olwmc commented Feb 8, 2022

Makes sense! I’ll get on it.

@olwmc olwmc linked an issue Feb 9, 2022 that may be closed by this pull request
@lutzhamel lutzhamel changed the base branch from master to dev-1.0.0 February 9, 2022 11:01
@lutzhamel
Copy link
Copy Markdown
Collaborator

I changed target of the pull request from 'master' to 'dev-1.0.0'

@olwmc
Copy link
Copy Markdown
Collaborator Author

olwmc commented Feb 9, 2022

So the only thing I have left to fix are in User Guide.rst, User Guide.txt, Reference Guide.rst, Reference Guide.txt and Asteroid in Action.rst.

I'm not super sure how these files work since I believe they're machine generated. How should I go about fixing the instances here?

Note: I found out which files still have a step->stride fix needed by grepping the repo for 'step' and looking through each one to see if it is the 'step' we're actually talking about

@olwmc
Copy link
Copy Markdown
Collaborator Author

olwmc commented Feb 9, 2022

Figured it out! This should be good to go.

@olwmc olwmc requested a review from lutzhamel February 9, 2022 17:04
@olwmc
Copy link
Copy Markdown
Collaborator Author

olwmc commented Feb 9, 2022

Hold on. Sorry. There's some weird issue going on with the documentation generation.

Copy link
Copy Markdown
Collaborator

@lutzhamel lutzhamel 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! Did you get a chance to take a peek at the asteroid/programs folder? I have no idea if there are programs in there that need a fix for the new syntax...

feel free to merge your PR and any time! Excellent Job!

@olwmc
Copy link
Copy Markdown
Collaborator Author

olwmc commented Feb 9, 2022

Yes I checked the whole tree of files. Grep has a -r directive but just to make sure I went through each folder/subfolder.

@olwmc olwmc merged commit 1959cf1 into dev-1.0.0 Feb 9, 2022
@olwmc olwmc deleted the tik-122 branch February 9, 2022 20:38
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.

List comprehensions do not automatically detect descending lists

2 participants