Skip to content

Kodev check#8682

Merged
Frenzie merged 9 commits into
koreader:masterfrom
yparitcher:kodevcheck
Apr 2, 2023
Merged

Kodev check#8682
Frenzie merged 9 commits into
koreader:masterfrom
yparitcher:kodevcheck

Conversation

@yparitcher

@yparitcher yparitcher commented Jan 18, 2022

Copy link
Copy Markdown
Member

run all the tests from the CI

CircleCI use kodev check

This should lead to less redundant scripts

The kodev part works fine, however since the docker relies on the CI scripts to set up the env, it doesn't work so nicely for CircleCi


This change is Reviewable

@yparitcher yparitcher requested a review from Frenzie as a code owner January 18, 2022 02:22
@yparitcher

Copy link
Copy Markdown
Member Author

I give up on getting CircleCi to behave, so this is just good for us devolpers to run the same tests

@Frenzie Frenzie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS The git version is low because it's waiting for an alternative to #7775 and I don't want to spend time doing maintenance on the old image if I can help it.

Unfortunately as stated elsewhere it looks like we'll have to switch back to non-Docker like in the old days.

Comment thread kodev Outdated
Comment thread kodev
} && popd || exit
}

function kodev-check() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do wonder if inlining it all like this is the best plan for ease of use/clarity/maintenance? I'm inclined to think it might be preferable to stick to something along the general lines of how it is right now.

You could just put a make static-check here that executes the script, or make or not you could also just source it or something.

koreader/Makefile

Lines 606 to 612 in ca6d82e

static-check:
@if which luacheck > /dev/null; then \
luacheck -q {reader,setupkoenv,datastorage}.lua frontend plugins spec; \
else \
echo "[!] luacheck not found. "\
"you can install it with 'luarocks install luacheck'"; \
fi

@codecov

codecov Bot commented Jan 19, 2022

Copy link
Copy Markdown

Codecov Report

Patch coverage: 15.24% and project coverage change: -0.54 ⚠️

Comparison is base (c3d2e62) 39.73% compared to head (7220bde) 39.20%.

❗ Current head 7220bde differs from pull request most recent head 1c5d0b4. Consider uploading reports for the commit 1c5d0b4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8682      +/-   ##
==========================================
- Coverage   39.73%   39.20%   -0.54%     
==========================================
  Files         290      294       +4     
  Lines       50374    51365     +991     
==========================================
+ Hits        20017    20138     +121     
- Misses      30357    31227     +870     
Impacted Files Coverage Δ
frontend/apps/filemanager/filemanager.lua 15.43% <0.00%> (ø)
frontend/apps/filemanager/filemanagershortcuts.lua 25.74% <ø> (+0.49%) ⬆️
frontend/apps/reader/modules/readerstyletweak.lua 38.81% <0.00%> (ø)
frontend/device/sdl/device.lua 48.40% <ø> (+0.43%) ⬆️
frontend/document/credocument.lua 70.08% <ø> (ø)
frontend/document/document.lua 68.18% <0.00%> (-0.12%) ⬇️
frontend/document/koptinterface.lua 29.65% <0.00%> (-0.10%) ⬇️
frontend/document/pdfdocument.lua 60.40% <0.00%> (ø)
frontend/ui/data/css_tweaks.lua 100.00% <ø> (ø)
frontend/ui/widget/bboxwidget.lua 18.05% <0.00%> (ø)
... and 68 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yparitcher

Copy link
Copy Markdown
Member Author

Btw, the segfault bug appears to be only with 18.04, so we can leave the appimage on 16.04 for max compat and update the rest of the docker images to 20.04 which is nice and 2 years old by now :) This way you can still keep docker

@Frenzie

Frenzie commented Jan 19, 2022

Copy link
Copy Markdown
Member

Really? I'd swear 20.04 is one of the very first things I tried and that I ran into the same issue. That'd be good news. :-)

@yparitcher

Copy link
Copy Markdown
Member Author

It was working on GHA and 18.04 wasn't, so i assumed it might be the same for docker

@yparitcher

