riscy / melpazoid Goto Github PK
View Code? Open in Web Editor NEWA bundle of CI scripts for testing Emacs packages, primarily submissions to MELPA.
License: GNU General Public License v3.0
A bundle of CI scripts for testing Emacs packages, primarily submissions to MELPA.
License: GNU General Public License v3.0
As melpa/melpa#6728, melpa have no python 3.6.
we can't expect python
, but we can expect Emacs
:).
Elisp is Turing complete and, fortunately, or unfortunately, can even execute external commands.
We should migrate from python
to the Elisp batch file while the project is still small.
The following warnings are produced when running GitHub actions using the current melpazoid.yml:
build
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/setup-python@v1
The
set-output
command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Melpa isn't a complete archive of Emacs packages. I think you should also check the Emacsmirror (including Emacsattic). You could use the epkg
package for that purpose or you could just get the necessary information from the Emacsmirror's data repository directly.
As an example, this would have allowed you to notice when accepting melpa/melpa#6725 that https://www.emacswiki.org/emacs/download/srfi.el also exists. (You won't be able to see that now anymore, because I am updating the Emacsmirror to mirror that new implementation. That often is the right thing to do but its still a good idea to inspect the older implementation and to make the author of the new one aware of it in case they want to lift some ideas or something.)
Hi!
This project looks so cool!
But I try this project, stack at Building container...
$ MELPA_PR_URL=https://github.com/melpa/melpa/pull/6725 make
python melpazoid.py
Cloning https://github.com/srfi-explorations/emacs-srfi
Building container... π³
^CTraceback (most recent call last):
File "melpazoid.py", line 563, in <module>
check_melpa_pr(os.environ['MELPA_PR_URL'])
File "melpazoid.py", line 495, in check_melpa_pr
return run_checks(recipe, elisp_dir, clone_address, pr_data)
File "melpazoid.py", line 82, in run_checks
check_containerized_build(_package_name(recipe))
File "melpazoid.py", line 91, in check_containerized_build
output = subprocess.check_output(['make', 'test', f"PACKAGE_NAME={package_name}"])
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 491, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1011, in communicate
stdout = self.stdout.read()
KeyboardInterrupt
make: *** [Makefile:6: run] Interrupt
How to debug this issue?
My OS is linux, Emacs-26.3
Hello, I found a repository where melpazoid is used for CI on GitHub Actions, using melpazoid.yml
from your repository.
It failed unconditionally on PRs, but I fixed it by setting LOCAL_REPO
environment variable: https://github.com/tecosaur/emacs-everywhere/pull/17/files
I think either your documentation or melpazoid.yml
needs an update to ensure that LOCAL_REPO
is set when used in individual package repositories.
680f58e introduced a suggestion for the %Y-%m-%d
time string. But for some reason it also prints the suggestion for %y-%m-%d
(with lower-cased y).
Ref: https://github.com/alexluigit/dirvish/blob/4a99dc5c9a2d3575183cd368284bb217b35f8007/dirvish-widgets.el#L30
Ref: https://github.com/alexluigit/dirvish/actions/runs/3189587662/jobs/5203562609#step:5:19
I'm integrating melpazoid to Eask, so I'm trying to use this tool through the command line.
$ python melpazoid /path/to/my/openai/
It gives me this error output:
Set a recipe with: [--recipe RECIPE]
Then I tried the options --recipe
:
$ python melpazoid /path/to/my/openai/ '(openai :fetcher github :repo "emacs-openai/openai")'
it gives me:
usage: melpazoid.py [-h] [--license] [--recipe RECIPE] [target]
melpazoid.py: error: argument --recipe: '(openai :fetcher github :repo emacs-openai/openai)' must be a valid MELPA recipe
If I tried using batch file:
set LOCAL_REPO=D:/_workspace/_eask/openai
set RECIPE=(openai :fetcher github :repo "jcs090218/openai")
make
it gives me:
Traceback (most recent call last):
File "D:\_workspace\_eask\melpazoid\melpazoid\melpazoid.py", line 995, in <module>
_main()
File "D:\_workspace\_eask\melpazoid\melpazoid\melpazoid.py", line 987, in _main
check_melpa_recipe(os.environ['RECIPE'])
File "D:\_workspace\_eask\melpazoid\melpazoid\melpazoid.py", line 672, in check_melpa_recipe
clone_address = _clone_address(recipe)
^^^^^^^^^^^^^^^^^^^^^^
File "D:\_workspace\_eask\melpazoid\melpazoid\melpazoid.py", line 826, in _clone_address
(package-recipe--upstream-url {_recipe_struct_elisp(recipe)}))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\_workspace\_eask\melpazoid\melpazoid\melpazoid.py", line 842, in _recipe_struct_elisp
return eval_elisp(
^^^^^^^^^^^
File "D:\_workspace\_eask\melpazoid\melpazoid\melpazoid.py", line 871, in eval_elisp
raise ChildProcessError(f"Emacs crashed: {result.stderr.decode()}")
ChildProcessError: Emacs crashed: Non-hex character used for Unicode escape: s (115)
make: *** [Makefile:7: run] Error 1
I've tried several packages but they all have the same result. I'm pretty sure the recipe format is a valid MELPA recipe. Does this tool support local package? π€
python3
will just be python
.3.11.5
.Hello, I followed the sharp-quoting advice from melpazoid.el and changed my code as follows:
;; error
(define-obsolete-function-alias #'org-starter-load-local-variables
#'org-starter-org-mode-hook
"0.2.9")
However, this causes a byte-compilation error (with Emacs 27.1) of org-starter-load-local-variables
not being known to be defined.
The following code doesn't cause the byte-compilation error:
;; ok
(define-obsolete-function-alias 'org-starter-load-local-variables
#'org-starter-org-mode-hook
"0.2.9")
Likewise, sharp-quoting the first function in the following defalias
form caused the same error:
;; error
(defalias #'org-starter-get-files-in-path #'org-starter--get-files-in-path)
According to the behavior of the byte-compiler, it is apparently wrong to sharp-quote obsolete functions. The following tests will need changes:
;; BTW, there shouldn't be the closing parenthesis at the end of this pattern
(melpazoid-misc "(defalias '[^#()]*)" msg)
(melpazoid-misc "(define-obsolete-function-alias '[[:graph:]]+ '[[:graph:]]" msg)
Note that the error doesn't occur when second functions are sharp-quoted. This must be because they are defined in prior to the alias definitions.
It's common to first define a keymap and then define a prefix command using fset
:
(defvar apprentice-phoenix-command-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "n w") #'apprentice-phoenix-find-web)
(define-key map (kbd "n v") #'apprentice-phoenix-find-views)
(define-key map (kbd "n c") #'apprentice-phoenix-find-controllers)
(define-key map (kbd "n l") #'apprentice-phoenix-find-channels)
(define-key map (kbd "n t") #'apprentice-phoenix-find-templates)
(define-key map (kbd "n m") #'apprentice-phoenix-find-models)
(define-key map (kbd "n s") #'apprentice-phoenix-find-static)
(define-key map (kbd "n r") #'apprentice-phoenix-router)
(define-key map (kbd "n R") #'apprentice-phoenix-routes)
map)
"Keymap for Apprentice Phoenix commands after `apprentice-key-command-prefix'.")
(fset 'apprentice-phoenix-command-map apprentice-phoenix-command-map)
Melpazoid currently raises a false positive in this situation:
- apprentice-phoenix.el#L116: Ensure this
fset
isn't being used as a surrogatedefalias
Is it possible to suppress this kind of warning?
I fixed a local copy with the following patch:
(buffer-name)
- (pkg-info-format-version
- (pkg-info-package-version "package-lint")))
+ (pkg-info-version-info "package-lint"))
ELISP> (symbol-file 'package-lint 'provide)
"/home/user/.emacs.d/straight/build/package-lint/package-lint.elc"
ELISP> (pkg-info-package-version "package-lint")
*** Eval error *** Canβt find installed package package-lint
ELISP> (pkg-info-version-info "package-lint")
"0"
ELISP> (epl-find-installed-package 'package-lint)
nil
ELISP>
π€·ββοΈ
I think epl might be broken, but I can't really follow it farther.
In any case, just to pump a message out to a buffer, I think pkg-info-version-info
is fine.
Warning when updating melpazoid
With emacs-30 (build from master), I'm getting warnings.
In melpazoid--package-load-paths:
.config/emacs/local/melpazoid.el:58:2: Warning: docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')
In melpazoid--buffer-almost-empty-p:
.config/emacs/local/melpazoid.el:70:2: Warning: docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')
Hey! I noticed a couple of recently-added packages (eshell-atuin
/lazy-ruff
) ended up having invalid homepage tags (;; URL:
headers), and I reckon we could automate checks for those, at least to make sure they're not 404. It probably isn't appropriate for package-lint
to make spurious web requests, because I feel like that should work identically offline, so perhaps that check belongs here?
Hi,
I am trying to write my first emacs package. While going through all the bells and whistles and the thought of submitting it later on melpa, I am trying to use this workflow. However, I get the following error on https://github.com/f3sch/b4.el/tree/fix_melpazoid (on master I tried to modify the action):
Not sure what is going on there...
On master it is failing with the same message and using the action provided by https://github.com/alphapapa/makem.sh works.
Any help is appreciated as I am not really familiar with github actions.
Thanks.
ArchLinux does not allow installing packages outside a venv
or the regular AUR packages.
A venv
is unnecessary, and melpazoid
is the exact kind of package that should be used separately, so it makes sense to add a PKGBUILD and push to the AUR.
Thanks for the scripts.
Today I was using melpazoid on a package I'm developing and was surprised to see:
byte-compile (using Emacs 27.1):
wikinfo.el:254:1:Warning: the following functions are not known to be defined:
json-parse-string, libxml-parse-html-region
I assume the docker image is not compiled w JSON or libxml support.
Editing the file is easy enough, but it might be worth it to mention this in the docs and/or introduce another environmental variable to add compile options for the container's Emacs build.
It might be a good idea to warn for private symbols which do not match the package's prefix.
The current version (at d482d5d) didn't seem to work for me.
With an update to actions/checkout
and actions/setup-python
it looks like it's working as expected (and entered as an issue rather than PR since there may be something i'm overlooking)
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
This is probably a huge ask but would it be possible to support podman? Trying to run this locally gives:
python3 melpazoid/melpazoid.py
Using local repository at /Users/sean/projects/org-cv
<!-- Building container for ox-altacv... π³ -->
Stderr output while compiling/loading:
\ ```
make[1]: docker: No such file or directory
make[1]: *** [image] Error 1
\ ```
Package and license:
- Prefer the default recipe or `:defaults`, if possible.
- GNU General Public License v3.0 (via API)
- GPL* -- org-cv-utils.el: Common utility functions for CV exporters
- GPL* -- ox-altacv.el: LaTeX altacv Back-End for Org Export Engine
I'm totally willing to try to help but wanted to bring up this discussion first!
Currently melpazoid
provides feedback with little granularity, and only up to the offending section.
For example,
- The `;;; Commentary` for this file is much wider than 80 characters
I instead propose the format that states:
- lines [38--40] are wider than 80 characters
Or better yet,
- line 38 is 90 characters, should be less than 80.
- line 39 is 92 characters, should be less than 80.
This format collaborates with the potential submitter by pointing them to the offending line, as is common with most modern tools/programming languages.
Is it possible to run melpazoid.py
(or its licence checker) without Docker?
I'm trying to integrate melpazoid into Nix, and I've successfully run extra checks provided by melpazoid.el
in Nix: akirak/elinter#24 (Note: I plan on rewriting the project from scratch for much less code, so the PR is just a demonstration.)
I'm also trying to run melpazoid.py
(for the license checker) in Nix, but it invokes make test
, which in turn starts building a Docker container, which causes the same issue as #1.
Since Docker is often used for similar purposes to Nix, it would be better if melpazoid.py
could be run without Docker, or allow running only the license checker. There are many CI solutions for elisp projects out there, but AFAIK none of them check license, so it would be convenient to allow using the license checker independently.
Hi. Dependency conflict occurs on installing requirements.txt
. (Python 3.9.6)
>> pip install -r requirements.txt
Collecting requests==2.24
Using cached requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting certifi==2020.6.20
Using cached certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
Collecting chardet==3.0.4
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting urllib3==1.26.5
Using cached urllib3-1.26.5-py2.py3-none-any.whl (138 kB)
Collecting idna==2.10
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
ERROR: Cannot install -r requirements.txt (line 1) and urllib3==1.26.5 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested urllib3==1.26.5
requests 2.24.0 depends on urllib3!=1.25.0, !=1.25.1, <1.26 and >=1.21.1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
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.