SciML / SciML/StructuralIdentifiability.jl

QA: make implicit imports explicit (ExplicitImports check_no_implicit_imports)

Open
#527 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
129
Forks
23
Avg merge
9h 35m
Merged PRs (30d)
17

Description

The QA group now runs ExplicitImports.jl's six checks via SciMLTesting.run_qa(...; explicit_imports = true) (see #PR). Five of the six pass (after fixing stale explicit imports and owner-qualifying FieldElem/RingElem, plus per-check public-name ignore lists for non-public names from Base/AbstractAlgebra/Nemo/RationalFunctionFields/ParamPunPam/MacroTools/Random).

The remaining check, check_no_implicit_imports, currently fails: the module relies on ~71 implicit imports brought in by the broad using AbstractAlgebra / using Nemo / using DataStructures / using Groebner / using IterTools / etc. To keep the QA lane green without doing a large, risky one-shot refactor of a computer-algebra package, this check is marked ei_broken = (:no_implicit_imports,) in test/qa/qa.jl (records Broken, not Fail; auto-flags an Unexpected Pass once it is resolved).

This issue tracks making those names explicit (using AbstractAlgebra: coeff, degree, evaluate, ...) so the check can be moved out of ei_broken. The full current list (name → exporting module):

* `AbstractAlgebra` which is exported by `AbstractAlgebra`
* `Combinatorics` which is exported by `Combinatorics`
* `DataStructures` which is exported by `DataStructures`
* `OrderedDict` which is exported by `OrderedCollections`
* `Groebner` which is exported by `Groebner`
* `IterTools` which is exported by `IterTools`
* `cache` which is exported by `IterTools`
* `LinearAlgebra` which is exported by `LinearAlgebra`
* `Logging` which is exported by `Logging`
* `with_logger` which is exported by `Logging`
* `MacroTools` which is exported by `MacroTools`
* `@capture` which is exported by `MacroTools`
* `Nemo` which is exported by `Nemo`
* `AbsPowerSeriesRingElem` which is exported by `AbstractAlgebra`
* `FieldElem` which is exported by `AbstractAlgebra`
* `Generic` which is exported by `AbstractAlgebra`
* `MPolyBuildCtx` which is exported by `AbstractAlgebra.Generic`
* `MPolyRing` which is exported by `AbstractAlgebra`
* `MPolyRingElem` which is exported by `AbstractAlgebra`
* `MatElem` which is exported by `AbstractAlgebra`
* `QQFieldElem` which is exported by `Nemo`
* `QQMPolyRingElem` which is exported by `Nemo`
* `RingElem` which is exported by `AbstractAlgebra`
* `base_ring` which is exported by `AbstractAlgebra`
* `coeff` which is exported by `AbstractAlgebra`
* `coefficients` which is exported by `AbstractAlgebra`
* `degree` which is exported by `AbstractAlgebra`
* `derivative` which is exported by `AbstractAlgebra`
* `dim` which is exported by `AbstractAlgebra.Generic`
* `divexact` which is exported by `AbstractAlgebra`
* `divides` which is exported by `AbstractAlgebra`
* `elem_type` which is exported by `AbstractAlgebra`
* `evaluate` which is exported by `AbstractAlgebra`
* `exponent_vector` which is exported by `AbstractAlgebra`
* `exponent_vectors` which is exported by `AbstractAlgebra`
* `finish` which is exported by `AbstractAlgebra.Generic`
* `gen` which is exported by `AbstractAlgebra`
* `gens` which is exported by `AbstractAlgebra`
* `height_bits` which is exported by `Nemo`
* `leading_coefficient` which is exported by `AbstractAlgebra`
* `leading_monomial` which is exported by `AbstractAlgebra`
* `monomial` which is exported by `AbstractAlgebra.Generic`
* `ncols` which is exported by `AbstractAlgebra`
* `nrows` which is exported by `AbstractAlgebra`
* `poly` which is exported by `AbstractAlgebra.Generic`
* `polynomial_ring` which is exported by `AbstractAlgebra`
* `power_series_ring` which is exported by `AbstractAlgebra`
* `push_term!` which is exported by `AbstractAlgebra.Generic`
* `rank` which is exported by `LinearAlgebra`
* `set_precision!` which is exported by `AbstractAlgebra`
* `setcoeff!` which is exported by `AbstractAlgebra.Generic`
* `symbols` which is exported by `AbstractAlgebra`
* `terms` which is exported by `AbstractAlgebra`
* `total_degree` which is exported by `AbstractAlgebra.Generic`
* `var` which is exported by `AbstractAlgebra`
* `vars` which is exported by `AbstractAlgebra`
* `ParamPunPam` which is exported by `ParamPunPam`
* `PrecompileTools` which is exported by `PrecompileTools`
* `@setup_workload` which is exported by `PrecompileTools`
* `Primes` which is exported by `Primes`
* `Random` which is exported by `Random`
* `RationalFunctionFields` which is exported by `RationalFunctionFields`
* `RationalFunctionField` which is exported by `RationalFunctionFields`
* `check_algebraicity` which is exported by `RationalFunctionFields`
* `field_contains` which is exported by `RationalFunctionFields`
* `generators` which is exported by `RationalFunctionFields`
* `simplified_generating_set` which is exported by `RationalFunctionFields`
* `TimerOutputs` which is exported by `TimerOutputs`
* `@timeit` which is exported by `TimerOutputs`
* `disable_timer!` which is exported by `TimerOutputs`
* `enable_timer!` which is exported by `TimerOutputs`

Tracking issue opened as part of the SciML run_qa v1.6 ExplicitImports rollout.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/qa/qa.jl and the module imports covered by SciMLTesting.run_qa(...; explicit_imports = true). Compare the listed names with their exporting modules, make the imports explicit, and rerun the QA checks. Done means check_no_implicit_imports passes and no longer needs to be listed in ei_broken.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
testing-qa, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.