bmssp 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -12
- package/package.json +26 -3
- package/src/bmssp.mjs +6 -2
- package/.editorconfig +0 -7
- package/.github/dependabot.yml +0 -19
- package/.github/workflows/dockerhub-build-publish.yml +0 -51
- package/.github/workflows/npm-build.yml +0 -34
- package/.github/workflows/npm-publish.yml +0 -37
- package/.github/workflows/static.yml +0 -45
- package/Dockerfile +0 -13
- package/test/main.js +0 -12
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tsinghua Single Source Shortest Paths algorithm
|
|
2
2
|
|
|
3
|
-
This is a repository containing implementation
|
|
3
|
+
This is a repository containing a simple community driven implementation in Javascript based on the paper written by Duan Ran et. al. from Tsinghua University.
|
|
4
4
|
"Breaking the Sorting Barrier for Directed Single-Source Shortest Paths".
|
|
5
5
|
|
|
6
6
|
https://dl.acm.org/doi/10.1145/3717823.3718179
|
|
@@ -13,18 +13,9 @@ We give a deterministic O(mlog2/3n)-time algorithm for single-source shortest pa
|
|
|
13
13
|
|
|
14
14
|
## Development Details
|
|
15
15
|
|
|
16
|
-
This project is mainly focused in Javascript
|
|
16
|
+
This project is mainly focused in Javascript in order to be published to npmjs.com as a JS module (esmodule).
|
|
17
17
|
|
|
18
|
-
### Other Implementations
|
|
18
|
+
### Other Implementations in GitHub
|
|
19
19
|
|
|
20
20
|
https://github.com/search?q=bmssp&type=repositories
|
|
21
21
|
|
|
22
|
-
Rust:
|
|
23
|
-
- https://github.com/lucas-montes/bmssp - Available as a crate to pull.
|
|
24
|
-
|
|
25
|
-
Java:
|
|
26
|
-
- https://github.com/PatrickDiallo23/BMSSP-Java
|
|
27
|
-
|
|
28
|
-
Python:
|
|
29
|
-
- https://github.com/sidharthpunathil/fastest-shortest-path-algo-poc
|
|
30
|
-
- https://github.com/simpsonresearch/tsinghua_benchmarks/tree/main
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bmssp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Javascript package implementation of the bmssp algorithm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shortest-paths",
|
|
@@ -19,11 +19,34 @@
|
|
|
19
19
|
"license": "MPL-2.0",
|
|
20
20
|
"author": "Saul Ivan Rivas Vega",
|
|
21
21
|
"type": "module",
|
|
22
|
-
"main": "index.js",
|
|
23
22
|
"directories": {
|
|
24
23
|
"doc": "docs"
|
|
25
24
|
},
|
|
25
|
+
"files": [
|
|
26
|
+
"src/",
|
|
27
|
+
"docs/",
|
|
28
|
+
"package.json",
|
|
29
|
+
"package-lock.json",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
26
33
|
"scripts": {
|
|
27
|
-
"test": "
|
|
34
|
+
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --coverage",
|
|
35
|
+
"lint": "npm run prettier && npm run eslint",
|
|
36
|
+
"format": "npm run prettier:fix && npm run eslint:fix",
|
|
37
|
+
"eslint": "eslint --max-warnings=0 .",
|
|
38
|
+
"eslint:fix": "eslint --fix .",
|
|
39
|
+
"prettier": "prettier --check \"./**/{*.js,*.mjs}\"",
|
|
40
|
+
"prettier:fix": "prettier --write \"./**/{*.js,*.mjs}\""
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@eslint/js": "^9.34.0",
|
|
44
|
+
"@eslint/markdown": "^7.2.0",
|
|
45
|
+
"eslint": "^9.34.0",
|
|
46
|
+
"eslint-config-prettier": "^10.1.8",
|
|
47
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
48
|
+
"globals": "^16.3.0",
|
|
49
|
+
"jest": "^30.1.1",
|
|
50
|
+
"prettier": "3.6.2"
|
|
28
51
|
}
|
|
29
52
|
}
|
package/src/bmssp.mjs
CHANGED
package/.editorconfig
DELETED
package/.github/dependabot.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: "docker"
|
|
9
|
-
directory: "/"
|
|
10
|
-
schedule:
|
|
11
|
-
interval: "weekly"
|
|
12
|
-
- package-ecosystem: "npm" # See documentation for possible values
|
|
13
|
-
directory: "/" # Location of package manifests
|
|
14
|
-
schedule:
|
|
15
|
-
interval: "weekly"
|
|
16
|
-
- package-ecosystem: "github-actions"
|
|
17
|
-
directory: "/"
|
|
18
|
-
schedule:
|
|
19
|
-
interval: "weekly"
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
name: Build and publish Docker image
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
docker-build-and-publish:
|
|
9
|
-
environment:
|
|
10
|
-
name: dockerhub
|
|
11
|
-
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
permissions:
|
|
15
|
-
contents: read
|
|
16
|
-
|
|
17
|
-
steps:
|
|
18
|
-
- name: Docker meta
|
|
19
|
-
id: meta
|
|
20
|
-
uses: docker/metadata-action@v5
|
|
21
|
-
with:
|
|
22
|
-
# list of Docker images to use as base name for tags
|
|
23
|
-
images: |
|
|
24
|
-
sirivasv/bmssp-js
|
|
25
|
-
# generate Docker tags based on the following events/attributes
|
|
26
|
-
tags: |
|
|
27
|
-
type=semver,pattern={{version}}
|
|
28
|
-
type=semver,pattern={{major}}.{{minor}}
|
|
29
|
-
type=semver,pattern={{major}}
|
|
30
|
-
- name: Checkout code
|
|
31
|
-
uses: actions/checkout@v5
|
|
32
|
-
|
|
33
|
-
- name: Login to Docker Hub
|
|
34
|
-
uses: docker/login-action@v3
|
|
35
|
-
with:
|
|
36
|
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
37
|
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
38
|
-
|
|
39
|
-
- name: Set up QEMU
|
|
40
|
-
uses: docker/setup-qemu-action@v3
|
|
41
|
-
|
|
42
|
-
- name: Set up Docker Buildx
|
|
43
|
-
uses: docker/setup-buildx-action@v3
|
|
44
|
-
|
|
45
|
-
- name: Build and push
|
|
46
|
-
uses: docker/build-push-action@v6
|
|
47
|
-
with:
|
|
48
|
-
context: .
|
|
49
|
-
platforms: linux/amd64,linux/arm64
|
|
50
|
-
push: true
|
|
51
|
-
tags: ${{ steps.meta.outputs.tags }}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
name: Build npm package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: [main]
|
|
6
|
-
push:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
npm-build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
|
|
16
|
-
strategy:
|
|
17
|
-
matrix:
|
|
18
|
-
node-version: [24.x]
|
|
19
|
-
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout code
|
|
22
|
-
uses: actions/checkout@v5
|
|
23
|
-
|
|
24
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
25
|
-
uses: actions/setup-node@v4
|
|
26
|
-
with:
|
|
27
|
-
node-version: ${{ matrix.node-version }}
|
|
28
|
-
cache: 'npm'
|
|
29
|
-
|
|
30
|
-
- name: Install dependencies
|
|
31
|
-
run: npm ci
|
|
32
|
-
|
|
33
|
-
- name: Run tests
|
|
34
|
-
run: npm test
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: Publish npm package
|
|
2
|
-
on:
|
|
3
|
-
release:
|
|
4
|
-
types: [published]
|
|
5
|
-
jobs:
|
|
6
|
-
npm-publish:
|
|
7
|
-
environment:
|
|
8
|
-
name: npm-bmssp
|
|
9
|
-
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
strategy:
|
|
13
|
-
matrix:
|
|
14
|
-
node-version: [24.x]
|
|
15
|
-
|
|
16
|
-
permissions:
|
|
17
|
-
contents: read
|
|
18
|
-
id-token: write
|
|
19
|
-
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout code
|
|
22
|
-
uses: actions/checkout@v5
|
|
23
|
-
|
|
24
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
25
|
-
uses: actions/setup-node@v4
|
|
26
|
-
with:
|
|
27
|
-
node-version: ${{ matrix.node-version }}
|
|
28
|
-
cache: 'npm'
|
|
29
|
-
registry-url: 'https://registry.npmjs.org'
|
|
30
|
-
|
|
31
|
-
- name: Install dependencies
|
|
32
|
-
run: npm ci
|
|
33
|
-
|
|
34
|
-
- name: Publish package
|
|
35
|
-
run: npm publish --provenance --access public
|
|
36
|
-
env:
|
|
37
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Simple workflow for deploying static content to GitHub Pages
|
|
2
|
-
name: Deploy static content to Pages
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
# Runs on pushes targeting the default branch
|
|
6
|
-
push:
|
|
7
|
-
branches: ["main"]
|
|
8
|
-
paths:
|
|
9
|
-
- 'docs/**'
|
|
10
|
-
|
|
11
|
-
# Allows you to run this workflow manually from the Actions tab
|
|
12
|
-
workflow_dispatch:
|
|
13
|
-
|
|
14
|
-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
15
|
-
permissions:
|
|
16
|
-
contents: read
|
|
17
|
-
pages: write
|
|
18
|
-
id-token: write
|
|
19
|
-
|
|
20
|
-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
21
|
-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
22
|
-
concurrency:
|
|
23
|
-
group: "pages"
|
|
24
|
-
cancel-in-progress: false
|
|
25
|
-
|
|
26
|
-
jobs:
|
|
27
|
-
# Single deploy job since we're just deploying
|
|
28
|
-
deploy:
|
|
29
|
-
environment:
|
|
30
|
-
name: github-pages
|
|
31
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
32
|
-
runs-on: ubuntu-latest
|
|
33
|
-
steps:
|
|
34
|
-
- name: Checkout
|
|
35
|
-
uses: actions/checkout@v5
|
|
36
|
-
- name: Setup Pages
|
|
37
|
-
uses: actions/configure-pages@v5
|
|
38
|
-
- name: Upload artifact
|
|
39
|
-
uses: actions/upload-pages-artifact@v4
|
|
40
|
-
with:
|
|
41
|
-
# Upload entire repository
|
|
42
|
-
path: 'docs/'
|
|
43
|
-
- name: Deploy to GitHub Pages
|
|
44
|
-
id: deployment
|
|
45
|
-
uses: actions/deploy-pages@v4
|
package/Dockerfile
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
FROM node:24-alpine
|
|
2
|
-
|
|
3
|
-
WORKDIR /app
|
|
4
|
-
|
|
5
|
-
# Copy package files and install dependencies
|
|
6
|
-
COPY package*.json ./
|
|
7
|
-
RUN npm install
|
|
8
|
-
|
|
9
|
-
# Mount src/ directory as a volume
|
|
10
|
-
VOLUME ["src/", "tests/"]
|
|
11
|
-
|
|
12
|
-
# Default command (can be overridden)
|
|
13
|
-
CMD ["node", "tests/main.js"]
|
package/test/main.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { printMessage } from "../src/bmssp.mjs";
|
|
2
|
-
|
|
3
|
-
function testFunction() {
|
|
4
|
-
try {
|
|
5
|
-
const result = printMessage("Hello, World!");
|
|
6
|
-
console.log('Test passed:', result);
|
|
7
|
-
} catch (error) {
|
|
8
|
-
console.error('Test failed:', error.message);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
testFunction();
|