fmind 3.0.1__tar.gz → 3.0.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.
fmind-3.0.3/PKG-INFO ADDED
@@ -0,0 +1,186 @@
1
+ Metadata-Version: 2.4
2
+ Name: fmind
3
+ Version: 3.0.3
4
+ Summary: Read Médéric Hurier's (Fmind) portfolio and daily news from the terminal.
5
+ Keywords: portfolio,cli,fmind,resume,articles,news,mcp
6
+ Author: Médéric Hurier
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Classifier: Programming Language :: Python :: 3.15
14
+ Classifier: Topic :: Utilities
15
+ Requires-Dist: typer>=0.26
16
+ Requires-Dist: rich>=13.9
17
+ Requires-Dist: httpx2>=2.12,<3 ; extra == 'mcp'
18
+ Requires-Dist: mcp>=2.2,<3 ; extra == 'mcp'
19
+ Requires-Dist: mcp-types>=2.2,<3 ; extra == 'mcp'
20
+ Requires-Python: >=3.14
21
+ Project-URL: Homepage, https://www.fmind.dev/
22
+ Project-URL: Repository, https://github.com/fmind/cli
23
+ Project-URL: Changelog, https://github.com/fmind/cli/blob/main/CHANGELOG.md
24
+ Project-URL: Issues, https://github.com/fmind/cli/issues
25
+ Project-URL: Security, https://github.com/fmind/cli/security/policy
26
+ Provides-Extra: mcp
27
+ Description-Content-Type: text/markdown
28
+
29
+ # fmind
30
+
31
+ Read [Médéric Hurier's (Fmind)](https://www.fmind.dev/) portfolio and daily tech news from the terminal, or bridge its `/mcp` server over stdio.
32
+
33
+ [![CI](https://github.com/fmind/cli/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fmind/cli/actions/workflows/ci.yml) [![PyPI](https://img.shields.io/pypi/v/fmind?color=174EA6)](https://pypi.org/project/fmind/) [![Python](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Ffmind%2Fcli%2Fmain%2Fpyproject.toml)](https://pypi.org/project/fmind/) [![License: MIT](https://img.shields.io/badge/license-MIT-174EA6)](https://github.com/fmind/cli/blob/main/LICENSE)
34
+
35
+ <a href="https://raw.githubusercontent.com/fmind/cli/main/docs/assets/overview.svg">
36
+ <img
37
+ src="https://raw.githubusercontent.com/fmind/cli/main/docs/assets/overview.svg"
38
+ alt="fmind overview: live endpoints on www.fmind.dev (/api/profile, /api/news, /articles/<slug>.md, and /mcp) flow through the stateless fmind CLI (15s deadline, 8 MiB limit, zero local cache) to Rich terminal cards, --json / --raw shell pipelines, and MCP over stdio."
39
+ width="960"
40
+ >
41
+ </a>
42
+
43
+ ## Install
44
+
45
+ Requires Python 3.14+ and HTTPS access to `www.fmind.dev`. Run immediately with [uv](https://docs.astral.sh/uv/) (which provisions Python 3.14+ automatically), or install persistently:
46
+
47
+ ```bash
48
+ uvx fmind
49
+ ```
50
+
51
+ ```text
52
+ Name Médéric Hurier (Fmind)
53
+ Role Freelance AI Architect
54
+ Headline Freelance AI Architect • AI Agents, MLOps & Security
55
+ …
56
+ Contact contact@fmind.dev
57
+ Website https://www.fmind.dev
58
+ …
59
+
60
+ fmind --help lists every command.
61
+ ```
62
+
63
+ ```bash
64
+ uv tool install fmind # portfolio and news commands
65
+ uv tool install 'fmind[mcp]' # include the stdio MCP bridge
66
+ pipx install fmind # alternative (requires a local Python 3.14+ interpreter)
67
+ ```
68
+
69
+ ## Commands
70
+
71
+ | Command | Shows |
72
+ | ----------------------------------------------------- | --------------------------------------------------------- |
73
+ | `fmind` | The `whoami` card and a pointer to `--help` |
74
+ | `fmind whoami` | Name, headline, location, experience, availability, links |
75
+ | `fmind about` | The biography |
76
+ | `fmind skills` | Core expertise, as published on the site |
77
+ | `fmind experiences` | Engagements in website order |
78
+ | `fmind certifications` | Certifications, the PhD, specializations |
79
+ | `fmind community` | Ambassador and advisory roles |
80
+ | `fmind papers` | The doctorate and the peer-reviewed papers, with code |
81
+ | `fmind projects [--limit <n>]` | Open-source projects and video series, with code |
82
+ | `fmind sites` | Interactive tools published alongside the writing |
83
+ | `fmind articles [--limit <n>]` | The most recent writing |
84
+ | `fmind search [query...] [--tag <tag>] [--limit <n>]` | Articles matching every term, newest first |
85
+ | `fmind read <slug> [--raw]` | One article, rendered in the terminal |
86
+ | `fmind tags` | The article tags, with counts and `search --tag` hints |
87
+ | `fmind news [query...] [--limit <n>]` | Daily curated links, newest edition first |
88
+ | `fmind hire` | What can be booked right now |
89
+ | `fmind mcp` | Stdio MCP bridge to `www.fmind.dev/mcp` (`fmind[mcp]`) |
90
+
91
+ Commands mirror the website's `/api/profile` and `/api/news` sections and stay stable across visual redesigns.
92
+
93
+ - `--limit` (`1`–`200`) bounds `articles` (`6`), `search` (`10`), `news` editions (`1`, or `10` with terms), and each `projects` list (`6`).
94
+ - `--json` works on bare `fmind` and before or after every command except `mcp` (`fmind --json experiences` or `fmind experiences --json`). It takes precedence over `read --raw` and stores the source in `markdown`.
95
+ - Global `--color` / `--no-color` (auto-detected, respecting `NO_COLOR` and redirects) and `--version` go before the command; `-h` / `--help` works on `fmind` and every subcommand.
96
+
97
+ ### Reading
98
+
99
+ `fmind search` ANDs terms case-insensitively across titles, summaries, tags, and slugs. `--tag` restricts to a published site tag (unknown tags fail and list valid ones).
100
+
101
+ ```bash
102
+ fmind search agent security
103
+ fmind search --tag MLOps --limit 3
104
+ ```
105
+
106
+ `fmind read` accepts an exact or unambiguous partial slug and pages long output via `$PAGER` (`less` by default; set `PAGER=cat` to print directly). Pass `--raw` for the Markdown source.
107
+
108
+ ```bash
109
+ slug="$(fmind articles --limit 1 --json | jq -r '.[0].slug')"
110
+ fmind read "$slug"
111
+ fmind read "$slug" --raw | glow -
112
+ ```
113
+
114
+ ### News
115
+
116
+ `fmind news` shows the latest daily edition of curated AI agent, Python, security, and cloud links. Terms AND-match link titles, domains, summaries, URLs, and edition dates or topics (`2026-11-06`, `2026-11`); `--limit` defaults to `1` (`10` when searching).
117
+
118
+ ```bash
119
+ fmind news # latest edition
120
+ fmind news --limit 7 # past week
121
+ fmind news agent security # matching links, newest edition first
122
+ fmind news 2026-11-06 # one edition
123
+ ```
124
+
125
+ ### Piping
126
+
127
+ `--json` writes undecorated JSON to stdout and errors to stderr:
128
+
129
+ ```bash
130
+ fmind articles --limit 20 --json | jq -r '.[] | "\(.date[:10]) \(.title)"'
131
+ fmind certifications --json | jq -r '.certifications[] | select(.active) | .title'
132
+ fmind news --limit 7 --json | jq -r '.[].items[] | "\(.domain) \(.title)"'
133
+ ```
134
+
135
+ Grouped JSON schemas:
136
+
137
+ - `whoami --json`: `metadata`, `experience` (featured engagement, or `[]`), and `services`.
138
+ - `certifications --json`: `certifications`, `thesis`, and `specializations`.
139
+ - `papers --json`: `thesis` and `papers`.
140
+ - `projects --json`: `open_source` and `youtube_series` (each bounded by `--limit`).
141
+ - `news --json`: editions, keeping only matching `items` when searching.
142
+ - `read <slug> --json`: article index fields plus `slug` and `markdown`.
143
+
144
+ ## MCP over stdio
145
+
146
+ Portfolio commands require only Typer and Rich; the optional `mcp` extra adds the [official MCP Python SDK](https://py.sdk.modelcontextprotocol.io/):
147
+
148
+ ```json
149
+ {
150
+ "mcpServers": {
151
+ "fmind": {
152
+ "command": "uvx",
153
+ "args": ["--from", "fmind[mcp]", "fmind", "mcp"]
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ - Bridges `https://www.fmind.dev/mcp` (or the `FMIND_PROFILE_URL` origin) over protocol-only stdio with no local caching (`--json` is rejected; startup errors go to stderr).
160
+ - Forwards read-only tools, resources, and prompts (no subscriptions, sampling, or elicitation).
161
+ - Enforces a 15s deadline and 8 MiB response cap per call, isolating individual failures without stopping the bridge.
162
+
163
+ ## Development
164
+
165
+ ```bash
166
+ mise install && mise run install # toolchain, locked venv, and git hooks
167
+ mise run all # check, test, build (non-mutating CI gate)
168
+ mise run format # format Python, JSON, Markdown, TOML, YAML
169
+ mise run smoke # live API/article and MCP compatibility check
170
+ ```
171
+
172
+ Override `FMIND_PROFILE_URL` to point profile, news, article reads, and `/mcp` at another origin (such as a local dev server):
173
+
174
+ ```bash
175
+ FMIND_PROFILE_URL=http://127.0.0.1:8080/api/profile fmind whoami
176
+ ```
177
+
178
+ Run `mise tasks` for individual checks, and see [AGENTS.md](https://github.com/fmind/cli/blob/main/AGENTS.md) for invariants and release details.
179
+
180
+ ## Support & Security
181
+
182
+ See the [Changelog](https://github.com/fmind/cli/blob/main/CHANGELOG.md) for release notes, open bug reports in [Issues](https://github.com/fmind/cli/issues), and report vulnerabilities via the [Security policy](https://github.com/fmind/cli/security/policy).
183
+
184
+ ## License
185
+
186
+ [MIT](https://github.com/fmind/cli/blob/main/LICENSE), © 2026 Médéric Hurier (Fmind).
fmind-3.0.3/README.md ADDED
@@ -0,0 +1,158 @@
1
+ # fmind
2
+
3
+ Read [Médéric Hurier's (Fmind)](https://www.fmind.dev/) portfolio and daily tech news from the terminal, or bridge its `/mcp` server over stdio.
4
+
5
+ [![CI](https://github.com/fmind/cli/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fmind/cli/actions/workflows/ci.yml) [![PyPI](https://img.shields.io/pypi/v/fmind?color=174EA6)](https://pypi.org/project/fmind/) [![Python](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Ffmind%2Fcli%2Fmain%2Fpyproject.toml)](https://pypi.org/project/fmind/) [![License: MIT](https://img.shields.io/badge/license-MIT-174EA6)](https://github.com/fmind/cli/blob/main/LICENSE)
6
+
7
+ <a href="https://raw.githubusercontent.com/fmind/cli/main/docs/assets/overview.svg">
8
+ <img
9
+ src="https://raw.githubusercontent.com/fmind/cli/main/docs/assets/overview.svg"
10
+ alt="fmind overview: live endpoints on www.fmind.dev (/api/profile, /api/news, /articles/<slug>.md, and /mcp) flow through the stateless fmind CLI (15s deadline, 8 MiB limit, zero local cache) to Rich terminal cards, --json / --raw shell pipelines, and MCP over stdio."
11
+ width="960"
12
+ >
13
+ </a>
14
+
15
+ ## Install
16
+
17
+ Requires Python 3.14+ and HTTPS access to `www.fmind.dev`. Run immediately with [uv](https://docs.astral.sh/uv/) (which provisions Python 3.14+ automatically), or install persistently:
18
+
19
+ ```bash
20
+ uvx fmind
21
+ ```
22
+
23
+ ```text
24
+ Name Médéric Hurier (Fmind)
25
+ Role Freelance AI Architect
26
+ Headline Freelance AI Architect • AI Agents, MLOps & Security
27
+ …
28
+ Contact contact@fmind.dev
29
+ Website https://www.fmind.dev
30
+ …
31
+
32
+ fmind --help lists every command.
33
+ ```
34
+
35
+ ```bash
36
+ uv tool install fmind # portfolio and news commands
37
+ uv tool install 'fmind[mcp]' # include the stdio MCP bridge
38
+ pipx install fmind # alternative (requires a local Python 3.14+ interpreter)
39
+ ```
40
+
41
+ ## Commands
42
+
43
+ | Command | Shows |
44
+ | ----------------------------------------------------- | --------------------------------------------------------- |
45
+ | `fmind` | The `whoami` card and a pointer to `--help` |
46
+ | `fmind whoami` | Name, headline, location, experience, availability, links |
47
+ | `fmind about` | The biography |
48
+ | `fmind skills` | Core expertise, as published on the site |
49
+ | `fmind experiences` | Engagements in website order |
50
+ | `fmind certifications` | Certifications, the PhD, specializations |
51
+ | `fmind community` | Ambassador and advisory roles |
52
+ | `fmind papers` | The doctorate and the peer-reviewed papers, with code |
53
+ | `fmind projects [--limit <n>]` | Open-source projects and video series, with code |
54
+ | `fmind sites` | Interactive tools published alongside the writing |
55
+ | `fmind articles [--limit <n>]` | The most recent writing |
56
+ | `fmind search [query...] [--tag <tag>] [--limit <n>]` | Articles matching every term, newest first |
57
+ | `fmind read <slug> [--raw]` | One article, rendered in the terminal |
58
+ | `fmind tags` | The article tags, with counts and `search --tag` hints |
59
+ | `fmind news [query...] [--limit <n>]` | Daily curated links, newest edition first |
60
+ | `fmind hire` | What can be booked right now |
61
+ | `fmind mcp` | Stdio MCP bridge to `www.fmind.dev/mcp` (`fmind[mcp]`) |
62
+
63
+ Commands mirror the website's `/api/profile` and `/api/news` sections and stay stable across visual redesigns.
64
+
65
+ - `--limit` (`1`–`200`) bounds `articles` (`6`), `search` (`10`), `news` editions (`1`, or `10` with terms), and each `projects` list (`6`).
66
+ - `--json` works on bare `fmind` and before or after every command except `mcp` (`fmind --json experiences` or `fmind experiences --json`). It takes precedence over `read --raw` and stores the source in `markdown`.
67
+ - Global `--color` / `--no-color` (auto-detected, respecting `NO_COLOR` and redirects) and `--version` go before the command; `-h` / `--help` works on `fmind` and every subcommand.
68
+
69
+ ### Reading
70
+
71
+ `fmind search` ANDs terms case-insensitively across titles, summaries, tags, and slugs. `--tag` restricts to a published site tag (unknown tags fail and list valid ones).
72
+
73
+ ```bash
74
+ fmind search agent security
75
+ fmind search --tag MLOps --limit 3
76
+ ```
77
+
78
+ `fmind read` accepts an exact or unambiguous partial slug and pages long output via `$PAGER` (`less` by default; set `PAGER=cat` to print directly). Pass `--raw` for the Markdown source.
79
+
80
+ ```bash
81
+ slug="$(fmind articles --limit 1 --json | jq -r '.[0].slug')"
82
+ fmind read "$slug"
83
+ fmind read "$slug" --raw | glow -
84
+ ```
85
+
86
+ ### News
87
+
88
+ `fmind news` shows the latest daily edition of curated AI agent, Python, security, and cloud links. Terms AND-match link titles, domains, summaries, URLs, and edition dates or topics (`2026-11-06`, `2026-11`); `--limit` defaults to `1` (`10` when searching).
89
+
90
+ ```bash
91
+ fmind news # latest edition
92
+ fmind news --limit 7 # past week
93
+ fmind news agent security # matching links, newest edition first
94
+ fmind news 2026-11-06 # one edition
95
+ ```
96
+
97
+ ### Piping
98
+
99
+ `--json` writes undecorated JSON to stdout and errors to stderr:
100
+
101
+ ```bash
102
+ fmind articles --limit 20 --json | jq -r '.[] | "\(.date[:10]) \(.title)"'
103
+ fmind certifications --json | jq -r '.certifications[] | select(.active) | .title'
104
+ fmind news --limit 7 --json | jq -r '.[].items[] | "\(.domain) \(.title)"'
105
+ ```
106
+
107
+ Grouped JSON schemas:
108
+
109
+ - `whoami --json`: `metadata`, `experience` (featured engagement, or `[]`), and `services`.
110
+ - `certifications --json`: `certifications`, `thesis`, and `specializations`.
111
+ - `papers --json`: `thesis` and `papers`.
112
+ - `projects --json`: `open_source` and `youtube_series` (each bounded by `--limit`).
113
+ - `news --json`: editions, keeping only matching `items` when searching.
114
+ - `read <slug> --json`: article index fields plus `slug` and `markdown`.
115
+
116
+ ## MCP over stdio
117
+
118
+ Portfolio commands require only Typer and Rich; the optional `mcp` extra adds the [official MCP Python SDK](https://py.sdk.modelcontextprotocol.io/):
119
+
120
+ ```json
121
+ {
122
+ "mcpServers": {
123
+ "fmind": {
124
+ "command": "uvx",
125
+ "args": ["--from", "fmind[mcp]", "fmind", "mcp"]
126
+ }
127
+ }
128
+ }
129
+ ```
130
+
131
+ - Bridges `https://www.fmind.dev/mcp` (or the `FMIND_PROFILE_URL` origin) over protocol-only stdio with no local caching (`--json` is rejected; startup errors go to stderr).
132
+ - Forwards read-only tools, resources, and prompts (no subscriptions, sampling, or elicitation).
133
+ - Enforces a 15s deadline and 8 MiB response cap per call, isolating individual failures without stopping the bridge.
134
+
135
+ ## Development
136
+
137
+ ```bash
138
+ mise install && mise run install # toolchain, locked venv, and git hooks
139
+ mise run all # check, test, build (non-mutating CI gate)
140
+ mise run format # format Python, JSON, Markdown, TOML, YAML
141
+ mise run smoke # live API/article and MCP compatibility check
142
+ ```
143
+
144
+ Override `FMIND_PROFILE_URL` to point profile, news, article reads, and `/mcp` at another origin (such as a local dev server):
145
+
146
+ ```bash
147
+ FMIND_PROFILE_URL=http://127.0.0.1:8080/api/profile fmind whoami
148
+ ```
149
+
150
+ Run `mise tasks` for individual checks, and see [AGENTS.md](https://github.com/fmind/cli/blob/main/AGENTS.md) for invariants and release details.
151
+
152
+ ## Support & Security
153
+
154
+ See the [Changelog](https://github.com/fmind/cli/blob/main/CHANGELOG.md) for release notes, open bug reports in [Issues](https://github.com/fmind/cli/issues), and report vulnerabilities via the [Security policy](https://github.com/fmind/cli/security/policy).
155
+
156
+ ## License
157
+
158
+ [MIT](https://github.com/fmind/cli/blob/main/LICENSE), © 2026 Médéric Hurier (Fmind).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fmind"
3
- version = "3.0.1"
3
+ version = "3.0.3"
4
4
  description = "Read Médéric Hurier's (Fmind) portfolio and daily news from the terminal."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -50,30 +50,38 @@ mcp = [
50
50
 
51
51
  [dependency-groups]
52
52
  dev = [
53
- "pytest>=8.3",
54
- "pytest-cov>=6.0",
55
- "ruff>=0.9",
56
- "ty>=0.0.101,<0.1",
53
+ "deptry>=0.25.1",
54
+ "markdown-it-py>=4.0",
55
+ "pytest>=9.2.0",
56
+ "pytest-cov>=7.1.0",
57
+ "pytest-socket>=0.8.1",
58
+ "pytest-timeout>=2.4.0",
59
+ "ruff>=0.17.5",
60
+ "ty>=0.0.107,<0.1",
61
+ "validate-pyproject>=0.27",
57
62
  ]
58
63
 
59
64
  [build-system]
60
- requires = ["uv_build>=0.13.0,<0.14"]
65
+ requires = ["uv_build>=0.13.9,<0.14"]
61
66
  build-backend = "uv_build"
62
67
 
63
- [tool.uv.build-backend]
64
- module-name = "fmind"
65
- module-root = "src"
66
-
67
68
  [tool.ruff]
68
69
  line-length = 120
69
70
  extend-exclude = ["*.md"]
70
71
 
72
+ [tool.ruff.format]
73
+ docstring-code-format = true
74
+ line-ending = "lf"
75
+
71
76
  [tool.ruff.lint]
72
77
  select = [
73
78
  "A",
79
+ "ARG",
74
80
  "ASYNC",
75
81
  "B",
82
+ "BLE",
76
83
  "C4",
84
+ "DTZ",
77
85
  "E",
78
86
  "ERA",
79
87
  "F",
@@ -85,6 +93,8 @@ select = [
85
93
  "PERF",
86
94
  "PGH",
87
95
  "PIE",
96
+ "PLE",
97
+ "PLW",
88
98
  "PT",
89
99
  "PTH",
90
100
  "Q",
@@ -118,21 +128,33 @@ banned-module-level-imports = [
118
128
  "TID253",
119
129
  ]
120
130
 
121
- [tool.ruff.format]
122
- docstring-code-format = true
123
- line-ending = "lf"
131
+ [tool.deptry]
132
+ known_first_party = ["fmind"]
124
133
 
125
134
  [tool.ty.rules]
126
135
  blanket-ignore-comment = "error"
136
+ unused-ignore-comment = "error"
137
+ unused-type-ignore-comment = "error"
127
138
 
128
- [tool.pytest.ini_options]
129
- addopts = "-ra --strict-config --strict-markers --cov=fmind --cov-branch --cov-fail-under=85"
139
+ [tool.pytest]
130
140
  testpaths = ["tests"]
141
+ addopts = [
142
+ "-ra",
143
+ "--allow-hosts=127.0.0.1,::1",
144
+ "--allow-unix-socket",
145
+ ]
131
146
  filterwarnings = ["error"]
132
- xfail_strict = true
147
+ strict = true
148
+ timeout = "60"
149
+
150
+ [tool.coverage.run]
151
+ branch = true
152
+ patch = ["subprocess"]
153
+ source = ["fmind"]
133
154
 
134
155
  [tool.coverage.report]
135
- exclude_also = [
136
- "if __name__ == .__main__.:",
137
- "raise NotImplementedError",
138
- ]
156
+ fail_under = 85
157
+ show_missing = true
158
+ skip_covered = true
159
+ skip_empty = true
160
+ exclude_also = ["if __name__ == .__main__.:"]
@@ -1,7 +1,7 @@
1
1
  # Docs: https://packaging.python.org/en/latest/specifications/pyproject-toml/
2
2
  [project]
3
3
  name = "fmind"
4
- version = "3.0.1"
4
+ version = "3.0.3"
5
5
  description = "Read Médéric Hurier's (Fmind) portfolio and daily news from the terminal."
6
6
  readme = "README.md"
7
7
  license = "MIT"
@@ -38,29 +38,38 @@ mcp = [
38
38
 
39
39
  [dependency-groups]
40
40
  dev = [
41
- "pytest>=8.3",
42
- "pytest-cov>=6.0",
43
- "ruff>=0.9",
44
- "ty>=0.0.101,<0.1",
41
+ "deptry>=0.25.1",
42
+ "markdown-it-py>=4.0",
43
+ "pytest>=9.2.0",
44
+ "pytest-cov>=7.1.0",
45
+ "pytest-socket>=0.8.1",
46
+ "pytest-timeout>=2.4.0",
47
+ "ruff>=0.17.5",
48
+ "ty>=0.0.107,<0.1",
49
+ "validate-pyproject>=0.27",
45
50
  ]
46
51
 
47
52
  [build-system]
48
- requires = ["uv_build>=0.13.0,<0.14"]
53
+ requires = ["uv_build>=0.13.9,<0.14"]
49
54
  build-backend = "uv_build"
50
55
 
51
- [tool.uv.build-backend]
52
- module-name = "fmind"
53
- module-root = "src"
54
-
55
56
  [tool.ruff]
56
57
  line-length = 120
57
- extend-exclude = ["*.md"]
58
+ extend-exclude = ["*.md"] # dprint owns Markdown, including its Python blocks
59
+
60
+ [tool.ruff.format]
61
+ docstring-code-format = true
62
+ line-ending = "lf"
63
+
58
64
  [tool.ruff.lint]
59
65
  select = [
60
66
  "A",
67
+ "ARG",
61
68
  "ASYNC",
62
69
  "B",
70
+ "BLE",
63
71
  "C4",
72
+ "DTZ",
64
73
  "E",
65
74
  "ERA",
66
75
  "F",
@@ -72,6 +81,8 @@ select = [
72
81
  "PERF",
73
82
  "PGH",
74
83
  "PIE",
84
+ "PLE",
85
+ "PLW",
75
86
  "PT",
76
87
  "PTH",
77
88
  "Q",
@@ -87,24 +98,39 @@ select = [
87
98
  "UP",
88
99
  "W",
89
100
  ]
101
+
90
102
  [tool.ruff.lint.flake8-tidy-imports]
91
103
  # Portfolio commands run without the optional `mcp` extra; only the bridge loads it.
92
104
  banned-module-level-imports = ["fmind.mcp", "httpx2", "mcp", "mcp_types"]
105
+
93
106
  [tool.ruff.lint.per-file-ignores]
94
107
  "src/fmind/mcp.py" = ["TID253"] # the bridge is the extra's only importer
95
108
  "tests/**" = ["S101", "SLF001", "T201", "TID253"] # tests assert, inspect layer internals, and install every extra
96
- [tool.ruff.format]
97
- docstring-code-format = true
98
- line-ending = "lf"
109
+
110
+ [tool.deptry]
111
+ known_first_party = ["fmind"]
99
112
 
100
113
  [tool.ty.rules]
101
114
  blanket-ignore-comment = "error"
115
+ unused-ignore-comment = "error"
116
+ unused-type-ignore-comment = "error"
102
117
 
103
- [tool.pytest.ini_options]
104
- addopts = "-ra --strict-config --strict-markers --cov=fmind --cov-branch --cov-fail-under=85"
118
+ [tool.pytest]
105
119
  testpaths = ["tests"]
120
+ # Offline by default: tests reach only loopback and Unix sockets.
121
+ addopts = ["-ra", "--allow-hosts=127.0.0.1,::1", "--allow-unix-socket"]
106
122
  filterwarnings = ["error"]
107
- xfail_strict = true
123
+ strict = true
124
+ timeout = "60"
125
+
126
+ [tool.coverage.run]
127
+ branch = true
128
+ patch = ["subprocess"]
129
+ source = ["fmind"]
108
130
 
109
131
  [tool.coverage.report]
110
- exclude_also = ["if __name__ == .__main__.:", "raise NotImplementedError"]
132
+ fail_under = 85
133
+ show_missing = true
134
+ skip_covered = true
135
+ skip_empty = true
136
+ exclude_also = ["if __name__ == .__main__.:"]
@@ -0,0 +1,24 @@
1
+ """Read Médéric Hurier's (Fmind) portfolio and daily news from the terminal.
2
+
3
+ Every command renders live documents published by https://www.fmind.dev, so this
4
+ package carries no copy of its own and needs no release when the content changes.
5
+ """
6
+
7
+ from typing import TYPE_CHECKING
8
+
9
+ __all__ = ["__version__"]
10
+
11
+ if TYPE_CHECKING:
12
+ __version__: str
13
+
14
+
15
+ def __getattr__(name: str) -> str:
16
+ """Resolve package version lazily so importing `fmind` skips `importlib.metadata`."""
17
+ if name == "__version__":
18
+ from importlib.metadata import version
19
+
20
+ value = version("fmind")
21
+ globals()["__version__"] = value
22
+ return value
23
+ msg = f"module {__name__!r} has no attribute {name!r}"
24
+ raise AttributeError(msg)