swtloc fails to run on Ubuntu 21.10

Hi, I am having issues getting swtloc to work, and due to my lack of knowledge on numba (considering the error message) I am unable to determine whether this is an issue with my setup or if there is something wrong with the pip package itself, therefore opening this issue.
I  am running Ubuntu 21.10 with Python 3.9.7 and installed swtloc with pip install swtloc which installed the library without any error messages and installed version 2.1.0 of swtloc:
$ pip show swtloc
Name: swtloc
Version: 2.1.0
...

Next I tried running the following script, see also the attached test.jpg image. I also tried a few different images and image formats all resulting in the same outcome (ignore the content of the image, I grabbed the first result from an image search):
import swtloc as swt
imgpath = 'test-data/test.jpg
swtl = swt.SWTLocalizer(image_paths=imgpath)
swtImgObj = swtl.swtimages[0]
swt_mat = swtImgObj.transformImage(text_mode='lb_df',
                                   auto_canny_sigma=1.0,
                                   maximum_stroke_width=20)

Which returned with an error:
Traceback (most recent call last):
  File "/home/$USER/workspace/github.com/arbakker/kook/kook/test-swtloc.py", line 5, in <module>
    swt_mat = swtImgObj.transformImage(text_mode='lb_df',
  File "/home/$USER/.local/lib/python3.9/site-packages/swtloc/abstractions.py", line 573, in transformImage
    self.image_swt = transform_function(edged_image=self.image_edged,
  File "/home/$USER/.local/lib/python3.9/site-packages/numba/core/dispatcher.py", line 468, in _compile_for_args
    error_rewrite(e, 'typing')
  File "/home/$USER/.local/lib/python3.9/site-packages/numba/core/dispatcher.py", line 409, in error_rewrite
    raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Cannot unify array(int64, 2d, C) and array(int32, 2d, C) for 'swt_matrix.2', defined at /home/$USER/.local/lib/python3.9/site-packages/swtloc/core.py (126)

File "../../../../../.local/lib/python3.9/site-packages/swtloc/core.py", line 126:
def swt_strokes(edged_image,
    <source elided>
            _ray_ix = ray_indices[:ray_pointer, 1]
            for each_y, each_x in zip(_ray_iy, _ray_ix):
            ^

During: typing of assignment at /home/$USER/.local/lib/python3.9/site-packages/swtloc/core.py (126)

File "../../../../../.local/lib/python3.9/site-packages/swtloc/core.py", line 126:
def swt_strokes(edged_image,
    <source elided>
            _ray_ix = ray_indices[:ray_pointer, 1]
            for each_y, each_x in zip(_ray_iy, _ray_ix):
            ^

Any ideas what might be causing the issue, or suggestion on how to troubleshoot the issue?

Hey, I am not so sure about Ubuntu Platform (as I don't really have access to it), but I tried running it on the following configuration
Python (Venv) - 3.9.7
OS : Windows 10
swtloc version : 2.1.0
via the following code-block
from swtloc import SWTLocalizer
from swtloc.configs import (IMAGE_ORIGINAL,
                            IMAGE_GRAYSCALE,
                            IMAGE_EDGED,
                            IMAGE_SWT_TRANSFORMED,
                            IMAGE_CONNECTED_COMPONENTS_3C,
                            IMAGE_CONNECTED_COMPONENTS_3C_WITH_PRUNED_ELEMENTS,
                            IMAGE_CONNECTED_COMPONENTS_PRUNED_3C,
                            IMAGE_PRUNED_3C_LETTER_LOCALIZATIONS,
                            IMAGE_ORIGINAL_LETTER_LOCALIZATIONS,
                            IMAGE_ORIGINAL_MASKED_LETTER_LOCALIZATIONS,
                            IMAGE_PRUNED_3C_WORD_LOCALIZATIONS,
                            IMAGE_ORIGINAL_WORD_LOCALIZATIONS,
                            IMAGE_ORIGINAL_MASKED_WORD_LOCALIZATIONS)

def save_results(swtimgobj, res_path):
    """Helper Function"""
    savepath1 = swtimgobj.showImage(image_codes=[IMAGE_ORIGINAL, IMAGE_GRAYSCALE, IMAGE_EDGED, IMAGE_SWT_TRANSFORMED],
                                   plot_title='SWT', plot_sup_title=f'\nTransform Time - {swtImgObj.transform_time}',
                                   save_fig=True, save_dir=res_path, dpi=300)

    savepath2 = swtimgobj.showImage(image_codes=[IMAGE_CONNECTED_COMPONENTS_3C,
                                                IMAGE_CONNECTED_COMPONENTS_3C_WITH_PRUNED_ELEMENTS,
                                                IMAGE_PRUNED_3C_LETTER_LOCALIZATIONS,
                                                IMAGE_ORIGINAL_MASKED_LETTER_LOCALIZATIONS],
                                     plot_title='Letter Localizations\n',
                                   plot_sup_title=rf"Localization Method : ${swtimgobj.cfg['swtimage.localizeletters.localize_by']}$",
                                   save_fig=True, save_dir=res_path, dpi=300)

    savepath3 = swtimgobj.showImage(image_codes=[IMAGE_PRUNED_3C_WORD_LOCALIZATIONS,
                                                IMAGE_ORIGINAL_WORD_LOCALIZATIONS,
                                                 IMAGE_ORIGINAL_MASKED_WORD_LOCALIZATIONS],
                                    plot_title='Word Localizations\n',
                                    plot_sup_title=rf"Localization Method : ${swtimgobj.cfg['swtimage.localizewords.localize_by']}$",
                                    save_fig=True, save_dir=res_path, dpi=300)

    print('First Result Image : ', savepath1)
    print('Second Result Image : ', savepath2)
    print('Third Result Image : ', savepath3)

imgpath = 'issue21/issue21.jpg'
respath = 'issue21/results/'
swtl = SWTLocalizer(image_paths=imgpath)
swtImgObj = swtl.swtimages[0]

# Transformation
swt_mat = swtImgObj.transformImage(text_mode='db_lf',
                                   maximum_stroke_width=50)

letters = swtImgObj.localizeLetters()
words = swtImgObj.localizeWords()

save_results(swtimgobj=swtImgObj, res_path=respath)

which gave the following results :

For SWT Transformation

For Letter Localization

For Word Localization

As for the numba specific error which you are encountering on ubuntu, what i can gather from Cannot unify array(int64, 2d, C) and array(int32, 2d, C).. is that typing of the two zip elements in core.py file has turned to be different. I will try to look into it, but in the mean time could you make the changes to your own code-block as shown below and confirm whether you are able to run or not?
import swtloc as swt
imgpath = 'test-data/test.jpg
swtl = swt.SWTLocalizer(image_paths=imgpath)
swtImgObj = swtl.swtimages[0]
swt_mat = swtImgObj.transformImage(text_mode='db_lf',
                                   engine='python',
                                   maximum_stroke_width=50)

Through this code-block (engine='python'), i am getting the same results as shown above, just that swtImgObj.transform_time = 0.433 sec which is nearly 10x worse than engine='numba'.
Also kindly note, addition of numba as an engine(in v2.0.0) was solely to speed up the computationally heavy for loop that sits in core.py (no other reason..)

Hi, thanks for the extensive answer, really appreciate it. Your adapted code example works for me (with engine='python',). Good to know it seem to be an Ubuntu specific issue, running it on Windows is a feasible workaround for me. Considering it only depends on my personal preference :)

Good to know :)
From what i can gather is that the swt_strokes would require explicit numpy annotation for the dtypes. I will park this for the next minor release.
Thanks for pointing it out.
Closing this issue for now. Kindly reopen should you feel the need to :)


Stack trace missing from example app

Would this be because we need source maps?

This is my last review point. Everything else looks good!

It has nothing to do with source maps, it's rather because this is how the raygun4node package is implemented.
To provide a stack trace automatically, we have to use send(Error) instead of send(string).
I will adjust the AWS Lambda implementation, so any string exception is wrapped in an Error before being reported.

I improved the example so it will show a more interesting stacktrace by default


reformat axis, calendar, units or all? Repeating time ranges

          Hi, I am fumbling my way through working with NetCDF files in R and have a large palaeoclimate.nc that has this time dimension:

time  Size:11500   *** is unlimited ***
standard_name: time
units: hours since 1-1-1 00:00:00
calendar: standard
axis: T
The thing is, I would like to reformat the time units so they properly reflect BP. I assume I have to change the calendar as well.
Right now, the range of time is only 1000 years, so the hours since 1-1-1 00:00:00 reset for each 1000-year span, making it difficult to create a time series.
Is there a straightforward way to accomplish this? Or do I need the author of the file to recode it?
Thanks!
K
Originally posted by @kaos000 in https://github.com/Unidata/cftime/issues/234#issuecomment-1864334700

Not sure what you mean by 'reformat the time units', but I if you mean change the time units and update the time values consistently you will have to rewrite the dataset.  This should be fairly straightforward - just make a copy of the Dataset, open in 'append' mode, change the time units and write new time values.


WSL2: Writing piped STDOUT to same file doesn't work

This doesn't work (Pipe to file)
"emeraldwalk.runonsave": {
        "commands": [
            {
                "match": ".sql",
                "cmd": "cat ${file} | ~/sqlfmt --print-width 88 --tab-width 2 --use-spaces --no-simplify > ${file}"
            }
        ]
    }

This is a workaround:
"emeraldwalk.runonsave": {
        "commands": [
            {
                "match": ".sql",
                "cmd": "cat ${file} | ~/sqlfmt --print-width 88 --tab-width 2 --use-spaces --no-simplify > ${file}2; mv ${file}2 ${file}"
            }
        ]
    }

Any ideas?

Does that command work outside of the extension? I'd be surprised if you can pipe back into the file you are piping out of.

This doesn't appear to be an issue with the extension but an issue with piping data back into the same file that it is being piped from.


hy: 0.27.0 -> 0.28.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/hylang/hy/releases.
meta.description for hy is: A LISP dialect embedded in Python
meta.homepage for hy is: https://hylang.org/
meta.changelog for hy is: https://github.com/hylang/hy/releases/tag/0.28.0
Updates performed

Version update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.28.0 with grep in /nix/store/c9byw24mgjchibsd32fhnkcg985nv0q5-python3.11-hy-0.28.0
found 0.28.0 in filename of file in /nix/store/c9byw24mgjchibsd32fhnkcg985nv0q5-python3.11-hy-0.28.0

Rebuild report (if merged into master) (click to expand)

5 total rebuild path(s)

5 package rebuild(s)

First fifty rebuilds by attrpath
hy
python310Packages.hy
python310Packages.hyrule
python311Packages.hy
python311Packages.hyrule

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/c9byw24mgjchibsd32fhnkcg985nv0q5-python3.11-hy-0.28.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A hy https://github.com/r-ryantm/nixpkgs/archive/4c762156c4286d712863c57579c41e99ef9f3fde.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/4c762156c4286d712863c57579c41e99ef9f3fde#hy

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/c9byw24mgjchibsd32fhnkcg985nv0q5-python3.11-hy-0.28.0
ls -la /nix/store/c9byw24mgjchibsd32fhnkcg985nv0q5-python3.11-hy-0.28.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages failed to build:

python310Packages.hyrule
python311Packages.hyrule

2 packages built:

hy (python311Packages.hy)
python310Packages.hy

Maintainer pings
cc @fabaff @Mazurel @nixy @thiagokokada for testing.

@ofborg build hy python3Packages.hyrule


Agent based model examples

We need a few examples of agent based models so that we have some diversity away from ODEProblem.

One thing we might want to do with agent based models is have an extractor/context that identifies the Finite State Machine of the agents by static analysis or running the code. Then we can talk about transforming models by changing the FSM which is a higher level of representation than the code level.
@mehalter, What is the right way to construct our ABM so that the agents are simple algebraic structures like FSM or Nondeterministic Automata?

@jpfairbanks and I discussed this on the phone earlier today, and currently in the example/agentbased.jl model example and the bin/agentgraft.jl SemanticModels example of manipulating the ABM model is programmed how you would define the changes mathematically as a FSM/NFA, where you add the state, add the new state transitions, and modify the old state transitions. This makes it pretty complicated to modify. The example in the agentgraft.jl is a pretty simple example, but takes a good amount of code and knowledge of the codes current state machine to change.
I think a simpler and more intuitive way to approach this would be to be able to export subexpressions as metagraphs of states and functions, edit the graph (like add new states and define the changes in transitions/functions as edges), then have Semantic models convert the new metagraph to the correct model and put it back where it went before instead of think about the algebraic changes that need to be made to the FSM definition.

Yeah I think this is on the right track

This is closed in #107


docs: add initial docs.md, update FAQ.md

Rendered version here:
https://github.com/Larpon/vab/blob/docs/add-docs-md/docs/docs.md
and here: https://github.com/Larpon/vab/blob/docs/add-docs-md/docs/FAQ.md#i-managed-to-compile-some-external-so-libs-how-do-I-include-them

Very nice explanation. Great work.

Thanks!


Remove the venv constraint for setup

After having had some trouble with the RTD build, I revisited the venv constraint for setup, and here's my proposition.

ok guys @huard @Zeitsperre I think I'm now satisfied.. I took a big conda turn, for the best I hope.. what do you think?

ok guys @huard @Zeitsperre I think I'm now satisfied.. I took a big conda turn, for the best I hope.. what do you think?

Is there a way to enable the checks for RtD on PRs for this repo? It would be good to ensure that the next PR doesn't break all of @cjauvin 's hard work!

Is there a way to enable the checks for RtD on PRs for this repo? It would be good to ensure that the next PR doesn't break all of @cjauvin 's hard work!

@Zeitsperre actually I guess the idea would be to activate a build only with change on master? now that we know that it works it's enough I guess to only verify manually.. not sure

@Zeitsperre actually I guess the idea would be to activate a build only with change on master? now that we know that it works it's enough I guess to only verify manually.. not sure

We don't lose anything by having builds on PR in addition to push. It's surprisingly easy to break the docs, haha.

We don't lose anything by having builds on PR in addition to push. It's surprisingly easy to break the docs, haha.


Update Year of Copyright

Changed 2019 to 2020

@googlebot I signed it!

Thank you very much for proposing this change.
While we appreciate your contribution, the years in the copyright statements should be the years they were created/edited. So it should stay as is.


Address pep8 related issues

So far this is the list of pep8 issues.
# pep8 elodie
elodie/arguments.py:3:11: E401 multiple imports on one line
elodie/arguments.py:6:1: E302 expected 2 blank lines, found 1
elodie/arguments.py:12:1: W293 blank line contains whitespace
elodie/filesystem.py:17:1: E302 expected 2 blank lines, found 0
elodie/filesystem.py:21:80: E501 line too long (86 > 79 characters)
elodie/filesystem.py:38:80: E501 line too long (93 > 79 characters)
elodie/filesystem.py:38:94: W291 trailing whitespace
elodie/filesystem.py:41:80: E501 line too long (86 > 79 characters)
elodie/filesystem.py:63:31: E711 comparison to None should be 'if cond is None:'
elodie/filesystem.py:63:80: E501 line too long (80 > 79 characters)
elodie/filesystem.py:78:80: E501 line too long (86 > 79 characters)
elodie/filesystem.py:89:21: E711 comparison to None should be 'if cond is None:'
elodie/filesystem.py:92:80: E501 line too long (103 > 79 characters)
elodie/filesystem.py:94:80: E501 line too long (86 > 79 characters)
elodie/filesystem.py:94:87: W291 trailing whitespace
elodie/filesystem.py:95:80: E501 line too long (94 > 79 characters)
elodie/filesystem.py:98:80: E501 line too long (97 > 79 characters)
elodie/filesystem.py:103:80: E501 line too long (127 > 79 characters)
elodie/filesystem.py:128:80: E501 line too long (85 > 79 characters)
elodie/filesystem.py:129:80: E501 line too long (92 > 79 characters)
elodie/filesystem.py:137:9: E265 block comment should start with '# '
elodie/filesystem.py:159:21: E711 comparison to None should be 'if cond is None:'
elodie/filesystem.py:160:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/filesystem.py:164:80: E501 line too long (85 > 79 characters)
elodie/filesystem.py:165:27: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
elodie/filesystem.py:166:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/filesystem.py:167:80: E501 line too long (93 > 79 characters)
elodie/filesystem.py:172:17: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/filesystem.py:194:80: E501 line too long (117 > 79 characters)
elodie/filesystem.py:197:80: E501 line too long (84 > 79 characters)
elodie/filesystem.py:201:80: E501 line too long (82 > 79 characters)
elodie/filesystem.py:205:80: E501 line too long (97 > 79 characters)
elodie/filesystem.py:208:80: E501 line too long (91 > 79 characters)
elodie/filesystem.py:210:80: E501 line too long (80 > 79 characters)
elodie/filesystem.py:211:1: W293 blank line contains whitespace
elodie/geolocation.py:14:1: E302 expected 2 blank lines, found 1
elodie/geolocation.py:25:1: E302 expected 2 blank lines, found 1
elodie/geolocation.py:39:80: E501 line too long (86 > 79 characters)
elodie/geolocation.py:39:87: W291 trailing whitespace
elodie/geolocation.py:40:80: E501 line too long (121 > 79 characters)
elodie/geolocation.py:42:80: E501 line too long (92 > 79 characters)
elodie/geolocation.py:43:80: E501 line too long (83 > 79 characters)
elodie/geolocation.py:44:80: E501 line too long (86 > 79 characters)
elodie/geolocation.py:47:80: E501 line too long (154 > 79 characters)
elodie/geolocation.py:50:1: W293 blank line contains whitespace
elodie/geolocation.py:55:1: W293 blank line contains whitespace
elodie/geolocation.py:58:1: E302 expected 2 blank lines, found 1
elodie/geolocation.py:59:80: E501 line too long (82 > 79 characters)
elodie/geolocation.py:71:15: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
elodie/geolocation.py:76:80: E501 line too long (153 > 79 characters)
elodie/geolocation.py:78:1: E302 expected 2 blank lines, found 1
elodie/geolocation.py:80:23: E221 multiple spaces before operator
elodie/geolocation.py:81:28: E221 multiple spaces before operator
elodie/geolocation.py:85:1: E302 expected 2 blank lines, found 1
elodie/geolocation.py:89:1: W293 blank line contains whitespace
elodie/geolocation.py:97:1: E302 expected 2 blank lines, found 1
elodie/geolocation.py:102:54: E231 missing whitespace after ','
elodie/geolocation.py:106:29: E703 statement ends with a semicolon
elodie/geolocation.py:133:80: E501 line too long (110 > 79 characters)
elodie/geolocation.py:136:28: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/geolocation.py:140:28: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/geolocation.py:145:1: E302 expected 2 blank lines, found 1
elodie/geolocation.py:153:28: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/geolocation.py:154:80: E501 line too long (98 > 79 characters)
elodie/geolocation.py:155:80: E501 line too long (106 > 79 characters)
elodie/geolocation.py:158:28: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/geolocation.py:162:28: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/localstorage.py:9:1: E302 expected 2 blank lines, found 1
elodie/localstorage.py:11:80: E501 line too long (82 > 79 characters)
elodie/localstorage.py:23:80: E501 line too long (82 > 79 characters)
elodie/localstorage.py:38:80: E501 line too long (82 > 79 characters)
elodie/localstorage.py:47:18: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/localstorage.py:91:18: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/localstorage.py:94:52: E231 missing whitespace after ','
elodie/localstorage.py:99:80: E501 line too long (140 > 79 characters)
elodie/localstorage.py:102:80: E501 line too long (99 > 79 characters)
elodie/localstorage.py:105:37: E201 whitespace after '('
elodie/localstorage.py:105:53: E202 whitespace before ')'
elodie/localstorage.py:107:26: E201 whitespace after '('
elodie/localstorage.py:107:36: E202 whitespace before ')'
elodie/localstorage.py:110:17: E265 block comment should start with '# '
elodie/localstorage.py:111:36: E703 statement ends with a semicolon
elodie/plist_parser.py:15:1: E302 expected 2 blank lines, found 0
elodie/media/media.py:23:1: E302 expected 2 blank lines, found 0
elodie/media/media.py:33:80: E501 line too long (106 > 79 characters)
elodie/media/media.py:33:82: E261 at least two spaces before inline comment
elodie/media/media.py:33:83: E262 inline comment should start with '# '
elodie/media/media.py:54:1: W293 blank line contains whitespace
elodie/media/media.py:68:80: E501 line too long (81 > 79 characters)
elodie/media/media.py:74:5: E303 too many blank lines (2)
elodie/media/media.py:91:80: E501 line too long (108 > 79 characters)
elodie/media/media.py:98:1: W293 blank line contains whitespace
elodie/media/media.py:117:80: E501 line too long (111 > 79 characters)
elodie/media/media.py:134:26: E703 statement ends with a semicolon
elodie/media/media.py:144:5: E303 too many blank lines (2)
elodie/media/media.py:166:55: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
elodie/media/media.py:184:1: W293 blank line contains whitespace
elodie/media/media.py:196:21: E711 comparison to None should be 'if cond is None:'
elodie/media/media.py:200:1: W293 blank line contains whitespace
elodie/media/media.py:235:28: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/media.py:236:80: E501 line too long (107 > 79 characters)
elodie/media/media.py:237:80: E501 line too long (170 > 79 characters)
elodie/media/media.py:270:5: E303 too many blank lines (2)
elodie/media/media.py:271:80: E501 line too long (92 > 79 characters)
elodie/media/media.py:273:80: E501 line too long (121 > 79 characters)
elodie/media/media.py:276:80: E501 line too long (82 > 79 characters)
elodie/media/photo.py:26:1: E302 expected 2 blank lines, found 0
elodie/media/photo.py:38:1: W293 blank line contains whitespace
elodie/media/photo.py:51:13: E128 continuation line under-indented for visual indent
elodie/media/photo.py:51:19: E251 unexpected spaces around keyword / parameter equals
elodie/media/photo.py:51:21: E251 unexpected spaces around keyword / parameter equals
elodie/media/photo.py:51:45: E251 unexpected spaces around keyword / parameter equals
elodie/media/photo.py:51:47: E251 unexpected spaces around keyword / parameter equals
elodie/media/photo.py:54:80: E501 line too long (87 > 79 characters)
elodie/media/photo.py:66:80: E501 line too long (94 > 79 characters)
elodie/media/photo.py:73:80: E501 line too long (91 > 79 characters)
elodie/media/photo.py:75:80: E501 line too long (93 > 79 characters)
elodie/media/photo.py:78:23: E225 missing whitespace around operator
elodie/media/photo.py:78:80: E501 line too long (94 > 79 characters)
elodie/media/photo.py:83:80: E501 line too long (113 > 79 characters)
elodie/media/photo.py:85:80: E501 line too long (114 > 79 characters)
elodie/media/photo.py:100:80: E501 line too long (85 > 79 characters)
elodie/media/photo.py:102:80: E501 line too long (93 > 79 characters)
elodie/media/photo.py:103:80: E501 line too long (102 > 79 characters)
elodie/media/photo.py:105:80: E501 line too long (104 > 79 characters)
elodie/media/photo.py:110:80: E501 line too long (96 > 79 characters)
elodie/media/photo.py:111:80: E501 line too long (86 > 79 characters)
elodie/media/photo.py:112:30: E703 statement ends with a semicolon
elodie/media/photo.py:114:36: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/photo.py:124:80: E501 line too long (89 > 79 characters)
elodie/media/photo.py:125:1: W293 blank line contains whitespace
elodie/media/photo.py:134:25: E703 statement ends with a semicolon
elodie/media/photo.py:175:80: E501 line too long (95 > 79 characters)
elodie/media/photo.py:176:80: E501 line too long (132 > 79 characters)
elodie/media/photo.py:177:80: E501 line too long (97 > 79 characters)
elodie/media/photo.py:178:80: E501 line too long (135 > 79 characters)
elodie/media/video.py:26:1: E302 expected 2 blank lines, found 0
elodie/media/video.py:28:24: E231 missing whitespace after ','
elodie/media/video.py:28:30: E231 missing whitespace after ','
elodie/media/video.py:28:36: E231 missing whitespace after ','
elodie/media/video.py:28:42: E231 missing whitespace after ','
elodie/media/video.py:46:80: E501 line too long (95 > 79 characters)
elodie/media/video.py:52:5: E303 too many blank lines (2)
elodie/media/video.py:74:80: E501 line too long (100 > 79 characters)
elodie/media/video.py:92:80: E501 line too long (102 > 79 characters)
elodie/media/video.py:94:80: E501 line too long (85 > 79 characters)
elodie/media/video.py:102:80: E501 line too long (123 > 79 characters)
elodie/media/video.py:114:1: W293 blank line contains whitespace
elodie/media/video.py:127:13: E128 continuation line under-indented for visual indent
elodie/media/video.py:127:19: E251 unexpected spaces around keyword / parameter equals
elodie/media/video.py:127:21: E251 unexpected spaces around keyword / parameter equals
elodie/media/video.py:127:45: E251 unexpected spaces around keyword / parameter equals
elodie/media/video.py:127:47: E251 unexpected spaces around keyword / parameter equals
elodie/media/video.py:130:80: E501 line too long (87 > 79 characters)
elodie/media/video.py:135:80: E501 line too long (87 > 79 characters)
elodie/media/video.py:145:80: E501 line too long (111 > 79 characters)
elodie/media/video.py:149:80: E501 line too long (89 > 79 characters)
elodie/media/video.py:150:1: W293 blank line contains whitespace
elodie/media/video.py:171:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/video.py:172:80: E501 line too long (97 > 79 characters)
elodie/media/video.py:188:80: E501 line too long (82 > 79 characters)
elodie/media/video.py:213:80: E501 line too long (89 > 79 characters)
elodie/media/video.py:215:80: E501 line too long (84 > 79 characters)
elodie/media/video.py:224:80: E501 line too long (118 > 79 characters)
elodie/media/video.py:225:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/video.py:231:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/video.py:237:80: E501 line too long (87 > 79 characters)
elodie/media/video.py:239:80: E501 line too long (102 > 79 characters)
elodie/media/video.py:241:80: E501 line too long (115 > 79 characters)
elodie/media/video.py:242:80: E501 line too long (122 > 79 characters)
elodie/media/video.py:245:36: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/video.py:250:80: E501 line too long (106 > 79 characters)
elodie/media/video.py:261:80: E501 line too long (92 > 79 characters)
elodie/media/video.py:263:80: E501 line too long (82 > 79 characters)
elodie/media/video.py:264:80: E501 line too long (88 > 79 characters)
elodie/media/video.py:280:80: E501 line too long (84 > 79 characters)
elodie/media/video.py:285:80: E501 line too long (82 > 79 characters)
elodie/media/video.py:286:21: E265 block comment should start with '# '
elodie/media/video.py:299:36: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/video.py:304:80: E501 line too long (81 > 79 characters)
elodie/media/video.py:305:80: E501 line too long (82 > 79 characters)
elodie/media/video.py:313:80: E501 line too long (111 > 79 characters)
elodie/media/video.py:314:80: E501 line too long (108 > 79 characters)
elodie/media/video.py:317:36: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/video.py:318:80: E501 line too long (86 > 79 characters)
elodie/media/video.py:321:80: E501 line too long (84 > 79 characters)
elodie/media/video.py:324:80: E501 line too long (207 > 79 characters)
elodie/media/video.py:325:36: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/media/video.py:329:80: E501 line too long (99 > 79 characters)
elodie/media/video.py:346:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:8:80: E501 line too long (114 > 79 characters)
elodie/tests/filesystem_test.py:10:1: E402 module level import not at top of file
elodie/tests/filesystem_test.py:11:1: E402 module level import not at top of file
elodie/tests/filesystem_test.py:12:1: E402 module level import not at top of file
elodie/tests/filesystem_test.py:13:1: E402 module level import not at top of file
elodie/tests/filesystem_test.py:14:1: E402 module level import not at top of file
elodie/tests/filesystem_test.py:27:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/filesystem_test.py:30:1: W293 blank line contains whitespace
elodie/tests/filesystem_test.py:37:80: E501 line too long (97 > 79 characters)
elodie/tests/filesystem_test.py:43:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/filesystem_test.py:49:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:51:80: E501 line too long (92 > 79 characters)
elodie/tests/filesystem_test.py:53:19: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
elodie/tests/filesystem_test.py:55:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:68:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:70:80: E501 line too long (97 > 79 characters)
elodie/tests/filesystem_test.py:88:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:120:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:124:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:131:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:136:80: E501 line too long (82 > 79 characters)
elodie/tests/filesystem_test.py:138:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:150:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:157:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:164:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:171:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:178:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:186:80: E501 line too long (95 > 79 characters)
elodie/tests/filesystem_test.py:196:80: E501 line too long (99 > 79 characters)
elodie/tests/filesystem_test.py:198:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:206:80: E501 line too long (95 > 79 characters)
elodie/tests/filesystem_test.py:216:80: E501 line too long (110 > 79 characters)
elodie/tests/filesystem_test.py:218:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:226:80: E501 line too long (95 > 79 characters)
elodie/tests/filesystem_test.py:236:80: E501 line too long (92 > 79 characters)
elodie/tests/filesystem_test.py:238:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:246:80: E501 line too long (95 > 79 characters)
elodie/tests/filesystem_test.py:256:80: E501 line too long (103 > 79 characters)
elodie/tests/filesystem_test.py:258:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:266:80: E501 line too long (95 > 79 characters)
elodie/tests/filesystem_test.py:276:80: E501 line too long (93 > 79 characters)
elodie/tests/filesystem_test.py:278:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:286:80: E501 line too long (95 > 79 characters)
elodie/tests/filesystem_test.py:296:80: E501 line too long (104 > 79 characters)
elodie/tests/filesystem_test.py:298:1: E302 expected 2 blank lines, found 1
elodie/tests/filesystem_test.py:303:80: E501 line too long (85 > 79 characters)
elodie/tests/filesystem_test.py:306:80: E501 line too long (95 > 79 characters)
elodie/tests/filesystem_test.py:316:80: E501 line too long (104 > 79 characters)
elodie/tests/geolocation_test.py:7:80: E501 line too long (114 > 79 characters)
elodie/tests/geolocation_test.py:9:1: E402 module level import not at top of file
elodie/tests/geolocation_test.py:10:1: E402 module level import not at top of file
elodie/tests/geolocation_test.py:14:1: E302 expected 2 blank lines, found 1
elodie/tests/geolocation_test.py:20:1: W293 blank line contains whitespace
elodie/tests/geolocation_test.py:22:80: E501 line too long (91 > 79 characters)
elodie/tests/geolocation_test.py:27:80: E501 line too long (112 > 79 characters)
elodie/tests/geolocation_test.py:29:1: E302 expected 2 blank lines, found 1
elodie/tests/geolocation_test.py:33:1: W293 blank line contains whitespace
elodie/tests/geolocation_test.py:35:80: E501 line too long (91 > 79 characters)
elodie/tests/geolocation_test.py:42:80: E501 line too long (120 > 79 characters)
elodie/tests/helper.py:8:1: E302 expected 2 blank lines, found 1
elodie/tests/helper.py:19:1: E302 expected 2 blank lines, found 1
elodie/tests/helper.py:21:80: E501 line too long (82 > 79 characters)
elodie/tests/helper.py:26:1: E302 expected 2 blank lines, found 1
elodie/tests/helper.py:30:1: E302 expected 2 blank lines, found 1
elodie/tests/helper.py:33:1: E302 expected 2 blank lines, found 1
elodie/tests/helper.py:45:1: E302 expected 2 blank lines, found 1
elodie/tests/helper.py:46:80: E501 line too long (111 > 79 characters)
elodie/tests/helper.py:48:1: E302 expected 2 blank lines, found 1
elodie/tests/helper.py:51:1: E302 expected 2 blank lines, found 1
elodie/tests/helper.py:55:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:5:80: E501 line too long (114 > 79 characters)
elodie/tests/localstorage_test.py:7:1: E402 module level import not at top of file
elodie/tests/localstorage_test.py:8:1: E402 module level import not at top of file
elodie/tests/localstorage_test.py:9:1: E402 module level import not at top of file
elodie/tests/localstorage_test.py:13:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:19:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:28:80: E501 line too long (83 > 79 characters)
elodie/tests/localstorage_test.py:33:1: W293 blank line contains whitespace
elodie/tests/localstorage_test.py:34:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:43:80: E501 line too long (83 > 79 characters)
elodie/tests/localstorage_test.py:48:1: W293 blank line contains whitespace
elodie/tests/localstorage_test.py:49:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:58:80: E501 line too long (83 > 79 characters)
elodie/tests/localstorage_test.py:63:1: W293 blank line contains whitespace
elodie/tests/localstorage_test.py:64:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:73:80: E501 line too long (83 > 79 characters)
elodie/tests/localstorage_test.py:74:1: W293 blank line contains whitespace
elodie/tests/localstorage_test.py:75:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:80:80: E501 line too long (100 > 79 characters)
elodie/tests/localstorage_test.py:82:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:91:80: E501 line too long (102 > 79 characters)
elodie/tests/localstorage_test.py:92:1: W293 blank line contains whitespace
elodie/tests/localstorage_test.py:93:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:98:80: E501 line too long (103 > 79 characters)
elodie/tests/localstorage_test.py:100:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:109:80: E501 line too long (83 > 79 characters)
elodie/tests/localstorage_test.py:121:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:127:80: E501 line too long (129 > 79 characters)
elodie/tests/localstorage_test.py:129:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:139:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:145:1: W293 blank line contains whitespace
elodie/tests/localstorage_test.py:146:5: E303 too many blank lines (2)
elodie/tests/localstorage_test.py:151:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:165:80: E501 line too long (105 > 79 characters)
elodie/tests/localstorage_test.py:167:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:181:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:183:1: W293 blank line contains whitespace
elodie/tests/localstorage_test.py:198:1: E302 expected 2 blank lines, found 1
elodie/tests/localstorage_test.py:200:1: W293 blank line contains whitespace
elodie/tests/media/media_test.py:13:80: E501 line too long (131 > 79 characters)
elodie/tests/media/media_test.py:14:80: E501 line too long (97 > 79 characters)
elodie/tests/media/media_test.py:16:1: E402 module level import not at top of file
elodie/tests/media/media_test.py:17:1: E402 module level import not at top of file
elodie/tests/media/media_test.py:18:1: E402 module level import not at top of file
elodie/tests/media/media_test.py:19:1: E402 module level import not at top of file
elodie/tests/media/media_test.py:23:1: E302 expected 2 blank lines, found 1
elodie/tests/media/media_test.py:29:1: E302 expected 2 blank lines, found 1
elodie/tests/media/media_test.py:35:1: E302 expected 2 blank lines, found 1
elodie/tests/media/media_test.py:36:80: E501 line too long (81 > 79 characters)
elodie/tests/media/media_test.py:40:1: E302 expected 2 blank lines, found 1
elodie/tests/media/media_test.py:41:80: E501 line too long (81 > 79 characters)
elodie/tests/media/media_test.py:45:1: E302 expected 2 blank lines, found 1
elodie/tests/media/media_test.py:46:80: E501 line too long (80 > 79 characters)
elodie/tests/media/media_test.py:50:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:13:80: E501 line too long (131 > 79 characters)
elodie/tests/media/photo_test.py:14:80: E501 line too long (97 > 79 characters)
elodie/tests/media/photo_test.py:16:1: E402 module level import not at top of file
elodie/tests/media/photo_test.py:17:1: E402 module level import not at top of file
elodie/tests/media/photo_test.py:18:1: E402 module level import not at top of file
elodie/tests/media/photo_test.py:22:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:36:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:40:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:46:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:51:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:56:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:62:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:68:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:74:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:80:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:86:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:94:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:100:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:105:80: E501 line too long (95 > 79 characters)
elodie/tests/media/photo_test.py:109:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:114:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:119:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:128:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/media/photo_test.py:137:80: E501 line too long (82 > 79 characters)
elodie/tests/media/photo_test.py:139:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:140:80: E501 line too long (80 > 79 characters)
elodie/tests/media/photo_test.py:155:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/media/photo_test.py:166:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:177:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/media/photo_test.py:186:1: E302 expected 2 blank lines, found 1
elodie/tests/media/photo_test.py:198:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/media/video_test.py:13:80: E501 line too long (131 > 79 characters)
elodie/tests/media/video_test.py:14:80: E501 line too long (97 > 79 characters)
elodie/tests/media/video_test.py:16:1: E402 module level import not at top of file
elodie/tests/media/video_test.py:17:1: E402 module level import not at top of file
elodie/tests/media/video_test.py:18:1: E402 module level import not at top of file
elodie/tests/media/video_test.py:22:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:36:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:42:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:48:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:54:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:61:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:67:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:72:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:77:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:89:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/media/video_test.py:98:80: E501 line too long (82 > 79 characters)
elodie/tests/media/video_test.py:100:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:104:80: E501 line too long (80 > 79 characters)
elodie/tests/media/video_test.py:114:5: E265 block comment should start with '# '
elodie/tests/media/video_test.py:115:5: E265 block comment should start with '# '
elodie/tests/media/video_test.py:119:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/media/video_test.py:130:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:144:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/media/video_test.py:153:1: E302 expected 2 blank lines, found 1
elodie/tests/media/video_test.py:168:19: E712 comparison to True should be 'if cond is True:' or 'if cond:'
elodie/tests/media/video_test.py:177:1: E302 expected 2 blank lines, found 1

Fixed everything not in the elodie/tests folder.


Add JSON-RPC method: peersInfo

Add JSON-RPC method: peersInfo https://github.com/cryptape/cita/issues/280

Add auto-generated files (from https://github.com/cryptape/cita-proto/commit/86f7e797c1137ad82a0ba41ca7c733ea247db37c)
Modify license header: copyright from 2018 to 2019
Other codes for peersInfo

Tips: If you review this PR, you can just review the following two commits:

316f2d6
689fb83
And the other two commits are generated by script or protoc:
9088deb: generated by script, and
c0c4be4: generated by protoc.


Changing const system declaration in html.py to var system?

Hello from the Princeton office! We are excited about brax and have started playing around with it.
One snag in our workflow: the generated JavaScript for html.py:render declares system as a const, so re-evaluating an Jupyter notebook cell calling html.render will fail. We've forked and changed the const to var, but hesitated submitting a PR since there may have been some important reason we missed for choosing const.
Anyway, just wanted to check!

Hello Daniel - I've been meaning to chase down why rendering fails from time to time.  Thank you for finding that!  A PR would be greatly appreciated.
As for the reason, it's const, programmer error      :-)

Done!
We were also wondering if you'd be amenable to (at least occupying) brax on pypi. Happy to set that up and pass ownership to someone on your team if that helps!
(But of course, there are also reasons not to do this, so defer to you guys! Our only reason is to make our setup.cfg minimally more clean :) )

Oops that probably should go in another issue...

That's a very kind offer.  Yes please do open another issue and if you add a bit of info about how you did it for deluca, we'll happily follow suit.


How to select all files under tab 'Connected file share' convinently?

I can see the files under cvat_share, but I don't know how to select all easily, except selecting them one by one.

@richardxdh
Hi,

Put the files into a folder
Select a folder

@bsekachev ,
I believe in previous version it was possible to choose

[ ] '/'

Can we implement a similar approach here?

Probably we can


Update

I explained the meaning of the methods downcase, upcase and capitalize.

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Thank you for your contribution to the page! 👍
We're happy to accept these changes, and look forward to future contributions. 🎉


Initial work

Import module code from seed-stack
Make a little more flexible so it can stand on its own
Use a preseed file instead of exec-ing the debconf stuff
metadata.json/Gemfile/Puppetfile/etc
Puppet-lint tests in a Rakefile
Travis

:+1:


Context for ITestableUserManager and IListUserManager

In my situation, I need access to the HTTP request context in order to select the correct user. Specifically, this is a multi-domain set up, so I want access to the Host header within ITestableUserManager.getUserByNamePassword(). Since this is called from within HTTPAuthentication.getUser(), context is available.
I would like to create a PR that modifies the interfaces and implementations to provide ctx as an additional parameter to methods of ITestableUserManager and IListUserManager and make a corresponding change to HTTPAuthentication.getUser() to pass in the context. I can maintain backwards compatibility by duck typing the last two parameters.
I can also update the documentation to reflect this change.
Am I missing something? Is this change one that you would consider useful? Are any other changes necessary for the PR to be accepted?
Thanks.

Here is a first pass.
https://github.com/OpenMarshal/npm-WebDAV-Server/pull/73

A question, I am trying to install my fork into my project, my package.json contains:
"webdav-server"<EMAIL_ADDRESS>
But when I attempt to require('webdav-server') I get:
davd_1        | Error: Cannot find module '/node_modules/webdav-server/lib/index'. Please verify that the package.json has a valid "main" entry
davd_1        |     at tryPackage (internal/modules/cjs/loader.js:316:19)
davd_1        |     at Function.Module._findPath (internal/modules/cjs/loader.js:705:18)
davd_1        |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:969:27)
davd_1        |     at Function.Module._load (internal/modules/cjs/loader.js:864:27)
davd_1        |     at Module.require (internal/modules/cjs/loader.js:1044:19)
davd_1        |     at require (internal/modules/cjs/helpers.js:77:18)
davd_1        |     at Object.<anonymous> (/app/dav/davserver.js:3:16)
davd_1        |     at Module._compile (internal/modules/cjs/loader.js:1158:30)
davd_1        |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
davd_1        |     at Module.load (internal/modules/cjs/loader.js:1002:32)
davd_1        |     at Function.Module._load (internal/modules/cjs/loader.js:901:14)
davd_1        |     at Module.require (internal/modules/cjs/loader.js:1044:19)
davd_1        |     at require (internal/modules/cjs/helpers.js:77:18)
davd_1        |     at Object.<anonymous> (/app/index.js:13:19)
davd_1        |     at Module._compile (internal/modules/cjs/loader.js:1158:30)
davd_1        |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
davd_1        |     at Module.load (internal/modules/cjs/loader.js:1002:32)
davd_1        |     at Function.Module._load (internal/modules/cjs/loader.js:901:14)
davd_1        |     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
davd_1        |     at internal/main/run_main_module.js:18:47

I am missing some step to make this an installable package, any tips?

Nevermind. I just implemented a new HTTPBasicAuthentication.


Downgrade hashbrown to 0.9 because 0.10 was yanked.

Pull request

Description
Downgrade hashbrown to 0.9 because 0.10 was yanked.
Which broke our security audit CI action: https://github.com/tremor-rs/tremor-runtime/actions/runs/529305998

Checklist

[x] The RFC, if required, has been submitted and approved
[x] Any user-facing impact of the changes is reflected in docs.tremor.rs
[x] The code is tested
[x] Use of unsafe code is reasoned about in a comment
[x] Update CHANGELOG.md appropriately, recording any changes, bug fixes or other observable changes in behavior

Coverage remained the same at 80.931% when pulling 32d0728edc80e2372fcf4b2a43201bbddf8eb351 on downgrade-hashbrown into 4b82b17ee3a2bd43da455b0ba88a467d8b9e0359 on main.


Style guide

Make a style guide for future developers.

Moved from old todo.txt.

Will the 80 character limit live on from punchcards?!  https://softwareengineering.stackexchange.com/questions/148677/why-is-80-characters-the-standard-limit-for-code-width

Fair to question whether or not an 80-character limit is outdated.  More generally, is it useful to have any fixed page width?  This perhaps suggests that it could be:
https://softwareengineering.stackexchange.com/a/222998

Here are some discussions from the web-design world, which is nice because it is separate from the history of coding/punchcards, and focuses on readability instead:
https://www.smashingmagazine.com/2014/09/balancing-line-length-font-size-responsive-web-design/
https://baymard.com/blog/line-length-readability


Consistent handling of --forbid-only for suites and tests

Description of the Change
The handling of the --forbid-only option is currently inconsistent for theTest and Suite classes. Suites that are marked as only and excluded by --grep  or --fgrep don't throw an error. Test that are marked as only but excluded by grep or f-grep do throw an error.
Following the discussion in #4256 it was suggested that due to the nature of the --forbid-only option it should not matter if a suite or test is excluded by a grep. An error should be thrown either way to protect the user from forgetting to remove .only() statements from his test code. I moved the changes concerning this inconsistency, including a refactoring of the Suite class to use a markOnly() instance method, into this PR to separate them from the fix #4256 for bug #3840.
Alternate Designs
An alternative to make it consistent would be to adapt the logic so it will be checked if test cases are excluded by grep or fgrep as well. (see discussion in #4256)
Why should this be in core?
It improves the consistency of the --forbid-only option and improves encapsulation between classes.
Benefits
It improves the consistency of the --forbid-only option and improves encapsulation between classes.
Possible Drawbacks
If the --forbid-only option is set and a test or suite is marked only but excluded by grep it will now throw an error.
Applicable issues
#4256
#3840

Coverage increased (+0.07%) to 93.219% when pulling 6062653b417f28c544364722e21b460628e3cd7e on arvidOtt:forbid-only-grep into fbe3ce4f7d5c27fec3fa1e32ee86b23b169e02d2 on mochajs:master.

@arvidOtt looks like this now conflicts with master

@mochajs/core This is one of those things that, I think, makes sense.  However, it's a) a breaking change, and b) maybe not worth breaking.  Opinions?

Before we merge this--or any breaking change, really--we should answer these questions:

Who does this potentially help?
Who does this potentially harm?
For those who it harms, are there any workarounds, and what are they?

I'll try to answer these:
This change ensures that, when used with --grep/--fgrep, --forbid-only will cause a failure, even if the test in question is to be skipped due to not matching the grep clause.  Users who are using --forbid-only with --grep (of which there are an unknown number) may find that --forbid-only now catches a usage of only that it did not previously catch, causing tests to exit with an error.

This potentially helps those who expect any usage of only in the entire list of files to exit with an error.  The current behavior results in a sort of "false positive", since it won't catch the usage if the tests are skipped using --grep.  Upon upgrade, these users will need to remove only.
This potentially harms those who expect a usage of only in the list of tests to be run to exit with an error.  The current behavior, then, is the expected behavior for this group of users.
For those who this negatively impacts, there is no complete workaround.  Restricting the list of files to a subset may help.  Using a ESLint plugin to detect these statements can also be an effective solution.  Reserving --forbid-only if process.env.CI is set may also be a better way to consume the option.

Generally, I don't see a lot of usage of --grep outside of ad-hoc Mocha runs, but these usages do exist. However--and this is the reason for --forbid-only--it's highly unlikely that using only in e.g., a CI build is intended; it is usually a mistake.
Since the intent of --forbid-only is to avoid false positives in CI, I believe this PR gets us closer to that goal, regardless of any potential difficulty this change may introduce to a (likely small) subset of users.

@arvidOtt FWIW this needs conflict resolution again, but you may want to just wait until someone else reviews it.  Or, if it's approved by others, I can resolve the conflicts myself and merge.

Maybe one thing to highlight here is that the inconsistency in the behaviour of suites and tests also might "harm" users by unexpected behaviour.

@juergba as you brought up this point in your comment in #3840 what is your opinion on this PR aiming to solve that problem?

If users are using --forbid-only in conjunction with --grep, they should be able to work around it by making multiple config's for example. We should clearly state so in the changelog, so users know what to do.

@nicojs Can you explain further?

@arvidOtt I've rebased to fix the conflict; please look at the result.  In another PR, I had created a createForbiddenExclusivityError function, which should be called instead of createUnsupportedError.

@boneskull that makes sense, thanks!
@juergba @nicojs I integrated your feedback 👷

Wanted to understand what @nicojs is recommending here insofar as documentation

Sure, I'll right down my thoughts tomorrow.

Maybe something like this.
BREAKING CHANGE
Focussed suites (i.e. describe.only) are never allowed in conjunction with --forbid-only, even if it's filtered out with --grep. This behavior was already the case with focussed tests (i.e. it.only), but not for suites.
This is no longer OK to do:
// foobar.spec.js
describe.only('foo', () => {
});

describe('bar', () => {
});

npx mocha --forbid-only --grep bar *.spec.js

Work around
If you want to keep using this setup, you can work around this issue by moving focussed suites to different files and configure mocha to exclude them in your CI.
// only-foo.spec.js
describe.only('foo', () => {
});

// bar.spec.js
describe('bar', () => {
});

npx mocha --forbid-only --grep bar --exclude only-foo.spec.js *.spec.js

The same configuration could also be achieved with 2 configuration files.
// .mocharc.json
{
  "spec": "*.spec.js",
  "exclude": "only-foo.spec.js",
  "grep": "bar",
  "forbid-only": true
}

// .mocharc.only.js
const config = require('./.mocharc.json');
config['forbid-only'] = false;
config.spec = ['**.spec.js'];
module.exports = config;

npx mocha # normal run, without foo
npx mocha --config .mocharc.only.js # run with focussed foo


next-server

Implements the new next-server package.

I hope it'll be pluggable to implement features such as https://github.com/zeit/next-plugins/issues/243


[WIP] prevent windows web doctor from launching chrome

Description
Due to https://bugs.chromium.org/p/chromium/issues/detail?id=158372, asking chrome for its version on windows will cause an instance to be launched. look in the registry instead

WIP because I haven't run it on windows yet!

This powershell one-liner prints the version of chrome installed, pretty sure it ain't perfect but it works
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object DisplayName -eq "Google Chrome" | Select-Object -expand Version

Returns
74.0.3729.169


ECHONET Lite communication waits for the response of the previous command before sending the next command.

Currently, EchonetLite2mqtt always sends commands at regular intervals using echonet-lite.js methods.
But there's a problem:

Echonetlite2mqtt may not receive a response if the device is slow to respond
Increasing the interval between commands to account for device response will slow startup.

These issues are reported in #9 #18 #21.

I think the problem can be solved by turning off the echonet-lite.js function and communicating independently.
In my experiments, Echonetelite2mqtt is able to reliably receive responses to commands.
Device detection is also now more than twice as fast.
Since this is a major change, I am worried about backward bugs and loss of compatibility.

i’d be glad to test something if you decide to make the change. iPhoneから送信2023/10/10 8:22、banban @.***>のメール:
I think the problem can be solved by turning off the echonet-lite.js function and communicating independently.
In my experiments, Echonetelite2mqtt is able to reliably receive responses to commands.
Device detection is also now more than twice as fast.
Since this is a major change, I am worried about backward bugs and loss of compatibility.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

@aftertommy
The prototype for this feature is ready.
In my environment it has been working fine for 3 days.
I remember that you needed TAG to use ECHONETLite2MQTT.
I created a tag "v2.4.0-alpha", could you please test it?

absolutely! thanks!2023/10/27 0:44、banban @.***>のメール:
@aftertommy
The prototype for this feature is ready.
In my environment it has been working fine for 3 days.
I remember that you needed TAG to use ECHONETLite2MQTT.
I created a tag "v2.4.0-alpha", could you please test it?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

I'm always looking forward to the wonderful evolution.
The recognition of Panasonic lighting via converter is very fast.
I tried to update it after a long time,
The air conditioner has become unrecognizable all over the place.
I can't recognize EcoCute either, so I can't seem to see panasonic CF-TC7B or lower. I tried the timer from 100ms to 3000ms, but it was annihilated.
Are there any countermeasures?

I don't know if it will be helpful, but the following logs are recorded 3 times every 3 minutes.
[ECHONETLite] prop changed: CF-TC7B_node DEL 0280d5

@grandevice

I don't know if it will be helpful, but the following logs are recorded 3 times every 3 minutes.
[ECHONETLite] prop changed: CF-TC7B_node DEL 0280d5

This log seems to be receiving INF from "CF-TC7B_node".
"DEL" seems to be a name given to an unused property.
I think it's probably a property list in "Node Profile".
With this information, I don't know the cause.
I would like internal logs if possible.

I'm ashamed to say that I can't find the link to the log page.
At the bottom is only the string of ECHONETLite2MQTT ver2.0.0.

@grandevice
Log download feature is available after v.2.0.1.
Perhaps you reverted EchonetLite2mqtt to a version that was working properly.
I wanted logs running with docker's v2.4.0-alpha tag or master tag.
If you can't do it now, do it at your convenience.

As long as I check the version, it seems to be 2.3.0, but I can't find the log link.

sorry i use node.js now

@grandevice
If you are using v.2.0.1 or higher, there should be a link on the Log page for "Donwload Logs and internal statues for debug."
If it display "ver.2.0.0" then I think you are using old code.

@grandevice @aftertommy
I made a new alpha version.
git tag: v2.4.0-alpha.3
docker tag: v2.4.0-alpha.3 or master
Since the command response checking rules have been changed, devices that could not be detected last time may become normal.

error:   uncaughtException: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#".
UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#".
When accessing from apple home using homebridge-mqtthing with v2.4.0-alpha3, it stopped with the error mentioned above.
environment:
raspberry pi 4
bookworm 64bit
node.js 20.9.0
Also, when operating the electronic lock via HF-JA1-W from Echonetlite2mqtt, the Current State was no longer updated automatically. It will be updated upon request.

@grandevice
Thank you for your report.
However, this error alone does not reveal the cause.
If possible, could you please send me the logs?
You can't find the log page link, right?
Can't you attach the "logs" folder in "echonetlite2mqtt" folder instead?
This may be caused by Node.js ver.20.9.0.
My environment is Node.js ver.14.21.3 and Node.js ver.16.20.2.
I will check if the same problem occurs with ver.20.9.0.

Thank you for your reply.
In the end, the environment was corrupted, so I replaced it with bullseye and set Node.js to v16.20.2, but the result did not change.
I can operate the electric lock connected to HF-JA with Echonetlite2MQTT v2.3.0, but the status remains unchanged.
I tried v.2.0.0-v.2.3.0, but the result was the same. The status of air conditioners, eco-cutes, and lighting will be changed immediately.
I have attached the log. thank you.
echonetlite2mqtt_logs_internalsStatus (3).zip

@grandevice
thank you for your reply.
The device in question is "Id: fe00000b000005fd014c364effecefc68" that you were operating on 2023-11-05 23:39 (JST), right?

First cause:
ECHONETLite2MQTT is getting the properties immediately after sending the command.
Maybe this device doesn't change oerationStatus immediately after receiving the command.
It seems to be resolved by waiting a while after sending the command and then obtaining oerationStatus.
But, ECHONETLite2MQTT does not have that feature.
Second cause:
Maybe ECHONETLite2MQTT is not receiving all notifications from all devices.
The oerationStatus of this Id:fe00000b000005fd014c364efffecefc68 has notification enabled.
This means that when you turn ON/OFF on a physical switch, the switch will be notified of the oerationStatus.
For example, when you turn on the air conditioner with the remote control, does the oerationStatus in ECHONETLite2MQTT change automatically?
If ECHONETLite2MQTT is not receiving notifications for all devices, something is probably wrong.
Could you please try the command options below?
"--echonetAltMultiNicMode 1"

@grandevice

error: uncaughtException: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#". UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#".
When accessing from apple home using homebridge-mqtthing with v2.4.0-alpha3, it stopped with the error mentioned above.

Did this problem improve after you recreated the environment?
I tested with Node.js ver.20.9.0 and this error did not occur.
So I believe this error was a problem in your environment.

It was all my mistake.
The reason was that the POE hub I bought again had an IGMPsnooping function. I didn't check the specifications as if I bought a successor, and I didn't notice it at all because it was an unmanaged hub.
I'm sorry to have caused you so much trouble.
I bought it again on Managed Plus Hub, turned off igmp sopping, and there was no problem at all.
I would like to say that, but there is no error in 2.4.0aplha3, and 2.3.0 is currently operating normally.
I'm looking forward to 3.0.0.

@grandevice
Thank you for your report.
I was relieved because there was no problem with ver.2.4.0aplha3.
I am currently implementing ver.3.0.0.
I think it will be completed in about 2-3 weeks.

This feature was implemented in v3.0.0.

i’m sorry for not testing this yet! it gets crazy around the holidays and it’s been hard to carve out time. looking forward to upgrading and checking out the new release!


Add --default-to-base option for code command?

Hi, thanks for releasing this tool, it's very helpful.
At present, when running the code command, BartyCrouch adds blank strings to the target locale files, which results in blank strings in the app until translations are provided. It would be nice if it provided a --default-to-base options (like the interfacecommand provides), that copies the base language string to the target files instead, so the UI at lease has some text. Is there a specific reason why this option is only available for interface?
Many thanks.

The reason is simple: The best practices I know all recommend to use structured keys like "HOME_SCREEN.NETWORK_ALERT.TITLE" in code and such a key simply wouldn't make any sense. Also there are tools like Linguan that can show you a list of all your empty localization Strings, so empty Strings are easier to check then pre-filled Strings.
The reason the interface subcommand has that option is that usually in Interface Builder (even considering best practices) you already have some kind of meaningful text. So, using that kind of makes sense (compared to the keys in code).
But having that all said, I'm not against adding that option – feel free to implement it and post a PR, I sure will have a look as soon as I can.

Thanks @Dschee.

The reason is simple: The best practices I know all recommend to use structured keys like "HOME_SCREEN.NETWORK_ALERT.TITLE" in code and such a key simply wouldn't make any sense.

I'm a bit confused, copying across the keys would be the default-to-keys option, which already exists for code.

Also there are tools like Linguan that can show you a list of all your empty localization Strings, so empty Strings are easier to check then pre-filled Strings.

That's true, though we use WebTranslateIt which keeps track of what has and hasn't been translated for us.
We are using structured keys, so as you say the default-to-keys option isn't a good fit for our app. I'll see if I can schedule some time to create a PR.
Cheers.

Ahh, I see now what you mean. Yes, now you reminded me: default-to-keys is kind of like the equivalent to default-to-base for code as it uses the thing you usually have to provide anyways (the default value in the Base Storyboard/XIB or the localization key) and uses that to prefill values.
I did never think about adding a Base language to the Localizable.strings file though to use a default translation, which is, if I understood you correctly what you're trying to do. That of course is a new feature then and would also make sense. If you find the time to do it, it would also be great to explain a usage example this in detail within the README file.

I'm closing this due to inactivity. Feel free to send a PR with such a feature and reference this issue so I can reopen it until the PR is merged.


Some ideas about partial lists

Hi @samuelcolvin
This looks really exciting, I think a library like this should have been created a long time ago :slightly_smiling_face:
Some time ago I played around with similar idea of partial data equality checks to simplify test assertions and wrote a small library for this.
I just wanted to share a couple of thoughts that you might find interesting. (Or maybe you already considered this, in that case - sorry for bothering)
In my experience a very common and annoying problem is when you need to ensure that a list contains all expected elements but their order is unknown and you don't care about order anyway. When elements are not hashable and not comparable you can't just sort two lists or turn them into sets. For example:
expected_result = [{"id": 1, "name": "John"}, {"id": 2, "name": "Jane"}]
assert result == expected_result # can't just do that

Possible workaround might be something like this:
sorted(result, key=itemgetter("id")) == sorted(expected_result, key=itemgetter("id"))

Or perhaps a helper function:
def unordered_equals(first: list, second: list) -> bool:
    return all(el in second for el in first) and all(el in first for el in second)

I think it would be great to have a simple way for doing such checks.
Also, sometimes I need to check only specific element(s) in a collection. I often notice that I want to be able to do something like this:
[1, 2, 3] == StartsWith([1, 2])
[1, 2, 3] == Contains(3)

# We only need to check that a user has a post with id=42
response == IsPartialDict({
    "username": "John",
    "posts": Contains(IsPartialDict(id=42)),
})

Thanks.
This is all possible already with IsList, I just need to write the docs. I'll add more detail with examples tomorrow when I'm at my desk.

This is mostly done, see the docs here.
I guess we could add Contains(foobar) as a more readable alias of IsListOrTuple(foobar, check_order=False, Length=(0, ...)).
let me know what you think of the implementation I've used.

Contains has been added.


[Proposal]Custom return value

Background
Initially we had something that most Rails app have - a simple users table, and, hence, a fabricator for it. Due to new requirements, we separated user object into two entities - user_accounts and user_#{type}_profiles}.
To reduce compatibility issues and number of refactorings we did two things:

Copied all login information to user_accounts table
Split users between two profiles (reused the same ID from users table)
Combined profiles together with accounts into a users view

The issue
So when reading, User object is almost exactly the same as before. User fabricator on the other hand is a bit of an issue now. We used combination of aliases and after_create callback, so that Fabricate(:user) would create an account + default profile. The problem is though, we need the User object in those tests, so we ended up having something like this in our specs: Fabricate(:#{profile_type}_user).#{profile_type}_user). Kind of works, but it would be nice if it was possible to override the return value of the fabricator.
The proposal
Introduce three new "callbacks" (not a callback really, but so is initialize_with):

on_build_return - overrides return value when building
on_create_return - overrides return value when creating
on_fabricate_return - overrides return value if building or creating

If those are present we would evaluate that in the context of our _instance and return the result of that here:

https://github.com/paulelliott/fabrication/blob/master/lib/fabrication/generator/base.rb#L16
and here:
https://github.com/paulelliott/fabrication/blob/master/lib/fabrication/generator/base.rb#L28

Other thoughts

I'd make a more specific one to take precedence over the more general one (on_build/create_return > on_fabricate_return )
Ideally they would be inheritable and overridable
Other uses: it's not the only place where we rely on a view to return enhanced object. So often if we want in the test to get the "view" version of the object we do this:

let(:project) { Fabricate(:project).to_dashboard_project }

I'd generalise this use case as - "return related object after fabricating".
If it's something you would back, I will present a patch. Also feel free to make a suggestions or discuss some specifics of the solution.

So if I understand correctly you have a User PORO that encapsulates UserAccount and UserXProfile ActiveRecord objects, correct?
Can you share the actual content of the fabricator you're trying to use? I think you actually can accomplish what you're trying to do with fabrication as it is without adding this new functionality.

@paulelliott not exactly - User in our case is a read-only ActiveRecord object, that is read from a SQL view. A single row in users view consists of combination of a user_account and user_profile.
Basically what we need is a new User fabricator, that:

creates two objects - UserAccount and UserProfile
queries users view for a read-only User object and returns it as a result of Fabrication

Technical details
Below is what we have so far after starting refactoring.
AR classes
class UserAccount < ActiveRecord::Base
  #...
  has_one :buyer_profile, class_name: 'UserBuyerProfile', dependent: :destroy
  has_one :supplier_profile, class_name: 'UserSupplierProfile', dependent: :destroy
  # this is not 100% done, as one account will have more than 1 profile eventually
  # but for simplicity sake, let's assume there is a single user record matching account
  has_one :user, class_name: 'User'

  #...
end

class UserBuyerProfile < ActiveRecord::Base
  belongs_to :user_account
  validates_presence_of :user_account_id

  # ...
end

class UserSupplierProfile < ActiveRecord::Base
  belongs_to :user_account
  validates_presence_of :user_account_id

  #...
end

class User < ActiveRecord::Base
  define_method(:readonly?) { true }
  self.primary_key = 'id'

  # ...
end

Fabricator
Fabricator(:user_account) do
  first_name { Faker::Name.name.split(' ').first }
  last_name  { Faker::Name.name.split(' ').last }
  email      { |attrs|
    Faker::Internet.email((attrs[:first_name] + ' ' + attrs[:last_name]).parameterize)
  }
  password { '12341234' }
  password_confirmation { '12341234' }
  terms_of_service { true }
  confirmed_at { 1.day.ago }
end

Fabricator(:buyer_user, from: :user_account, aliases: [:user]) do
  after_create do |user_account, _transients|
    Fabricate(:user_buyer_profile, user_account: user_account)
  end
end

Fabricator(:supplier_user, from: :user_account) do
  after_create do |user_account, _transients|
    Fabricate(:user_supplier_profile, user_account: user_account)
  end
end

As you can see, calling Fabricate(:user), creates a UserAccount and UserBuyerProfile objects, which is what we need to have a fully functional user in our system. But right now we have to do this in our tests to return the user object: Fabricate(:user) { Fabricate(:user).user }, ideally I want to be able to do this instead: Fabricate(:user) { Fabricate(:user) }.
Hence, proposed callback - on_create_return.
In this particular example it would be used like this:
Fabricator(:buyer_user, from: :user_account, aliases: [:user]) do
  after_create do |user_account, _transients|
    Fabricate(:user_buyer_profile, user_account: user_account)
  end
  on_create_return { |user_account| user_account.user }
end

This callback would be executed after all other callbacks are done.
I want stress though, there might be a better options how to achieve this, I am open to suggestions! Maybe there is existing functionality that allows to achieve similar results, but I could't figure it out from reading the docs.
Also I 100% agree with you that the same pattern might be useful, when you have a PORO object that encapsulates several AR objects.

I think you could pretty easily accomplish this with a simple helper in your own test suite.
# spec/helpers/fabricate_user.rb
def fabricate_user(:buyer, properties={})
  # make the things, look up the user, and return it
end

I totally get what you're suggesting and think what you're saying makes sense. I'm only hesitant to add this to fabrication because no one has ever asked for this sort of thing before.


\underbrace broken in chtml output

\underbrace showing broken output in CHTML format but showing correctly in SVG format.
The issue only occurs in the Mobile browser (Chrome Browser)
please help me how can I resolve this issue.

This may be the same as issue #2598.  There was a pull request to resolve the issue, and it has been merged into the develop branch, so it will be in the next release.
Here is a configuration that implements the fix that you can try to see if that takes care of your problem.
<script>
MathJax = {
  startup: {
    ready() {
      //
      //  These would be replaced by import commands if you wanted to make
      //  a proper extension.
      //
      const {TeXFont} = MathJax._.output.chtml.fonts.tex_ts;
      const {CHTMLmo} = MathJax._.output.chtml.Wrappers.mo;

      //
      //  Subclass TeXFont to override the methods that create stretchy
      //  parts in order to add the extra padding to avoid a WebKit bug
      //  that prevents the extenders from being properly placed (#2598).
      //
      class myTeXFont extends TeXFont {
        addDelimiterVPart(styles, c, W, part, n) {
          super.addDelimiterVPart(styles, c, W, part, n);
          const css = styles['mjx-stretchy-v' + c + ' mjx-' + part + ' mjx-c::before'];
          if (!css.padding && !css['padding-left']) {
            css.padding = '.1em 0';
          }
        }
        addDelimiterHPart(styles, c, part, n, force = false) {
          super.addDelimiterHPart(styles, c, part, n, force);
          const css = styles['mjx-stretchy-h' + c + ' mjx-' + part + ' mjx-c::before'];
          if (!css.padding) {
            css['padding-top'] = '1px';
          }
        }
      }

      //
      //  Override style for stretchy extenders to fix an issue in WebKit.
      //
      CHTMLmo.styles['mjx-stretchy-h > mjx-ext > mjx-c'].width = '100%';

      //
      //  Create the new TeXFont object
      //
      MathJax.config.chtml.font = new myTeXFont({fontURL: MathJax.config.chtml.fontURL});

      //
      //  Do the usual setup
      //
      MathJax.startup.defaultReady();
    }
  }
}
</script>
<script id="MathJax-script" async<EMAIL_ADDRESS>
If this works, then you can use it until the next release of MathJax, which will include these patches already.
That that doesn't do it, let us know.


Rewrite in Rust

I think Rust would be much more maintainable than C++.
I asked ChatGPT to convert the existing C++ to Rust. That may be a good starting point:
extern crate com;

use com::{com_interface, ComRc, ComItf};
use std::ffi::OsString;
use std::io::{self, Write};
use winapi::{LPWSTR, MAX_PATH, WPSTYLE_SPAN, WPSTYLE_CENTER, WPSTYLE_TILE, WPSTYLE_STRETCH, WPSTYLE_KEEPASPECT};

#[com_interface("6D5140C1-7436-11CE-8034-00AA006009FA")]
pub trait IActiveDesktop: ComItf {
fn GetWallpaper(&self, wp: LPWSTR, len: i32, flags: i32) -> HRESULT;
fn SetWallpaper(&self, wp: LPWSTR, flags: i32) -> HRESULT;
fn SetWallpaperOptions(&self, opts: &WALLPAPEROPT, flags: i32) -> HRESULT;
fn ApplyChanges(&self, flags: i32) -> HRESULT;
}

#[repr(C)]
#[derive(Debug, Copy, Clone)]
struct WALLPAPEROPT {
dwSize: u32,
dwStyle: i32,
}

fn get_wallpaper(sz_wallpaper: &mut [u16]) -> io::Result<()> {
unsafe {
let result = CoInitialize(std::ptr::null_mut());
if result != S_OK {
return Err(io::Error::new(
io::ErrorKind::Other,
"Failed to initialize COM",
));
}
let mut p_desk: *mut IActiveDesktop = std::ptr::null_mut();
let hr = CoCreateInstance(
&CLSID_ActiveDesktop,
std::ptr::null_mut(),
CLSCTX_INPROC_SERVER,
&IID_IActiveDesktop,
&mut p_desk as *mut *mut IActiveDesktop as *mut *mut std::ffi::c_void,
);
if hr != S_OK {
return Err(io::Error::new(
io::ErrorKind::Other,
"Failed to get the desktop wallpaper",
));
}
(*p_desk).GetWallpaper(sz_wallpaper.as_mut_ptr(), MAX_PATH, 0);
(*p_desk).Release();
CoFreeUnusedLibraries();
CoUninitialize();
}
Ok(())
}

fn set_wallpaper(full_path: &[u16], wp_style: i32) -> io::Result<()> {
unsafe {
let result = CoInitialize(std::ptr::null_mut());
if result != S_OK {
return Err(io::Error::new(
io::ErrorKind::Other,
"Failed to initialize COM",
));
}
let mut p_desk: *mut IActiveDesktop = std::ptr::null_mut();
let hr = CoCreateInstance(
&CLSID_ActiveDesktop,
std::ptr::null_mut(),

(It's a little bit truncated)

I agree 100% with you on that. Since the current codebase is not that large it shouldn't pose a problem for now if we converted it to C++ for the time being. Unfortunately my knowledge of Rust is very limited. I will ask around and see if anyone is willing to help us with that though.


cesium1.99 3dtiles Setting the image texture does not take effect

cesium1.99 3dtiles Setting the image texture does not take effect

Hi @tuchenchen, would you be able to include a Sandcastle example that replicates the issue? That would help us give us more context to determine the issue. Thanks!

I'm closing this issue due to inactivity. If you believe this is still an issue, please feel free to re-open. Thanks!


Add new project to the list

Hi,
I would like to add a link. This project is in the middle of getting picked up by Eclipse. Definitely worth adding to the list in my opinion.
REPO: Eclipse Theia IDE
DESCRIPTION: A cloud & desktop IDE.
AUTHOR: TypeFox, Ericsson and Red Hat

Also from my side, thank you @jgbradley1. Closed by #622.


Bug #13848: fix checking of $reference is instance of $type in Instanse::ensure method, when first parameter is array

fixed behavior, when have not been throws exception when passing $type parameter into Instance::ensure method, when $reference object isn't instance of $type

Q
A

Is bugfix?
yes

New feature?
no

Breaks BC?
no

Tests pass?
yes

Fixed issues
#13848

Remove pleace tests/framework/di/InstanceTest.php:106
Instance::ensure(['class' => 'yii\db\Connection', 'dsn' => 'test'], 'yii\base\Widget', $container);

This test was supposed to perform this check, but it's not working.

Merged. Thank you!


gnutls: add regression test for static builds

Description of changes
Would have caught the issue fixed by 525f8d9433a7 ("pkgsStatic.gnutls: fix build").
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Hmm yeah that's true.  Maybe people will run the tests locally…


Completion: mention the minimum required Haxe version

Can you use \since{3.2.0} instead?

Done. Didn't know that was a thing. :)

Thanks!


Turn on cpp test to bypass abseil-py's build error

I don't think that this is a great solution, because it'll mean building a ton of tests that we don't actually want.

I don't think that this is a great solution, because it'll mean building a ton of tests that we don't actually want.

I agree that's not an ideal one, better solution is to use -DBUILD_TESTING=off, but unfortunately that doesn't work. And since we are not directly refer abseil-py, it's the libs like boringssl or curl did that, even the flag -DBUILD_TESTING=off is already set on cpp's CMakeList.txt, the error would still hit the second run.

Update the PR, only turn on stub flag for CPP. corresponding CPP PR is https://github.com/firebase/firebase-cpp-sdk/pull/528


BTC-E

Just like with https://github.com/michaelgrosner/tribeca/pull/6 - Most of it works, the order entry functionality still needs to be tested. At least BTC-E is easier to get API order entry access, and I'll be able to test it fully tomorrow. I'm going to merge it in to get the Bitstamp PR updated, but will not advertise that it exists and works until I can test it. I invite anyone who wants to test it out+modify it to do so in the meantime.

Can I test it soon ?
BTCE give good opportunity for the moment and wait for tribeca

@Pascal66 You can test it by pulling down the branch. I rebased it so the branch is up to date. It most likely does NOT work, so if you want to trade on it, you will have to do some development on it. BTC-E's API is extremely unsupportive of low latency/high volume trading.

I've tried some things but always had : (even with BTC/USD)
Terminating! uncaughtException [Error: Unsupported currency pair!. Please check that gateway BtcE supports the value specified in TradedPair config value] Error: Unsupported currency pair!. Please check that gateway BtcE supports the value specified in TradedPair config value
or if currency isnt btc/ltc/usd (as its defined in btce gateway:
Terminating! uncaughtException [TypeError: Cannot read property 'toLowerCase' of undefined] TypeError: Cannot read property 'toLowerCase' of undefined
at new BtcE


Automated cherry pick of #5440: Enable Windows OVS Container to run on pristine Host

Cherry pick of #5440 on release-1.13.
#5440: Enable Windows OVS Container to run on pristine Host
For details on the cherry pick process, see the cherry pick requests page.

/test-windows-all

/test-windows-containerd-conformance

/test-windows-containerd-e2e

/test-windows-containerd-e2e

/test-windows-containerd-e2e

@luolanzone Windows e2e failed, I think the root cause should be the lack of these two patches:
https://github.com/antrea-io/antrea/commit/17c279bf03053b63eb468b5c2465b637ea2874da
https://github.com/antrea-io/antrea/commit/e5c7bd2c653ecb07bcb1e632662de1483a35dd07

OK, I will cherry-pick these two patches, thanks.

/test-windows-containerd-e2e

/test-windows-containerd-conformance

/test-windows-containerd-conformance

Verify docs and spelling failed due to format issue

/skip-all


Support more css props

Rebasing ✅

A job failed and it's not clear why. This is the second time I am hitting this scenario.


Protractor seem to ignore debouce settings while executing sendKey command

Hi,
We noticed that protractor does not works correctly in case of debounce property is setup in ng-model-options of the control like below:

         <input id="email" type="text" inputmode="email" ng-model="user.email" name="uEmail" required class="form_control std-rounded" placeholder="email address"
     ng-model-options="{ debounce: 10000 }" ng-focus="focus('email');">

         <input id="password" novalidate ng-minlength="6" type="password" inputmode="paidessword" name="uPassword" ng-model="user.password" required class="form_control std-rounded" placeholder="password"
        ng-model-options="{ debounce: 10000 }" ng-focus="focus('password');">
         ng-focus="focus('password');">

When you run something like this:
var txtEmail = element(by.model('user.email'));
var txtPassword = element(by.model('user.password'));
var btnSignIn = element(by.buttonText('Sign In'));
...
txtEmail.sendKeys("qqq@asd.com");
txtPassword.sendKeys("qqqqq");
btnSignIn.click();
....click will be performed prior to  txtPassword field will be populated.

You have ng-minlength="6" on your password input field, but are sending a password that is only 5 characters long. As a result, the model value is expected to be undefined.

Thanks @ryanhart2 for taking a look! I think we can close this then.

@juliemr Even I am facing similar issue.
I have a input box
<input type="text" id="select" ng-model-options="{ debounce: 1000 }" ng-model="selectedItem.displayText" >
This input is acting as a filter for a ng-repeat.
But since protractor is not respecting the debounce setting, I am getting incorrect list for the ng-repeat in my test.

Hi, I have the same problem. Due to accessibility and to inform the user the number of items filtered, I have added a debounce in the phonecat project but after that, the e2e do not work.

@felixzapata Hi felix for the time being I have fixed the issue using browser.sleep
beforeEach(function () {
        CHF.multiselect.input(0).sendKeys('w');
	browser.sleep(700);
});

hi @mohitjee15 , thanks but it is not valid for me

Nevermind, After a review, I think that my problem is related with another issue in my code.


CP_Input_GetMouseWorldY() Does not calculate CP_Settings_Scale() & CP_Settings_ApplyMatrix() properly

When using canvas transforms such as CP_Settings_Scale() & CP_Settings_ApplyMatrix(), CP_Input_GetMouseWorldY() gives a value thats (1/scale^3) instead of (1/scale)
Main.c: main.c.txt

The matrix inverse function needs separate input and output values.  Out code for screenToWorld was just passing the same matrix into the in and out values and was getting mangled in the process.

Thank you for the great sample code and clear explanation of the issue!
Solved in #25


Add testcase for config manger usage LatestAggregationTestCase

Purpose
$subject
Documentation
N/A
Security checks

Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes
Ran FindSecurityBugs plugin and verified report? yes
Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes

Codecov Report

Merging #1456 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1456      +/-   ##
============================================
+ Coverage     67.86%   67.88%   +0.01%
  Complexity       41       41
============================================
  Files           643      643
  Lines         26907    26907
  Branches       4245     4245
============================================
+ Hits          18261    18265       +4
+ Misses         6867     6864       -3
+ Partials       1779     1778       -1

Impacted Files
Coverage Δ
Complexity Δ

...core/src/main/java/io/siddhi/core/table/Table.java
28.81% <0%> (+1.27%)
0% <0%> (ø)
:arrow_down:

...java/io/siddhi/core/stream/input/InputHandler.java
80.64% <0%> (+3.22%)
0% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ae30f2...8e9ed32. Read the comment docs.


Only read data section when calling data() method

When a Grib2Message object is created from an existing file, the entire packed GRIB2 message is read into Grib2Message._msg.  To improve performance, when we create the Grib2Message object, we only want to read sections 0 through 6 and only read section 7 (Data Section) when Grib2Message.data() is called.
When data is finally read, the packed data section would be appended to the existing message data in Grib2Message._msg OR add a kwarg to data() to control whether the packed data is saved in the message object.

The work for this feature is complete and is working as expected.


Added config to debounce preview rendering while live editing

This is something I've often loved to have using react-styleguidist. Basically it enables to write code in codemirror without having tens of updates on the preview panel. As side-effect is also less probable that while writing the preview will crash because of incomplete expressions.
Is this something you'd like to add to the project?

I've rebased upon master and fixed as you asked.
If Travis is happy let me know if there's anything else I can improve or if is ok for you ;)

I'm not sure of why Travis is failing only in one task of one build... any suggestions?

It happens sometimes. Restarting the job usually helps.
Thanks! I’m merging it.


TypeScript npm setting: tell user about it

Testing: https://github.com/Microsoft/vscode/issues/27695
I think this message should inform about the possibility of setting the NPM path in settings:

Added blurb about typescript.npm at the end of the warning message. Installing NPM is the correct fix for many cases as well. Since the message is now fairly long and may get clipped, we also document  typescript.npm behind More Information: https://github.com/Microsoft/vscode-docs/commit/07c911b8ed5ef911de56ddd10eafc79bc1fbcc7b


upgrade to the new release of fabric8 and jube

upgrade to the new release of fabric8 and jube

Refer to this link for build results (access rights to CI server needed):
https://fabric8-ci.fusesource.com/job/fabric8-quickstarts-master-pullreq/228/
Test PASSed.


Is this repo abandoned?

I don't see any new commit since 2016, not to mention the pull requests piling up.
I can see guard itself isn't as active as it used to be, but at least isn't dead.
Am I missing something here? maybe there are newer alternatives our there nowadays?

bump