federicoceratto / nim-package-directory Goto Github PK
View Code? Open in Web Editor NEWNim package directory - documentation builder
Home Page: https://nimble.directory/
License: GNU General Public License v3.0
Nim package directory - documentation builder
Home Page: https://nimble.directory/
License: GNU General Public License v3.0
It would be good if the start page could list the latest 20 packages or so also if it's already older.
Related issue: #33.
from time to time, on the project page, I get this error:
An error has occured in one of your routes.
Detail: package_directory.nim(1916) package_directory
package_directory.nim(1913) main
jester.nim(494) serve
httpbeast.nim(540) run
httpbeast.nim(371) eventLoop
httpbeast.nim(227) processEvents
asyncdispatch.nim(1627) poll
asyncdispatch.nim(1368) runOnce
asyncdispatch.nim(208) processPendingCallbacks
asyncmacro.nim(29) fetch_github_versionsNimAsyncContinue
package_directory.nim(589) fetch_github_versionsIter
package_directory.nim(538) extract_latest_version
package_directory.nim(525) is_newer
strutils.nim(1115) parseInt
[[reraised from:
package_directory.nim(1916) package_directory
package_directory.nim(1913) main
jester.nim(494) serve
httpbeast.nim(540) run
httpbeast.nim(371) eventLoop
httpbeast.nim(227) processEvents
asyncdispatch.nim(1627) poll
asyncdispatch.nim(1368) runOnce
asyncdispatch.nim(208) processPendingCallbacks
asyncmacro.nim(29) mainRouterNimAsyncContinue
asyncmacro.nim(145) mainRouterIter
asyncfutures.nim(372) read
]]
[[reraised from:
package_directory.nim(1916) package_directory
package_directory.nim(1913) main
jester.nim(494) serve
httpbeast.nim(540) run
httpbeast.nim(371) eventLoop
httpbeast.nim(227) processEvents
asyncdispatch.nim(1627) poll
asyncdispatch.nim(1368) runOnce
asyncdispatch.nim(208) processPendingCallbacks
asyncmacro.nim(29) dispatchNimAsyncContinue
asyncmacro.nim(145) dispatchIter
asyncfutures.nim(372) read
]]
[[reraised from:
package_directory.nim(1916) package_directory
package_directory.nim(1913) main
jester.nim(494) serve
httpbeast.nim(540) run
httpbeast.nim(371) eventLoop
httpbeast.nim(227) processEvents
asyncdispatch.nim(1627) poll
asyncdispatch.nim(1368) runOnce
asyncdispatch.nim(208) processPendingCallbacks
asyncmacro.nim(29) handleRequestSlowNimAsyncContinue
asyncmacro.nim(145) handleRequestSlowIter
asyncfutures.nim(372) read
]]
invalid integer: 0-2
Some packages have hosted docs like ur but attempting to go to them results in a page that's a jester error.
An error has occured in one of your routes.
Detail: package_directory.nim(1916) package_directory
package_directory.nim(1913) main
jester.nim(494) serve
httpbeast.nim(540) run
httpbeast.nim(371) eventLoop
httpbeast.nim(283) processEvents
jester.nim(497) :anonymous
jester.nim(399) handleRequest
asyncmacro.nim(262) dispatch
asyncmacro.nim(29) dispatchNimAsyncContinue
jester.nim(297) dispatchIter
asyncmacro.nim(262) mainRouter
asyncmacro.nim(32) mainRouterNimAsyncContinue
package_directory.nim(1373) mainRouterIter
io.nim(842) readFile
[[reraised from:
package_directory.nim(1916) package_directory
package_directory.nim(1913) main
jester.nim(494) serve
httpbeast.nim(540) run
httpbeast.nim(371) eventLoop
httpbeast.nim(283) processEvents
jester.nim(497) :anonymous
jester.nim(399) handleRequest
asyncmacro.nim(262) dispatch
asyncmacro.nim(32) dispatchNimAsyncContinue
asyncmacro.nim(145) dispatchIter
asyncfutures.nim(372) read
]]
[[reraised from:
package_directory.nim(1916) package_directory
package_directory.nim(1913) main
jester.nim(494) serve
httpbeast.nim(540) run
httpbeast.nim(371) eventLoop
httpbeast.nim(283) processEvents
jester.nim(497) :anonymous
jester.nim(399) handleRequest
asyncmacro.nim(262) handleRequestSlow
asyncmacro.nim(32) handleRequestSlowNimAsyncContinue
asyncmacro.nim(145) handleRequestSlowIter
asyncfutures.nim(372) read
]]
cannot open: /tmp/nim_package_directory/cache/ur/pkgs/ur-0.1.1/ur.html
Others have nothing clickable and have an empty page, globby for instance.
Basically as described in the nim forum over here:
https://forum.nim-lang.org/t/3280
Basically it would entail periodically following the github links to all projects in packages.json, and then checking for version changes in nimble or babel files. eg over here for a recently-added package:
https://raw.githubusercontent.com/bpr/vla/master/vla.nimble
The idea being to get something a bit like what you can see over here:
Hello!
I've copied this issue from nim-lang/nimble#978.
Package names with underscores are displayed without the underscore in the nimble directory.
Original text:
I tried installing this package: https://nimble.directory/pkg/simpleparseopt
According to the linked page, I should install it using nimble install simpleparseopt. So far so good.
Now I tried using the package by importing it using import simpleparseopt. However, that failed.
The readme does not mention how I should import it. But I noticed that the title in the readme was different from the package name.
The readme says simple_parseopt. Once I tried import simple_parseopt, everything worked fine.
I thought there might be some configuration error on their side.
So I also tried creating my own package and published it to the nimble directory: https://nimble.directory/pkg/conventionalsemver
Same deal. My package name is conventional_semver. The PR submitted to publish the package also has an underscore.
But when looking at the nimble directory, the underscore is gone. I couldn't really find any mention of this behavior in the nimble readme. Is there a bug, or is it generally recommended to avoid snake_case for package names?
Doc Build Broken?, No new packages is having Hosted Docs on Nimble, they all fail with the same error:
Hint: parsexml [Processing]
lib/nim/pure/parsexml.nim(38, 1) Error: cannot open '../../examples/htmltitle.nim'
lib/nim/pure/xmldomparser.nim(30, 12) Error: type mismatch: got
but expected one of:
proc contains[U, V, W](s: HSlice[U, V]; value: W): bool
first type mismatch at position: 1
required type: HSlice[contains.U, contains.V]
but expression 'key' is of type: string
proc contains[T](x: set[T]; y: T): bool
first type mismatch at position: 1
required type: set[T]
but expression 'key' is of type: string
proc contains[T](a: openArray[T]; item: T): bool
first type mismatch at position: 2
required type: T
but expression '":"' is of type: string
expression: contains(key, ":")
lib/nim/pure/xmldomparser.nim(31, 13) Error: attempting to call undeclared routine: 'split'
lib/nim/pure/xmldomparser.nim(31, 13) Error: attempting to call undeclared routine: '.'
lib/nim/pure/xmldomparser.nim(31, 13) Error: expression '.' cannot be called
lib/nim/pure/xmldomparser.nim(31, 24) Error: type mismatch: got <>
but expected one of:
proc `[]`[T, U](s: string; x: HSlice[T, U]): string
proc `[]`[T](s: openArray[T]; i: BackwardsIndex): T
proc `[]`[I: Ordinal; T](a: T; i: I): T
proc `[]`[T](s: var openArray[T]; i: BackwardsIndex): var T
proc `[]`[Idx, T](a: var array[Idx, T]; i: BackwardsIndex): var T
proc `[]`[Idx, T](a: array[Idx, T]; i: BackwardsIndex): T
proc `[]`(s: string; i: BackwardsIndex): char
proc `[]`[T, U, V](s: openArray[T]; x: HSlice[U, V]): seq[T]
proc `[]`[Idx, T, U, V](a: array[Idx, T]; x: HSlice[U, V]): seq[T]
expression: [](1)
lib/nim/pure/xmldomparser.nim(31, 28) Error
If clicking on hosted docs, I often find it reporting a 504 status code, with the following page
504 Gateway Time-out
nginx/1.14.2
After waiting multiple minutes, it usually loads successfully following a refresh.
Looks like the hosted docs aren't displaying at all, even for packages where they build OK.
For an example, go to https://nimble.directory/docs/flower, then click /flower
, to be taken to a blank page. In the page source I can see a hidden message saying "Sorry, that file does not exists." Seems to behave the same for all packages.
Was looking forward to use https://nimble.directory/pkg/nimqbittorrent but it seems the repo has been deleted by the author. archive.org didn't archive the source files. Domain of contact e-mail for author is expired. Maybe RIP, who knows.
Would be nice if we had a snapshot of the git source code in nimble directory for situations like these. If your project depends on a nimble package that gets nuked by the author and you don't have the code anymore for some reason, you're doomed. Not sure if this is the right repo to request this.
Visiting this URL returns an error with routes: https://nimble.directory/search?query=Http
today i was trying to find a package for a personal project, and came across the htmlview package. this package seems to have been deleted by the author, and never updated in the index as to have it removed entirely or redirected to the new repo. On the individual package page on https://nimble.directory/pkg/...
there seems to be no way to report a problem with said package.
To mitigate similar future issues, perhaps a scheduled job should be added the package index CI system to validate that package sources aren't 404'ing in addition to validating that any new packages added are valid JSON or whatever.
/cc @dom96 as you originally created the package index and since it's now part of the language org, i assume you have some say in how package validation happens and if it is part of a nightly CI job or something.
reposting from nim-lang/Nim#7410 (comment) to here since this seems the right project.
This came up in timotheecour/D_vs_nim#3
for someone not very familiar with nim trying to figure out how many packages does nim have, things can be confusing:
https://nimble.directory/packages.xml shows only ~194 packages but https://github.com/nim-lang/packages shows ~640 packages
it's made worse by the fact that nim-lang/Nim#7400 still prevents someone browsing https://nim-lang.org/docs/lib.html from seeing packages, and the fact that https://nimble.directory/ doesn't show the total number of packages.
https://nimble.directory/packages.xml
shows:
<description>New and updated Nim packages</description>
<link>https://nimble.directory/packages.xml</link>
<lastBuildDate></lastBuildDate>
<pubDate></pubDate>
<ttl>3600</ttl>
but doesn't specify what it means by new and updated
;
how about:
specify total number of packages in https://nimble.directory/ (or maybe total + total new since ), eg as done in https://code.dlang.org/ which shows Displaying results 1 to 21 of 1250 packages found.
change description in https://nimble.directory/packages.xml to show: New and updated Nim packages since <date>
The text of quotes (blockquote
) in READMEs is barely readable when having white text on a light green background. Example: https://nimble.directory/pkg/flower
See xmldom or treesitter for examples.
Package URL for treesitter is https://github.com/genotrance/nimtreesitter?subdir=treesitter.
The website always responds with 502 Bad Gateway. Can anybody confirm this?
/ping @FedericoCeratto
Hello world. I just want suggest two improvements:
fyi
Hi,
I have notice the "new" version badge. I have looked into the code. What's magic!
I mean this request. According github APIv3 docs it's the only way to get the latest release version, BUT...
In real life the most packages don't have release version. Each time a repo is tagged, a new source code bundle will automatically show up on the github "Release" page. However, these automatic "releases" will not appear via the API. It's because I wrote about magic...
I think it's more correct from a holistic point of view to get the package version from a .nimble
file. What do you think about?
For example, the following code can be placed in a except
section:
let dotnimble = "https://raw.githubusercontent.com/" & owner_repo_name & "/master/" & repo & ".nimble"
let r = newHttpClient().get(dotnimble)
if r.code == Http200 :
for line in splitLines(r.body) :
if line.startsWith("version"): pkg["github_latest_version"] = split(r.body, "\"")[1]
Maybe I'm wrong.
[UPDATE]: Yes, partially wrong. Just now I found another function, which is involved with getting package version: proc fetch_github_versions(pkg: Pkg, owner_repo_name: string)
from package_directory.nim
file, not github.nim
that I've mentioned before. It checks tags
too!
So the right place for code typed above is here, instead pkg["github_latest_version"] = newJString "none"
assignment. The latest attempt to get version. Better then none
.
The ssl cert for https://nimble.directory/ expired today. Since HSTS is enabled nobody can access the site
The landscape should always contain packages under New Packages
section (6 or 9), even if the latest package was published 3 weeks ago. So the newer package should replace the old one and so on.
This would be a better approach than listing nothing. + better exposure to newcomers (pkg authors / visitors).
I think it would be good for nim community and library devs to know what libraries people are searching for.
So, this issue proposes that every search get saved and the list of searches be viewable, and/or searchable, preferably with a searched count so that library devs can take user interest into account when they are deciding what library to write next.
Maybe just save the search string and nothing about the searcher's machine/connection to protect/respect their privacy.
perhaps to avoid moderation requirements, the strings could just be saved and this package author could just release a sanitized list periodically with search strings and their respective counts/ranked by searches, etc. Anything would be better than just not knowing what people needed for their projects.
thanks
Nim packages directory lists items by name, star count and author. While star count gives an hint to the reader, it generally doesn't say if the project is live and kicking. Wouldn't it be better to list some other indices?
I'm not sure which number is best to represent project health, but I think it should be linked with the concept of time somehow.
We could just follow what github uses: the "insights" tab has many tools but the first one that github shows is an overview of the merged / unmerged pull requests and opened / closed issues in a time frame (eg 1 month), what about this? Or maybe the number of contributors?
The intention is not to rule out inactive projects, but just give a better view projects aimed to solve same problem.
Sometimes you want slow and solid, sometimes you need new with lot of momentum, sometimes you have to adventure with a a one-man project, but in all cases a general view is needed.
My package build is failing with "Error: Unsatisfied dependency: nim (>= 1.6.0)". I expect packages to be built against 1.6.6 (which I believe is the current stable version).
https://nimble.directory/ci/badges/records/nimdevel/output.html
If you're going to mirror the README.md from packages, then you may want to rewrite relative paths into absolute ones so that any links and images show up correctly.
For example, https://nimble.directory/pkg/d3 has a link to the examples/
directory and a couple of images, all of which use relative paths and won't work on nimble.directory.
Lots of packages are failing to build now on the CI service, since they depend on nim devel to build, rather than nim stable.
Maybe the CI service can intelligently pick which version of Nim to build with, and switch to that with choosenim?
Hello,
I was checking out the https://nimble.directory/ site today, and was excited to see that it provided an RSS feed for new packages: https://nimble.directory/packages.xml
But the feed is not showing the newest packages first; it looks like this:
https://nimble.directory/packages.xml returns broken URL of package repository.
<link>https:/nimble.directory/packages.xml</link>
The URL starts with https:/
.
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Nim packages</title>
<description>New and updated Nim packages</description>
<link>https:/nimble.directory/packages.xml</link>
<lastBuildDate>Thu, 12 Mar 2020 03:29:02 Z</lastBuildDate>
<pubDate>Thu, 12 Mar 2020 03:29:02 Z</pubDate>
<ttl>3600</ttl>
<item>
<title>nimpress</title>
<description>Fast and simple calculation of polygenic scores</description>
<link>https:/nimble.directory/pkg/nimpress</link>
<guid isPermaLink="true">https:/nimble.directory/pkg/nimpress</guid>
<pubDate>Tue, 10 Mar 2020 06:22:07 Z</pubDate>
</item>
<item>
<title>weightedgraph</title>
<description>Graph With Weight Libary</description>
<link>https:/nimble.directory/pkg/weightedgraph</link>
<guid isPermaLink="true">https:/nimble.directory/pkg/weightedgraph</guid>
<pubDate>Tue, 10 Mar 2020 09:52:35 Z</pubDate>
</item>
<item>
<title>norman</title>
<description>Migration manager for Norm.</description>
<link>https:/nimble.directory/pkg/norman</link>
<guid isPermaLink="true">https:/nimble.directory/pkg/norman</guid>
<pubDate>Thu, 12 Mar 2020 01:54:38 Z</pubDate>
</item>
<item>
<title>nimfm</title>
<description>A library for factorization machines in Nim.</description>
<link>https:/nimble.directory/pkg/nimfm</link>
<guid isPermaLink="true">https:/nimble.directory/pkg/nimfm</guid>
<pubDate>Thu, 12 Mar 2020 03:14:51 Z</pubDate>
</item>
</channel>
</rss>
I think that public_baseurl of conf.json
will be wrong.
(but this is a example file)
To comply with Repology's requirements, nimble.directory needs to export the following fields besides ones defined in packages.json
:
web
if defined, else url
)doc
if defined, else nimble.directory hosted docs)The bigints
package reports version 0.5.0 (see screenshot), but the latest version is 1.0.0.
There is a README.md file in the GIT depot, a DOC section on the package.json description, but the libsaedea page on nimble.directory is empty and says "Package libsaedea doesn't contains a README file."
How can I fix this ?
(see https://git.qoto.org/m33/libsaedea/-/blob/master/README.md)
It would be very useful to be able to filter results by whether the project is a library, CLI, TUI, or GUI program. I have no idea what would be required to implement this. Would just be nice, that's all. :)
Example: https://nimble.directory/search?query=Qt, https://nimble.directory/search?query=qt
Confusing and annoying, really
READMEs are fetched from a github API and not from repositories themselves, so everything not hosted on github shows "Package โฆ doesn't contains a README file.", which is incorrect.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.