linkedin-games 0.1.3__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.
- linkedin_games-0.1.3/LICENSE.md +21 -0
- linkedin_games-0.1.3/PKG-INFO +147 -0
- linkedin_games-0.1.3/README.md +105 -0
- linkedin_games-0.1.3/pyproject.toml +175 -0
- linkedin_games-0.1.3/pyproject.toml.orig +156 -0
- linkedin_games-0.1.3/src/linkedin_games/__init__.py +9 -0
- linkedin_games-0.1.3/src/linkedin_games/core/__init__.py +0 -0
- linkedin_games-0.1.3/src/linkedin_games/core/_color.py +139 -0
- linkedin_games-0.1.3/src/linkedin_games/core/_game_board.py +206 -0
- linkedin_games-0.1.3/src/linkedin_games/patches/__init__.py +0 -0
- linkedin_games-0.1.3/src/linkedin_games/patches/_model.py +116 -0
- linkedin_games-0.1.3/src/linkedin_games/patches/_rectangle.py +226 -0
- linkedin_games-0.1.3/src/linkedin_games/patches/_rectangle_seed.py +263 -0
- linkedin_games-0.1.3/src/linkedin_games/patches/_rectangle_shape.py +9 -0
- linkedin_games-0.1.3/src/linkedin_games/patches/patches.py +139 -0
- linkedin_games-0.1.3/src/linkedin_games/queens/__init__.py +0 -0
- linkedin_games-0.1.3/src/linkedin_games/queens/_model.py +51 -0
- linkedin_games-0.1.3/src/linkedin_games/queens/_region.py +111 -0
- linkedin_games-0.1.3/src/linkedin_games/queens/queens.py +140 -0
- linkedin_games-0.1.3/src/linkedin_games/sudoku/__init__.py +0 -0
- linkedin_games-0.1.3/src/linkedin_games/sudoku/_model.py +63 -0
- linkedin_games-0.1.3/src/linkedin_games/sudoku/classic_sudoku.py +23 -0
- linkedin_games-0.1.3/src/linkedin_games/sudoku/mini_sudoku.py +23 -0
- linkedin_games-0.1.3/src/linkedin_games/sudoku/sudoku.py +177 -0
- linkedin_games-0.1.3/src/linkedin_games/tango/__init__.py +0 -0
- linkedin_games-0.1.3/src/linkedin_games/tango/_model.py +80 -0
- linkedin_games-0.1.3/src/linkedin_games/tango/tango.py +222 -0
- linkedin_games-0.1.3/src/linkedin_games/zip/__init__.py +0 -0
- linkedin_games-0.1.3/src/linkedin_games/zip/_model.py +70 -0
- linkedin_games-0.1.3/src/linkedin_games/zip/zip.py +198 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rodrigo Celso de Lima Porto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: linkedin-games
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: A Python package for solving LinkedIn board games like Queens, Tango, Zip, Mini Sudoku and Patches using linear optimization models.
|
|
5
|
+
Keywords: LinkedIn Games,LinkedIn,Games,Queens,Tango,Zip,Mini Sudoku,Patches,Pyomo,Optimization,Linear Optimization
|
|
6
|
+
Author: Rodrigo C. L. Porto
|
|
7
|
+
Author-email: Rodrigo C. L. Porto <rodrigo.cl.porto@gmail.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Rodrigo Celso de Lima Porto
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
30
|
+
Classifier: Natural Language :: English
|
|
31
|
+
Classifier: Intended Audience :: Education
|
|
32
|
+
Classifier: Topic :: Games/Entertainment
|
|
33
|
+
Requires-Dist: highspy>=1.14.0
|
|
34
|
+
Requires-Dist: matplotlib>=3.10.8
|
|
35
|
+
Requires-Dist: networkx>=3.6.1
|
|
36
|
+
Requires-Dist: pyomo>=6.10.0
|
|
37
|
+
Requires-Python: >=3.13
|
|
38
|
+
Project-URL: Source Code, https://github.com/rodrigo-cl-porto/linkedin-games-solvers
|
|
39
|
+
Project-URL: Jupyter Book, https://rodrigo-cl-porto.github.io/linkedin-games-solvers/
|
|
40
|
+
Project-URL: LinkedIn Profile, https://www.linkedin.com/in/rodrigo-cl-porto/
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
|
|
43
|
+
<div align="center">
|
|
44
|
+
<img src="./docs/assets/logo.svg" alt="logo" width="40%">
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
# 🐍𖣯 LinkedIn Games Solvers
|
|
48
|
+
|
|
49
|
+
LinkedIn Games is a Python package that provides a simple set of components to solve LinkedIn board games ([Queens][linkedin-queens], [Tango][linkedin-tango], [Zip][linkedin-zip], [Mini Sudoku][linkedin-mini-sudoku] and [Patches][linkedin-patches] for now) using Linear Optimization models. This library leverages popular Python libraries such as [Pyomo] for mathematical modeling and [NetworkX] for graph-based representations of game boards.
|
|
50
|
+
|
|
51
|
+
This repository also contains a Jupyter Book that serves as a comprehensive guide to understanding and solving LinkedIn games using the LinkedIn Games library. The book covers topics about the basics of mathematical optimization, the model structure of LinkedIn board games, and step-by-step tutorials for solving them by using linear optimization.
|
|
52
|
+
|
|
53
|
+
[linkedin-queens]: https://www.linkedin.com/games/queens/
|
|
54
|
+
[linkedin-tango]: https://www.linkedin.com/games/tango/
|
|
55
|
+
[linkedin-zip]: https://www.linkedin.com/games/zip/
|
|
56
|
+
[linkedin-mini-sudoku]: https://www.linkedin.com/games/mini-sudoku/
|
|
57
|
+
[linkedin-patches]: https://www.linkedin.com/games/patches/
|
|
58
|
+
[Pyomo]: https://www.pyomo.org/
|
|
59
|
+
[NetworkX]: https://networkx.org/en/
|
|
60
|
+
|
|
61
|
+
# Installing
|
|
62
|
+
|
|
63
|
+
To install the LinkedIn Games library, you can use `pip`:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install linkedin-games
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Or run this command if you use `uv` as your project's environment manager (which I personally recommend):
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
uv add linkedin-games
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
# A Simple Example
|
|
76
|
+
|
|
77
|
+
In order to solve this Patches game:
|
|
78
|
+
|
|
79
|
+
<div align="center">
|
|
80
|
+
<img src="./docs/assets/patches-121.jpg" alt="Patches No. 121" width="40%">
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
One can run this simple code snippet.
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
from linkedin_games import Patches
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
seeds = {
|
|
90
|
+
(1,1): {"color": "yellow", "area"=8},
|
|
91
|
+
(2,5): {"color": "green", "area"=8},
|
|
92
|
+
(3,3): {"color": "purple"},
|
|
93
|
+
(4,4): {"color": "orange"},
|
|
94
|
+
(5,2): {"color": "teal", "area"=8},
|
|
95
|
+
(6,6): {"color": "red", "area"=6, "shape"="vertical"}
|
|
96
|
+
}
|
|
97
|
+
patches = Patches((6, 6), seeds)
|
|
98
|
+
patches.solve()
|
|
99
|
+
patches.show()
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Which will return the following result:
|
|
103
|
+
|
|
104
|
+
<div align="center">
|
|
105
|
+
<img src="./docs/assets/patches-121-solved.png" alt="Patches No. 121 solved" width="40%">
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
Which, by its turn, matches the official solution of this game:
|
|
109
|
+
|
|
110
|
+
<div align="center">
|
|
111
|
+
<img src="./docs/assets/patches-121-solution.jpg" alt="Solution of Patches No. 121" width="40%">
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
# 📙 Jupyter Book
|
|
115
|
+
|
|
116
|
+
You can read more about the usage and implementation of this library on this [Jupyter Book].
|
|
117
|
+
|
|
118
|
+
[Jupyter Book]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/
|
|
119
|
+
|
|
120
|
+
## Table of Contents
|
|
121
|
+
|
|
122
|
+
- Solving Linkedin Games by Linear Optimization
|
|
123
|
+
- [Home][home]
|
|
124
|
+
- Getting Started
|
|
125
|
+
- [What is Optimization?][what-is-optimization]
|
|
126
|
+
- [LinkedIn Games Library][linkedin-games-library]
|
|
127
|
+
- How to Solve
|
|
128
|
+
- [Queens][how-to-solve-queens]
|
|
129
|
+
- [Tango][how-to-solve-tango]
|
|
130
|
+
- [Zip][how-to-solve-zip]
|
|
131
|
+
- [Mini Sudoku][how-to-solve-mini-sudoku]
|
|
132
|
+
- [Patches][how-to-solve-patches]
|
|
133
|
+
|
|
134
|
+
[home]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/
|
|
135
|
+
[what-is-optimization]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/getting-started/what-is-optimization/
|
|
136
|
+
[linkedin-games-library]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/getting-started/linkedin-games-library/
|
|
137
|
+
[how-to-solve-queens]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/queens/
|
|
138
|
+
[how-to-solve-tango]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/tango/
|
|
139
|
+
[how-to-solve-zip]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/zip/
|
|
140
|
+
[how-to-solve-mini-sudoku]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/mini-sudoku/
|
|
141
|
+
[how-to-solve-patches]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/patches/
|
|
142
|
+
|
|
143
|
+
# ❤️ Donate
|
|
144
|
+
|
|
145
|
+
If you find this library useful and would like to support its development, please consider making a [donation]. Your contributions will help me maintain my work, as well as fund future projects.
|
|
146
|
+
|
|
147
|
+
[donation]: https://github.com/sponsors/rodrigo-cl-porto
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="./docs/assets/logo.svg" alt="logo" width="40%">
|
|
3
|
+
</div>
|
|
4
|
+
|
|
5
|
+
# 🐍𖣯 LinkedIn Games Solvers
|
|
6
|
+
|
|
7
|
+
LinkedIn Games is a Python package that provides a simple set of components to solve LinkedIn board games ([Queens][linkedin-queens], [Tango][linkedin-tango], [Zip][linkedin-zip], [Mini Sudoku][linkedin-mini-sudoku] and [Patches][linkedin-patches] for now) using Linear Optimization models. This library leverages popular Python libraries such as [Pyomo] for mathematical modeling and [NetworkX] for graph-based representations of game boards.
|
|
8
|
+
|
|
9
|
+
This repository also contains a Jupyter Book that serves as a comprehensive guide to understanding and solving LinkedIn games using the LinkedIn Games library. The book covers topics about the basics of mathematical optimization, the model structure of LinkedIn board games, and step-by-step tutorials for solving them by using linear optimization.
|
|
10
|
+
|
|
11
|
+
[linkedin-queens]: https://www.linkedin.com/games/queens/
|
|
12
|
+
[linkedin-tango]: https://www.linkedin.com/games/tango/
|
|
13
|
+
[linkedin-zip]: https://www.linkedin.com/games/zip/
|
|
14
|
+
[linkedin-mini-sudoku]: https://www.linkedin.com/games/mini-sudoku/
|
|
15
|
+
[linkedin-patches]: https://www.linkedin.com/games/patches/
|
|
16
|
+
[Pyomo]: https://www.pyomo.org/
|
|
17
|
+
[NetworkX]: https://networkx.org/en/
|
|
18
|
+
|
|
19
|
+
# Installing
|
|
20
|
+
|
|
21
|
+
To install the LinkedIn Games library, you can use `pip`:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install linkedin-games
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Or run this command if you use `uv` as your project's environment manager (which I personally recommend):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv add linkedin-games
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
# A Simple Example
|
|
34
|
+
|
|
35
|
+
In order to solve this Patches game:
|
|
36
|
+
|
|
37
|
+
<div align="center">
|
|
38
|
+
<img src="./docs/assets/patches-121.jpg" alt="Patches No. 121" width="40%">
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
One can run this simple code snippet.
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from linkedin_games import Patches
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
seeds = {
|
|
48
|
+
(1,1): {"color": "yellow", "area"=8},
|
|
49
|
+
(2,5): {"color": "green", "area"=8},
|
|
50
|
+
(3,3): {"color": "purple"},
|
|
51
|
+
(4,4): {"color": "orange"},
|
|
52
|
+
(5,2): {"color": "teal", "area"=8},
|
|
53
|
+
(6,6): {"color": "red", "area"=6, "shape"="vertical"}
|
|
54
|
+
}
|
|
55
|
+
patches = Patches((6, 6), seeds)
|
|
56
|
+
patches.solve()
|
|
57
|
+
patches.show()
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Which will return the following result:
|
|
61
|
+
|
|
62
|
+
<div align="center">
|
|
63
|
+
<img src="./docs/assets/patches-121-solved.png" alt="Patches No. 121 solved" width="40%">
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
Which, by its turn, matches the official solution of this game:
|
|
67
|
+
|
|
68
|
+
<div align="center">
|
|
69
|
+
<img src="./docs/assets/patches-121-solution.jpg" alt="Solution of Patches No. 121" width="40%">
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
# 📙 Jupyter Book
|
|
73
|
+
|
|
74
|
+
You can read more about the usage and implementation of this library on this [Jupyter Book].
|
|
75
|
+
|
|
76
|
+
[Jupyter Book]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/
|
|
77
|
+
|
|
78
|
+
## Table of Contents
|
|
79
|
+
|
|
80
|
+
- Solving Linkedin Games by Linear Optimization
|
|
81
|
+
- [Home][home]
|
|
82
|
+
- Getting Started
|
|
83
|
+
- [What is Optimization?][what-is-optimization]
|
|
84
|
+
- [LinkedIn Games Library][linkedin-games-library]
|
|
85
|
+
- How to Solve
|
|
86
|
+
- [Queens][how-to-solve-queens]
|
|
87
|
+
- [Tango][how-to-solve-tango]
|
|
88
|
+
- [Zip][how-to-solve-zip]
|
|
89
|
+
- [Mini Sudoku][how-to-solve-mini-sudoku]
|
|
90
|
+
- [Patches][how-to-solve-patches]
|
|
91
|
+
|
|
92
|
+
[home]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/
|
|
93
|
+
[what-is-optimization]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/getting-started/what-is-optimization/
|
|
94
|
+
[linkedin-games-library]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/getting-started/linkedin-games-library/
|
|
95
|
+
[how-to-solve-queens]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/queens/
|
|
96
|
+
[how-to-solve-tango]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/tango/
|
|
97
|
+
[how-to-solve-zip]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/zip/
|
|
98
|
+
[how-to-solve-mini-sudoku]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/mini-sudoku/
|
|
99
|
+
[how-to-solve-patches]: https://rodrigo-cl-porto.github.io/linkedin-games-solvers/how-to-solve/patches/
|
|
100
|
+
|
|
101
|
+
# ❤️ Donate
|
|
102
|
+
|
|
103
|
+
If you find this library useful and would like to support its development, please consider making a [donation]. Your contributions will help me maintain my work, as well as fund future projects.
|
|
104
|
+
|
|
105
|
+
[donation]: https://github.com/sponsors/rodrigo-cl-porto
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "linkedin-games"
|
|
3
|
+
version = "0.1.3"
|
|
4
|
+
description = "A Python package for solving LinkedIn board games like Queens, Tango, Zip, Mini Sudoku and Patches using linear optimization models."
|
|
5
|
+
keywords = [
|
|
6
|
+
"LinkedIn Games",
|
|
7
|
+
"LinkedIn",
|
|
8
|
+
"Games",
|
|
9
|
+
"Queens",
|
|
10
|
+
"Tango",
|
|
11
|
+
"Zip",
|
|
12
|
+
"Mini Sudoku",
|
|
13
|
+
"Patches",
|
|
14
|
+
"Pyomo",
|
|
15
|
+
"Optimization",
|
|
16
|
+
"Linear Optimization",
|
|
17
|
+
]
|
|
18
|
+
readme = "README.md"
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 5 - Production/Stable",
|
|
21
|
+
"Natural Language :: English",
|
|
22
|
+
"Intended Audience :: Education",
|
|
23
|
+
"Topic :: Games/Entertainment",
|
|
24
|
+
]
|
|
25
|
+
requires-python = ">=3.13"
|
|
26
|
+
dependencies = [
|
|
27
|
+
"highspy>=1.14.0",
|
|
28
|
+
"matplotlib>=3.10.8",
|
|
29
|
+
"networkx>=3.6.1",
|
|
30
|
+
"pyomo>=6.10.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[[project.authors]]
|
|
34
|
+
name = "Rodrigo C. L. Porto"
|
|
35
|
+
email = "rodrigo.cl.porto@gmail.com"
|
|
36
|
+
|
|
37
|
+
[project.license]
|
|
38
|
+
file = "LICENSE.md"
|
|
39
|
+
|
|
40
|
+
[project.markdown_extensions.mkdocstrings]
|
|
41
|
+
handler = "python"
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
"Source Code" = "https://github.com/rodrigo-cl-porto/linkedin-games-solvers"
|
|
45
|
+
"Jupyter Book" = "https://rodrigo-cl-porto.github.io/linkedin-games-solvers/"
|
|
46
|
+
"LinkedIn Profile" = "https://www.linkedin.com/in/rodrigo-cl-porto/"
|
|
47
|
+
|
|
48
|
+
[dependency-groups]
|
|
49
|
+
book = [
|
|
50
|
+
"ipywidgets>=8.1.8",
|
|
51
|
+
"jupyter-book>=2.1.6",
|
|
52
|
+
"jupyterlab>=4.6.2",
|
|
53
|
+
"jupyterlab-myst>=2.7.0",
|
|
54
|
+
]
|
|
55
|
+
dev = [
|
|
56
|
+
"poethepoet>=0.48.0",
|
|
57
|
+
"pytest>=9.1.1",
|
|
58
|
+
"ruff>=0.15.22",
|
|
59
|
+
]
|
|
60
|
+
docs = [
|
|
61
|
+
"mkdocstrings-python>=2.0.5",
|
|
62
|
+
"zensical>=0.0.52",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
[build-system]
|
|
66
|
+
requires = ["uv_build>=0.10.4,<0.11.0"]
|
|
67
|
+
build-backend = "uv_build"
|
|
68
|
+
|
|
69
|
+
[tool.ruff]
|
|
70
|
+
line-length = 120
|
|
71
|
+
target-version = "py313"
|
|
72
|
+
fix = true
|
|
73
|
+
show-fixes = true
|
|
74
|
+
indent-width = 4
|
|
75
|
+
exclude = [
|
|
76
|
+
"venv",
|
|
77
|
+
".venv",
|
|
78
|
+
"env",
|
|
79
|
+
".env",
|
|
80
|
+
"node_modules",
|
|
81
|
+
"__pycache__",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
[tool.ruff.lint]
|
|
85
|
+
exclude = ["*.ipynb"]
|
|
86
|
+
select = [
|
|
87
|
+
"ASYNC",
|
|
88
|
+
"A",
|
|
89
|
+
"ANN",
|
|
90
|
+
"B",
|
|
91
|
+
"BLE",
|
|
92
|
+
"C4",
|
|
93
|
+
"C90",
|
|
94
|
+
"COM",
|
|
95
|
+
"E",
|
|
96
|
+
"EM",
|
|
97
|
+
"ERA",
|
|
98
|
+
"EXE",
|
|
99
|
+
"F",
|
|
100
|
+
"FBT",
|
|
101
|
+
"FIX",
|
|
102
|
+
"I",
|
|
103
|
+
"ICN",
|
|
104
|
+
"ISC",
|
|
105
|
+
"Q",
|
|
106
|
+
"RET",
|
|
107
|
+
"RSE",
|
|
108
|
+
"S",
|
|
109
|
+
"SIM",
|
|
110
|
+
"SLF",
|
|
111
|
+
"T10",
|
|
112
|
+
"T20",
|
|
113
|
+
"TC",
|
|
114
|
+
"TD",
|
|
115
|
+
"TRY",
|
|
116
|
+
"UP",
|
|
117
|
+
"W",
|
|
118
|
+
"YTT",
|
|
119
|
+
"RUF",
|
|
120
|
+
"N",
|
|
121
|
+
]
|
|
122
|
+
ignore = [
|
|
123
|
+
"T201",
|
|
124
|
+
"COM812",
|
|
125
|
+
"I001",
|
|
126
|
+
"E741",
|
|
127
|
+
"W293",
|
|
128
|
+
]
|
|
129
|
+
|
|
130
|
+
[tool.ruff.lint.per-file-ignores]
|
|
131
|
+
"tests/**/*.py" = [
|
|
132
|
+
"ANN201",
|
|
133
|
+
"S101",
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
[tool.ruff.format]
|
|
137
|
+
quote-style = "double"
|
|
138
|
+
indent-style = "space"
|
|
139
|
+
line-ending = "lf"
|
|
140
|
+
|
|
141
|
+
[tool.poe]
|
|
142
|
+
executor = "uv"
|
|
143
|
+
verbosity = -1
|
|
144
|
+
|
|
145
|
+
[tool.poe.tasks.clean]
|
|
146
|
+
cmd = "rm -rf .venv"
|
|
147
|
+
|
|
148
|
+
[tool.poe.tasks.sync]
|
|
149
|
+
cmd = "uv sync --all-groups"
|
|
150
|
+
|
|
151
|
+
[tool.poe.tasks.docs]
|
|
152
|
+
cmd = "zensical serve"
|
|
153
|
+
|
|
154
|
+
[tool.poe.tasks.book]
|
|
155
|
+
cmd = "jupyter-book start"
|
|
156
|
+
cwd = "book"
|
|
157
|
+
|
|
158
|
+
[tool.poe.tasks.book.env]
|
|
159
|
+
NODE_TLS_REJECT_UNAUTHORIZED = "0"
|
|
160
|
+
|
|
161
|
+
[tool.poe.tasks.test]
|
|
162
|
+
cmd = "pytest --maxfail=1"
|
|
163
|
+
cwd = "tests"
|
|
164
|
+
|
|
165
|
+
[tool.poe.tasks.lint]
|
|
166
|
+
cmd = "ruff check"
|
|
167
|
+
|
|
168
|
+
[tool.poe.tasks.build]
|
|
169
|
+
cmd = "uv build --no-sources"
|
|
170
|
+
|
|
171
|
+
[tool.poe.tasks.publish]
|
|
172
|
+
shell = """
|
|
173
|
+
uv publish --username __token__ --password UV_PUBLISH_PASSWORD\r
|
|
174
|
+
"""
|
|
175
|
+
envfile = ".env"
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "linkedin-games"
|
|
3
|
+
version = "0.1.3"
|
|
4
|
+
description = "A Python package for solving LinkedIn board games like Queens, Tango, Zip, Mini Sudoku and Patches using linear optimization models."
|
|
5
|
+
keywords = [
|
|
6
|
+
"LinkedIn Games",
|
|
7
|
+
"LinkedIn",
|
|
8
|
+
"Games",
|
|
9
|
+
"Queens",
|
|
10
|
+
"Tango",
|
|
11
|
+
"Zip",
|
|
12
|
+
"Mini Sudoku",
|
|
13
|
+
"Patches",
|
|
14
|
+
"Pyomo",
|
|
15
|
+
"Optimization",
|
|
16
|
+
"Linear Optimization"
|
|
17
|
+
]
|
|
18
|
+
authors = [{ name = "Rodrigo C. L. Porto", email = "rodrigo.cl.porto@gmail.com" }]
|
|
19
|
+
readme = "README.md"
|
|
20
|
+
license = { file = "LICENSE.md" }
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Development Status :: 5 - Production/Stable",
|
|
23
|
+
"Natural Language :: English",
|
|
24
|
+
"Intended Audience :: Education",
|
|
25
|
+
"Topic :: Games/Entertainment"
|
|
26
|
+
]
|
|
27
|
+
requires-python = ">=3.13"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"highspy>=1.14.0",
|
|
30
|
+
"matplotlib>=3.10.8",
|
|
31
|
+
"networkx>=3.6.1",
|
|
32
|
+
"pyomo>=6.10.0",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.markdown_extensions]
|
|
36
|
+
mkdocstrings = { handler = "python" }
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
"Source Code" = "https://github.com/rodrigo-cl-porto/linkedin-games-solvers"
|
|
40
|
+
"Jupyter Book" = "https://rodrigo-cl-porto.github.io/linkedin-games-solvers/"
|
|
41
|
+
"LinkedIn Profile" = "https://www.linkedin.com/in/rodrigo-cl-porto/"
|
|
42
|
+
|
|
43
|
+
[dependency-groups]
|
|
44
|
+
book = [
|
|
45
|
+
"ipywidgets>=8.1.8",
|
|
46
|
+
"jupyter-book>=2.1.6",
|
|
47
|
+
"jupyterlab>=4.6.2",
|
|
48
|
+
"jupyterlab-myst>=2.7.0",
|
|
49
|
+
]
|
|
50
|
+
dev = [
|
|
51
|
+
"poethepoet>=0.48.0",
|
|
52
|
+
"pytest>=9.1.1",
|
|
53
|
+
"ruff>=0.15.22",
|
|
54
|
+
]
|
|
55
|
+
docs = [
|
|
56
|
+
"mkdocstrings-python>=2.0.5",
|
|
57
|
+
"zensical>=0.0.52",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
[build-system]
|
|
61
|
+
requires = ["uv_build>=0.10.4,<0.11.0"]
|
|
62
|
+
build-backend = "uv_build"
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
[tool.ruff]
|
|
66
|
+
line-length = 120
|
|
67
|
+
target-version = "py313"
|
|
68
|
+
fix = true
|
|
69
|
+
show-fixes = true
|
|
70
|
+
indent-width = 4
|
|
71
|
+
exclude = ["venv", ".venv", "env", ".env", "node_modules", "__pycache__"]
|
|
72
|
+
|
|
73
|
+
[tool.ruff.lint]
|
|
74
|
+
exclude = ["*.ipynb"]
|
|
75
|
+
select = [
|
|
76
|
+
"ASYNC",
|
|
77
|
+
"A",
|
|
78
|
+
"ANN",
|
|
79
|
+
"B",
|
|
80
|
+
"BLE",
|
|
81
|
+
"C4",
|
|
82
|
+
"C90",
|
|
83
|
+
"COM",
|
|
84
|
+
"E",
|
|
85
|
+
"EM",
|
|
86
|
+
"ERA",
|
|
87
|
+
"EXE",
|
|
88
|
+
"F",
|
|
89
|
+
"FBT",
|
|
90
|
+
"FIX",
|
|
91
|
+
"I",
|
|
92
|
+
"ICN",
|
|
93
|
+
"ISC",
|
|
94
|
+
"Q",
|
|
95
|
+
"RET",
|
|
96
|
+
"RSE",
|
|
97
|
+
"S",
|
|
98
|
+
"SIM",
|
|
99
|
+
"SLF",
|
|
100
|
+
"T10",
|
|
101
|
+
"T20",
|
|
102
|
+
"TC",
|
|
103
|
+
"TD",
|
|
104
|
+
"TRY",
|
|
105
|
+
"UP",
|
|
106
|
+
"W",
|
|
107
|
+
"YTT",
|
|
108
|
+
"RUF",
|
|
109
|
+
"N",
|
|
110
|
+
]
|
|
111
|
+
ignore = ["T201", "COM812", "I001", "E741", "W293"]
|
|
112
|
+
|
|
113
|
+
[tool.ruff.lint.per-file-ignores]
|
|
114
|
+
"tests/**/*.py" = ["ANN201", "S101"]
|
|
115
|
+
|
|
116
|
+
[tool.ruff.format]
|
|
117
|
+
quote-style = "double"
|
|
118
|
+
indent-style = "space"
|
|
119
|
+
line-ending = "lf"
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
[tool.poe]
|
|
123
|
+
executor = "uv"
|
|
124
|
+
verbosity = -1
|
|
125
|
+
|
|
126
|
+
[tool.poe.tasks.clean]
|
|
127
|
+
cmd = "rm -rf .venv"
|
|
128
|
+
|
|
129
|
+
[tool.poe.tasks.sync]
|
|
130
|
+
cmd = "uv sync --all-groups"
|
|
131
|
+
|
|
132
|
+
[tool.poe.tasks.docs]
|
|
133
|
+
cmd = "zensical serve"
|
|
134
|
+
|
|
135
|
+
[tool.poe.tasks.book]
|
|
136
|
+
cmd = "jupyter-book start"
|
|
137
|
+
cwd = "book"
|
|
138
|
+
env = { NODE_TLS_REJECT_UNAUTHORIZED = "0" }
|
|
139
|
+
|
|
140
|
+
[tool.poe.tasks.test]
|
|
141
|
+
cmd = "pytest --maxfail=1"
|
|
142
|
+
cwd = "tests"
|
|
143
|
+
|
|
144
|
+
[tool.poe.tasks.lint]
|
|
145
|
+
cmd = "ruff check"
|
|
146
|
+
|
|
147
|
+
[tool.poe.tasks.build]
|
|
148
|
+
cmd = "uv build --no-sources"
|
|
149
|
+
|
|
150
|
+
[tool.poe.tasks.publish]
|
|
151
|
+
shell = """
|
|
152
|
+
uv publish --username __token__ --password UV_PUBLISH_PASSWORD
|
|
153
|
+
"""
|
|
154
|
+
envfile=".env"
|
|
155
|
+
|
|
156
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from .patches.patches import Patches
|
|
2
|
+
from .queens.queens import Queens
|
|
3
|
+
from .sudoku.classic_sudoku import ClassicSudoku
|
|
4
|
+
from .sudoku.mini_sudoku import MiniSudoku
|
|
5
|
+
from .sudoku.sudoku import Sudoku
|
|
6
|
+
from .tango.tango import Tango
|
|
7
|
+
from .zip.zip import Zip
|
|
8
|
+
|
|
9
|
+
__all__ = ["ClassicSudoku", "MiniSudoku", "Patches", "Queens", "Sudoku", "Tango", "Zip"]
|
|
File without changes
|