Skip to content

Conversation

@upsonp
Copy link
Contributor

@upsonp upsonp commented May 11, 2022

I've corrected #138 by searching for the last index of a duplicate occurrence. The way the method was working was to flip the array of names and get the last index of a duplicate, but in doing so it was just returning the length of the array if the duplicate name happened to appear in the zeroth position.

I've implemented a technique as defined in Python: Get last index of item in list

For issue #139 I've done a search of the metadata['names'] array to find the index of the Date column, then I use that index to find the dates/times rather than assume column 2 is the date column.

@upsonp
Copy link
Contributor Author

upsonp commented May 16, 2022

I have fixed several issues in this PR, just in case it was forgotten about.

@ocefpaf
Copy link
Member

ocefpaf commented May 16, 2022

Can you remove the __pycache__ directory and add a line to our .gitignore to avoid accidental commits of them again?

@upsonp
Copy link
Contributor Author

upsonp commented May 17, 2022

Done, thanks and sorry I missed that.

@ocefpaf
Copy link
Member

ocefpaf commented May 18, 2022

Thanks @upsonp for the bug fix. I added a simple test that uses the pytest fixture. Hopefully that is enough for now. I'll work on a few other issues and mint a new release ASAP.

@ocefpaf ocefpaf merged commit 2c0eea8 into pyoceans:master May 18, 2022
This was referenced May 18, 2022
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.

2 participants