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

Fix FileNotFoundErrors to support windows #1

Open
wants to merge 14 commits into
base: windows
Choose a base branch
from

Conversation

mataton
Copy link

@mataton mataton commented Apr 4, 2024

@qiyunzhu Is this the preferred method for adding code to someone else's existing PR? With the current PR #949 you have on BIOM's main branch, I believe if you accept these changes into your windows branch that they will be reflected in that PR (biocore#949). If there is a better way to do this please let me know.

These changes fix all FileNotFoundErrors which were present. All that was needed was to change the file separators from hard coded '/' which doesn't work with windows, to os.path.sep, and to use os.path.join on the file paths.

@qiyunzhu
Copy link
Owner

qiyunzhu commented Apr 5, 2024

@mataton Good job! You can directly create a PR to the biocore repo. You can just copy my code in the other PR, and add yours.

os.chdir(__file__.rsplit('/', 1)[0])
obs = _subset_table(hdf5_biom='test_data/test.biom', axis='sample',
if os.path.sep in __file__:
os.chdir(__file__.rsplit(os.path.sep, 1)[0])
Copy link
Owner

Choose a reason for hiding this comment

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

__file__.rsplit(os.path.sep, 1)[0] can be os.path.dirname(__file__), I guess.

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