| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9e4da68 commit c25a6d0
54 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,7 @@ jobs: | |||
| 15 | 15 | - name: Setup Python | |
| 16 | 16 | uses: actions/setup-python@v5 | |
| 17 | 17 | with: | |
| 18 | - python-version: "3.10" | ||
| 18 | + python-version: "3.14" | ||
| 19 | 19 | - name: Install nox | |
| 20 | 20 | run: | | |
| 21 | 21 | python -m pip install --upgrade setuptools pip wheel | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ jobs: | |||
| 14 | 14 | runs-on: ubuntu-22.04 | |
| 15 | 15 | strategy: | |
| 16 | 16 | matrix: | |
| 17 | - python: ['3.10', '3.11', '3.12', '3.13'] | ||
| 17 | + python: ['3.10', '3.11', '3.12', '3.13', '3.14'] | ||
| 18 | 18 | steps: | |
| 19 | 19 | - name: Checkout | |
| 20 | 20 | uses: actions/checkout@v4 | |
@@ -48,7 +48,7 @@ jobs: | |||
| 48 | 48 | - name: Setup Python | |
| 49 | 49 | uses: actions/setup-python@v5 | |
| 50 | 50 | with: | |
| 51 | - python-version: "3.10" | ||
| 51 | + python-version: "3.14" | ||
| 52 | 52 | - name: Install coverage | |
| 53 | 53 | run: | | |
| 54 | 54 | python -m pip install --upgrade setuptools pip wheel | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,7 @@ repos: | |||
| 32 | 32 | - id: isort | |
| 33 | 33 | name: isort (python) | |
| 34 | 34 | - repo: https://github.com/psf/black | |
| 35 | - rev: 22.3.0 | ||
| 35 | + rev: 23.7.0 | ||
| 36 | 36 | hooks: | |
| 37 | 37 | - id: black | |
| 38 | 38 | - repo: https://github.com/pycqa/flake8 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ In order to add a feature: | |||
| 22 | 22 | documentation. | |
| 23 | 23 | ||
| 24 | 24 | - The feature must work fully on the following CPython versions: | |
| 25 | - 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows. | ||
| 25 | + 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. | ||
| 26 | 26 | ||
| 27 | 27 | - The feature must not add unnecessary dependencies (where | |
| 28 | 28 | "unnecessary" is of course subjective, but new dependencies should | |
@@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests. | |||
| 72 | 72 | ||
| 73 | 73 | - To run a single unit test:: | |
| 74 | 74 | ||
| 75 | - $ nox -s unit-3.13 -- -k <name of test> | ||
| 75 | + $ nox -s unit-3.14 -- -k <name of test> | ||
| 76 | 76 | ||
| 77 | 77 | ||
| 78 | 78 | .. note:: | |
@@ -143,12 +143,12 @@ Running System Tests | |||
| 143 | 143 | $ nox -s system | |
| 144 | 144 | ||
| 145 | 145 | # Run a single system test | |
| 146 | - $ nox -s system-3.13 -- -k <name of test> | ||
| 146 | + $ nox -s system-3.14 -- -k <name of test> | ||
| 147 | 147 | ||
| 148 | 148 | ||
| 149 | 149 | .. note:: | |
| 150 | 150 | ||
| 151 | - System tests are only configured to run under Python 3.10, 3.11, 3.12 and 3.13. | ||
| 151 | + System tests are only configured to run under Python 3.10, 3.12 and 3.14. | ||
| 152 | 152 | For expediency, we do not run them in older versions of Python 3. | |
| 153 | 153 | ||
| 154 | 154 | This alone will not run the tests. You'll need to change some local | |
@@ -262,11 +262,13 @@ We support: | |||
| 262 | 262 | - `Python 3.11`_ | |
| 263 | 263 | - `Python 3.12`_ | |
| 264 | 264 | - `Python 3.13`_ | |
| 265 | + - `Python 3.14`_ | ||
| 265 | 266 | ||
| 266 | 267 | .. _Python 3.10: https://docs.python.org/3.10/ | |
| 267 | 268 | .. _Python 3.11: https://docs.python.org/3.11/ | |
| 268 | 269 | .. _Python 3.12: https://docs.python.org/3.12/ | |
| 269 | 270 | .. _Python 3.13: https://docs.python.org/3.13/ | |
| 271 | + .. _Python 3.14: https://docs.python.org/3.14/ | ||
| 270 | 272 | ||
| 271 | 273 | ||
| 272 | 274 | Supported versions can be found in our ``noxfile.py`` `config`_. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ We use `nox` to instrument our tests. | |||
| 13 | 13 | - To run a single unit test: | |
| 14 | 14 | ||
| 15 | 15 | ```bash | |
| 16 | - nox -r -s unit-3.13 -- -k <name of test> | ||
| 16 | + nox -r -s unit-3.14 -- -k <name of test> | ||
| 17 | 17 | ``` | |
| 18 | 18 | ||
| 19 | 19 | - Ignore this step if you lack access to Google Cloud resources. To run system | |
@@ -23,7 +23,7 @@ We use `nox` to instrument our tests. | |||
| 23 | 23 | $ nox -r -s system | |
| 24 | 24 | ||
| 25 | 25 | # Run a single system test | |
| 26 | - $ nox -r -s system-3.13 -- -k <name of test> | ||
| 26 | + $ nox -r -s system-3.14 -- -k <name of test> | ||
| 27 | 27 | ||
| 28 | 28 | - The codebase must have better coverage than it had previously after each | |
| 29 | 29 | change. You can test coverage via `nox -s unit system cover` (takes a long | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,9 +30,9 @@ | |||
| 30 | 30 | _cached_project_default: Optional[str] = None | |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | - def get_default_credentials_with_project() -> tuple[ | ||
| 34 | - google.auth.credentials.Credentials, Optional[str] | ||
| 35 | - ]: | ||
| 33 | + def get_default_credentials_with_project() -> ( | ||
| 34 | + tuple[google.auth.credentials.Credentials, Optional[str]] | ||
| 35 | + ): | ||
| 36 | 36 | global _AUTH_LOCK, _cached_credentials, _cached_project_default | |
| 37 | 37 | ||
| 38 | 38 | with _AUTH_LOCK: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -618,7 +618,6 @@ def skew( | |||
| 618 | 618 | skew_column_ids: typing.Sequence[str], | |
| 619 | 619 | grouping_column_ids: typing.Sequence[str] = (), | |
| 620 | 620 | ) -> blocks.Block: | |
| 621 | - | ||
| 622 | 621 | original_columns = skew_column_ids | |
| 623 | 622 | column_labels = block.select_columns(original_columns).column_labels | |
| 624 | 623 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -657,7 +657,6 @@ def _get_sampling_option( | |||
| 657 | 657 | sampling_method: Optional[str] = None, | |
| 658 | 658 | random_state: Optional[int] = None, | |
| 659 | 659 | ) -> sampling_options.SamplingOptions: | |
| 660 | - | ||
| 661 | 660 | if (sampling_method is not None) and (sampling_method not in _SAMPLING_METHODS): | |
| 662 | 661 | raise NotImplementedError( | |
| 663 | 662 | f"The downsampling method {sampling_method} is not implemented, " | |
@@ -700,7 +699,8 @@ def to_pandas_batches( | |||
| 700 | 699 | """Download results one message at a time. | |
| 701 | 700 | ||
| 702 | 701 | page_size and max_results determine the size and number of batches, | |
| 703 | - see https://cloud.google.com/python/docs/reference/bigquery/latest/google.cloud.bigquery.job.QueryJob#google_cloud_bigquery_job_QueryJob_result""" | ||
| 702 | + see https://cloud.google.com/python/docs/reference/bigquery/latest/google.cloud.bigquery.job.QueryJob#google_cloud_bigquery_job_QueryJob_result | ||
| 703 | + """ | ||
| 704 | 704 | ||
| 705 | 705 | under_10gb = ( | |
| 706 | 706 | (not allow_large_results) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1006,7 +1006,6 @@ def to_timestamp_op_impl(x: ibis_types.Value, op: ops.ToTimestampOp): | |||
| 1006 | 1006 | else timestamp(x) | |
| 1007 | 1007 | ) | |
| 1008 | 1008 | elif x.type() == ibis_dtypes.Timestamp(None): # type: ignore | |
| 1009 | - | ||
| 1010 | 1009 | return timestamp(x) | |
| 1011 | 1010 | else: | |
| 1012 | 1011 | # Numerical inputs. | |
@@ -1908,7 +1907,6 @@ def struct_op_impl( | |||
| 1908 | 1907 | def ai_generate( | |
| 1909 | 1908 | *values: ibis_types.Value, op: ops.AIGenerate | |
| 1910 | 1909 | ) -> ibis_types.StructValue: | |
| 1911 | - | ||
| 1912 | 1910 | return ai_ops.AIGenerate( | |
| 1913 | 1911 | _construct_prompt(values, op.prompt_context), # type: ignore | |
| 1914 | 1912 | op.connection_id, # type: ignore | |
@@ -1923,7 +1921,6 @@ def ai_generate( | |||
| 1923 | 1921 | def ai_generate_bool( | |
| 1924 | 1922 | *values: ibis_types.Value, op: ops.AIGenerateBool | |
| 1925 | 1923 | ) -> ibis_types.StructValue: | |
| 1926 | - | ||
| 1927 | 1924 | return ai_ops.AIGenerateBool( | |
| 1928 | 1925 | _construct_prompt(values, op.prompt_context), # type: ignore | |
| 1929 | 1926 | op.connection_id, # type: ignore | |
@@ -1937,7 +1934,6 @@ def ai_generate_bool( | |||
| 1937 | 1934 | def ai_generate_int( | |
| 1938 | 1935 | *values: ibis_types.Value, op: ops.AIGenerateInt | |
| 1939 | 1936 | ) -> ibis_types.StructValue: | |
| 1940 | - | ||
| 1941 | 1937 | return ai_ops.AIGenerateInt( | |
| 1942 | 1938 | _construct_prompt(values, op.prompt_context), # type: ignore | |
| 1943 | 1939 | op.connection_id, # type: ignore | |
@@ -1951,7 +1947,6 @@ def ai_generate_int( | |||
| 1951 | 1947 | def ai_generate_double( | |
| 1952 | 1948 | *values: ibis_types.Value, op: ops.AIGenerateDouble | |
| 1953 | 1949 | ) -> ibis_types.StructValue: | |
| 1954 | - | ||
| 1955 | 1950 | return ai_ops.AIGenerateDouble( | |
| 1956 | 1951 | _construct_prompt(values, op.prompt_context), # type: ignore | |
| 1957 | 1952 | op.connection_id, # type: ignore | |
@@ -1963,7 +1958,6 @@ def ai_generate_double( | |||
| 1963 | 1958 | ||
| 1964 | 1959 | @scalar_op_compiler.register_nary_op(ops.AIIf, pass_op=True) | |
| 1965 | 1960 | def ai_if(*values: ibis_types.Value, op: ops.AIIf) -> ibis_types.StructValue: | |
| 1966 | - | ||
| 1967 | 1961 | return ai_ops.AIIf( | |
| 1968 | 1962 | _construct_prompt(values, op.prompt_context), # type: ignore | |
| 1969 | 1963 | op.connection_id, # type: ignore | |
@@ -1974,7 +1968,6 @@ def ai_if(*values: ibis_types.Value, op: ops.AIIf) -> ibis_types.StructValue: | |||
| 1974 | 1968 | def ai_classify( | |
| 1975 | 1969 | *values: ibis_types.Value, op: ops.AIClassify | |
| 1976 | 1970 | ) -> ibis_types.StructValue: | |
| 1977 | - | ||
| 1978 | 1971 | return ai_ops.AIClassify( | |
| 1979 | 1972 | _construct_prompt(values, op.prompt_context), # type: ignore | |
| 1980 | 1973 | op.categories, # type: ignore | |
@@ -1984,7 +1977,6 @@ def ai_classify( | |||
| 1984 | 1977 | ||
| 1985 | 1978 | @scalar_op_compiler.register_nary_op(ops.AIScore, pass_op=True) | |
| 1986 | 1979 | def ai_score(*values: ibis_types.Value, op: ops.AIScore) -> ibis_types.StructValue: | |
| 1987 | - | ||
| 1988 | 1980 | return ai_ops.AIScore( | |
| 1989 | 1981 | _construct_prompt(values, op.prompt_context), # type: ignore | |
| 1990 | 1982 | op.connection_id, # type: ignore | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -381,9 +381,9 @@ def graph_extract_scalar_exprs() -> Sequence[nodes.ColumnDef]: | |||
| 381 | 381 | # TODO: We can prune expressions that won't be reused here, | |
| 382 | 382 | return tuple(nodes.ColumnDef(expr, id) for id, expr in results.items()) | |
| 383 | 383 | ||
| 384 | - def graph_extract_window_expr() -> Optional[ | ||
| 385 | - Tuple[Sequence[nodes.ColumnDef], window_spec.WindowSpec] | ||
| 386 | - ]: | ||
| 384 | + def graph_extract_window_expr() -> ( | ||
| 385 | + Optional[Tuple[Sequence[nodes.ColumnDef], window_spec.WindowSpec]] | ||
| 386 | + ): | ||
| 387 | 387 | for id in graph.sinks: | |
| 388 | 388 | next_def = by_id[id] | |
| 389 | 389 | if isinstance(next_def.expression, agg_expressions.WindowExpression): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments