subcommands help is not displayed on "command --help"

At the end of https://hackage.haskell.org/package/turtle-1.2.8/docs/Turtle-Tutorial.html#g:18 there is an example using subcommand but the help text for subcommands doesn't show up.
$ ./options --help
Volume adjuster

Usage: options (up | down)

Available options:
  -h,--help                Show this help text

  Available commands:
    up
    down

$ ./options up --help
Turn the volume up

Usage: options up AMOUNT

Available options:
  -h,--help                Show this help text
  AMOUNT                   How much to increase the volume

$ ./options up 10
Increasing the volume by 10

I'd expect the snippet to be:
  Available commands:
    up             Turn the volume up
    down           Turn the volume down

This is fixed in master.  The following code:
{-# LANGUAGE OverloadedStrings #-}

import Turtle

data Command = IncreaseVolume Int | DecreaseVolume Int deriving (Show)

parser :: Parser Command
parser
    =   fmap IncreaseVolume
            (subcommand "up" "Turn the volume up"
                (argInt "amount" "How much to increase the volume") )
    <|> fmap DecreaseVolume
            (subcommand "down" "Turn the volume down"
                (argInt "amount" "How much to decrease the volume") )

main = do
    x <- options "Volume adjuster" parser
    case x of
        IncreaseVolume n -> printf ("Increasing the volume by "%d) n
        DecreaseVolume n -> printf ("Decreasing the volume by "%d) n

... produces this --help output:
$ ./example --help
Volume adjuster

Usage: example (up | down)

Available options:
  -h,--help                Show this help text

Available commands:
  up                       Turn the volume up
  down                     Turn the volume down

I'll be pushing a new release to Hackage soon


rgb color type

Supporting a rgb color type would allow UI optimization in MakeCode.

Requires support in makecode buffer. More work than expected. Maybe it's possible to be smarter on the UI side.


Theme compile breaks with "Infinite calling loop error" if trying to compile more than 37 storefronts

PHP Version
7.4.23
Shopware Version
v<IP_ADDRESS> Stable Version
Expected behaviour
Command bin/build-storefront.sh must compile theme for all added in administration panel sales channels
Actual behaviour
Theme compile process failes on 37th sales channel...
How to reproduce
Install product template of shopware 6.
Add near 400 categories and 7000 products.
Add more than 37 sales channels and connect 3000 products to each of them.
Try to call bin/build-storefront.sh and compile sales channels.
Got error:
`
[OK] Dumped plugin configuration.
Cannot check extensions for required npm installations as jq is not installed
added 1732 packages, and audited 1733 packages in 48s
114 vulnerabilities (97 moderate, 17 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run npm audit for details.
npm notice
npm notice New major version of npm available! 7.10.0 -> 8.5.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.5.1
npm notice Run npm install -g<EMAIL_ADDRESS>to update!
npm notice

copied "/home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/node_modules/tiny-slider" to "/home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/tiny-slider"
copied "/home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/node_modules/jquery" to "/home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/jquery"
copied "/home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/node_modules/bootstrap" to "/home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap"
copied "/home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/node_modules/flatpickr" to "/home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/flatpickr"

✓ Done, all directories / files copied successfully.
Execution time: 484.718751ms

<EMAIL_ADDRESS>production
NODE_ENV=production webpack --config webpack.config.js

Webpack Plugin Injector: Plugin "Storefront" injected as a new entry point
✔ Shopware 6 Storefront
Compiled successfully in 41.96s
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
316 modules
Copying files for bundle: FrameworkBundle
Copying files for bundle: MonologBundle
Copying files for bundle: SensioFrameworkExtraBundle
Copying files for bundle: TwigBundle
Copying files for bundle: WebProfilerBundle
Copying files for bundle: DebugBundle
Copying files for bundle: EnqueueBundle
Copying files for bundle: EnqueueAdapterBundle
Copying files for bundle: Framework
Copying files for bundle: System
Copying files for bundle: Content
Copying files for bundle: Checkout
Copying files for bundle: Profiling
Copying files for bundle: Administration
Copying files for bundle: Storefront
Copying files for bundle: Elasticsearch
Copying files for bundle: Maintenance
Copying files for bundle: JtImport
Copying files for bundle: SwagMarkets
Copying files for bundle: SwagExtensionStore
Copying files for bundle: DbalKernelPluginLoader
Copying files for bundle: Recovery
[OK] Successfully copied all bundle files
Start theme compilation
Compiling theme for sales channel for : 0114a6ac5067ffeee286ecd8ed19cd87
! [NOTE] Took 4,461020 seconds
Compiling theme for sales channel for : 026bd7e1c7ba94bd0e4bb293ddcc3fd6
! [NOTE] Took 4,061169 seconds
Compiling theme for sales channel for : 0a4aefdafe144761b9560de939b7047b
! [NOTE] Took 4,232038 seconds
Compiling theme for sales channel for : 11632a454506459c88308280f1686999
! [NOTE] Took 4,717004 seconds
Compiling theme for sales channel for : 13e66bd17e53ebb6976582e362728d54
! [NOTE] Took 4,318023 seconds
Compiling theme for sales channel for : 16d1cd7edecf238c7bfed0cd53b550a0
! [NOTE] Took 4,580483 seconds
Compiling theme for sales channel for : 170d71207fa9a6440f4b3dfbbad19642
! [NOTE] Took 4,534550 seconds
Compiling theme for sales channel for : 190fc4dedceb65c18218e7ad21c4b57c
! [NOTE] Took 5,196443 seconds
Compiling theme for sales channel for : 1ae956329eb29fbe21a4b827c99d32eb
! [NOTE] Took 4,980641 seconds
Compiling theme for sales channel for : 2289eb2471f85cf70e6f945fa41ce421
! [NOTE] Took 5,452691 seconds
Compiling theme for sales channel for : 2714c7d258e4d059c86a3a8a50179d69
! [NOTE] Took 6,146038 seconds
Compiling theme for sales channel for : 2e1fe664cb1e232b55ab10272e8b358a
! [NOTE] Took 7,483166 seconds
Compiling theme for sales channel for : 32225bb93c1866ccd0023dfbdacc05db
! [NOTE] Took 7,396033 seconds
Compiling theme for sales channel for : 33752d05083b0a2bae89a51eaba7f78d
! [NOTE] Took 7,787420 seconds
Compiling theme for sales channel for : 352fabdd5d79a043eb4b6d1d63063a4e
! [NOTE] Took 6,493550 seconds
Compiling theme for sales channel for : 37486bdd326721c1ce41a4b1962fbbaa
! [NOTE] Took 7,803910 seconds
Compiling theme for sales channel for : 381e9686736a9a143244d20233aab29e
! [NOTE] Took 8,548270 seconds
Compiling theme for sales channel for : 3da4c0e39fdb2b6fe30aebb36eb0a099
! [NOTE] Took 8,596200 seconds
Compiling theme for sales channel for : 4106bc5c2154c8393183542179bfe458
! [NOTE] Took 7,080990 seconds
Compiling theme for sales channel for : 4bac9d9e9a06b8f6832c210bb841dd94
! [NOTE] Took 8,512400 seconds
Compiling theme for sales channel for : 50943b24a0f5056d39a99b3269506772
! [NOTE] Took 9,247697 seconds
Compiling theme for sales channel for : 50bb0ae6e3bf5286852a87b4e4c1470f
! [NOTE] Took 9,705199 seconds
Compiling theme for sales channel for : 516135d9dcad41159637e8f8241f9825
! [NOTE] Took 8,100776 seconds
Compiling theme for sales channel for : 58ba02d297dc36594bcc4a793ac35a81
! [NOTE] Took 7,892087 seconds
Compiling theme for sales channel for : 5d5001e291674a22172723adbffe2a5c
! [NOTE] Took 7,764243 seconds
Compiling theme for sales channel for : 5d8c0fead883cb079034962787f08084
! [NOTE] Took 8,944967 seconds
Compiling theme for sales channel for : 617397c216b78b46b33b592997b11681
! [NOTE] Took 10,284572 seconds
Compiling theme for sales channel for : 66f66ba059788a83722f5ae0c6266e57
! [NOTE] Took 9,761450 seconds
Compiling theme for sales channel for : 6776bd4a4dcefe8d8de4649c2013c1d5
! [NOTE] Took 9,560764 seconds
Compiling theme for sales channel for : 6874e1ab8110499a3ff1c98acd6ba1d3
! [NOTE] Took 9,655900 seconds
Compiling theme for sales channel for : 73e0dbf2a15f493ec64e9cd0664e6410
! [NOTE] Took 9,220058 seconds
Compiling theme for sales channel for : 75930b3e71b37f38da98fd212a19dcf8
! [NOTE] Took 9,234703 seconds
Compiling theme for sales channel for : 75ab655bdcb29aa978efd92a81b44ba5
! [NOTE] Took 10,991472 seconds
Compiling theme for sales channel for : 7689b7929e83587a023465ed1896e336
! [NOTE] Took 10,720027 seconds
Compiling theme for sales channel for : 7929c2e75bc6c67e66ccd96ef0e3e202
! [NOTE] Took 10,229808 seconds
Compiling theme for sales channel for : 7a03f202dcdcfd1c1b91cdb9d264e642
! [NOTE] Took 10,199004 seconds
Compiling theme for sales channel for : 7a164ed49cdd262530adb82b4f5b789e
In ThemeCompiler.php line 201:
Unable to compile the theme "Storefront". Infinite calling loop: /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_float.scss on line 7, at c
olumn 53
Call Stack:
#0 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 53
#1 function breakpoint-infix /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_float.scss on line 5
#2 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59
#3 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_float.scss on line 10
#4 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59
#5 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_float.scss on line 10
#6 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59
#7 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_float.scss on line 10
#8 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59
#9 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_float.scss on line 10
#10 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_flex.scss on line 50
#11 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59
#12 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_flex.scss on line 50
#13 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59
#14 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_flex.scss on line 50
#15 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59
#16 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_flex.scss on line 50
#17 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59
#18 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_flex.scss on line 50
#19 mixin media-breakpoint-up /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/utilities/_display.scss on line 14
#20 function breakpoint-min /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/mixins/_breakpoints.scss on line 59

  #12880 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_functions.scss on line 45
  #12881 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 653
  #12882 function theme-color /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 650
  #12883 function theme-color /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 649
  #12884 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_functions.scss on line 45
  #12885 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 577
  #12886 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_functions.scss on line 45
  #12887 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 557
  #12888 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_functions.scss on line 45
  #12889 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 552
  #12890 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_functions.scss on line 45
  #12891 function str-replace /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 548
  #12892 function theme-color /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 535
  #12893 function theme-color /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 246
  #12894 function theme-color /home/admin/web/test.site/vendor/shopware/storefront/Resources/app/storefront/vendor/bootstrap/scss/_variables.scss on line 172

theme:compile [-k|--keep-assets]
`

Thats a known issue in SCSS parser. i guess you can define in theme:compile the theme which should be compilde

Thats a known issue in SCSS parser. i guess you can define in theme:compile the theme which should be compilde

Hi Shyim.
How to do that? If I try to add any argument to bin/console theme:compile it throws me arror No arguments expected for "theme:compile" command
I need to compile theme for 113 sales channels. Can I compile one theme and somehow add it to all sales channels. Or can I compile each sales channel one by one?
How to solve this issue?

Move this https://github.com/shopware/platform/blob/trunk/src/Storefront/Theme/ThemeCompiler.php#L68-L73
into the compileTheme method. Should fix it then

Move this https://github.com/shopware/platform/blob/trunk/src/Storefront/Theme/ThemeCompiler.php#L68-L73 into the compileTheme method. Should fix it then

Thanks a lot. I hope that helps...

Move this https://github.com/shopware/platform/blob/trunk/src/Storefront/Theme/ThemeCompiler.php#L68-L73 into the compileTheme method. Should fix it then
Works like a charm. Thanks a lot!

@shyim reopen please to include this in the core.

Hello,
Within our company roadmap and work capacity, we try to address each bug or improvement request but admit that not each one will be resolved. To continue our culture of honesty and openness, we are closing this issue to focus on our roadmap on behalf of all Shopware users.
If you feel like this issue is still impacting you, please create a new issue and let us know.
Thank you again for your valuable feedback.


[Discussion] Copy build to output folder

I'm trying to copy the results of a build to an output folder as part of our build scripts
I've tried setting
    <BaseIntermediateOutputPath>C:\Out</BaseIntermediateOutputPath>
    <IntermediateOutputPath>C:\Out</IntermediateOutputPath>
    <OutputPath>C:\Out</OutputPath>

but have had none of the js code or modules copied
I know earlier versions used to drop to the bin folder but that's no longer the case
How would I tell my njsproj to copy to a specific output folder?

Closing, as this issue is pretty old. Will reopen if anyone else runs into this.


Feat: Auth_Screens

Added new pages for sign-in and sign-up in  lib/pages/auth_screen folder.

Thanks for approving my pull request @Praveen-Pandiyan . I'll will add those pages images in the folder ASAP. If you have any suggestions or idea share, i'll work on it.


Can we change the repo name to "FindYourCandy"?

To be consistent with the demo name.

Yes. Is the demo name determine by "FindYourCandy"?

Yes

OK, we'll change Repo name soon.

I've just changed our repo name.

Thanks!


Feature/resiliency module

Description
Added E2E test for resiliency module and extending PowerFlex 2.7.0 sample file for supporting resiliency module along with UT coverage for resiliency.go file
GitHub Issues
List the GitHub issues impacted by this PR:

GitHub Issue #

https://github.com/dell/csm/issues/739

Checklist:

[x] I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
[x] I have verified that new and existing unit tests pass locally with my changes
[x] I have not allowed coverage numbers to degenerate
[x] I have maintained at least 90% code coverage
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[x] I have maintained backward compatibility

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

[x] Ran E2E test for PowerStore, PowerScale and PowerFlex
[x] Ran make unit-test and make driver-unit-test
[x] Ran cert-csi after installing the PowerStore 2.7.0 driver, with and without enabling resiliency module.
[x] Tested resiliency module for PowerFlex driver.

Closing it for a while until I fix all checks.


Schema::hasTable does not work when multiple schemas are used

Laravel Version: 8.61.0
PHP Version: 8.0.10
Database Driver & Version: PostgreSQL (libpq) 12.8

Description:
When checking for table existence using Schema::hasTable(), PostgreSQL grammar does not take into account multiple schemas, although Illuminate\Database\Connectors\PostgresConnector::configureSchema() allows for multiple schemas in search_path.
I'll be happy to offer a fix via PR later, if this will be considered worth fixing.
Steps To Reproduce:
Configure your postgres database connection with multiple schemas. For example:
'pgsql' => [
    'driver' => 'pgsql',
    'host' => env('DB_HOST', '<IP_ADDRESS>'),
    'port' => env('DB_PORT', '5432'),
    'database' => env('DB_DATABASE', 'forge'),
    'username' => env('DB_USERNAME', 'forge'),
    'password' => env('DB_PASSWORD', ''),
    'charset' => 'utf8',
    'prefix' => '',
    'schema' => ['public', 'user', 'postgis'],
],

Schema::hasTable generated query is:
select * from information_schema.tables
 where table_schema = 'public'
   and table_name = 'table'
   and table_type = 'BASE TABLE'

It should be (with schemas array as a binding):
select *
  from information_schema.tables
 where table_schema IN ('public', 'user', 'postgis')
   and table_name = 'table'
   and table_type = 'BASE TABLE'

You're better off submitted the PR if you want this feature. It really isn't a "fix" since support for many schemas isn't officially documented:

The config('database.connections.pgsql.schema') sample shows a single schema configured with a string:
https://github.com/laravel/laravel/blob/195faa16cbeabc84b0eb9c9f4227ead762c93575/config/database.php#L66-L79

https://laravel.com/docs/8.x/database#configuration doesn't cover configuring it.

https://laravel.com/docs/8.x/migrations#checking-for-table-column-existence only shows Schema::hasTable() supporting a string argument.

Feature requests are meant to be directed through https://github.com/laravel/framework/discussions.

Thanks, @derekmd. I'll do just that then.

Thanks @derekmd


中文乱码 Chinese is garbled after the generated PDF

Question

My markdown doc contains Chinese, Chinese is garbled after the generated PDF. What should I do? What are the possible problems? I'm a new guy, and I don't have any idea.

Environment
[root@centos7 ~]# python -V
Python 3.7.5
[root@centos7 ~]# pip list
Package                    Version
-------------------------- ---------
beautifulsoup4             4.9.3
cairocffi                  1.2.0
CairoSVG                   2.5.2
cffi                       1.14.5
click                      7.1.2
cssselect2                 0.4.1
defusedxml                 0.7.1
future                     0.18.2
html5lib                   1.1
importlib-metadata         3.7.3
Jinja2                     2.11.3
joblib                     1.0.1
libsass                    0.20.1
livereload                 2.6.3
lunr                       0.5.8
Markdown                   3.3.4
MarkupSafe                 1.1.1
mkdocs                     1.1.2
mkdocs-material            7.0.6
mkdocs-material-extensions 1.0.1
mkdocs-pdf-export-plugin   0.5.8
mkdocs-with-pdf            0.8.3
nltk                       3.5
Pillow                     8.1.2
pip                        19.2.3
pycparser                  2.20
Pygments                   2.8.1
pymarkdown                 0.1.4
pymdown-extensions         8.1.1
Pyphen                     0.10.0
PyYAML                     5.4.1
regex                      2021.3.17
setuptools                 41.2.0
six                        1.15.0
soupsieve                  2.2.1
tinycss2                   1.1.0
toolz                      0.11.1
tornado                    6.1
tqdm                       4.59.0
typing-extensions          <IP_ADDRESS>
WeasyPrint                 52.4
webencodings               0.5.1
zipp                       3.4.1

Repro steps
1. Create a new project.
[root@centos7 ~]# mkdocs new test
[root@centos7 ~]# cd test/

2. Using the plugin.
[root@centos7 test]# cat > mkdocs.yml <<EOF
site_name: 我的测试
dev_addr: <IP_ADDRESS>:8000
plugins:
  - with-pdf:
EOF

3. Rewrite index.md with Chinese
[root@centos7 test]# cat > docs/index.md <<"EOF"
完整文档请访问：[mkdocs.org](https://www.mkdocs.org).

* `mkdocs new [dir-name]` - 创建一个新项目
* `mkdocs serve` - 启动实时重新加载文档服务器
* `mkdocs build` - 建立文档站点
* `mkdocs -h` - 打印这个帮助信息

    mkdocs.yml    # 配置文件、
    docs/
        index.md  # 文档根页面
        ...       # 其他markdown页面, 镜像或其他问题
EOF

4. mkdocs build
[root@centos7 test]# mkdocs build
WARNING -  Config value: 'dev_addr'. Warning: The use of the IP address '<IP_ADDRESS>' suggests a production environment or the use of a proxy to connect to the MkDocs server. However, the MkDocs' server is intended for local development purposes only. Please use a third party production-ready server instead.
INFO    -  Cleaning site directory
INFO    -  Building documentation to directory: /root/test/site
INFO    -  Number headings up to level 3.
INFO    -  Generate a table of contents up to heading level 2.
INFO    -  Generate a cover page with "default_cover.html.j2".
INFO    -  Converting <img> alignment(workaround).
INFO    -  Rendering for PDF.
INFO    -  Output a PDF to "/root/test/site/pdf/document.pdf".
INFO    -  Converting 1 articles to PDF took 2.2s
INFO    -  Documentation built in 2.47 seconds

5. Download and open the pdf

Hi @you-can-change.
I think you need to setup the Chinese environment and fonts(required only when generating PDF).
I'm sorry, I don't know how to do it, so the search keywords are:

Locale
  ```
  # check installed locales
  localectl list-locales | grep -i  zh
  # show now settings
  localectl status

  # set locale
  localectl set-locale LANG=zh_CN.UTF-8
  # or
  export LANG="zh_CN.UTF-8"
  ```

Fonts
  ```
  yum install google-noto-cjk-fonts
  # or
  yum groupinstall Fonts
  # or ...

  # check
  fc-match serif:lang=zh
  fc-match sans-serif:lang=zh
  ```

Thanks a lots,I follow your step, It work now :heart:.
# install the fonts
[root@centos7 test]#  yum groupinstall Fonts

# check fonts
[root@centos7 test]#   fc-match serif:lang=zh
DejaVuSerif.ttf: "DejaVu Serif" "Book"
[root@centos7 test]#   fc-match sans-serif:lang=zh
DejaVuSans.ttf: "DejaVu Sans" "Book"

# set locale
[root@centos7 test]#  localectl set-locale LANG=zh_CN.UTF-8

# show locale settings
[root@centos7 test]# localectl status
   System Locale: LANG=zh_CN.UTF-8
       VC Keymap: us
      X11 Layout: us

# then build
[root@centos7 test]#  mkdocs build

But not work well :sob:, The pdf doesn't have table of contents, and some content didn't show as expected.
It seems to be caused by not being able to handle Chinese normally, Shoud I close the issue?

[root@centos7 test]#   fc-match serif:lang=zh
DejaVuSerif.ttf: "DejaVu Serif" "Book"
[root@centos7 test]#   fc-match sans-serif:lang=zh
DejaVuSans.ttf: "DejaVu Sans" "Book"

Deja Vu is English font(not contains Chinese glyphs) - maybe error fallback.
Please try to install other Chinese font such as "Google Noto CJK".

https://blog.csdn.net/hknaruto/article/details/103311462
https://chankongching.wordpress.com/2020/04/14/centos-7-amazon-linux-2-installing-chinese-lang-pack/
http://yuminstall.org/how-to-install-google-noto-sans-cjk-fonts-20141117-5-el7-noarch-on-centos7/

(I can't read Chinese)

I'm sorry for wasting your time， it was my fault:sweat_smile::sweat_smile::sweat_smile:.
When I translated the default index.md, I treated the sentences beginning with the # sign as comments and deleted them.
So there is no table of contents.
I added the missing directory structure, now it's work very well.Thank you for your support again.:heart::heart::heart:


Drawable with colorFilter

Hi man,
thanks for sharing your work with us.
Working with your library I discover a problem with drawable and color filter.
If i write something like:
Drawable drawable =  getResources().getDrawable(R.drawable.generic_image); drawable.setColorFilter(COLOR.RED, PorterDuff.Mode.SRC_IN); circleImageView.setImageDrawable(drawable);
The drawable will be load correctly but without the color filter.
Using the same code with a normal ImageView the drawable will be rendered correctly.
This problem can be generated with every image (advice: use a gray image the color filter will be more effective).
I'm here if you need more info.
Thanks again.

This has actually been fixed just three days ago, see #29 for reference. I still need to push a new version to Maven Central though. Leaving this issue open until that's done - shouldn't be to long.
For the ColorFilter to work you have to apply it to the View, e.g. circleImageView.setColorFilter(new PorterDuffColorFilter(COLOR.RED, PorterDuff.Mode.SRC_IN).

There is a chance in near future you add this compatibility for drawable too? In my case it will be really useful because i can use with picasso a drawable with its colorfilter for placeholder and then load from network the image i need without clear the color filter from the view. Thank you in any case for the help.

Hi, thanks for the lib. When we can expect a release with the issue fixed?

I'm sorry for the delay, v1.2.2 with ColorFilter support is now on it's way to MavenCentral.


The single process type check is skipped if the AUT is deployed in a non-default namespace

Describe the bug
The single process type check is skipped if the AUT is deployed in a non-default namespace.
Some kubectl commands triggered during the check do not observe the namespace, i.e. the -n  part is missing.
Example for a deployment with two pods - drouter (statefulSet) and dserver (deployment):
I, [2024-05-15 21:12:33 +00:00 #157756]  INFO -- cnf-testsuite: KubectlClient::Get.resource command: kubectl get Deployment dns-dserver -o json
D, [2024-05-15 21:12:34 +00:00 #157756] DEBUG -- cnf-testsuite: KubectlClient::Get.resource output:
I, [2024-05-15 21:12:34 +00:00 #157756]  INFO -- cnf-testsuite: KubectlClient::Get.resource stderr: Error from server (NotFound): deployments.apps "dns-dserver" not found

I, [2024-05-15 21:12:42 +00:00 #157756]  INFO -- cnf-testsuite: KubectlClient::Get.resource command: kubectl get StatefulSet dns-drouter -o json
D, [2024-05-15 21:12:43 +00:00 #157756] DEBUG -- cnf-testsuite: KubectlClient::Get.resource output:
I, [2024-05-15 21:12:43 +00:00 #157756]  INFO -- cnf-testsuite: KubectlClient::Get.resource stderr: Error from server (NotFound): statefulsets.apps "dns-drouter" not found

To Reproduce
Steps to reproduce the behavior:
$ cnf-testsuite version
CNF TestSuite version: v1.2.0

Run the test with helm_install_namespace set to a non-default namespace, e.g. helm_install_namespace: cnti
Observe the result:
🎬 Testing: [single_process_type]
⏭  🏆SKIPPED: [single_process_type] Container resources not checked ⚖👀

Expected behavior
The check is executed and either succeeds or fails.
Device (please complete the following information):
Linux ip-10-0-33-150 6.5.0-1020-aws #20~22.04.1-Ubuntu SMP Wed May  1 16:10:50 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
How will this be tested? aka Acceptance Criteria (optional)
Additional context
Note the check conflicts with the specialized init system check. Example with dumb-init:
🎬 Testing: [single_process_type]
resource: {kind: "StatefulSet", name: "dns-drouter", namespace: "default"}, pod dns-drouter-0 and container: drouter has more than one process type (/usr/local/bin/dumb-init--/usr/local/bin/dns-app, /usr/local/bin/dns-app)
✖  🏆FAILED: [single_process_type] More than one process type used ⚖👀
Maybe the single process type should be tolerant to init subsystems (just as a suggestion)

This will probably need to be addressed for all of the specialized init systems.  We still want to check for multiple process types when those systems are used, but the init-related process (eg. /usr/local/bin/dumb-init--/usr/local/bin/dns-app) should not be treated as an additional process type causing a failure.

Reference

https://github.com/just-containers/s6-overlay/issues/578 - s6 overlay not working with read-only filesystem #578

@taylor , thanks for your comments. I have probably confused you with providing the additional context (single_process_type check fails if init system is used) that is unrelated to the issue reported. Sorry for that.
The issue concerned in this ticket is that the single_process_type check is skipped if the AUT is deployed in a non-default namespace. Some kubectl commands utilized by the test do not use the -n parameter that needs to be added. Thoughts?


remove redundant condition in resnet.py

The "stride != 1" condition here in resnet.py appears to be redundant.
def _make_layer(self, block, planes, blocks, stride=1, dilate=False):
        ...
        if stride != 1 or self.inplanes != planes * block.expansion:
            downsample = nn.Sequential(
                conv1x1(self.inplanes, planes * block.expansion, stride),
                norm_layer(planes * block.expansion),
            )
        ...

Apparently the if statement here is used to decide whether to apply a "downsampling". It seems that this statement is considering two conditions:

the feature map's size(WxH) has changed. (stride != 1)
the number of channels has expanded.(self.inplanes != planes * block.expansion)

I try to explain that the Condition 2 is a strict superset of Condition 1 below.

In all the models from ResNet18 to ResNet152 and their variants, the expansion of channels takes place whenever feature map’s size reduces. This matches the descriptions in the original paper:

if the feature map size is halved, the number of filters is doubled so as to preserve the time complexity per layer.

the opposite is not true. There is one single case where the channels expand without reduction of feature map’s size: when the input goes through the first Bottleneck of first layer, e.g. in ResNet101, its channels expand(from 64 to 256) while its feature maps remain the same size.

It only makes sense to use “stride != 1” if there exists a case where the feature map’s size shrinks but the channels remain the same. But such a situation doesn’t exist in any implementation of all standard ResNet models.
Therefore, I think the stride != 1 condition should be omitted for tidiness and readability.

For a simple test, I try to print the boolean value of both stride != 1 and self.inplanes != planes * block.expansion when the if statement is satisfied.
def _make_layer(self, block, planes, blocks, stride=1, dilate=False):
    ...
    if stride != 1 or self.inplanes != planes * block.expansion:
        print(stride != 1, self.inplanes != planes * block.expansion)
        downsample = nn.Sequential(
            conv1x1(self.inplanes, planes * block.expansion, stride),
            norm_layer(planes * block.expansion),
        )
    ...

I believe following outputs proves my opinion.
>>> import torchvision.models.resnet as resnet
>>> model = resnet.resnet18()
True True
True True
True True
>>> model = resnet.resnet34()
True True
True True
True True
>>> model = resnet.resnet50()
False True
True True
True True
True True
>>> model = resnet.resnet101()
False True
True True
True True
True True
>>> model = resnet.resnet152()
False True
True True
True True
True True
>>> model = resnet.resnext50_32x4d()
False True
True True
True True
True True
>>> model = resnet.resnext101_32x8d()
False True
True True
True True
True True
>>> model = resnet.wide_resnet50_2()
False True
True True
True True
True True
>>> model = resnet.wide_resnet101_2()
False True
True True
True True
True True

Besides, I've checked structures of all ResNet models before and after removing the stride != 1 condition. And they remain perfectly the same.

Hi, thanks for your patient reviewing work!
I totally agree the condition would be useful "when we do not change the number of channels but downsample the input size" as you mentioned.
However, as far as I can see, this may only happen in two cases:

when we try to downsample the input going through the first BasicBlock of the first layer, which naturally doesn't expand channels.
when we try to remain the number of channels when crossing two neighbouring layers, which I suppose you didn't mean to do.

For the first case, we need to assign the value of stride when calling _make_layers() to construct the self.layer1 made of BasicBlock s. However, it's already hard coded as below in __init__():
def __init__(self, block, layers, num_classes=1000, zero_init_residual=False,
                 groups=1, width_per_group=64, replace_stride_with_dilation=None,
                 norm_layer=None):
    ...
    self.layer1 = self._make_layer(block, 64, layers[0])
    self.layer2 = self._make_layer(block, 128, layers[1], stride=2,
                                       dilate=replace_stride_with_dilation[0])
    self.layer3 = self._make_layer(block, 256, layers[2], stride=2,
                                       dilate=replace_stride_with_dilation[1])
    self.layer4 = self._make_layer(block, 512, layers[3], stride=2,
                                       dilate=replace_stride_with_dilation[2])
    ...

As for the second case, it is also not feasible since the planes assigned to _make_layers() is also hard coded to expand by 2 every layer as we can see in the snippet above.
In both cases, there isn't any relevant argument in __init__() exposed to users to make them work.
So, I think the potential implementation you mentioned is actually not supported by the current code and therefore wouldn't cause BC issues.
That's what I can think about now, but maybe I'm missing some key points here. Feel free to correct me and some examples would be fairly appreciated! @fmassa

I meant point number 2. Users can modify the snippet to make planes be the same over two consecutive layers, for example
    self.layer3 = self._make_layer(block, 256, layers[2], stride=2,
                                       dilate=replace_stride_with_dilation[1])
    self.layer4 = self._make_layer(block, 256, layers[3], stride=2,
                                       dilate=replace_stride_with_dilation[2])

which only requires a single value change. Plus, we might at some point want to expose number of planes on the constructor (I almost did it in https://github.com/pytorch/vision/pull/822 in the BaseResNet class that I removed before merging), and for that reason I would prefer to keep the code safe in this regard.
Thoughts?

@fmassa So you meant users could just modify the source code for their own needs, right?
Then the condition stride != 1 would be a preparation for this kind of modification in advance. If so, this does prevent disruptive cases for users who would just change the value of planes.
Though I would prefer such customized modifications on the source code should be taken care of by users on their own, this could be a considerate process for users.
Also, I've noticed your work on BaseResNet, pretty nice one! Any follow-up work in the plan?
Again, thanks a lot for your time and patience!

Also, I've noticed your work on BaseResNet, pretty nice one! Any follow-up work in the plan?

I didn't spend further time on it. If we are to include BaseResNet, then we stride !=  condition is necessary to have, and thus it's better to leave it there to avoid having to remember one more thing in the future.


Connect button error when pressed

"Connect" button on MyCards screen;
TypeError: onPress is not a function. (In 'onPress(event)', 'onPress' is an instance of Object)
Supposed to generate and show QR code.

try toggling feature
try this.setState


make client id configurable

Allow the mqtt client id to be configurable.  This is helpful when running multiple instances of homebridge-mqtt.

Hi @emes
You already get different cliendIds at start. What is the purpose for making them configurable?

The current client ids are random.  That's fine when you're running one instance of homebridge-mqtt.  I run six instances, so if debugging at the mqtt broker, I need to figure out which instance got which random string.

Configurable client-ids are pretty common.  If you're really averse to adding an additional configuration option. Then I could revise with just something like this in model.js:
options.clientId = this.config.topic_prefix || 'homebridge-mqtt_' + Math.random().toString(16).substr(2, 8);

It's a little less flexible, but would allow for easily identifiable ids for those not running a default single instance and nothing added to configuration.

If you're really averse to adding an additional configuration option.
No, I just wondered how people use homebridge-mqtt


LDAP = [INFO] Import finished. Users imported: 60, but only 25 are in Wekan listed...

Hello
I have tried to make a ldap connection to our MS Active Directory.
this is what I used:
sudo snap set wekan ldap-enable='true'
sudo snap set wekan default-authentication-method='ldap'
sudo snap set wekan ldap-port='389'
sudo snap set wekan ldap-host='IP from my MS domain Controller'
sudo snap set wekan ldap-basedn='OU=xx,DC=intern,DC=xxxxxxxx,DC=com'
sudo snap set wekan ldap-login-fallback='false'
sudo snap set wekan ldap-reconnect='true'
sudo snap set wekan ldap-timeout='10000'
sudo snap set wekan ldap-idle-timeout='10000'
sudo snap set wekan ldap-connect-timeout='10000'
sudo snap set wekan ldap-authentication='true'
sudo snap set wekan ldap-authentication-userdn='CN=LDAP_User,OU=TESTUSER,OU=xx,DC=intern,DC=xxxxxxxx,DC=com'
sudo snap set wekan ldap-authentication-password='my password from LDAP_User'
sudo snap set wekan ldap-log-enabled='true'
sudo snap set wekan ldap-background-sync='true'
sudo snap set wekan ldap-background-sync-interval='every 1 minute'
sudo snap set wekan ldap-background-sync-keep-existant-users-updated='true'
sudo snap set wekan ldap-background-sync-import-new-users='true'
sudo snap set wekan ldap-encryption='false'
sudo snap set wekan ldap-user-search-field='sAMAccountName'
sudo snap set wekan ldap-username-field='sAMAccountName'
sudo snap set wekan ldap-fullname-field='cn'
sudo snap set wekan ldap-default-domain='intern.xxxxxxxx.com'
sudo snap set wekan ldap-user-search-scope=sub
The connecton works and i got 60 Users importet from the OU=xx
But when I check in Wekan under Adminpanel,-->People-->People
there are only 25 LDAP User, but it should be more. when I check in Wekan terminal this:
sudo snap logs wekan
2021-02-15T11:49:00Z wekan.wekan[32518]: [DEBUG] Identifying user with: sAMAccountName
2021-02-15T11:49:00Z wekan.wekan[32518]: [DEBUG] userQuery {
2021-02-15T11:49:00Z wekan.wekan[32518]:   "services.ldap.id": "63434d696e2e73246b616e"
2021-02-15T11:49:00Z wekan.wekan[32518]: }
2021-02-15T11:49:00Z wekan.wekan[32518]: [INFO] Import finished. Users imported: 60
2021-02-15T11:49:10Z wekan.wekan[32518]: [INFO] Idle
2021-02-15T11:49:10Z wekan.wekan[32518]: [INFO] Disconecting
2021-02-15T11:49:10Z wekan.wekan[32518]: [INFO] Closed
so I have two questions.

Why are only 25 LDAP Users in Wekan and not all 60?
Maybe it would be easyer when I can make a group, like wekan_user and put a bunch of user in it so they can only access wekan. What should i change under "sudo snap set wekan..." for this?

Best Regards
Scott

@Scott-1980
Please look at database users collection/table are all 60 users there, with nosqlbooster

in the databae are 61 Users.
It looks like there are the 60 from the ldap import and one user from the first login (AdminUser)

So why cant i se the 61 users in the wekan board:

@Scott-1980
Is there any difference in database content at users collection/table JSON content for those visible at Admin Panel / People / People, and those not visible? Are some fields extra, missing, or otherwise different?

Please do note that that The number of people is: shows only number of people loaded to webbrowser to be visible, it is not accurate count of all users.

I also think that if all of those users have not yet logged into Wekan, then it's possible that those are not yet visible at Admin Panel / People / People.

It is also possible, that while those users are not currently visible, you could probably still find those users at Admin Panel / People / People by searching for e-mail address or other details.

Oh, I think yu are right. It shows 26 Users in my Wekan webfrontend. But in the database are more user.
If I search in the webfrontend after a user who is not shown there under the 26 users. It will find the user and show it will al informations. Thats great, Thanks to you!!!
So no wI have make a import frm all OUs and now there are more than 1500 users in the database :-(
There are many deactivatet users and contacts and groups also inth edatabase now :-(
Is there a option where I can see import only active USERS?
Best Regards
Scott

@Scott-1980
Please look at LDAP sync code, could there be added some limit to import so that only active users would be imported. Because otherwise, after deleting non-active users they would be back at next sync interval.
After that fix is added to Wekan, you could use nosqlbooster with some delete database query that would delete those users that are not active: https://docs.mongodb.com/manual/tutorial/remove-documents/

same for me. i have to scroll-down on "Admin Panel / People" and than it shows more than just 26/27

any news to this? i also have much more useres and admin panel show only 26 ^^


transaction deserialization no-std env support

Context
The core crates don't support no-std environments.
This PR adds support for no-std to the following crates:

xrpl_types
xrpl_binary_codec

This will allow us to use the respective crates in a no-std env (commonly on-chain environments).

Note

This is required to deserialize encoded transactions on-chain (a no-std wasm32-unknown-unknown environment).

@gmosx Any chance we can merge this?
Or shall I close the PR here.

Hey sorry, I missed this. I will review today and get back to you! Thank you!

@allanbrondumkr can you also check this please?

@zees-dev this test is failing:
test client_tests::tests::client_can_fetch_transactions ... FAILED
can you pls look into it?

@zees-dev this test is failing:
test client_tests::tests::client_can_fetch_transactions ... FAILED
can you pls look into it?

Will do 👍

@zees-dev this test is failing:
test client_tests::tests::client_can_fetch_transactions ... FAILED
can you pls look into it?

The test seems to be passing for me:
cargo test --all-features client_can_fetch_transactions

running 1 test
test client_tests::tests::client_can_fetch_transactions ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 23 filtered out; finished in 1.00s

     Running unittests src/lib.rs (target/debug/deps/xrpl_types-50397579f17e97f1)

Ok the issue (test breakage) was introduced in this PR.
This is because no TLS provider (i think?) is being utilized as we turn off the default features for the reqwest library upon compilation.
This PR introduces that specific feature back and defaults the TLS to tls-default (which should now allow usage of https URLs).
Addressed issue in the commit above.
Now cargo test should simply work (dont need the --all-features flag).

@allanbrondumkr can you also check this please?

I don't know much about what is good practice for supporting "no-std", but changes seems ok. I guess it makes sense to support no-std, although it does add some extra complexity

Merged, thank you for this contribution @zees-dev


Bug: Change Recipient Details to Donator Details

What happened?
Should it be Donator details instead of Recipient Details?
Add screenshots

What browsers are you seeing the problem on?
No response
Record

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I agree to follow this project's Code of Conduct
[X] I want to work on this issue

Yeah, Nice Catch


Add initial server-side checks for CDS features

This check will be run only on the server side when features are requested. This logic will be factored out into a more general check class later.
When features are requested

Check to see that the "StopCodonCheckReport" for each feature has a newer timestamp than the feature's last modified time stamp.
If not, run the StopCodonCheck, add the CheckReport for it, and then return the features

The StopCodonCheck should check for the following items:

Make sure there are no stop codons inside any of the feature's CDSs.

Stop codons are TAA, TAG, or TGA
Make sure to take the reading frame into account, i.e. count only groups of three bases starting at the beginning of the CDS.

e.g. if the sequence was ATGATATGAAACTGA, this has an internal stop codon: ATG_ATA_TGA_AAC_TGA
This does not have an internal stop codon, even though it contains the sequence TGA internally, because it is not in the reading frame ATGATTGAACACTGA, ATG_ATT_GAA_CAC_TGA

Make sure the last three bases of the CDS are a stop codon

If the length of the CDS is not a multiple of three, this check automatically fails

If a mRNA has multiple CDS children (not a canonical gene representation, but fairly common), make sure to combine all the CDSs before doing this check.
If the feature in on the negative strand, check the reverse complement of the CDS instead of the forward sequence.

General question. If a feature has been updated since last time checkReports were run --> need to re-run checkReports. This is clear. But should we overwrite the old checkReport documents or should we create new documents every time when checkReports are run?

As agreed with Garrett, if a feature is changed and there is need to re-run the check reports then simply delete old reports and create new ones. No need to save old reports.

Add also check report to find possibly overlapping CDSs

Done in #312


feat: align tables slow example better with zustand solution

The slow tables example currently does not even access the state, maybe it would be better to access the state?

yep, good idea, thanks


Shell completions

fix: #102
First commit add gutenberg completions {bash, zsh, fish, powershell} command but as clap_app! macro doesn't accept possible_values, the second one rewrite build_cli function with builder pattern style.

Thanks for that! I thought generating the completions requires some special package available but can't remember which one right now (the build.rs was failing on CI) which is why they were in the repo: would users run into panics?
Rustup does it the same way through a command but its has tons of commands/arguments. Gutenberg has only 3 commands and only one take one argument so I'm not sure it needs completions right now. I'm not planning to add more commands either.

Going to close that in the end: if a package manager builds from source it will have access to the repo and we can just update the completion scripts when something in the CLI changes, which shouldn't happen very often. This keeps the CLI itself cleaner.
Thanks though


feat(interview-prep): Converting and Tranfering Rosetta challenges

Checklist:

[ ] I have read freeCodeCamp's contribution guidelines.
[ ] My pull request has a descriptive title (not a vague title like Update index.md)
[ ] My pull request targets the master branch of freeCodeCamp.
[ ] All the files I changed are in the same world language, for example: only English changes, or only Chinese changes, etc.

Closes #XXXXX

@scissorsneedfoodtoo This is the next set of problems, can you please review this? I will try to add guide pages for these challenges as @moT01 suggested.

@moT01 Thank you for adding the guide pages. I have added  the forumTopicIds and renamed the files.
I corrected the position of S-Expressions so that it can be consistent with Rosetta Code ordering. I am sorry, I forgot to mention it in the description.

Thanks @NitronR,

I corrected the position of S-Expressions

Ahh, I guess I missed the removal of it in the diff. I was looking through the file history and couldn't find where it got deleted.

@moT01, awesome, thank you for creating Guide articles for all of those challenges.
@NitronR, I noticed a few things and will leave some review comments.

@thecodingaviator, could you take a look at this when you get a chance?

@NitronR drop a reply in after you've made the above changes, and I'll have a look!

@scissorsneedfoodtoo Thanks for the review. I have done the changes.
@thecodingaviator Can you please take a look?

@scissorsneedfoodtoo @thecodingaviator Thanks for helping out with this!

I have blocked this for now. See the pinned code freeze issue

Limitations removed on Coding Interview Prep Challenges.

@NitronR, hope you don't mind, but I went in and added the isHidden flags for you.
Thanks again for all of your hard work porting these challenges over. Looking forward to your next PR :+1: :+1:

@scissorsneedfoodtoo Thank you for the help!

@moT01 @scissorsneedfoodtoo I have made the changes. Can you please check?

Thanks for all your hard work on these ports @NitronR and @moT01 for your review. Everything LGTM :+1: :+1:


Add sounds

https://stackoverflow.com/questions/54114171/how-to-play-an-mp3-once-onclick-in-react?rq=1

Closed by #14


release version 0.3

[x] Copy deb on storage
[x] Tag code in Git and create release in GitHub
[x] Update code to version 0.4

Done
https://github.com/SRE-PRG/azmitool/releases/tag/v0.3


500 error when fetching image attachments

It appears Yahoo are doing some kind of referrer checking.
If a message contains an image attachment, yahoo.py will try to download it. This will result in a 500 Internal Server Error.
** Fetching attachment 'DSC07465.JPG'
Traceback (most recent call last):
  File "./yahoo.py", line 192, in <module>
    archive_email(yga, reattach=(not args.no_reattach), save=(not args.no_save))
  File "./yahoo.py", line 52, in archive_email
    atts[attach['filename']] = yga.get_file(photoinfo['displayURL'])
  File "/mnt/zfs2/ygroups/yahoo-group-archiver/yahoogroupsapi.py", line 49, in get_file
    r.raise_for_status()
  File "/home/philpem/.local/lib/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://xa.yimg.com/kq/groups/NgEGp_Hue9axOiNJrw--/or/skiVJcbofNa3MYMOEEQ-/name/DSC07465.JPG

Opening the image URL in a browser shows this error message:
We are sorry, you can not display images hosted by Yahoo! Groups on non Yahoo! Groups pages

I've just tried to download the image in a browser and got a 404 error. The thumbnails load but not the image.
It seems Yahoo are starting to delete things a bit early...

I avoided this by adding the --no-reattach and --no-save parameters to yahoo.py.

I got a 500 Server Error on some attachments too.
After looking up the message, I could manually open the image attachment but I noticed the URL was different from what the script was using.
Based on the difference, I tried this modification in yahoogroupsapi.py and it seems to be working so far:
    def get_file(self, url):
        newurl = url.replace("/or/","/hr/")
        r = self.s.get(newurl)
        r.raise_for_status()
        return r.content

Maybe inkblot14's method was patched? Still getting the following error when trying to download images with "/or/" replaced with "/hr/" in the URL:
requests.exceptions.SSLError: HTTPSConnectionPool(host='xa.yimg.com', port=443): Max retries exceeded with url: /kq/groups/VXRh1NjuftMqZ99a/hr/jC5PKZ_tedbs7qvzMxNZ/name/IMG_0695.jpg?download=1 (Caused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:590)'),))
Any ideas?

I don't know if it helps, but the way I figured out the substitution was to open the message in YG webpage and open the attachment from there - compared it with the error msg from the script to see how the URL was different. I'd try that with your group, and see if maybe there's something other than "/or/" and "/hr/"...maybe it's different for each group.

@codycooperross:

Maybe inkblot14's method was patched? Still getting the following error when trying to download images with "/or/" replaced with "/hr/" in the URL:
requests.exceptions.SSLError: HTTPSConnectionPool(host='xa.yimg.com', port=443): Max retries exceeded with url: /kq/groups/VXRh1NjuftMqZ99a/hr/jC5PKZ_tedbs7qvzMxNZ/name/IMG_0695.jpg?download=1 (Caused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:590)'),))
Not sure about this one, given that it's an SSL error. Accessing that URL directly with an additional Referer: http://groups.yahoo.com/ header works for me in the browser. SSL connection issues were potentially being triggered by lack of certificate pinning from the Yahoo server, but I hadn't seen one with that exact SSL error before. It's unrelated to the 500 errors in the OP.

@philpem:

It appears Yahoo are doing some kind of referrer checking.
If a message contains an image attachment, yahoo.py will try to download it. This will result in a 500 Internal Server Error.
...
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://xa.yimg.com/kq/groups/NgEGp_Hue9axOiNJrw--/or/skiVJcbofNa3MYMOEEQ-/name/DSC07465.JPG

Opening the image URL in a browser shows this error message:
We are sorry, you can not display images hosted by Yahoo! Groups on non Yahoo! Groups pages

I'm not able to reproduce the 500 error for this URL. I get the 404 error in the browser, but it goes away if I manually add a Yahoo Groups referer header.
I'd welcome further reports on errors when downloading images, especially if they're reliably triggered.

@IgnoredAmbience My fork actually fixes this.
The issue is server-side. Yahoo seems to return 500 errors for some files - but if you make the request then retry after a short while, it'll usually work.

@IgnoredAmbience My fork actually fixes this.
The issue is server-side. Yahoo seems to return 500 errors for some files - but if you make the request then retry after a short while, it'll usually work.

I'm also running up against this problem and can confirm that retrying later often helps.  Perhaps you could contribute your fix here?

additionally, whenever i get a 500, the script seems to infinitely loop retrying the image, i would prefer to skip it and move on
2019-10-27 19:24:10.747 EDT ERROR process_single_attachment ERROR downloading 'https://xa.yimg.com/kq/groups/adopXwvteNB1Qsz.aw--/or/qMLAVD3tctUT1.GDCIQj/name/mb86.jpg' variant or: 500 Server Error: Internal Server Error for url: https://xa.yimg.com/kq/groups/adopXwvteNB1Qsz.aw--/or/qMLAVD3tctUT1.GDCIQj/name/mb86.jpg

i think the problem is this line: https://github.com/IgnoredAmbience/yahoo-group-archiver/blob/master/yahoo.py#L178
it doesn't seem limited by TRIES

Believe this fixed in current master.


ISPN-10839 Configuration Doc Updates

https://issues.redhat.com/browse/ISPN-10839
Needs backport to 10.1. See the Jira for details and review draft.

Thanks @oraNod


Vertical alignment in running header/footer should permit the value "middle"

The vertical alignment settings (valign and image_valign) in the running header/footer should allow the value "middle" for alignment to the midpoint as an alias for "center". This brings the value inline with CSS.

I think we should also change the name of the property from valign to vertical-align since our stated goal is to align with CSS conventions.


Text Overflow in CupertinoListTile

Hi, despite several attempts, it seems impossible to handle text overflow in a CupertinoListTile.
I would like to put the too long text on several lines.
Is there any solution ?

Hi, you can use ConstrainedBox and maxLines property of the Text:
CupertinoListTile(
  title: ConstrainedBox(
    constraints: const BoxConstraints(maxWidth: 200),
    child: const Text(
      'text that overflows',
      maxLines: 3,
    ),
  ),
),

Let me know if you have any questions.

I just tried your solution, but it doesn't work.
Extra words just don't appear

Could you send me the implementation of your screen? You may be enforcing additional constraints.

Your solution works ! Sorry it was a mistake on my side.
Thanks a lot for your help.


Swappable Models

One of the biggest issues people hit with Mezzanine, and likely many other open source Django apps that provide models, is the ability to customize the fields that the models use. Django itself hit this early on with its User model, which can now be "swapped" by pointing a setting at the app/model name to use in its place. (Presumably, I've never used it) the swappable model must implement certain members, methods and/or attributes, and then consumers of the model (view functions and the like) can expect these to exist.
Mezzanine has the EXTRA_MODEL_FIELDS setting that allows fields to be injected, but it has a handful of problems. Primarily database migrations are difficult to deal with, since migrations for an app now spread across the original app and some external app/package. Apparently m2m fields can't be injected. Some related issues are #1031 and #1150.
Ideally we can make the core models throughout Mezzanine (and Cartridge) swappable, and remove the EXTRA_MODEL_FIELDS setting. This would give developers the power to customize things like:

The core Page model that underpins all page types
The BlogPost model
Cartridge's Product model

The ability to swap out these three models would take Mezzanine and Cartridge's potential flexibility to a whole other level.

Also interesting: https://github.com/wq/django-swappable-models
It looks like this is small enough to be vendorised into Mezzanine if need be.

Is it possible that the new Applications API in Django 1.7+ could be useful here?
Specifically I'm thinking Mezzanine could have an app config that lends itself to being extended, like:
# mezzanine/apps.py

from django.apps import AppConfig

class MezzanineAppConfig(AppConfig):
    label = 'mezzanine'

    def get_models(self):
        models = super(MezzanineAppConfig, self).get_models()
        final_models = []

        for model in models:
            final_models.append(self.get_model(model.__name__))

        return final_models

Then to use it in Mezzanine you'd do:
# mezzanine/blog/views.py

from django.apps import apps

_mezzanine_app_config = apps,get_app_config('mezzanine')
BlogPost = _mezzanine_app_config.get_model('BlogPost')
## OR ##
BlogPost = apps.get_model('mezzanine', 'BlogPost')

And finally, to swap out a model in your project:
# myblogapp/models.py

from mezzanine.blog.models import BlogPost

class MyBlogPost(BlogPost):
    pass

# myproject/apps.py

from mezzanine.apps import MezzanineAppConfig

from myblogapp.models import MyBlogPost

class MyMezzanineAppConfig(MezzanineAppConfig):
    def get_model(self, model_name):
        if model_name.lower() == 'blogpost':
            return MyBlogPost
        else:
            return super(MyMezzanineAppConfig, self).get_model(model_name)

# myproject/settings.py

INSTALLED_APPS = [
    'myproject.apps.MyMezzanineAppConfig',
    # ...
]

This is untested, just me writing out some code as a thought experiment. I haven't had a chance to play with Django 1.7+, but doing a cursory check of their GitHub, it seems like they've moved the code for getting models from an app to using AppConfig.get_model, so it seems like this may work well with migrations and what not.
My understanding of the code so far would suggest that mezzanine.blog.models.BlogPost would be skipped over for having a table created in this situation because the migration code would use AppConfig.get_models which would return the model from myblogapp. I'm not sure what the app label would be for the model.
The timing of when to call get_model in mezzanine/blog/views.py would need to be tested, it may not be possible to do at the top-level since all of the app configs may not have been loaded yet at that point, I'm not sure.
Per @AlexHill's suggestion of having a decorator, a modified version of the above code could instead build up a list of swapped models in MezzanineAppConfig via the decorator and get rid of the need for the project subclass of MezzanineAppConfig, but I'm again not sure if that would occur in time to be useful (would myblogapp.models be imported and have the class decorators executed before the makemigrations command started in on MezzanineAppConfig would be the question).
Seems like an interesting direction to go, if someone has the time to play around with it. A nice '@swap_model(BlogPost)' decorator could be a clean way to trigger the functionality.

@dsanders11 interesting idea and thankyou for spending the time to think about this.'
The obstacle is the one you already identified: AppConfig.get_model() and friends aren't guaranteed to be available until after Apps.populate() has been called, which means your model definitions can't reliably use them.
You can override these things of course, but messing with the internals of app loading and model importing is something we want to do less of – that's the motivation for getting rid of EXTRA_MODEL_FIELDS.

My understanding of the code so far would suggest that mezzanine.blog.models.BlogPost would be skipped over for having a table created in this situation because the migration code would use AppConfig.get_models which would return the model from myblogapp.

I think you're right, migrations wouldn't be created for the overridden model. What might happen is that a migration would be created in the blog app for your own custom BlogPost model, which would be a dealbreaker – that's one of the biggest annoyances with EXTRA_MODEL_FIELDS today. Maybe not, since the app_label would differ – would have to test.

Overall, I think any solution which makes models "impersonate" models in other apps is a dangerous path to go down.
Django's swappable user model avoids this. When you swap out auth.User, you're never pretending that your custom user model is actually a part of contrib.auth. Instead, models that need a user model just ask for whatever user model is configured, and work with that.
That approach is nice because models stay in their own apps, and because it's explicit: if you really do need auth.User, you can still depend on it directly without it being swapped out from underneath you.

My 2 cents - sounds like the right thing to do would be to mimic whatever auth.User does.

Totally agree with that. IMO it's only a question of how much sugar we add on top.

I'm not sure if this conversation is still ongoing, but I have been looking into how auth.User works its magic recently. Some of the explanations from here (as well as a look at the source) have helped me try to understand the more minute details. From what I understand, since django doesn't support overriding model fields, the user would - at some point - have to copy over all of the required code from the default model to their own app. It makes sense (at least to me) to setup the internals of mezzanine to support swapped models (eg, if a user was overriding Page, all references would have to be replaced with settings.PAGES_PAGE_MODEL) and create a separate app, called swap for example, with all of the necessary code copied to its models.py.
To further explain the pages example, there would be a commented-out line in settings.py that would look something like PAGES_PAGE_MODEL = 'swap.Page' (kind of like how EXTRA_MODEL_FIELDS is right now). This is exactly how auth.User does it, with an AUTH_USER_MODEL setting. The swap app would not be used unless that line was uncommented, and the database migrated. However, since all of the necessary references and code have been copied to that app, it is easily overridden by the user in a couple steps.
Obviously, swap would also have to be added to INSTALLED_APPS, but only uncommenting the PAGES_PAGE_MODEL setting would trigger a swap. That being said, it should be left commented out in INSTALLED_APPS until use, otherwise it would just get in the way.
I'm not sure how much this method makes sense from your guys' point of view, since I'm by no means an experienced developer. Any thoughts?

@avery-laird sounds right

I've been doing a bit of preliminary work to get this up and running, but when updating the Page reference in other app models to settings.PAGES_PAGE_MODEL, I'm getting a type error that I've never seen before:
TypeError: Error when calling the metaclass bases
    unicode() argument 2 must be string, not tuple

I haven't been able to track down the issue just from my own debugging, has anyone run into this exception before?

Hi, I have swapped BlogPost on my 4.0.1 branch: https://github.com/bors-ltd/mezzanine/commit/77001a45cea166a7490aac00bdce22490f510a27
It works for my case (inheriting from django.contrib.gs models and admin) but it lacks tests.
And I should take a look at that AppConfig thing too.

Noticed the second warning in the documentation regarding substituting a custom user model which points out that the model being swapped in has to be created in the initial migration for its app. Something to keep in mind if this progresses since it will be a bit of a headache for switching to swapped models since most people would probably use a model from an app which has an initial migration at that point.

Hello, I'm waking up this rather old issue.
I was pretty sure I already opened a pull request for my "swappable_blogpost" branch and people commented it but it seems my memory failed me.
Anyway, here is my branch updated against the latest 4.2.2 release (not the master branch): https://github.com/stephenmcd/mezzanine/compare/4.2.2...bors-ltd:4.2.2-swappable_blogpost
Do you need I go on with the Page model and make it a "swappable_models" branch? Against what base branch? How do you see tests about it?
The tests pass on my branch but I don't have any new test with a custom model. I could probably get somewhere with override_settings but not sure how to do it without adding a model that would be shipped along with Mezzanine.

Hello, I'm waking up this rather old issue.

Thanks for waking it up! This is probably the number one feature Mezzanine needs right now, so it's very welcome.

Do you need I go on with the Page model and make it a "swappable_models" branch? Against what base branch?

Yes this definitely needs to be complete across all the concrete models before we can accept it (maybe that's why your old PR fell by the wayside, I honestly can't remember either). I'd suggest treating "swappable models" as one entire feature rather than breaking it down into blog, pages, etc, and looking at your current work, it doesn't look like there's too much involved, which lends itself toward doing it all together - so one branch/PR should do.

I could probably get somewhere with override_settings but not sure how to do it without adding a model that would be shipped along with Mezzanine.

Give it a try and see how far you get - it would be great to have specific coverage for this, but if we can't, at least having the existing tests pass when swapped models are explicitly used in your current project would definitely suffice for now.
Thanks again!

Just to notify I've started the work. No big issue yet but I'm playing hide and seek everywhere content models are imported.
So far I have swapped:

Page
RichTextPage
Link
BlogPost
BlogCategory
Form
FormEntry
FieldEntry
Gallery
GalleryImage

And the first design decision I must report is when, for example, Gallery inherits from Page, it must be the vanilla Page. The swapped model is out of the Python scope. So if you want to add a field to every Page and Page-like models, you'll have to swap all of them.

Awesome!

So if you want to add a field to every Page and Page-like models, you'll have to swap all of them.

Ideally we can resolve this so that swapping Page is actually useful. We can look at that more closely once the initial work is done.

Hello again, this was close to be ready for initial review, but there are three tests not passing: test_delete_unused, test_keywords and test_keywords. (test_syntax too but expected on the 4.2.2 tag).
Here is the work in progress: https://github.com/bors-ltd/mezzanine/tree/4.2.2-swappable_models
I could make these tests pass by modifying RichTextPage to inherit directly from (Page, RichText), bypassing AbstractRichTextPage. It's quite strange, if you could take a look.
There is also the question of swapping Page itself, the root of all content models, and still having Page.objects.all() lists links, forms, galleries, etc. although they were not swapped.
I've also left a few XXX, mainly about translations.
By the way, how do you run Mezzanine's test suite in the context of a bootstraped project?

The get_<model>_name and get_<model>_model functions seem tedious. Could they be done away with? E.g.:
    class AbstractRichTextPage(Page, RichText):
        def get_model(cls):
            model_name = getattr(settings, "RICH_TEXT_PAGE_MODEL", "pages.RichTextPage")
            return utils.models.get_model(model_name)

    RichTextPage = AbstractRichTextPage.get_model()

Or even more concise:
def get_swappable_model(setting_name, default):
    model_name = getattr(settings, setting_name, default)
    return get_model(model_name)

RichTextPage = get_swappable_model("RICH_TEXT_PAGE_MODEL", "pages.RichTextPage")

I agree on get_<model>_name, I followed the get_user_model_name pattern but it doesn't make sense to begin with. Django already promotes settings.AUTH_USER_MODEL in the docs.
But I couldn't get rid of these model loading functions. These models must be loaded later in Django's bootstrap process. If I just load all these models early in the process, at best I get "Models are not ready yet", at worst I get obscure errors in tests.
I've just pushed forced another version. The get_<model>_model are spread out in the __init__ of each app, just like django.contrib.auth does.
At first I got quite many obscure errors, like blog URLs not reversing, but I delayed as much the loading of models and the errors disappeared. Which makes me feel this is quite fragile.
But I still get these three tests not passing and I lack a proper debug environment like running a single test and open an (i)pdb when a test fails.

Hi,
I reworked my swappable models branch against the latest release: https://github.com/stephenmcd/mezzanine/compare/master...bors-ltd:4.3.1-swappable-models?expand=1
But tests are far from passing for now...
Github shows conflicts against the master branch, I don't have any "4.3.x" or "stable" branch to rebase upon.


chore(Data/Set): move Defs.lean to Operations.lean

This frees up Data/Set/Defs.lean so that we can later move Init/Set.lean to Data/Set/Defs.lean.

Thanks!
maintainer merge

bors merge


Flickering on navigation

Navigating causes flickering of the page.
Refactor to use useQuery to make routing work if things are cached?

believe this has been resovled


OnAfterChange does not pass slick callback paramaters

Can you pass the index and element parameters to the OnAfterChange property? I can send a pull request if that is useful.

I also noticed the same thing. I tried altering the code to get it to send back the index and element parameters, but I was still getting null values. At the moment, I'm using a broadcast at the onAfterChange method (not happy about it, but I needed a working solution ASAP), but I hope this will be implemented soon. Cheers

I've got the same problem here, both parameters are "undefined".
What I need is the index directly after changing the slide. Using "currentSlideIndex" for example as a model does not work, because binding it at the "current-index" attribute laggs 1 step behind... :(
changing from slide 0 to 1 ..... $scope.currentSlideIndex is still 0.... :(
Does anyone got an idea to solve it?

I've fixed in my pull request:     https://github.com/idvorkin/angular-slick

Will this be merged?  Tested this changed and works perfectly.

Will this be merged?

Bump. This still seem to be an issue on latest version.


Fix matching of ^ and & for password requirements

When the script asks for a SQL password, it says the password needs to contain a special character, however because the ^ and $ characters aren't escaped, the regular expression match that is supposed to check that requirement always succeeds, even when the password doesn't contain a special character.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_regular_expressions?view=powershell-7.3#escaping-characters
You can verify by trying these lines in PowerShell:
> "Password without special character" -match '!|@|#|%|^|&|$'
True
> "Password without special character" -match '!|@|#|%|\^|&|\$'
False
> "Password with ^ special character" -match '!|@|#|%|\^|&|\$'
True
> "Password with $ special character" -match '!|@|#|%|\^|&|\$'
True

Thanks @lgvacanti !


REopt API call crashes SAM for weather file with subhourly data

Clicking Get size and dispatch on Battery Cell and System page should check weather file time step and display UI message instead of proceeding with API call.
Tested with 15-minute data from NSRDB.

The REopt documentation suggests it should work with 30 and 15 minute data. While we should add a UI message for other subhourly timesteps, the fact that 15 minute data fails suggests a bug in how SSC sets up the API call.

The REopt documentation suggests it should work with 30 and 15 minute data. While we should add a UI message for other subhourly timesteps, the fact that 15 minute data fails suggests a bug in how SSC sets up the API call.

Agreed. Here are files for testing: reopt-subhourly-tests.zip

Two versions of the same .sam file, one for SAM 2022.11.21 and one for SAM 2023.12.17.
15-minute and 60-minute NSRDB weather files for same location and year.


⚠ Tachidesk Server has degraded performance

In 0eb4dc8, Tachidesk Server (https://tachidesk.culturecloud.eu.org) experienced degraded performance:

HTTP code: 502
Response time: 10133 ms

Resolved: Tachidesk Server performance has improved in a9c9ec3.


Add support for config file

Resolves: https://jira.duraspace.org/browse/FCREPO-2164

Can you update the README to include an example config file snippet and how to use the config file option?

@awoods Looks good — do you want to squash or shall I squash & merge?

@escowles, please squash/merge with the GitHub button.


Ways to use through Arduino IDE

Hi
I maintain megaTinyCore ( https://github.com/SpenceKonde/megaTinyCore ) which lets these parts be used through the Arduino IDE. Right now we are telling people to use a jtag2updi firmware on a nano/promini/etc to program these parts. This looks like a great solution in terms of not needing additional hardware, just a serial adapter. I would like to make it possible to use this programming method from the Arduino IDE - I see two approaches.
Am I correct in concluding that we can't bully AVRDude into doing this?
That would mean that we would, instead need to create a new "tool" for this. Is there a way to make a self-contained version of pyupdi that board manager could pull in with tools_dependencies (ie, will work without having to install a python runtime or anything else)? my understanding is that if that were possible, I could have my core pull that in upon installation and have a programmer option that would use pyupdi to upload with just a serial port.
Thanks

I think avrdude is no longer the way to go, and adding a new tool in the arduino ide is a better approach.
But without native python its necessary to go for a "py2exe"-like approach which then needs more OS support.  I have not done this in a while so I will need to explore some options first.
But yes, this would be cool :)

Anyone working on making pyupdi supported by Arduino IDE?

converting it to a an executable would be amazing, would be much cleaner...
but we don't need to go to that level of work - we can just pull in python like the esp8266 core does!
I know how to do everything except including all the libraries needed by pyupdi.... Am not a python person...

Sounds interresting! Could you elaborate?
I'm running on my Pi directly - ie. in a Raspbian/Linux environment. Installing the libs is easy (see pyupdi main page)
"pip3 install https://github.com/mraardvark/pyupdi/archive/master.zip"
Then you can do sometinh like:
"python3 ~/.local/lib/python3.7/site-packages/updi/pyupdi.py"
Works for me - but would like to have the option inside the Arduino IDE....

FYI: the pyupdi "backend" is now incorporated in pymcuprog, which is installable from pypi:
pip install pymcuprog
The command syntax is a bit more generic since this tool is used for many purposes, but mainly native HID debugger interaction.
example: pymcuprog write -d atmega4809 -f hexfile.hex -t uart -u COM1
Right now there are only a few AVRs "supported" (those on CNANOs or IOT boards) but more will be available.
Maintaining pymcuprog (although arguably as a centralised dictatorship :/ ) is easier in my opinion...
Making binaries out of python packages is non-trivial, but not that hard either - although I think performance might be questionable since (eg: pyinstaller) binaries are expanded with all dependencies into a temp folder and executed from there.

About producing a binary from pyupdi.py, I quickly tried pyinstaller --onefile pyupdi.py on Windows and it produced a single .exe file of around 6Mb. I'm sure this can be reduced a lot, as there are very little non-native dependencies here (only pyserial, I believe). I successfully flashed an ATtiny1614 with this .exe file, so I think it's a valid approach. This seems to be what Espressif did with their esptool.py tool for the ESP32 Arduino IDE integration.
Maintaining a multi-platform binary release of pyupdy is not necessarily a lot of work: pyinstaller can be integrated with github to produce binaries on its own. Here's an example of a pure-python app with automated binary releases: https://github.com/esphome/esphome-flasher.
On the other hand, we only really need one working version that @SpenceKonde could integrate in e.g. megaTinyCore. I can give you a hand on the Python side if you think the Arduino IDE integration is straightforward after this. We surely need to test it on Linux platforms as well (how does the Arduino board manager download the right tools for the right OS? I'm not familiar with that part).

Wow, if we can produce a single executable, that's perfect!
Build that for as many of the recognized platforms as is possible, compress as appropriate (.zip also works on windows, and .tar.gz is very common for unix-like OS's, host somewhere (doesn't github let you upload supporting binaries - for this sort of purpose?), the metadata gets put into an entry like this that goes in the tools section of the board manager json:
        {
          "name": "avrdude",
          "version": "6.3.0-arduino17",
          "systems": [
            {
              "size": "219631",
              "checksum": "SHA-256:2a8e68c5d803aa6f902ef219f177ec3a4c28275d85cbe272962ad2cd374f50d1",
              "host": "arm-linux-gnueabihf",
              "archiveFileName": "avrdude-6.3.0-arduino17-armhf-pc-linux-gnu.tar.bz2",
              "url": "http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-armhf-pc-linux-gnu.tar.bz2"
            },
            {
              "size": "229852",
              "checksum": "SHA-256:6cf948f751acfe7b96684537f2291c766ec8b54b4f7dc95539864821456fa9fc",
              "host": "aarch64-linux-gnu",
              "archiveFileName": "avrdude-6.3.0-arduino17-aarch64-pc-linux-gnu.tar.bz2",
              "url": "http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-aarch64-pc-linux-gnu.tar.bz2"
            },
            {
              "size": "279045",
              "checksum": "SHA-256:120cc9edaae699e7e9ac50b1b8eb0e7d51fdfa555bac54233c2511e6ee5418c9",
              "host": "x86_64-apple-darwin12",
              "archiveFileName": "avrdude-6.3.0-arduino17-x86_64-apple-darwin12.tar.bz2",
              "url": "http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-x86_64-apple-darwin12.tar.bz2"
            },
            {
              "size": "254271",
              "checksum": "SHA-256:accdfb920af2aabf4f7461d2ac73c0751760f525216dc4e7657427a78c60d13d",
              "host": "x86_64-linux-gnu",
              "archiveFileName": "avrdude-6.3.0-arduino17-x86_64-pc-linux-gnu.tar.bz2",
              "url": "http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-x86_64-pc-linux-gnu.tar.bz2"
            },
            {
              "size": "244550",
              "checksum": "SHA-256:5c8cc6c17db9300e1451fe41cd7178b0442b4490ee6fdbc0aed9811aef96c05f",
              "host": "i686-linux-gnu",
              "archiveFileName": "avrdude-6.3.0-arduino17-i686-pc-linux-gnu.tar.bz2",
              "url": "http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-i686-pc-linux-gnu.tar.bz2"
            },
            {
              "size": "328460",
              "checksum": "SHA-256:e99188873c7c5ad8f8f906f068c33600e758b2e36cce3adbd518a21bd266749d",
              "host": "i686-mingw32",
              "archiveFileName": "avrdude-6.3.0-arduino17-i686-w64-mingw32.zip",
              "url": "http://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-i686-w64-mingw32.zip"
            }
          ]
        },

and then versions of the core that support it include it in their toolsDependencies section, with the other tools they pull in....
          "toolsDependencies": [
            {
              "packager": "arduino",
              "name": "avr-gcc",
              "version": "7.3.0-atmel3.6.1-arduino7"
            },
            {
              "packager": "arduino",
              "name": "avrdude",
              "version": "6.3.0-arduino17"
            },
            {
              "packager": "arduino",
              "name": "arduinoOTA",
              "version": "1.3.0"
            }
          ]

Alright, I just built an alpha release on my own fork:
https://github.com/qbolsee/pyupdi-bin/releases/tag/v0.1
Let's carefully test this locally before planning a release to the board manager, right now I only tested the windows one. Do you already know how to pass the arguments (COM port, .hex filename) to the binary from the Arduino IDE?

Nice initiative :)
The complications always come with MacOs though, right?
I have no hardware to test on right now, but your binaries in v0.1 work in Linux, but fail on Mac

Yes, it might take a few days to get the MacOS version working as I can't easily test it. It was built with macOS-latest in the github workflow, perhaps that can have an effect?
Anyway thanks for the feedback. I think the file format was wrong, I updated it and now it's just a .tar.bz2 with a binary inside:
https://github.com/qbolsee/pyupdi-bin/releases/download/v0.1/pyupdi-bin-v0.1-macOS-x64.tar.bz2

@qbolsee could you update your binaries with PR #73 included? I'd like to experiment with bundling the Win_x64, linux and MacOS binaries with MegaCoreX, which is an Arduino hardware package for the megaAVR-0 chips.

Oh that sounds great, I'd be glad to help! Actually @SpenceKonde and I found a "cleaner" approach for his megaTinyCore: we include a portable Python binary and the Python scripts. By adapting platform.txt, we can get the portable Python to launch our script. Instead of using pyupdi, we migrated to the more complete pymcuprog, and I wrote an interfacing script to make the Arduino IDE integration easier.
If you think the same approach would be OK for you, we can surely help. If you prefer using pyinstaller-style binaries I can also help, but I have to warn you: Windows Defender is constantly flagging the binary as a trojan. It seems to be a common issue with pyinstaller: https://stackoverflow.com/questions/54733909/windows-defender-alert-users-from-my-pyinstaller-exe. I will update my binaries anyway, in case someone finds them useful.

FYI: new pymcuprog released on pypi - although release testing exposed a few 'pyupdi' bugs which we will need to address soon.
Also FYI: I think pyinstaller binaries need signing on Windows and Mac "for best results".


Show error if building extensions.csproj fails

Build should fail if building extensions.csproj fails or cannot build due to missing azure functions core tools
As of now here is the message
WARNING] Failed to get Azure Functions Core Tools version locally
[WARNING] Local Azure Functions Core Tools does not support extension auto-install, skip it in the package phase.
[WARNING] Local version of Azure Functions Core Tools (null) does not match the latest (2.0.3). Please update it for the best experience. See: https://aka.ms/azfunc-install
[INFO] Function extension installation done.
[INFO] Successfully built Azure Functions.
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:copy-resources (copy-resources) @ azure-functions-java-endtoendtests ---

which is misleading.

cc: @jdneo @Flanker32

@pragnagopa Project could package and deploy to azure without azure function core tools, so could we show a warning and tell user Function could not run locally without azure function core tools instead of showing build fail?

@pragnagopa  Any comments on this issue?

Core Tools is part of requirements for using maven plugin. For functions that do need extensions, for example a queue trigger, funciton.json is not generated and there is no indication that build failed. If users go ahead and deploy without locally testing - again core tools is needed for this as well, it is too late to notify
Being more explicit that core tools is required is better experience

Sounds good! Only throw error if extensions are needed

Great, @pragnagopa could you please provide the list of functions that do not need extensions?

Except httptrigger, all other triggers need extensions


fix: String.splitOn bug

Fixes #3829. As reported on Zulip (both recently and a year ago), String.splitOn has a bug when dealing with separators of more than one character (which are luckily rare). The code change here is very small, replacing a i with i - j, but it makes termination more complex so that's where the rest of the line count goes.

I also added a doc comment to splitOn. (Why are all of these functions still undocumented? I went through all the list functions some time ago but I guess we don't have anyone on docs duty.)

Perfect!


Dependency Injection

Reality Collective - Service Framework Feature Request
Overview
Let's start talking about dependency injection and what it might look like for the service framework.
Ideally, I see this being implemented in 3 steps:

Service injection for services
Service injection for MonoBehaviours
Service injection for plain C# classes

1. Service injection for services
In a fist step it would already be beneficial to support having the service manager inject dependencies into other services as requested. This would already save a lot of boilerplate code. Here is what I imagine that to look like
public override void Initialize(IInputService inputService, ILocomotionService locomotionService)
{
...
}

We use the Initialize() API to let developers specify any dependencies their service has and then have the service manager resolve those. We cannot use the service constructor for this, since that would introduce issues with dependencies not being registered with the service container yet. We should prefer method injection here so we can guarantee that all services are registered with the locator at the time of dependency injection.

Service Injection is now complete as of https://github.com/realitycollective/com.realitycollective.service-framework/pull/111
Module Injection is also needed.

@FejZa can you describe patterns for 2 & 3, to give an indication as to their usage?