ffl-bigquery 0.3.1__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/CHANGELOG.md +10 -0
  2. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/PKG-INFO +1 -1
  3. ffl_bigquery-0.3.2/ffl_bigquery/_version.py +1 -0
  4. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/tables/rankings.py +6 -4
  5. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/pyproject.toml +1 -1
  6. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_nflverse_tables_simple.py +18 -1
  7. ffl_bigquery-0.3.1/ffl_bigquery/_version.py +0 -1
  8. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/.github/workflows/ci.yml +0 -0
  9. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/.github/workflows/release.yml +0 -0
  10. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/.gitignore +0 -0
  11. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/LICENSE +0 -0
  12. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/README.md +0 -0
  13. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/bash.exe.stackdump +0 -0
  14. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/__init__.py +0 -0
  15. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/_schema_samples/__init__.py +0 -0
  16. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/_schema_samples/ff_opportunity.parquet +0 -0
  17. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/_schema_samples/ff_rankings.parquet +0 -0
  18. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/_schema_samples/ftn_charting.parquet +0 -0
  19. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/_schema_samples/injuries.parquet +0 -0
  20. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/_schema_samples/participation.parquet +0 -0
  21. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/_schema_samples/snap_counts.parquet +0 -0
  22. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/_transform_util.py +0 -0
  23. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/adp/__init__.py +0 -0
  24. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/adp/ffc.py +0 -0
  25. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/adp/mfl.py +0 -0
  26. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/adp/resolve.py +0 -0
  27. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/adp/schema.py +0 -0
  28. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/adp/sync.py +0 -0
  29. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/adp/transform.py +0 -0
  30. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/cli.py +0 -0
  31. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/coaches/__init__.py +0 -0
  32. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/coaches/schema.py +0 -0
  33. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/coaches/sync.py +0 -0
  34. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/coaches/transform.py +0 -0
  35. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/coordinators/__init__.py +0 -0
  36. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/coordinators/schema.py +0 -0
  37. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/coordinators/sync.py +0 -0
  38. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/coordinators/wikipedia.py +0 -0
  39. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/derive/__init__.py +0 -0
  40. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/derive/dst_scoring.py +0 -0
  41. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/derive/dst_weekly.py +0 -0
  42. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/derive/kicker_scoring.py +0 -0
  43. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/derive/kicker_weekly.py +0 -0
  44. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/derive/personnel.py +0 -0
  45. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/derive/points_weekly.py +0 -0
  46. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/derive/scheme_week.py +0 -0
  47. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/http.py +0 -0
  48. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/__init__.py +0 -0
  49. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/driver.py +0 -0
  50. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/runs.py +0 -0
  51. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/spec.py +0 -0
  52. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/tables/__init__.py +0 -0
  53. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/tables/depth_charts.py +0 -0
  54. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/tables/ftn_charting.py +0 -0
  55. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/tables/injuries.py +0 -0
  56. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/tables/opportunity.py +0 -0
  57. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/tables/participation.py +0 -0
  58. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/nflverse/tables/snap_counts.py +0 -0
  59. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/partition.py +0 -0
  60. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/runs.py +0 -0
  61. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/schema.py +0 -0
  62. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/schema_gen.py +0 -0
  63. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/verify/__init__.py +0 -0
  64. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/verify/adp.py +0 -0
  65. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/verify/tables.py +0 -0
  66. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/writer.py +0 -0
  67. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/xref/__init__.py +0 -0
  68. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/xref/schema.py +0 -0
  69. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/xref/sync.py +0 -0
  70. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/ffl_bigquery/xref/transform.py +0 -0
  71. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/conftest.py +0 -0
  72. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/ff_playerids_sample.csv +0 -0
  73. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/ffc_empty_error.json +0 -0
  74. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/ffc_empty_success.json +0 -0
  75. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/ffc_ppr_2015.json +0 -0
  76. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/mfl_adp_2015.json +0 -0
  77. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/mfl_adp_empty_2005.json +0 -0
  78. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/mfl_adp_single_player.json +0 -0
  79. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/nflverse/depth_charts_legacy.parquet +0 -0
  80. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/nflverse/depth_charts_modern.parquet +0 -0
  81. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/fixtures/wikipedia_seasons.json +0 -0
  82. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_adp_ffc.py +0 -0
  83. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_adp_mfl.py +0 -0
  84. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_adp_resolve.py +0 -0
  85. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_adp_schema.py +0 -0
  86. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_adp_sync.py +0 -0
  87. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_adp_transform.py +0 -0
  88. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_cli.py +0 -0
  89. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_clustering_types_are_valid.py +0 -0
  90. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_coaches.py +0 -0
  91. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_coordinators.py +0 -0
  92. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_depth_charts.py +0 -0
  93. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_dst_scoring.py +0 -0
  94. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_dst_weekly.py +0 -0
  95. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_http.py +0 -0
  96. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_kicker_scoring.py +0 -0
  97. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_kicker_weekly.py +0 -0
  98. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_nflverse_driver.py +0 -0
  99. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_nflverse_runs.py +0 -0
  100. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_nflverse_tables_registry.py +0 -0
  101. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_partition.py +0 -0
  102. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_personnel.py +0 -0
  103. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_play_level_tables.py +0 -0
  104. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_points_weekly.py +0 -0
  105. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_runs.py +0 -0
  106. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_schema.py +0 -0
  107. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_schema_gen.py +0 -0
  108. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_scheme_week.py +0 -0
  109. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_verify_adp.py +0 -0
  110. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_verify_dst.py +0 -0
  111. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_verify_kicker.py +0 -0
  112. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_verify_tables.py +0 -0
  113. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_writer.py +0 -0
  114. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_writer_write_season.py +0 -0
  115. {ffl_bigquery-0.3.1 → ffl_bigquery-0.3.2}/tests/test_xref.py +0 -0
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.3.2 — 2026-09-29
6
+
7
+ `ff_rankings` MERGE key now includes `page_type`: `(scrape_date, ecr_type, page_type, id)`.
8
+ FantasyPros ranks some players on two position pages (edge rushers appear on both
9
+ dynasty-DL and dynasty-LB) with the same `ecr_type` and `id` but a different rank, so the
10
+ old key was not unique — every snapshot on record has 146–179 such pairs. A first capture
11
+ of a snapshot inserted fine, but any re-run of the same snapshot failed with "UPDATE/MERGE
12
+ must match at most one source row for each target row". `page_type` is never NULL
13
+ upstream and is now REQUIRED in the schema spec.
14
+
5
15
  ## 0.3.1 — 2026-09-15
