-
-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NEWS.md confuses automated tooling #3918
Comments
eh, I think actually parsing all the potential changelogs and using some basic rules to choose the best one is a more robust way to go in general. I tweaked my using PackageAnalyzer: find_package, obtain_code
using Changelog # branch: eph/find_changelog
using Changelog: find_changelog, tryparsefile, find_version
function changelog(pkg, version=nothing)
code_dir = obtain_code(find_package(pkg))[1]
nt = find_changelog(code_dir)
nt === nothing && error("Could not find changelog for $pkg in $code_dir")
(; path, changelog) = nt
if version !== nothing
v = find_version(changelog, version)
v === nothing && return error("Could not find version $version in changelog at $path")
return v
end
return changelog
end
changelog("JuMP", v"1") yielding julia> changelog("JuMP", v"1")
Changelog.VersionInfo with
- version: 1.0.0
- date: 2022-03-24
- changes
- Read more about this release, along with an acknowledgement of all the contributors in our JuMP 1.0.0 is released blog post.
- Breaking
- The previously deprecated functions (v0.23.0, v0.23.1) have been removed.Deprecation was to improve consistency of function names:`num_nl_constraints` (see `num_nonlinear_constraints`)`all_nl_constraints` (see `all_nonlinear_constraints`)`add_NL_expression` (see `add_nonlinear_expression`)`set_NL_objective` (see `set_nonlinear_objective`)`add_NL_constraint` (see `add_nonlinear_constraint`)`nl_expr_string` (see `nonlinear_expr_string`)`nl_constraint_string` (see `nonlinear_constraint_string`)`SymMatrixSpace` (see `SymmetricMatrixSpace`)
- The unintentionally exported variable `JuMP.op_hint` has been renamed to theunexported `JuMP._OP_HINT`
- Fixed
- Fixed a bug writing .nl files
- Fixed a bug broadcasting `SparseAxisArray`s |
I'm open to just removing our |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been working on changelog parsing in https://github.com/JuliaDocs/Changelog.jl, in order to make changelogs more accessible to Julia users and tooling, e.g. perhaps a pkg repl mode for
pkg> changelog JuMP
, or for RegistryCI to be able to read changelogs so that for breaking releases it can fulfill the release notes check by checking a changelog if present.However, having a toplevel NEWS.md that is essentially a manual redirect makes it hard to automatically find the changelog automatically. In JuliaDocs/Changelog.jl#13 I check a bunch of top-level filenames in the package, and I could also search
docs/src
to finddocs/src/changelog.md
, but to figure out which one to prefer would need some heuristics - naively, I would check top-level first, then if I don't find anything, checkdocs/src
, but that would give the wrong answer here. I could do a more sophisticated check by finding which file is longer or which has more parsable versions or something, but it seems a little complicated (albeit doable). I think that is an option but it might be simpler if JuMP's NEWS.md simply symlinked todocs/src/changelog.md
or something like that?The text was updated successfully, but these errors were encountered: