GithubHelp home page GithubHelp logo

metacpan / metacpan-web Goto Github PK

View Code? Open in Web Editor NEW
410.0 43.0 234.0 13.8 MB

Web interface for MetaCPAN

Home Page: http://metacpan.org

License: Other

Perl 71.05% Shell 0.67% CSS 0.02% JavaScript 14.67% Dockerfile 0.60% Less 12.98%
metacpan perl cpan hacktoberfest

metacpan-web's Introduction

test Coverage Status

Getting Started

We strongly recommend using metacpan-docker. This will give you a virtual machine already configured and ready to start developing on.

If you prefer not to use Docker, the following commands will get you started:

Installing Manually

carton install
npm install
export PATH="$(realpath ./node_modules/.bin):$PATH"

Installing on macOS

If you like, you can install carton via Homebrew:

brew install carton

If your carton install is having issues with SSL-related modules, you may need to use an OPENSSL_PREFIX. Something like:

OPENSSL_PREFIX="/usr/local/Cellar/[email protected]/1.1.1q" carton install

You may need to check /usr/local/Cellar/[email protected] to find the latest installed path on your system.

Running Tests

You can use the supplied wrapper around prove to run tests:

./bin/prove t

To run the tests in parallel, add -j8 (or however many CPUs you have) to the prove command.

Running the App

carton exec plackup -p 5001 -r

If you'd like to use Gazelle rather than the default Plack server:

carton exec plackup -p 5001 -s Gazelle -r

Local Git and testing considerations

You will want to set up the supplied pre-commit Git hook like so:

./git/setup.sh

which causes precious to be run before each commit. You can manually run this with precious path/to/file

Local Configuration Changes

The back end defaults to fastapi.metacpan.org. Running a local API server is optional and not required to hack on the front end. The address to the API being used can be changed in the metacpan_web.conf file. Ideally you would create a new file called metacpan_web_local.conf that contains

api                 http://127.0.0.1:5000

which will be loaded on top of the existing config file.

Compatibility Notes

On Win32 (and possibly also on other platforms) when using Perl < 5.12, the server started with plackup will generate warnings relating to date parsing. These are caused by Plack due to a bug in the gmtime implementation and can be removed by upgrading to Perl 5.12.

metacpan-web's People

Contributors

atoomic avatar autarch avatar bleargh45 avatar dependabot[bot] avatar dhogan8 avatar dpetrov avatar github-actions[bot] avatar haarg avatar mbeijen avatar metacpan-automation[bot] avatar metacpan-bot avatar mickeyn avatar mohawk2 avatar monken avatar oalders avatar oiami avatar omega avatar plu avatar ranguard avatar rwstauner avatar simbabque avatar ssoriche avatar szabgab avatar talina06 avatar thaljef avatar thisusedtobeanemail avatar tsibley avatar wchristian avatar yanick avatar zakame avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metacpan-web's Issues

finetune result scoring

Hi there! terrific job with the new MetaCPAN!

As we discussed on #metacpan, the results scoring needs to handle some edge cases like exact matches. For example, searching for "Data::Printer" without quotes gives "Printer" as the first result, and "Data::Printer" as the second. The same goes for "data printer" without the quotes. However, if you add the quotes to either of them, you get Data::Printer first.

Thanks again for such a nice interface to CPAN :)

Duplicate Pod files cause confusion

When a dist contains a README.pod file which is a copy of the main module's Pod, then metacpan.org will think that README.pod is the source file for the module in question.

Example: http://beta.metacpan.org/module/Hailo

The "Source" and "raw" links point to README.pod instead of lib/Hailo.pm. Another problem which results from this is that "Module version" will be empty. The site should give higher priority to .pm files which match the NAME section in the Pod, or just prefer .pm files over .pod in general.

translated cpan urls need the author name upcased

Urls like this:

http://search.cpan.org/~flora/Data-Stream-Bulk-0.08/lib/Data/Stream/Bulk.pm

get translated to:

http://beta.metacpan.org/module/flora/Data-Stream-Bulk-0.08/lib/Data/Stream/Bulk.pm

This should be:

http://beta.metacpan.org/module/FLORA/Data-Stream-Bulk-0.08/lib/Data/Stream/Bulk.pm

Allow browser caching

Currently, a bunch of the resources making up a page appear to me to be non-cacheable. Changing that would be nice.

Fix locked panel on the left

Via blog:

One small comment: the sidebar doesn't work well on small screens. I
can't see the lower part of it ("activity") on my laptop because it
doesn't have enough vertical pixels. Can you please disable this
locking thingie you're doing?

I find the sticky panel very helpful, but will fix it to scroll if the screen is not big enough

Font size

The fonts are too small for my screen. Instead of setting them to 12px, try 80%

Search for author:ANDK returns nothing

On the homepage I entered author:andk and author:ANDK and got no results.

Interestingly, author:andk told me "0 results (0.001 seconds)" whereas author:ANDK left the area below the search box white

