Skip to content

Commit 2658245

Browse files
Merge commit 'f27a44bf9e8955c3019ced9313695adc0bb1744c'
2 parents 3878958 + f27a44b commit 2658245

File tree

173 files changed

+52611
-19594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+52611
-19594
lines changed

.github/workflows/automated-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Check out repository code
1717
uses: actions/checkout@v5
1818
- name: Use Node.js
19-
uses: actions/setup-node@v4
19+
uses: actions/setup-node@v5
2020
with:
2121
node-version: lts/*
2222
cache: npm
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Check Modules Compare Harness
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
runIdSuffix:
7+
description: Optional suffix appended to the harness run ID (e.g., branch name)
8+
required: false
9+
default: ""
10+
schedule:
11+
- cron: "0 6 * * 1"
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
compare:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 60
20+
steps:
21+
- name: Check out repository code
22+
uses: actions/checkout@v5
23+
24+
- name: Use Node.js
25+
uses: actions/setup-node@v5
26+
with:
27+
node-version: lts/*
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Generate fixture dataset
34+
run: node --run fixtures:generate
35+
36+
- name: Prepare harness run ID
37+
id: prepare
38+
env:
39+
RUN_ID_SUFFIX: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.runIdSuffix || '' }}
40+
run: |
41+
BASE="ci-${GITHUB_RUN_ID}"
42+
if [ -n "$RUN_ID_SUFFIX" ]; then
43+
BASE="${BASE}-${RUN_ID_SUFFIX}"
44+
fi
45+
echo "run-id=${BASE}" >> "$GITHUB_OUTPUT"
46+
47+
- name: Run comparison harness
48+
env:
49+
HARNESS_RUN_ID: ${{ steps.prepare.outputs.run-id }}
50+
run: npm run checkModules:compare -- --run-id "$HARNESS_RUN_ID"
51+
52+
- name: Upload comparison artifacts
53+
if: always()
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: compare-harness-${{ steps.prepare.outputs.run-id }}
57+
path: .pipeline-runs/compare/${{ steps.prepare.outputs.run-id }}
58+
if-no-files-found: error

.github/workflows/container-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
# regular build
3131
PARAMS="--output type=image,\"name=ghcr.io/${REPO}:${{ github.ref_name }}\",push=true"
3232
else
33-
# only build with small wiki list and no image push
34-
PARAMS="--output type=image,push=false --opt build-arg:WIKI_FILE=website/test/3rd-Party-Modules.md"
33+
# only build without pushing the image; still pull the full wiki dataset
34+
PARAMS="--output type=image,push=false"
3535
fi
3636
# registry credentials
3737
export DOCKER_CONFIG="$(pwd)/container"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Makes sure our published module data still looks good before we merge changes
2+
name: Release Artifact Validation
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
actions: read
14+
15+
jobs:
16+
validate-release-artifacts:
17+
name: Validate release artifacts
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Check out repository
22+
uses: actions/checkout@v5
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v5
26+
with:
27+
node-version: 24
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build bundled schemas
34+
run: npm run schemas:build
35+
36+
- name: Validate release artifacts
37+
run: npm run release:validate

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.pipeline-runs/
12
/modules/*
23
/modules_/*
34
/modules_temp/*

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
*.js
22
website/data/*.json
3+
fixtures/baseline/
4+
fixtures/data/
35
website/fonts/
46
modules/
57
result.md

README.md

Lines changed: 2 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -55,88 +55,14 @@ Here are some test results:
5555
- _Deprecated: Found 'node-version: [16' in file `nodejs.yml`: Update to current version._
5656
- _Issue: The license in the package.json (ISC) doesn't match the license file (MIT)._
5757

58-
## Prerequisites
58+
## Contributor Guide
5959

60-
For running the scripts and developing you need:
61-
62-
- [Python](https://www.python.org)
63-
- [node.js](https://nodejs.org)
64-
65-
## Installation
66-
67-
1. Clone this repository:
68-
`git clone https://github.com/MagicMirrorOrg/MagicMirror-3rd-Party-Modules`
69-
2. Change into the created directory:
70-
`cd MagicMirror-3rd-Party-Modules`
71-
3. Install dependencies:
72-
`npm install`
73-
74-
## Scripts
75-
76-
With `npm start` you can call up a cli menu that offers you options for execution.
77-
78-
You can run all scripts in the right order by `node --run all`.
79-
80-
_Note_: Running all scripts requires a lot of time (> 10 min) and space on your hard drive (> 2 GB).
81-
82-
### create_module_list.js
83-
84-
This script reads the GitHub info of the modules from the respective GitHub repo and writes it to a json file.
85-
86-
### updateRepositoryApiData.js
87-
88-
This script reads data, such as the number of stars, via the GitHub API for a few modules.
89-
90-
### get_modules.py
91-
92-
This script reads the module list (created by the script before) and clones all modules.
93-
94-
_Note_: This script takes a long time (> 10 min) to download all modules and also takes up a lot of space on your hard drive (> 2 GB).
95-
96-
### expand_module_list_with_repo_data.js
97-
98-
This script expands the module list with information from the `package.json` files from the modules (if available).
99-
100-
The script also adds an image. To do this, it searches the module's repo for an image that contains "screenshot" or "example" in it's name. If it doesn't find anything like that, it takes the first image it finds in the repo.
101-
102-
_Note_: Images will only be included if a free license is specified in the `package.json`.
103-
104-
### check_modules_js.js
105-
106-
This script does some additional checks on the modules like if the main js file is named correctly or minified.
107-
108-
### check_modules.py
109-
110-
This script goes through all cloned modules and performs various checks. The result is written to the files [`result.html`](https://modules.magicmirror.builders/result.html) and [`modules.json`](./website/data/modules.json).
111-
112-
### Special script: create_own_module_list.js
113-
114-
This script is for developers who want to test their own modules themselves. It can also be used to test other branches.
115-
116-
This script replaces the first script `create_module_list.js` for this case.
117-
118-
How can you use it?
119-
120-
1. Write the module or modules you want to test in a new file [`ownModuleList.json`](ownModuleList.json) (use `ownModuleList_sample.json` as template). The only obligatory field is "url", but you can also enter a "branch".
121-
2. Execute `node --run ownList`.
122-
3. You can see the result in [`result.html`](https://modules.magicmirror.builders/result.html).
123-
124-
## Running the produced container image locally
125-
126-
We are running this project as container. For testing the produced container you can run it locally by executing
127-
128-
```bash
129-
docker run --rm -p 8080:8080 ghcr.io/magicmirrororg/magicmirror-3rd-party-modules:main
130-
```
131-
132-
You can access the content with a webbrowser under http://localhost:8080.
60+
Contributor setup instructions—including required runtimes and installation steps—now live in the [Contributing Guide](docs/CONTRIBUTING.md). Casual readers can skip straight to the module catalogue.
13361

13462
## Ideas / To do
13563

13664
See [GitHub issues](https://github.com/MagicMirrorOrg/MagicMirror-3rd-Party-Modules/issues) for ideas and tasks.
13765

138-
Track pipeline modernization progress in [`pipeline-refactor-roadmap.md`](pipeline-refactor-roadmap.md).
139-
14066
### Templates for the creation of issues
14167

14268
- Missing keywords: <https://github.com/BrianHepler/MMM-BirdNET/issues/6>
@@ -146,14 +72,6 @@ Track pipeline modernization progress in [`pipeline-refactor-roadmap.md`](pipeli
14672
- Move screenshot to repository: <https://github.com/joschi27/MMM-flatastic/issues/3>
14773
- Reference to the check results: <https://github.com/Fabrizz/MMM-OnSpotify/issues/48>
14874

149-
### Discarded ideas
150-
151-
- New test: Is `moment` in use? <https://momentjs.com/docs/#/-project-status/>.
152-
- `moment` is not really dead yet (it is no longer being developed, but it is still being maintained), so there is no urgent reason to change now. This is a test for the future when the Temporal API is ready.
153-
- Use data from GitHub API: <https://api.github.com/repos/MagicMirrorOrg/MagicMirror>
154-
- Is there also a GitLab API? Yes, example: <https://gitlab.com/khassel/MMM-RepoStats/-/blob/master/node_helper.js?ref_type=heads#L116>
155-
- Unfortunately, the queries are blocked relatively quickly when we query information from each module via the API.
156-
15775
## License
15876

15977
This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.

cspell.config.json

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,63 @@
22
"version": "0.2",
33
"language": "en",
44
"words": [
5+
"Accu",
6+
"airquality",
57
"anniversarymodule",
8+
"apidevtools",
9+
"aseag",
610
"axios",
711
"bergfex",
812
"bugsounet",
13+
"checkjs",
14+
"checkpy",
915
"codeberg",
16+
"Cutover",
17+
"diffing",
1018
"depandabot",
1119
"dependencie",
20+
"Fenner",
1221
"fontawesome",
1322
"Gitea",
1423
"hoster",
24+
"Itay",
1525
"Kristjan",
1626
"magicmirror",
27+
"magicmirrororg",
1728
"mainbranch",
1829
"marcomerens",
30+
"michmich",
1931
"mmpm",
2032
"MMRIZE",
2133
"mplayer",
34+
"mtimes",
2235
"NOASSERTION",
2336
"omxplayer",
2437
"openweathermap",
2538
"ptrbld",
39+
"PYTHONPATH",
2640
"ratp",
41+
"refspecs",
2742
"rollup",
2843
"smarthome",
2944
"testconfig",
30-
"Updat"
45+
"trumpetx",
46+
"Updat",
47+
"venv",
48+
"virtualenv",
49+
"workstream",
50+
"workstreams",
51+
"Workstreams"
3152
],
3253
"ignorePaths": [
54+
"fixtures/**/*.json",
3355
"node_modules/",
3456
"modules/",
3557
"modules_temp/",
3658
"website/**",
3759
"eslint-config-DEBUG.json",
38-
"container/"
60+
"container/",
61+
"website/test/3rd-Party-Modules.md"
3962
],
4063
"dictionaries": ["node"]
4164
}

0 commit comments

Comments
 (0)