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 bug in pooch example #58

Merged
merged 2 commits into from
Jun 3, 2024
Merged

Fix bug in pooch example #58

merged 2 commits into from
Jun 3, 2024

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Jun 3, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
pooch example is wrong AFAICT: it will download the GIN website contents showing file, not the contents of file.

What does this PR do?
Specifies the URL correctly in the pooch with GIN example.

References

\

How has this PR been tested?

These fixtures work as expected (but the commented out line doesnt!)

@pytest.fixture(autouse=True, scope="session")
def brainglobe_test_registry():
    test_data = pooch.create(
        # Use the default cache folder for the operating system
        path=pooch.os_cache("brainglobe_test_data"),
        base_url="https://gin.g-node.org/BrainGlobe/test-data/raw/master/",
#      base_url="https://gin.g-node.org/BrainGlobe/test-data/src/master/",
        # The registry specifies the files that can be fetched
        registry={
            "cellfinder/cells-z-1000-1050.xml": None,
            "cellfinder/other-cells-z-1000-1050.xml": None,
        },
    )
    return test_data

@pytest.fixture
def cells(brainglobe_test_registry):
    cell_data_path = brainglobe_test_registry.fetch("cellfinder/cells-z-1000-1050.xml")
    cell_data = get_cells(cell_data_path)
    return cell_data

Is this a breaking change?

\

Does this PR require an update to the documentation?

This is an update to the documentation.

Checklist:

  • The code has been tested locally
  • [] Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@alessandrofelder alessandrofelder marked this pull request as ready for review June 3, 2024 11:04
@adamltyson adamltyson merged commit ad17e46 into main Jun 3, 2024
3 checks passed
@adamltyson adamltyson deleted the alessandrofelder-patch-1 branch June 3, 2024 12:08
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