Line Numbers in Code Snippets

I'm not sure the line numbers are that helpful in code snippets on the Pod pages. On the source code for sure, but I think they tend to clutter the Pod. You may want to consider adding "gutter: false" to the JS config on the Pod pages.

Add Settings panel

Small icon in the top right corner should do. Things you can enable/disable there:

  • relative dates
  • locked left panel
  • hide TOC
  • Ellipsis
  • more?

Incorrect/Incomplete dependencies list

The dependencies list (for example: http://beta.metacpan.org/module/Plack::App::File) is a little confusing...
it doesn't reflect the dependencies of that file, but rather the distribution that it comes packaged in.
It looks like that list comes straight from the dist's META.yml

However, all the modules listed aren't actually used by Plack::App::File (except for parent.pm)
and some modules that are used (like HTTP::Date and Cwd) are not shown.

I see the usefulness in showing the dependencies required for installing that module,
but I also think it's useful to see which ones are required for using that module (which can be completely different).

Perhaps the heading should be changed to "Distribution Dependencies" to reflect where the list comes from?
Actual file dependencies could be shown using something like Perl::PrereqScanner,
or perhaps just link to deps.cpantesters.org (Issue #46).

Show version dependencies

The right-hand side dependency list in the dist/module view is excellent, but it could be made better. First of all, how about showing the minimum required version, if any? Something like "Capture::Tiny (>=0.11)". Second, can you please list the perl version dependency as well, if one is specified? E.g. "perl (>= v5.14.0)".

badly formed POD files not indexed

The page

 http://beta.metacpan.org/release/Pod-PseudoPod 

doesn't refer to:

 http://beta.metacpan.org/module/CHROMATIC/Pod-PseudoPod-0.17/lib/Pod/PseudoPod/Tutorial.pod

apparently because it is missing the "NAME" section. While this could arguably be considered a bug in the documentation, such bugs will happen (and that one happened in a Pod:: doc is suggestive). search.cpan.org does index these, by filename.

Left hand search box too wide

In my Firefox on Linux, with my font settings, the left hand search box is too wide and overflows the left column.

Set the width to 95%

Results page - show description, put Synopsis in mouse over

At the moment on beta.metacpan the results page has

-

But it's almost impossible to read the synopsis as it's not formatted, instead it might be better to replace the synopsis with the start of the (first X characters or X sentences maybe).

However showing the synopsis from the result page when a user either clicks a button or mouse over's a link (like you get on https://www.pivotaltracker.com/projects/252059 when you mouse over a speech bubble) would be really useful - even better if it's syntax hi-lighted....

metacpan/metacpan-api#97

Searching for mistyped class name - no results, and search term not displayed

I'm using Opera 11.00, on Linux.

I (accidentally) typed "dbix ckass", and got a results page with 0 results (no "did you mean?") .. I was expecting that my mistyped search term would be displayed so I could fix it, but the search box was also empty.

(I'm told this works in FF.. so maybe its an anti-Opera-ism? ;)

Show author results

I often type in an author's name into the search box, and find it annoying that I have to then click somewhere else to do an author search.

How about doing two searches, one for modules, one for authors, and showing both results (or at least the top results for authors)

Allow conflicting files in CPAN distributions

Some CPAN distributions have conflicting files. That is not a problem if they are not both installed on a given system.
But it looks like it is a problem for MetaCPAN.

Example : http://beta.metacpan.org/search?q=which
I would like to be able to read the POD of CWEST/ppt-0.14, not just Win32::App:which (of which I'm the author by the way).
However when I click on the 'which' link for CWEST/ppt-0.14 I'm sent to a link which is not distribution dependent which displays which.pm from Win32::App::which.

"install" link with explanation

Many beginner who are not yet familiar with the way how perl modules can be installed would click on the "download" link and then are puzzled what's next. There could be a link to "install" that when clicked will show some explanation on the various ways how to install CPAN modules.
e.g.

If you are on a linux distribution you should try using the native installer (aptitude, yum etc.
Otherwise explain how to configure and use the various cpan clients. Maybe even pointing at local::lib

Add "Fork Me on Github" graphic

Distributions which have Github repos could benefit from the familiar "fork me on github" on the top right of the page:

<a href="http://github.com/elasticsearch">
<img alt="Fork me on GitHub" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" style="position: absolute; top: 0; right: 0; border: 0;">
</a>

More prominent links to human-readable special files

When browsing modules on search.cpan.org, it is very easy to find the dist's changelog and readme in the header near the top of the page. On metacpan.org, one has to scroll all the way down to "Other files" in the dist view and wade through a list of unrelated files.

How about adding a list to the right hand side, above the Dependencies, containing links to the dist's human-readable files (Changes/CHANGES,ChangeLog, README, HACKING, TODO)? It would be nice if the list were also visible when viewing a specific module within the dist, as the Dependencies list is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.