nixpkgs/pkgs/development/python-modules/google-cloud-bigquery/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

141 lines
3.1 KiB
Nix

{
lib,
buildPythonPackage,
db-dtypes,
fetchPypi,
freezegun,
google-api-core,
google-cloud-bigquery-storage,
google-cloud-core,
google-cloud-datacatalog,
google-cloud-storage,
google-cloud-testutils,
google-resumable-media,
grpcio,
ipython,
mock,
pandas,
proto-plus,
protobuf,
psutil,
pyarrow,
pytest-xdist,
pytestCheckHook,
python-dateutil,
pythonOlder,
requests,
setuptools,
tqdm,
}:
buildPythonPackage rec {
pname = "google-cloud-bigquery";
version = "3.27.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "google_cloud_bigquery";
inherit version;
hash = "sha256-N5xSQFTXsJD6VtDCJmLMbmRYpiKbZ1TA5xd+OnNCHSw=";
};
build-system = [ setuptools ];
dependencies = [
grpcio
google-api-core
google-cloud-core
google-cloud-bigquery-storage
google-resumable-media
proto-plus
protobuf
requests
python-dateutil
] ++ google-api-core.optional-dependencies.grpc;
optional-dependencies = {
bqstorage = [
google-cloud-bigquery-storage
grpcio
pyarrow
];
pandas = [
db-dtypes
pandas
pyarrow
];
tqdm = [ tqdm ];
ipython = [ ipython ];
};
nativeCheckInputs =
[
freezegun
google-cloud-testutils
mock
psutil
google-cloud-datacatalog
google-cloud-storage
pytestCheckHook
pytest-xdist
]
++ optional-dependencies.pandas
++ optional-dependencies.ipython;
# prevent google directory from shadowing google imports
preCheck = ''
rm -r google
'';
disabledTests = [
# requires credentials
"test_bigquery_magic"
"TestBigQuery"
"test_context_with_no_query_cache_from_context"
"test_arrow_extension_types_same_for_storage_and_REST_APIs_894"
"test_list_rows_empty_table"
"test_list_rows_page_size"
"test_list_rows_range_csv"
"test_list_rows_range"
"test_list_rows_scalars_extreme"
"test_list_rows_scalars"
"test_dry_run"
"test_session"
# Mocking of _ensure_bqstorage_client fails
"test_to_arrow_ensure_bqstorage_client_wo_bqstorage"
# requires network
"test_dbapi_create_view"
"test_list_rows_nullable_scalars_dtypes"
"test_parameterized_types_round_trip"
"test_structs"
"test_table_snapshots"
"test__initiate_resumable_upload"
"test__initiate_resumable_upload_mtls"
"test__initiate_resumable_upload_with_retry"
"test_table_clones"
"test_context_with_default_connection"
"test_context_with_custom_connection"
];
disabledTestPaths = [
# Tests require credentials
"tests/system/test_query.py"
"tests/system/test_job_retry.py"
"tests/system/test_pandas.py"
];
pythonImportsCheck = [
"google.cloud.bigquery"
"google.cloud.bigquery_v2"
];
meta = with lib; {
description = "Google BigQuery API client library";
homepage = "https://github.com/googleapis/python-bigquery";
changelog = "https://github.com/googleapis/python-bigquery/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = [ ];
};
}