From 68add6cbad87d6421c520f8786374d07ffecc37f Mon Sep 17 00:00:00 2001 From: Michael Young Date: Thu, 19 Sep 2024 13:22:41 +0100 Subject: [PATCH] Fix Autodoc ordering, removing InstallPackageFrom* --- doc/intro.autodoc | 1 - gap/PackageManager.gd | 41 ++++++++++++++++++++--------------------- gap/archive.gd | 7 ------- gap/compile.gd | 3 +-- gap/distro.gd | 19 +++---------------- gap/git.gd | 16 ---------------- gap/packageinfo.gd | 8 -------- 7 files changed, 24 insertions(+), 71 deletions(-) diff --git a/doc/intro.autodoc b/doc/intro.autodoc index f80af36..beb2700 100644 --- a/doc/intro.autodoc +++ b/doc/intro.autodoc @@ -52,4 +52,3 @@ InstallPackage("https://github.com/gap-packages/curlInterface.git"); @EndExample @Chapter Commands -@Chapter Compilation diff --git a/gap/PackageManager.gd b/gap/PackageManager.gd index 4c7e7ac..7244cf0 100644 --- a/gap/PackageManager.gd +++ b/gap/PackageManager.gd @@ -4,8 +4,7 @@ # Declarations # #! @Chapter Commands - -#! @Section Installing and updating packages +#! @Section Main commands #! @Description #! Attempts to download and install a package. The argument string @@ -105,25 +104,6 @@ DeclareGlobalFunction("InstallPackage"); #! true or false DeclareGlobalFunction("UpdatePackage"); -#! @Description -#! Info class for the PackageManager package. Set this to -#! the following levels for different levels of information: -#! * 0 - No messages -#! * 1 - Problems only: messages describing what went wrong, with no -#! messages if an operation is successful -#! * 2 - Directories and versions: also displays informations about package -#! versions and installation directories -#! * 3 - Progress: also shows step-by-step progress of operations -#! * 4 - All: includes extra information such as whether curlInterface is -#! being used, and package info validation -#! -#! Set this using, for example `SetInfoLevel(InfoPackageManager, 1)`. -#! Default value is 3. -DeclareInfoClass("InfoPackageManager"); -SetInfoLevel(InfoPackageManager, 3); - -#! @Section Removing packages - #! @Description #! Attempts to remove an installed package using its name. The first argument #! name should be a string specifying the name of a package installed @@ -147,6 +127,25 @@ SetInfoLevel(InfoPackageManager, 3); #! true or false DeclareGlobalFunction("RemovePackage"); +#! @Section Info warnings + +#! @Description +#! Info class for the PackageManager package. Set this to +#! the following levels for different levels of information: +#! * 0 - No messages +#! * 1 - Problems only: messages describing what went wrong, with no +#! messages if an operation is successful +#! * 2 - Directories and versions: also displays informations about package +#! versions and installation directories +#! * 3 - Progress: also shows step-by-step progress of operations +#! * 4 - All: includes extra information such as whether curlInterface is +#! being used, and package info validation +#! +#! Set this using, for example `SetInfoLevel(InfoPackageManager, 1)`. +#! Default value is 3. +DeclareInfoClass("InfoPackageManager"); +SetInfoLevel(InfoPackageManager, 3); + DeclareGlobalFunction("PKGMAN_CheckPackage"); DeclareGlobalFunction("PKGMAN_Exec"); DeclareGlobalFunction("PKGMAN_InfoWithIndent"); diff --git a/gap/archive.gd b/gap/archive.gd index 045a253..10757ab 100644 --- a/gap/archive.gd +++ b/gap/archive.gd @@ -1,10 +1,3 @@ -#! @Description -#! Attempts to download and install a package from an archive located at the -#! given URL. Returns true if the installation was successful, and -#! false otherwise. -#! @Arguments url -#! @Returns -#! true or false DeclareGlobalFunction("InstallPackageFromArchive"); DeclareGlobalFunction("PKGMAN_TarTopDirectory"); diff --git a/gap/compile.gd b/gap/compile.gd index 84cb633..6e86f17 100644 --- a/gap/compile.gd +++ b/gap/compile.gd @@ -1,5 +1,4 @@ -#! @Chapter Compilation - +#! @Chapter Commands #! @Section Manual compilation #! @Description diff --git a/gap/distro.gd b/gap/distro.gd index 98b8041..ba2894a 100644 --- a/gap/distro.gd +++ b/gap/distro.gd @@ -5,22 +5,8 @@ # automatically installing dependencies. # -#! @Description -#! Attempts to download and install a package given only its name. Returns -#! false if something went wrong, and true otherwise. -#! -#! Certain decisions, such as installing newer versions of packages, will be -#! confirmed by the user via an interactive shell – to avoid this -#! interactivity and use sane defaults instead, the optional argument -#! interactive can be set to false. -#! -#! A required version can also be specified using the optional argument -#! version. It works as described in the -#! function. -#! @Arguments name[, version][, interactive] -#! @Returns -#! true or false -DeclareGlobalFunction("InstallPackageFromName"); +#! @Chapter Commands +#! @Section Main commands #! @Description #! Attempts to download and install the latest versions of all packages @@ -40,6 +26,7 @@ DeclareGlobalFunction("InstallPackageFromName"); #! true or false DeclareGlobalFunction("InstallRequiredPackages"); +DeclareGlobalFunction("InstallPackageFromName"); DeclareGlobalFunction("GetPackageURLs"); DeclareGlobalFunction("PKGMAN_InstallDependencies"); diff --git a/gap/git.gd b/gap/git.gd index aa9b94a..65de3c5 100644 --- a/gap/git.gd +++ b/gap/git.gd @@ -1,19 +1,3 @@ -#! @Description -#! Attempts to download and install a package from a git repository located at -#! the given URL. Returns false if something went wrong, and -#! true otherwise. -#! -#! If the optional string argument branch is specified, this function -#! will install the branch with this name. Otherwise, the repository's -#! default branch will be used. -#! -#! Certain decisions, such as installing newer versions of packages, will be -#! confirmed by the user via an interactive shell – to avoid this -#! interactivity and use sane defaults instead, the optional second argument -#! interactive can be set to false. -#! @Arguments url[, interactive][, branch] -#! @Returns -#! true or false DeclareGlobalFunction("InstallPackageFromGit"); DeclareGlobalFunction("PKGMAN_NameOfGitRepo"); diff --git a/gap/packageinfo.gd b/gap/packageinfo.gd index 7b20bb3..f579a15 100644 --- a/gap/packageinfo.gd +++ b/gap/packageinfo.gd @@ -1,11 +1,3 @@ -#! @Description -#! Attempts to download and install a package from a valid `PackageInfo.g` -#! file. The argument info should be either a valid package info -#! record, or a URL that points to a valid `PackageInfo.g` file. Returns -#! true if the installation was successful, and false otherwise. -#! @Arguments info -#! @Returns -#! true or false DeclareGlobalFunction("InstallPackageFromInfo"); DeclareGlobalFunction("PKGMAN_GetPackageInfo");