ilc-models 0.2.0__tar.gz → 0.2.1__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.
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.1] - 2025-11-12
4
+
5
+ ### Changed
6
+
7
+ - Add form to `TableRow.from_tuple` method
8
+
3
9
  ## [0.2.0] - 2025-11-10
4
10
 
5
11
  ### Breaking
@@ -62,6 +68,8 @@
62
68
 
63
69
  _Initial release._
64
70
 
71
+ [0.2.1]: https://github.com/fourtreestech/ilc-models/releases/tag/v0.2.1
72
+
65
73
  [0.2.0]: https://github.com/fourtreestech/ilc-models/releases/tag/v0.2.0
66
74
 
67
75
  [0.1.8]: https://github.com/fourtreestech/ilc-models/releases/tag/v0.1.8
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ilc-models
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Data models for the ILC project
5
5
  Project-URL: Repository, https://github.com/fourtreestech/ilc-models
6
6
  Author-email: Neil Martin <neil@fourtrees.tech>
@@ -19,7 +19,7 @@ Description-Content-Type: text/markdown
19
19
 
20
20
  # ilc-models
21
21
 
22
- ![version](https://img.shields.io/badge/version-0.2.0-blue)
22
+ ![version](https://img.shields.io/badge/version-0.2.1-blue)
23
23
  ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Ffourtreestech%2Filc-models%2Fmain%2Fpyproject.toml)
24
24
  ![coverage](https://img.shields.io/badge/coverage-100%25-green)
25
25
 
@@ -1,6 +1,6 @@
1
1
  # ilc-models
2
2
 
3
- ![version](https://img.shields.io/badge/version-0.2.0-blue)
3
+ ![version](https://img.shields.io/badge/version-0.2.1-blue)
4
4
  ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Ffourtreestech%2Filc-models%2Fmain%2Fpyproject.toml)
5
5
  ![coverage](https://img.shields.io/badge/coverage-100%25-green)
6
6
 
@@ -15,7 +15,7 @@ sys.path.insert(0, str(Path("..", "..", "src").resolve()))
15
15
  project = "ilc-models"
16
16
  copyright = "2025, Neil Martin"
17
17
  author = "Neil Martin"
18
- release = "0.2.0"
18
+ release = "0.2.1"
19
19
 
20
20
  # -- General configuration ---------------------------------------------------
21
21
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ilc-models"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Data models for the ILC project"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -29,7 +29,7 @@ requires = ["hatchling"]
29
29
  build-backend = "hatchling.build"
30
30
 
31
31
  [tool.bumpver]
32
- current_version = "0.2.0"
32
+ current_version = "0.2.1"
33
33
  version_pattern = "MAJOR.MINOR.PATCH"
34
34
  commit_message = "Bump version {old_version} -> {new_version}"
35
35
  tag_message = "{new_version}"
@@ -18,7 +18,7 @@ from pydantic import (
18
18
  model_validator,
19
19
  )
20
20
 
21
- __version__ = "0.2.0"
21
+ __version__ = "0.2.1"
22
22
 
23
23
 
24
24
  class RowTuple(NamedTuple):
@@ -651,12 +651,13 @@ class TableRow(BaseModel):
651
651
  :rtype: :class:`TableRow`
652
652
  """
653
653
  return cls(
654
- team=row_tuple[0],
655
- won=row_tuple[2],
656
- drawn=row_tuple[3],
657
- lost=row_tuple[4],
658
- scored=row_tuple[5],
659
- conceded=row_tuple[6],
654
+ team=row_tuple.team,
655
+ won=row_tuple.won,
656
+ drawn=row_tuple.drawn,
657
+ lost=row_tuple.lost,
658
+ scored=row_tuple.goals_for,
659
+ conceded=row_tuple.goals_against,
660
+ form=row_tuple.form,
660
661
  )
661
662
 
662
663
  def __eq__(self, other: Any) -> bool:
@@ -458,6 +458,18 @@ class TestTableRow:
458
458
  row.add_form("L")
459
459
  assert row.form == "WLDWL"
460
460
 
461
+ def test_as_tuple_populates_form(self, ilc_fake):
462
+ row = ilc_fake.table_row()
463
+ row.form = "WDLLW"
464
+ row2 = row.as_tuple()
465
+ assert row2.form == "WDLLW"
466
+
467
+ def test_from_tuple_populates_form(self, ilc_fake):
468
+ row = ilc_fake.table_row()
469
+ row.form = "WDLLW"
470
+ row2 = TableRow.from_tuple(row.as_tuple())
471
+ assert row2.form == "WDLLW"
472
+
461
473
 
462
474
  class TestLeague:
463
475
  def test_title(self, fake_league):
@@ -156,7 +156,7 @@ wheels = [
156
156
 
157
157
  [[package]]
158
158
  name = "ilc-models"
159
- version = "0.1.8"
159
+ version = "0.2.0"
160
160
  source = { editable = "." }
161
161
  dependencies = [
162
162
  { name = "pydantic" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes