JuliaHomotopyContinuation / HomotopyContinuation.jl

A Julia package for solving systems of polynomials via homotopy continuation.
https://www.JuliaHomotopyContinuation.org
MIT License
186 stars 31 forks source link

Add doctests #357

Closed jonas-schulze closed 4 years ago

jonas-schulze commented 4 years ago

I tried to make the docstring of @var a doctest (which is fine as it is), but even using

```jldoctest ; setup = :(using .ModelKit)

it keeps failing:

...
│ Subexpression:
│
│ @var a b x[1:2] y[1:2,1:3]
│
| Evaluated output:
│
│ (a, b, HomotopyContinuation.ModelKit.Variable[x₁, x₂], ...
│
│ Expected output:
│
│ (a, b, Variable[x₁, x₂], ...
...

As the docstring is correct and very simple, I'll stop trying.

I won't even try for @unique_var due to the randomized names.

jonas-schulze commented 4 years ago

I added some non-doctest related commits lately. I can split this PR, if you like. 🙂

saschatimme commented 4 years ago

The CI is currently broken, so I would need to fix this first before the doctests actually have a benefit

saschatimme commented 4 years ago

But in general I like the idea of having more / any doctests very much :)

jonas-schulze commented 4 years ago

Given I haven't had time to work on this for quite some time, I think this is good to go.

saschatimme commented 4 years ago

I will try to get to this the next couple days, but its already very much appreciated :)