Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hackdna
Copy link
Member

@hackdna hackdna commented Jul 2, 2025

Close #36, and toward #25 and #33

@hackdna hackdna added the dependencies Pull requests that update a dependency file label Jul 2, 2025
@hackdna hackdna marked this pull request as ready for review July 3, 2025 14:39
Copilot AI review requested due to automatic review settings July 3, 2025 14:39

This comment was marked as outdated.

@hackdna hackdna requested a review from Copilot July 3, 2025 20:10

This comment was marked as outdated.

@hackdna hackdna requested a review from biblicabeebli July 3, 2025 20:24
@biblicabeebli
Copy link
Member

Just reviewed the diff, this looks great.

@biblicabeebli
Copy link
Member

Encountered a weird dependencies thing:

  • went to run tests, did not have responses installed
  • installed dependencies with pip install pyproject.toml[dev], ran tests, still did not have responses installed
  • triple checked pyproject.toml lists responses under, dev - yup:
[project.optional-dependencies]
dev = [
    "pytest",
    "responses",
    "twine",
    "vcrpy"
]
  • confirmed responses was not installed, tried a couple other pip install invocations, nothing installed responses.
  • manually ran pip install responses - it installed stateing the usual bits about already satisfied requirements.
  • ran pytest tests/test_all.py, ran pytest tests/test_sync.py -- tests pass.

I've got no clue what was going on there, and I never got a warning about conflicts blocking something. Have I maybe misunderstood how to invoke pip to install those dev requirements?

@hackdna
Copy link
Member Author

hackdna commented Jul 7, 2025

The correct command is pip install ".[dev]" or if installing from PyPI: pip install "beiwe-forest[dev]"

@biblicabeebli
Copy link
Member

OK - question about these tests using responses:

  • Mano doesn't have the ability to do anything with a partially downloaded zip file - that's a feature I intend to work on.
    • (This zip file is not compressed, it is just a container, so the bytes of files are all there up to the point the connection breaks)
  • So, does responses have a way to inject a network error in a test?
    • currently I think the way is to yield some bytes and then raise an error

@biblicabeebli
Copy link
Member

The correct command is pip install ".[dev]" or if installing from PyPI: pip install "beiwe-forest[dev]"

yup that was it, thanks.

@biblicabeebli
Copy link
Member

Ok looks like there are still vcr tests in test_all.py.
If scope of this pull request is just to remove the pinned urllib I'm happy with it and can hit approve, if it includes converting all vcr tests to responses tests .... I guess carry on! Lemme know.

@hackdna
Copy link
Member Author

hackdna commented Jul 7, 2025

OK - question about these tests using responses:

* Mano doesn't have the ability to do anything with a partially downloaded zip file - that's a feature I intend to work on.
  
  * (This zip file is not compressed, it is just a container, so the bytes of files are all there up to the point the connection breaks)

* So, does responses have a way to inject a network error in a test?
  
  * currently I think the way is to yield some bytes and then raise an error

How's this: ac12f0b

@hackdna
Copy link
Member Author

hackdna commented Jul 7, 2025

Ok looks like there are still vcr tests in test_all.py. If scope of this pull request is just to remove the pinned urllib I'm happy with it and can hit approve, if it includes converting all vcr tests to responses tests .... I guess carry on! Lemme know.

Yes, the scope here is just to deal with urllib3. If we are happy with this approach the next PR will replace vcrpy with responses in a similar manner.

@hackdna hackdna requested a review from Copilot July 7, 2025 21:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the pinned urllib3 dependency and replaces legacy VCR-based tests with a new suite using responses for mocking the download API.

  • Removed explicit urllib3==1.26.20 pin and updated dev dependencies.
  • Introduced tests/test_sync.py with comprehensive, fixtures-driven download tests leveraging responses.
  • Deleted the legacy VCR-based test_download in tests/test_all.py and documented static test data in tests/data/README.md.

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Removed urllib3 pin; added responses to dev dependencies
tests/test_sync.py New download tests using responses fixtures
tests/test_all.py Removed VCR-based download test
tests/data/README.md Added documentation for static zip test data
tests/data/.gitkeep Ensures tests/data directory is tracked
tests/conftest.py Added fixtures (mock_zip_data, mock_download_api, etc.)
Comments suppressed due to low confidence (2)

tests/data/README.md:10

  • [nitpick] This reference to the VCR cassette may be outdated now that tests use the static download.v1.zip; consider updating or removing this line to accurately reflect current test data sources.
  - Extracted from `tests/cassettes/download.v1.yaml`

tests/test_sync.py:16

  • [nitpick] Several tests in this file duplicate the same download invocation and parameters; consider extracting the common call into a shared fixture or helper to reduce duplication and make updates easier.
    zf = mano.sync.download(keyring,

@hackdna hackdna mentioned this pull request Jul 7, 2025
@biblicabeebli biblicabeebli merged commit e13d371 into main Jul 14, 2025
12 checks passed
@biblicabeebli biblicabeebli deleted the urllib3-fix branch July 14, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unpin urllib3 version

3 participants