Skip to content

add: fpm search#1054

Open
henilp105 wants to merge 58 commits intofortran-lang:mainfrom
henilp105:fpm-search
Open

add: fpm search#1054
henilp105 wants to merge 58 commits intofortran-lang:mainfrom
henilp105:fpm-search

Conversation

@henilp105
Copy link
Copy Markdown
Member

@henilp105 henilp105 commented Jun 22, 2024

This PR intends to add the search and discovery of fpm installed and fpm - registry packages directly from cli. this command supports globbing for package name, version, license, namespace. the similar functionality has been patched at the registry repo. (fortran-lang/registry#81). paging is not used in local registry due to multiple search queries.

This is the syntax of the new fpm search functionality:

fpm search --query q* --page 1 --registry URL --namespace n* --package p* --package_version v* --license l* --limit 10 --sort-by [name] --sort [asc/desc]

Parameters:

  • query: Searches in fpm.toml description and fpm-registry descriptions only for fpm-registry (README.md) (case insensitive, globbing supported).
  • package: Searches by package name (case insensitive, globbing supported).
  • registry: Custom registry URL (default: fpm-registry).
  • namespace: Searches by namespace (globbing supported).
  • package_version: Searches by package version (globbing supported).
  • license: Searches by license (globbing supported).
  • page: Page number (default: 1).
  • limit: Number of results (default: 10).
  • sort-by: Sorts by name, author, createdat, updatedat, downloads (default: name).
  • sort: Order of sorting, asc or desc (default: asc).

Tasks left

  • add docs and tests
  • clean and refactor

Thanks and Regards,
Henil

CC @certik @awvwgk @perazz @arteevraina

@henilp105 henilp105 requested a review from perazz June 23, 2024 05:50
Comment thread src/fpm/cmd/search.f90 Outdated
Comment thread src/fpm_command_line.f90
Comment thread src/fpm_command_line.f90 Outdated
Comment thread src/fpm_command_line.f90
@perazz perazz mentioned this pull request Jul 22, 2024
2 tasks
@perazz
Copy link
Copy Markdown
Member

perazz commented Sep 9, 2024

Let's get this merged @henilp105, is there any more tasks you plan of adding?

@henilp105
Copy link
Copy Markdown
Member Author

Sure @perazz , Let's get this merged in a week, I will add some tests and clean UI by then.

@henilp105 henilp105 requested a review from Copilot September 29, 2025 05:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new fpm search command that enables searching for packages in both local registries and the fpm-registry. Users can search using various filters including query text, package name, namespace, version, and license with support for globbing patterns.

  • Adds comprehensive search functionality with multiple filter options and sorting capabilities
  • Integrates search command into the existing fpm CLI structure with help documentation
  • Updates downloader module to properly quote URLs in curl/wget commands

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
test/help_test/help_test.f90 Adds 'search' command to help test suite
src/fpm_command_line.f90 Implements search command line parsing, help text, and settings structure
src/fpm/downloader.f90 Adds quotes around URLs in curl/wget commands for better URL handling
src/fpm/cmd/search.f90 New module implementing the core search functionality for local and remote registries
app/main.f90 Integrates search command into main application dispatcher
Comments suppressed due to low confidence (1)

src/fpm_command_line.f90:1

  • Typo in help text: 'fmp-registry' should be 'fpm-registry'.
!># Definition of the command line interface

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/fpm_command_line.f90
Comment thread src/fpm_command_line.f90 Outdated
Comment thread src/fpm_command_line.f90
Comment thread src/fpm_command_line.f90
Comment thread src/fpm/cmd/search.f90 Outdated
Comment thread src/fpm/cmd/search.f90 Outdated
Comment thread src/fpm/cmd/search.f90 Outdated
@henilp105 henilp105 requested a review from perazz April 8, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants