From d0408a591f7e8634f2857eff7eb442a913f60b52 Mon Sep 17 00:00:00 2001 From: Qingyu Qu <2283984853@qq.com> Date: Sun, 6 Apr 2025 03:52:43 +0800 Subject: [PATCH 1/2] Add contributing manual --- CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..2facfd348 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,36 @@ + - This repository follows the [SciMLStyle](https://github.com/SciML/SciMLStyle) and the SciML [ColPrac](https://github.com/SciML/ColPrac). + - Please run `using JuliaFormatter, NonlinearSolve; format(joinpath(dirname(pathof(NonlinearSolve)), ".."))` before committing. + - Add tests for any new features. + - Additional help on contributing to the numerical solvers can be found at https://docs.sciml.ai/NonlinearSolve/stable/ + +## Developing Locally + +NonlinearSolve is a large package and thus it uses a sublibrary approach to keep down +the total number of dependencies per solver. As a consequence, it requires a bit of special +handling compared to some other Julia packages. + +When running the subpackage test suite, it's recommended that one has dev'd its relevant packages in NonlinearSolve.jl. This can be done via(use `NonlinearSolveFirstOrder` as example): + +```julia +using Pkg +dev_pks = Pkg.PackageSpec[] +for path in ("lib/SciMLJacobianOperators", "lib/NonlinearSolveBase") + push!(dev_pks, Pkg.PackageSpec(; path)) +end +Pkg.develop(dev_pks) +``` + +When running the full test suite, it's +recommended that one has dev'd all of the relevant packages. This can be done via: + +```julia +using Pkg +Pkg.develop(map( + path -> Pkg.PackageSpec.(; path = "$(@__DIR__)/lib/$(path)"), readdir("./lib"))); +``` + +and then running tests accordingly. + +## Dependency Structure + +There is a tree dependency structure to the sublibraries of NonlinearSolve.jl. The core package is NonlinearSolveBase.jl, which is the hard dependcy of all the other subpackages. SimpleNonlinearSolve.jl is a special one which have BracketingNonlinearSolve.jl as dependency. NonlinearSolve.jl as the parent package contains all of the subpackages. From 9369458cb53596eacf7038be1da0d0a7627ae493 Mon Sep 17 00:00:00 2001 From: Qingyu Qu <2283984853@qq.com> Date: Sun, 6 Apr 2025 04:01:37 +0800 Subject: [PATCH 2/2] Spell check --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2facfd348..f4cf50b31 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,4 +33,4 @@ and then running tests accordingly. ## Dependency Structure -There is a tree dependency structure to the sublibraries of NonlinearSolve.jl. The core package is NonlinearSolveBase.jl, which is the hard dependcy of all the other subpackages. SimpleNonlinearSolve.jl is a special one which have BracketingNonlinearSolve.jl as dependency. NonlinearSolve.jl as the parent package contains all of the subpackages. +There is a tree dependency structure to the sublibraries of NonlinearSolve.jl. The core subpackage NonlinearSolveBase.jl is the hard dependency of all the other subpackages. SimpleNonlinearSolve.jl is a special one with BracketingNonlinearSolve.jl as dependency. NonlinearSolve.jl as the parent package contains all of the subpackages.