Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix broken runnableExamples for getWeeksInIsoYear #20193

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Aug 11, 2022

Based on what I understand from Wikipedia, 2001 does not have 53 weeks, but 2004, 2009, 2015, 2020 do. The years 2000 and 2001 seem to be copy pasted from the getDaysInYear example above. The result of getWeeksInIsoYear also seem to match up with Wikipedia.

That means these runnableExamples were never tested. Why is this the case? I only discovered this in #20091.

Based on what I understand from [Wikipedia](https://en.wikipedia.org/wiki/ISO_week_date#Weeks_per_year), 2001 does not have 53 weeks, but 2004, 2009, 2015, 2020 do. The years 2000 and 2001 seem to be copy pasted from the `getDaysInYear` example above. The result of `getWeeksInIsoYear` also seem to match up with Wikipedia.

That means these runnableExamples were never tested. Why is this the case? I only discovered this in nim-lang#20091.
metagn added a commit to metagn/Nim that referenced this pull request Aug 11, 2022
@ringabout ringabout merged commit 31b7a25 into nim-lang:devel Aug 11, 2022
@github-actions
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from 31b7a25

Hint: mm: orc; threads: on; opt: speed; options: -d:release
163649 lines; 16.808s; 841.605MiB peakmem

metagn added a commit to metagn/Nim that referenced this pull request Aug 12, 2022
Based on what I understand from [Wikipedia](https://en.wikipedia.org/wiki/ISO_week_date#Weeks_per_year), 2001 does not have 53 weeks, but 2004, 2009, 2015, 2020 do. The years 2000 and 2001 seem to be copy pasted from the `getDaysInYear` example above. The result of `getWeeksInIsoYear` also seem to match up with Wikipedia.

That means these runnableExamples were never tested. Why is this the case? I only discovered this in nim-lang#20091.
metagn added a commit to metagn/Nim that referenced this pull request Aug 15, 2022
metagn added a commit to metagn/Nim that referenced this pull request Aug 15, 2022
ringabout added a commit that referenced this pull request Aug 15, 2022
* Improve error message for `strutils.addf` (#20157)

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>

* fixes #20153; do not escape `_` for mysql [backport] (#20164)

* fixes #20153; do not escape `_` for mysql

* add a test

* Update db_mysql.nim

* Update tdb_mysql.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* [minor] don't find `"Hint: gc"` for action (#20170)

* fixes links in the readme (#20167)

* update the docs of arc following up #19749 (#19752)

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* fixes broken ssl tests (#20181)

* bootstrap the compiler with nimPreviewSlimSystem (#20176)

* bootstrap the compiler with nimPreviewSlimSystem

* threads

* docs: fix some spelling errors (#19816)

* docs: fix some spelling errors

* contributing: fix spelling error

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update contributing.md

* Update intern.md

* Update manual.md

* Update manual_experimental_strictnotnil.md

* Update nimgrep_cmdline.txt

* Update pegdocs.txt

* Update testament.md

* Update tut1.md

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Build compiler with --noNimblePath (#20168)

- Fixes #18840

* help our poor CI; don't run CI on other branches for push (#20184)

* fix broken runnableExamples for getWeeksInIsoYear (#20193)

Based on what I understand from [Wikipedia](https://en.wikipedia.org/wiki/ISO_week_date#Weeks_per_year), 2001 does not have 53 weeks, but 2004, 2009, 2015, 2020 do. The years 2000 and 2001 seem to be copy pasted from the `getDaysInYear` example above. The result of `getWeeksInIsoYear` also seem to match up with Wikipedia.

That means these runnableExamples were never tested. Why is this the case? I only discovered this in #20091.

* improve deprecation error messages (#20197)

* Show beatutiful html instead of ugly markdown preview (#20196)

* closes #6559; add testcase (#20200)

* CI upgrade to ubuntu-20.04 (#20182)

* CI upgrade to ubuntu-20.04 

The ubuntu-18.04 environment is deprecated, consider switching to ubuntu-20.04(ubuntu-latest), or ubuntu-22.04 instead. For more details see actions/runner-images#6002

* Update azure-pipelines.yml

* Markdown code blocks part 4 (#20189)

No logic was added, just 8 more files have been migrated.

* closes #15316; add testcase (#20213)

* add version-1-6 and version-1-2 to triggered branches (#20214)

* add version-1-6 and version-1-2 to triggered branches

* Update .github/workflows/ci_packages.yml

* use quote

* closes #12955; add testcase (#20223)

* add more

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
Co-authored-by: Ivan Yonchovski <yyoncho@users.noreply.github.com>
Co-authored-by: metagn <metagngn@gmail.com>
Co-authored-by: Andrey Makarov <ph.makarov@gmail.com>
Araq added a commit that referenced this pull request Aug 24, 2022
* micro implementation of rfc 149

refs nim-lang/RFCs#149

* number/array/seq literals, more statements

* try fix number literal alias issue

* renew expectedType with if/case/try branch types

* fix (nerf) index type handling and float typed int

* use typeAllowed

* tweaks + const test (tested locally) [skip ci]

* fill out more of the checklist

* more literals, change @ order, type conversions

Not copying the full call tree before the typedesc call check
in `semIndirectOp` is also a small performance improvement.

* disable self-conversion warning

* revert type conversions (maybe separate op later)

* deal with CI for now (seems unrelated), try enums

* workaround CI different way

* proper fix

* again

* see sizes

* lol

* overload selection, simplify int literal -> float

* range, new @ solution, try use fitNode for nil

* use new magic

* try fix ranges, new magic, deal with #20193

* add documentation, support templates

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
capocasa pushed a commit to capocasa/Nim that referenced this pull request Mar 31, 2023
Based on what I understand from [Wikipedia](https://en.wikipedia.org/wiki/ISO_week_date#Weeks_per_year), 2001 does not have 53 weeks, but 2004, 2009, 2015, 2020 do. The years 2000 and 2001 seem to be copy pasted from the `getDaysInYear` example above. The result of `getWeeksInIsoYear` also seem to match up with Wikipedia.

That means these runnableExamples were never tested. Why is this the case? I only discovered this in nim-lang#20091.
capocasa pushed a commit to capocasa/Nim that referenced this pull request Mar 31, 2023
* micro implementation of rfc 149

refs nim-lang/RFCs#149

* number/array/seq literals, more statements

* try fix number literal alias issue

* renew expectedType with if/case/try branch types

* fix (nerf) index type handling and float typed int

* use typeAllowed

* tweaks + const test (tested locally) [skip ci]

* fill out more of the checklist

* more literals, change @ order, type conversions

Not copying the full call tree before the typedesc call check
in `semIndirectOp` is also a small performance improvement.

* disable self-conversion warning

* revert type conversions (maybe separate op later)

* deal with CI for now (seems unrelated), try enums

* workaround CI different way

* proper fix

* again

* see sizes

* lol

* overload selection, simplify int literal -> float

* range, new @ solution, try use fitNode for nil

* use new magic

* try fix ranges, new magic, deal with nim-lang#20193

* add documentation, support templates

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
narimiran pushed a commit that referenced this pull request May 11, 2023
* micro implementation of rfc 149

refs nim-lang/RFCs#149

* number/array/seq literals, more statements

* try fix number literal alias issue

* renew expectedType with if/case/try branch types

* fix (nerf) index type handling and float typed int

* use typeAllowed

* tweaks + const test (tested locally) [skip ci]

* fill out more of the checklist

* more literals, change @ order, type conversions

Not copying the full call tree before the typedesc call check
in `semIndirectOp` is also a small performance improvement.

* disable self-conversion warning

* revert type conversions (maybe separate op later)

* deal with CI for now (seems unrelated), try enums

* workaround CI different way

* proper fix

* again

* see sizes

* lol

* overload selection, simplify int literal -> float

* range, new @ solution, try use fitNode for nil

* use new magic

* try fix ranges, new magic, deal with #20193

* add documentation, support templates

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
(cherry picked from commit 0014b9c)
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.

None yet

2 participants