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

Implement pypi simulator + e3-pypi-closure yanked tests #674

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

leocardao
Copy link
Contributor

@leocardao leocardao commented Jan 24, 2024

The pypi simulator is used to simulate the interactions between our code and the real pypi.

Addresses are mocked, and for the moment it only simulates requests in https://pypi.org/pypi//json format.

Test json metadata must be downloaded in advance and placed in tests/tests_e3/pypi_data/json.

This PR also add e3-pypi-closure yanked tests.

Related to #671

@leocardao leocardao force-pushed the mr/cardao/pypi-simulator branch from 5bc154a to 865e620 Compare January 24, 2024 18:03
@leocardao leocardao self-assigned this Jan 24, 2024
@leocardao leocardao changed the title Implement pypi simulator Implement pypi simulator + e3-pypi-closure yanked tests Jan 24, 2024
@leocardao leocardao force-pushed the mr/cardao/pypi-simulator branch 2 times, most recently from d686c19 to 395cc65 Compare January 24, 2024 18:55
@leocardao leocardao force-pushed the mr/cardao/pypi-simulator branch from 395cc65 to dedd9af Compare January 25, 2024 13:59
@leocardao
Copy link
Contributor Author

I solved all the comments about exceptions because I changed the way errors are handled in PypiSimulator.

As I said, requests-mock catches errors and turns them into "Internal server error". So I've improved error handling by separating the code from Pypi's behavior and adding a whole bunch of information.

@leocardao leocardao force-pushed the mr/cardao/pypi-simulator branch from dedd9af to 4207abe Compare January 25, 2024 14:14
@leocardao leocardao requested a review from grouigrokon January 25, 2024 14:16
@leocardao leocardao force-pushed the mr/cardao/pypi-simulator branch from 4207abe to 0670233 Compare January 25, 2024 14:37
@leocardao leocardao requested a review from grouigrokon January 25, 2024 14:49
grouigrokon
grouigrokon previously approved these changes Jan 25, 2024
tox.ini Show resolved Hide resolved
The pypi simulator is used to simulate the interactions between our code
and the real pypi.

Addresses are mocked, and for the moment it only simulates requests in
https://pypi.org/pypi/<YOUR PACKAGE>/json format.

Test json metadata must be downloaded in advance and placed in
tests/tests_e3/pypi_data/json.

Related to AdaCore#671
@leocardao leocardao force-pushed the mr/cardao/pypi-simulator branch from 18247cd to 62ba3bf Compare January 29, 2024 09:51
@leocardao leocardao requested a review from grouigrokon January 29, 2024 09:52
@leocardao leocardao merged commit 9929681 into AdaCore:master Jan 29, 2024
9 checks passed
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