Copy link
Copy Markdown
Member Author

If it does work and we upgrade I would like to help clean up the docker image: Install everything in system directories and get rid of the need to mangle paths

@Frenzie

Frenzie commented Jan 19, 2022

Copy link
Copy Markdown
Member

You can do that regardless if you want. Docker will remain in use. What do you mean mangle paths though?

@yparitcher

yparitcher commented Jan 19, 2022

Copy link
Copy Markdown
Member Author

every Ci script has to add the user luarocks directory to its path and the shellcheck path etc

@Frenzie

Frenzie commented Jan 19, 2022

Copy link
Copy Markdown
Member

If it "has to" then that's an oversight due to that being required before Docker.

@yparitcher

Copy link
Copy Markdown
Member Author

If it "has to" then that's an oversight due to that being required before Docker.

most of the cruft is not from docker rather from how the CI scripts were originally set up from travis and before

@ghost

ghost commented Jan 28, 2022

Copy link
Copy Markdown

@yparitcher Maybe it would make sense to add a make doc check too. See #8742 and #8636 (comment).

Hopefully this could help to shortcut some PR's.

@Frenzie

Frenzie commented Jan 28, 2022

Copy link
Copy Markdown
Member

Btw, I don't currently run ldoc on PRs because it almost always wastes about 10 additional seconds. A mistake that slips through just means the docs will be a couple of days out of date at worst.

@ghost

ghost commented Jan 28, 2022

Copy link
Copy Markdown

@yparitcher Please also add

