How to build binaries or packages
The build is a FAKE project in the ./build folder with the build.cmd and the build.sh run it with the target name as the first argument. Without a target it builds the whole solution.
Building
The Build target compiles every released tool listed in build/ProjectInfo.fs.
- For Windows
.\build.cmd build
- For Linux:
.\build.sh build
The Preprocessing project references packages from the CSBiology feed on GitHub Packages. nuget.config reads the credentials for that feed from the environment variables GithubUser and PackageToken. Set both before building the full solution, which includes that project. The released tools restore from nuget.org alone. To build a single tool, call dotnet on its project file:
dotnet build src/PeptideDB/PeptideDB.fsproj -c Release
Packing
The Pack target creates a NuGet package for every released project in pkg/. The version comes from the top entry of each project's RELEASE_NOTES.md that has a version, so bump that file first. A leading #### Unreleased section without a version collects changes until the next release and is skipped; replace it with the version and the date when you release: For Windows:
.\build.cmd pack
For Linux:
.\build.sh pack
PackPrerelease does the same with a suffix it asks for on the console. Every tool packs as a .NET tool with the package id ProteomIQon.<ToolName> and the command name proteomiqon-<toolname>. A package from pkg/ can be installed locally to try it out before publishing:
dotnet tool install --global ProteomIQon.PeptideDB --add-source ./pkg --version 0.0.10
Published versions are on Nuget.org
Tests
RunTests builds and runs tests/ProteomIQon.Tests.fsproj. The end to end pipeline tests start the tool assemblies, so this target needs the full build to succeed first: For Windows:
.\build.cmd runtests
For Linux:
.\build.sh runtests
How to create your own tool
Every ProteomIQon tool is a small console project located in src/, containing three files with distinct responsibilities.
-
CLIArgumentParsing.fsDeclares command-line arguments using Argu.
-
Program.fsParses arguments, reads the parameter JSON and loops over input files.
-
Tool-specific implementation
Contains the actual processing logic.
Shared components
Parameter records and result row types shared between tools are located in src/ProteomIQon/ in the core project.
Scaffolding from the template
The repository ships a dotnet new template that creates this layout. Follow these steps to set up your new tool.
-
Install the template
Run the following command once from the repository root:
dotnet new install ./ConsoleTemplate/template -
Create your project
Run
dotnet new listto verify thatpct(the prototypical ProteomIQon console project) is available.Then create your project inside
src/and add it to the solution:cd src dotnet new pct -n MyTool --force cd .. dotnet sln ProteomIQon.sln add src/MyTool/MyTool.fsproj
Information
Compare the new .fsproj with an existing tool such as src/PeptideDB/PeptideDB.fsproj. Use its target framework, package versions, PackAsTool and ToolCommandName properties as references.
Wiring the tool in
Four more places need to know about the tool:
- A parameter record in
src/ProteomIQon/DTO.fswith atoDomainconversion, plus a default JSON file insrc/ProteomIQon/defaultParams/. The tools read parameters withJson.ReadAndDeserialize. - A
RELEASE_NOTES.mdin the project folder. The build reads the package version from it. - An entry in the projects list of
build/ProjectInfo.fs, so Build and Pack include it. - A page in
docs/tools/; see How to document your work.
Next step
Then open a pull request against dev.
How to document your work
- The pages on this site are literate F# scripts under
docs/, rendered with the fsdocs tool. - Prose lives in
(** ... *)comment blocks as Markdown; code between the blocks is shown with syntax highlighting and tooltips.
Building the docs locally
-
From the repository root, restore the tools once and then run the docs target. It builds the core project in Release and renders the site into
output/:dotnet tool restore .\build.cmd builddocs -
On Linux or macOS use
./build.sh builddocs. For editing with hot reload use the watch target. It serves the site on a local port and re-renders a page whenever you save it:.\build.cmd watchdocs
Adding a page for a tool
-
Copy an existing file from
docs/tools/, for examplePeptideDB.fsx, rename it after the tool folder insrc/, and adjust the frontmatter at the top. Theindexvalue sets the position in the sidebar. The pages are ordered along the processing chain, so pick the slot where the new tool fits and shift the later ones if needed. -
Each tool page has the same four parts: a short description of what the tool does and where it sits in the chain, an inputs and outputs section, the parameter table with the defaults from
src/ProteomIQon/defaultParams/, and the script that writes a parameter file followed by the command line calls. Tools without a parameter file skip the table and the script. -
Keep the parameter script runnable. It references the core assembly built by builddocs, so this proves it before you publish:
dotnet fsi docs/tools/YourTool.fsx