Skip to content
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

Share manifests #740

Merged
merged 12 commits into from
Nov 9, 2023
Merged
8 changes: 7 additions & 1 deletion .github/workflows/core_compat_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ jobs:
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main(; subdirs=["core"])
CompatHelper.main(; subdirs=[
"core",
"docs",
"build/create_binaries",
"build/libribasim",
"build/ribasim_cli"
])
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"[julia]": {
"editor.formatOnSave": true
},
"julia.environmentPath": "core",
"notebook.formatOnSave.enabled": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
Expand Down
226 changes: 164 additions & 62 deletions core/Manifest.toml → Manifest.toml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name = "root"
authors = ["Deltares and contributors <[email protected]>"]
description = "Meta-project used to share the Manifest of Ribasim and its dependents"

[deps]
Ribasim = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635"
create_binaries = "3cfb6a46-05f0-43df-bb16-bf763deb14b4"
docs = "8daea9ca-fc6c-4731-aa85-717fa0b706bc"
libribasim = "f319f290-633d-4573-adfe-d6d5548b6388"
ribasim_cli = "e45c999e-e944-4589-a8e6-7d0b7a60140a"
225 changes: 0 additions & 225 deletions build/create_binaries/Manifest.toml

This file was deleted.

7 changes: 7 additions & 0 deletions build/create_binaries/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
name = "create_binaries"
uuid = "3cfb6a46-05f0-43df-bb16-bf763deb14b4"
authors = ["Deltares and contributors <[email protected]>"]
description = "Build Ribasim binaries with PackageCompiler"
manifest = "../../Manifest.toml"
version = "0.1.0"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
Expand Down
4 changes: 2 additions & 2 deletions build/create_binaries/add_metadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function add_metadata(project_dir, license_file, output_dir, git_repo)
)
# the Manifest.toml always gives the exact version of Ribasim that was built
cp(
normpath(project_dir, "Manifest.toml"),
normpath(git_repo, "Manifest.toml"),
normpath(output_dir, "share/julia/Manifest.toml");
force = true,
)
Expand All @@ -35,7 +35,7 @@ function add_metadata(project_dir, license_file, output_dir, git_repo)
open(normpath(output_dir, "README.md"), "a") do io
# since the exact Ribasim version may be hard to find in the Manifest.toml file
# we can also extract that information, and add it to the README.md
manifest = TOML.parsefile(normpath(project_dir, "Manifest.toml"))
manifest = TOML.parsefile(normpath(git_repo, "Manifest.toml"))
if !haskey(manifest, "manifest_format")
error("Manifest.toml is in the old format, run Pkg.upgrade_manifest()")
end
Expand Down
4 changes: 4 additions & 0 deletions build/create_binaries/src/create_binaries.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
__precompile__(false)

# This is not really a package, but needs to be set up like one so we can run
# `dev build/create_binaries` from the root project.
Loading