mapfile -t shellscript_locations < <({ git grep -lE '^#!(/usr)?/bin/(env )?(bash|sh)' | sed "/^plugins\/terminal.koplugin\/shfm$/d" && git submodule --quiet foreach '[ "$path" = "base" -o "$path" = "platform/android/luajit-launcher" ] || git grep -lE "^#!(/usr)?/bin/(env )?(bash|sh)" | sed "s|^|$path/|"' && git ls-files ./*.sh; } | sort | uniq)

for skipping checks onf shfm

Thanks.

@ghost

ghost commented Jan 28, 2022

Copy link
Copy Markdown

Btw, I don't currently run ldoc on PRs because it almost always wastes about 10 additional seconds. A mistake that slips through just means the docs will be a couple of days out of date at worst.

I also haven't done this regularly.. So this is no big deal. B u t; If we are at the hunt, if we are on a special thing, if we are onto it: It might be easy to solve right now. And 10s now is better than 100s the next day :) :) :) ;)

@Frenzie

Frenzie commented Jan 28, 2022

Copy link
Copy Markdown
Member

It's a very deliberate choice. People who add docs normally test them first to see if they look okay! Otherwise that's like submitting a PR with untested code. There's an expectation that it works at least in the emulator. ;-)

Anyway, point being it's a giant waste of time and the risk of failure is zero.

@poire-z

poire-z commented Oct 25, 2022

Copy link
Copy Markdown
Contributor

Is this PR still relevant?

@Frenzie

Frenzie commented Oct 25, 2022

Copy link
Copy Markdown
Member

Ah, forget what I just said. Let's close them both and we'll find it easily enough in the future. :-) I didn't even realize/remember there were two PRs.

@Frenzie Frenzie added this to the 2023.04 milestone Apr 2, 2023
@Frenzie Frenzie merged commit 3452462 into koreader:master Apr 2, 2023
@yparitcher yparitcher deleted the kodevcheck branch April 2, 2023 21:15
TranHHoang added a commit to TranHHoang/koreader that referenced this pull request May 26, 2023
KOReader 2023.04 "Solar Panel"

![koreader-2023-04-fs8](https://user-images.githubusercontent.com/202757/234975122-d7739c71-74aa-4cb0-a086-72a4bba70f52.png)

It's been another busy month squashing many bugs. Our Mac users will be happy to hear that I told macOS we've supported HiDPI since long before anyone came up with such terminology (koreader#10341), and that the program can now natively build on M1 devices (koreader#10291).

Solar panel credit: <https://openclipart.org/detail/294030/solar-energy> by gnokii

We'd like to thank all contributors for their efforts. Some highlights since the previous release include:

* Readerzooming: fix use of default settings (koreader#10205) @hius07
* ButtonDialog/ButtonDialogTitle: consistent 'width' handling (koreader#10230) @poire-z
* MovableContainer: add support for anchoring initial position (koreader#10230) @poire-z
* Book map, Page browser: add top left menu (koreader#10230) @poire-z
* Book style tweak: add button with CSS suggestions (koreader#10230) @poire-z
* crengine: fix parsing of multibytes encodings (koreader#10230) @poire-z
* readerstyletweak: update profiles on unregistering in dispatcher (koreader#10247) @hius07
* Filesearcher: add search in book metadata (koreader#10198) @hius07
* Fix: Updated legacy directory, which crashed the program (koreader#10260) @Mochitto
* ReaderLink: allow a forward location stack (koreader#10228) @yparitcher
* BookInfo: add page information (koreader#10255) @hius07
* Center pdf manual zoom mode (koreader#10246) @nairyosangha
* File browser: add Folder Menu (koreader#10275) @hius07
* Calendar view: add options to change start time of days (koreader#10254) @weijiuqiao
* filechooser: fix crash on "unreadable content" (koreader#10283) @hius07
* Sync book statistics: add to dispatcher (koreader#10285) @ptrm
* [plugin] Exporter: use util.getSafeFilename() to remove illegal characters from output filename (koreader#10282) @Mochitto
* readerbookmark: fix writing pdf annotation (koreader#10287) @hius07
* Folder Menu: sign for Home folder (koreader#10288) @hius07
* ListMenu: show mark for books with highlights (koreader#10276) @hius07
* Calendar view's day view: thicker separator at 00:00 (koreader#10289) @poire-z
* PageBrowser: tweak scrolling behaviour at book start/end (koreader#10289) @poire-z
* Make `kodev check` feature complete (koreader#8682) @yparitcher
* macOS: support for M1 building (koreader#10291) @ptrm
* Reader: do not apply font size and spacing out of range (koreader#10295, koreader#10307) @hius07
* File browser: show Folder Menu on long-press on Home icon (koreader#10298) @hius07
* SSH.koplugin: fix cant stop SSH server bug when pid file's stale (koreader#10300) @weijiuqiao
* PM: Optimize task queue handling around standby (koreader#10203) @zwim
* statistic.koplugin: fix today's timeline showing next day when within custom offset (koreader#10299) @weijiuqiao
* ReaderThumbnails: update cached page thumbnail on bookmark note change (koreader#10303) @hius07
* SDL: add multitouch support (koreader#10334) @Frenzie
* SDL: add HiDPI support (koreader#10341) @Frenzie
* BookInfo: fix crash on show cover (koreader#10315) @hius07
* Deal with table.pack corner-cases properly (koreader#10350) @NiLuJe
* Android: add Tagus Gea support (<koreader/android-luajit-launcher#412>) @Alfedi

[Full changelog](koreader/koreader@v2023.03...v2023.04) — [closed milestone issues](https://github.com/koreader/koreader/milestone/63?closed=1)

---

Installation instructions: [Android](https://github.com/koreader/koreader/wiki/Installation-on-Android-devices) • [Cervantes](https://github.com/koreader/koreader/wiki/Installation-on-BQ-devices) • [ChromeOS](https://github.com/koreader/koreader/wiki/Installation-on-Chromebook-devices) • [Kindle](https://github.com/koreader/koreader/wiki/Installation-on-Kindle-devices) • [Kobo](https://github.com/koreader/koreader/wiki/Installation-on-Kobo-devices) • [PocketBook](https://github.com/koreader/koreader/wiki/Installation-on-PocketBook-devices) • [ReMarkable](https://github.com/koreader/koreader/wiki/Installation-on-ReMarkable) • [Desktop Linux](https://github.com/koreader/koreader/wiki/Installation-on-desktop-linux) • [MacOS](https://github.com/koreader/koreader/wiki/Installation-on-MacOS)
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants