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
5 changes: 4 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ version = "10.0.0"
[deps]
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
SQLite = "0aa819cd-b072-5ca4-8fd4-e0e014ffd12d"
SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
LightXML = "9c8b4983-aa76-5018-a973-4c85ecc9e179"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[compat]
Expand All @@ -24,6 +26,7 @@ JSON3 = "1.14"
SQLite = "1.6"
DataFrames = "1.6"
LightXML = "0.9"
FFTW = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
2 changes: 2 additions & 0 deletions src/EconomicToolkit.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: MPL-2.0
include("julia/EconomicToolkit.jl")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a module-qualified include in the package entrypoint

When loading the package with using EconomicToolkit, Julia evaluates this entrypoint in Base.__toplevel__, a bare module without the single-argument include helper. Consequently, this shim raises UndefVarError: include not defined, preventing package loading and precompilation. The existing inner file defines the module, so delegate with Base.include(@__MODULE__, "julia/EconomicToolkit.jl") instead. This follows the loading context and include definitions in Julia 1.10's loader.

Useful? React with 👍 / 👎.

3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: MPL-2.0
include(joinpath(@__DIR__, "..", "tests", "julia", "runtests.jl"))
include(joinpath(@__DIR__, "..", "tests", "julia", "test_client.jl"))
Comment on lines +2 to +3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Isolate the legacy and package-client test namespaces

Including both suites in the same module contaminates the client tests: tests/julia/runtests.jl first includes standalone formula implementations that define elasticity, gdp_growth, and other functions in the current namespace. The subsequent using EconomicToolkit in test_client.jl cannot replace those bindings, so its unqualified calls resolve to the legacy implementations. For example, the client test's elasticity(...; method="point") reaches the legacy method requiring a Symbol, and its one-argument gdp_growth(gdp) has no matching legacy method. Run the suites in separate modules or qualify the client calls so the new Pkg.test() entrypoint actually tests the package API without these failures.

Useful? React with 👍 / 👎.

Loading