Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
cache-python: true
activate-environment: true
enable-cache: true

- name: Doxygen Action
uses: mattnotmitt/doxygen-action@1.12.0
with:
working-directory: "doc/"

- name: Synchronize the virtual environment
run: uv sync --managed-python --no-dev --group doc

- name: Build Sphinx documentation
run: |
pip install -r doc/requirements.txt
sphinx-build doc/source/ ./doc/build/html/
uv run sphinx-build doc/source/ ./doc/build/html/

- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@v5
with:
path: doc/build/html/

Expand Down
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
<AssemblyProduct>Python.NET</AssemblyProduct>
<LangVersion>12.0</LangVersion>
<IsPackable>false</IsPackable>
<DeterministicSourcePaths>true</DeterministicSourcePaths>
<FullVersion>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)version.txt").Trim())</FullVersion>
<VersionPrefix>$(FullVersion.Split('-', 2)[0])</VersionPrefix>
<VersionSuffix Condition="$(FullVersion.Contains('-'))">$(FullVersion.Split('-', 2)[1])</VersionSuffix>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.*" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="5.*">
Expand Down
20 changes: 0 additions & 20 deletions doc/Makefile

This file was deleted.

35 changes: 0 additions & 35 deletions doc/make.bat

This file was deleted.

12 changes: 0 additions & 12 deletions doc/requirements.txt

This file was deleted.

7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ dev = [
"numpy >=2 ; python_version >= '3.10'",
"numpy <2 ; python_version < '3.10'",
]
doc = [
"sphinx",
"furo>=2025.12.19",
"pygments>=2.20",
"breathe",
"sphinx-csharp @ git+https://github.com/rogerbarton/sphinx-csharp.git",
]

[[project.authors]]
name = "The Contributors of the Python.NET Project"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,8 @@ def test_getting_overloaded_method_binding_does_not_leak_memory(memory_usage_tra
bytesAllocatedPerIteration = pow(2, 20) # 1MB
bytesLeakedPerIteration = processBytesDelta / iterations

# Allow 50% threshold - this shows the original issue is fixed, which leaks the full allocated bytes per iteration
failThresholdBytesLeakedPerIteration = bytesAllocatedPerIteration / 2
# Allow 90% threshold - this shows the original issue is fixed, which leaks the full allocated bytes per iteration
failThresholdBytesLeakedPerIteration = bytesAllocatedPerIteration * 0.9

assert bytesLeakedPerIteration < failThresholdBytesLeakedPerIteration

Expand Down
573 changes: 571 additions & 2 deletions uv.lock

Large diffs are not rendered by default.

Loading