Add ooniprobe private api - #1194
Open
aagbsn wants to merge 139 commits into
Open
Conversation
this service does not terminate TLS so request.base_url's scheme is http. This rewrites the URL using https.
.venv/lib/python3.13/site-packages/dateutil/tz/tz.py:37 /project/ooniapi/services/ooniprobe/.venv/lib/python3.13/site-packages/dateutil/tz/tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
unskip skipped tests, and adjust to the sample dataset
Unfortunately using AnyUrl as-is breaks the db query as the input field does not include a trailing /, which we need to strip
inject fixed time for api tests change isomid() to accept datetime or date objects and return normalized datetime
adjust tests to sample data; rewrite query to use date range from input
this type is initialized with this field as None and used to compare subsequent records; making it Optional quietens validation. make test used fixed_time, adjust test values to sampled data
in api/ooniapi/private.py this is not set in the response, removing for compatibility
asn_by_month, countries_by_month, global_overview_by_month
no_data must be three-tuple for model validator model_date field referenced by alias name `date`
test_name is not a field of IMNetworkStats
fix query, pass parameters
validate each item in response contains at least one value
Contributor
Author
|
I noticed that the quotas summary endpoint isn't compatible with the new rate limiter middleware because it doesn't provide a way to summarize the quotas by address. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the private api endpoints to ooniprobe #807
test checklist for API endpoints:
/api/_/asn_by_month/api/_/countries_by_month/api/_/test_names/api/_/countries/api/_/check_report_id/api/_/test_coverage/api/_/website_networks/api/_/vanilla_tor_stats/api/_/network_stats/api/_/global_overview/api/_/global_overview_by_month/api/_/circumvention_stats_by_country/api/_/circumvention_runtime_stats/api/_/domain_metadata/api/_/asnmeta/api/_/networks/api/_/domainsendpoints that need implementation:
/api/_/quotas_summaryendpoints that do not work on api.ooni.org:
/api/_/website_stats/api/_/website_urls/api/_/im_networks/api/_/im_stats/api/_/country_overview