6
16
 
7
17
  Season rollover fix for `sync-nflverse --seasons latest`. `run_sync_nflverse_cli` was
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ffl-bigquery
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Historical fantasy football ADP, usage, and coaching/scheme data → BigQuery: the fantasy layer on top of nfl-bigquery
5
5
  Project-URL: Homepage, https://github.com/blahovec-labs/ffl-bigquery
6
6
  Project-URL: Issues, https://github.com/blahovec-labs/ffl-bigquery/issues
@@ -0,0 +1 @@
1
+ __version__ = "0.3.2"
@@ -2,8 +2,10 @@
2
2
 
3
3
  Unlike every other table here this is NOT season-chunked -- the loader returns
4
4
  "as of now" with a scrape_date and no season column, so it is snapshot-grain
5
- like ff_adp: MERGE on (scrape_date, ecr_type, id) so re-running the same day is
6
- a no-op, and it becomes a time series only if captured repeatedly.
5
+ like ff_adp: MERGE on (scrape_date, ecr_type, page_type, id) so re-running the same
6
+ day is a no-op, and it becomes a time series only if captured repeatedly. page_type
7
+ is in the key because FantasyPros ranks some players (edge rushers) on two position
8
+ pages -- dynasty-DL and dynasty-LB -- with the same ecr_type and id.
7
9
  """
8
10
  from __future__ import annotations
9
11
 
@@ -16,14 +18,14 @@ from ffl_bigquery.schema import to_bq_schema
16
18
  from ffl_bigquery.schema_gen import specs_from_frame
17
19
  from ffl_bigquery.writer import BigQueryWriter, TableRef
18
20
 
19
- FF_RANKINGS_KEYS = ["scrape_date", "ecr_type", "id"]
21
+ FF_RANKINGS_KEYS = ["scrape_date", "ecr_type", "page_type", "id"]
20
22
  FF_RANKINGS_PARTITION = TimePartition(
21
23
  field="scrape_date", clustering=["ecr_type", "pos"]
22
24
  )
23
25
  FF_RANKINGS_SCHEMA = specs_from_frame(
24
26
  read_sample("ff_rankings"), table="ff_rankings",
25
27
  type_overrides={"scrape_date": "DATE"},
26
- required=("scrape_date", "ecr_type", "id"),
28
+ required=("scrape_date", "ecr_type", "page_type", "id"),
27
29
  enrichment={
28
30
  "ecr": {"semantic_tags": ["metric"],
29
31
  "business_definition": "Expert consensus rank."},
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ffl-bigquery"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "Historical fantasy football ADP, usage, and coaching/scheme data → BigQuery: the fantasy layer on top of nfl-bigquery"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -62,8 +62,25 @@ def test_rankings_is_snapshot_grain_not_season_chunked():
62
62
  FF_RANKINGS_SCHEMA,
63
63
  )
64
64
 
65
- assert FF_RANKINGS_KEYS == ["scrape_date", "ecr_type", "id"]
65
+ assert FF_RANKINGS_KEYS == ["scrape_date", "ecr_type", "page_type", "id"]
66
66
  assert FF_RANKINGS_PARTITION.field == "scrape_date"
67
67
  assert "season" not in spec_names(FF_RANKINGS_SCHEMA)
68
68
  for k in FF_RANKINGS_KEYS:
69
69
  assert next(s for s in FF_RANKINGS_SCHEMA if s.name == k).mode == "REQUIRED"
70
+
71
+
72
+ def test_rankings_keys_keep_a_player_ranked_on_two_position_pages():
73
+ # FantasyPros ranks edge rushers on both the DL and LB pages: same
74
+ # (scrape_date, ecr_type, id), different page_type/ecr. Without page_type in
75
+ # the key the MERGE fails ("must match at most one source row"), which
76
+ # broke ffl-ingest's nflverse run 2026-09-26..29.
77
+ import pandas as pd
78
+
79
+ from ffl_bigquery.nflverse.tables.rankings import FF_RANKINGS_KEYS
80
+
81
+ df = pd.DataFrame({
82
+ "scrape_date": ["2026-09-25", "2026-09-25"], "ecr_type": ["dp", "dp"],
83
+ "id": [16469, 16469], "player": ["T.J. Watt", "T.J. Watt"],
84
+ "page_type": ["dynasty-dl", "dynasty-lb"], "ecr": [15.0, 6.0],
85
+ })
86
+ assert not df.duplicated(FF_RANKINGS_KEYS).any()
@@ -1 +0,0 @@
1
- __version__ = "0.3.1"
File without changes
File without changes
File without changes