[Question] Block access to other entries than those assigned to us

Hello,
Before using for the first time backpack for a client (and buying my first license, hura!), I try to set up a security system. For the moment, I am stuck.
I have items that I add with the administration interface. By saving the item, it fills the "user_id" column with the ID of the user who is doing the manipulation.
Thanks to the command $this->crud->addClause('where', 'user_id', '==', Auth::id()) users only see their items.
But I noticed that by changing the ID in the URL, they can access other users' items. I tried several techniques to prevent this, but I never did.
I tried to use $this->crud->allowAccess(['edit']); but it does not work.
In setup() :
if ( Auth::id() != $item->user_id){
          $this->crud->allowAccess(['edit'])
        }

But it does not work and I feel that it will never work because I do it wrong. Already, I can not access the data of an item precisely (because here, it does not find user_id which is a given item). I tried to give several value to $item but each time, I collect a collection.
I'm really lost! Please, help me or make me understand!

You've run into the perennial permissions problem; the solution is multi-pronged and it depends on how paranoid (and/or thorough) you want to be; at a minimum you'd want to:

add a global "something" appropriate for whoever is logged in
intercept the calls to store and update and destroy (delete?) methods in the CRUD controller(s) to make sure people cannot do unexpected stores, updates or deletes

You could also add:

extra decision making code in the authentication guard (probably the "admin" guard but it can be any guard or middleware auth)
Eloquent observers that double check what the controllers, and/or anything else can do

For something "global" I tend to add a pile of where clauses in the setup but these fairly much only stop people who aren't trying to break the system from breaking the system. You might be able to achieve the same thing using global (or non-global) scopes but be aware that to not apply a global scope in Backpack involves reaching through to the underlying model itself; not difficult but a pain.
Also be aware that Backpack does use sync when handling relationships so that can -- actually it does -- avoid model observers. There is a PR or a suggestion to make it easier to handle permissions here but I'm not sure of its status (actually it's stalled but that's because the suggester hasn't pushed the matter).

What you describe sounds like laravels global scopes. Please have a look at them.

I'm not sure if this is the right way to do it, but this is what I do. It is specific to my use case. So do consider this a very incomplete representation.
<?php

namespace App\Http\Middleware;

use Closure;
use Auth;
use App\Models\Judgment;
use App\Models\Notification;

class publishedCaseFaliure
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if(ends_with($request->url(),'/edit')){
            if( !Auth::user()->hasEditRights( $request->route()->parameters['judgment'] ) ){
                Notification::newEntry(Auth::user()->name . ' trying to edit non-editable case ' . Judgment::find($request->route()->parameters['judgment'])->getICONumber());
                \Alert::error('No edit rights !')->flash();
                return redirect('admin/judgment?iconumber=' . $request->route()->parameters['judgment']);
            }
        }
        return $next($request);
    }
}

I use middlewares. At the moment, it works by defining a middleware for every model. The middleware is applied on the crud routing entry and executes on the edit call. It does the calculation and redirects back to the list page if the validations fail with an Alert.

@tabacitu, Would you be open to extending the CrudController to having a overidable permission check function that could be used to do this in a much more cleaner manner ?
Notes:-
abort(403); is not a great idea, especially if you have something like Sentry running. It was meant to a stop unauthorised requests not for user regulation.
Notifications is a queue of sorts to dump these mishaps to Telegram.
My validation rules are entered in the User model. And there it is specific to the entity's (Judgment) current status.
Visibility of edit button was a waste of time as validation on each line make everthing slower. Some ajax based implementation could work, but its not needed in most cases.

Oh, I do use the assigned concept in conjuction with this, but it is under the assumption that, If the user clicks on the assignments link, the list of cases shown are the ones that are accessible. And as far as my site is concerned, there is no need for hiding other records.

@Athuli7 I think it's an inventive way to do it, yes. And if it works, it works :-)
I personally would probably do it in the model's boot() method, with Eloquent Events. Would not only solve the problem for Backpack interfaces, but anywhere else inside the app.


Update README.md

Realized that there was incorrect closing of span tag therefore raised the pull request.

@Nikhil-Pahwa Thanks for this!


[2.1] Editor Debugger: Changed the Color of Child Process Connected

Cherry-picked https://github.com/godotengine/godot/pull/10191 for Godot 2.1.x

This also changed colors of actual errors:

I'll revert for now as the added friendliness for the "Child Process Connected" is not worth having all errors show up as friendly :)

Oh, my bad... Child Process Connected is not alone... It has friends. 😎

Oh, this breaks my heart!
Friendly errors were a good feature to make Godot more appealing to new users. XD
Seriously now, I hope this can be done properly since I loved the greenish-blueish message.

To do it properly, I guess it should distinguish between actual errors, warnings and info messages.


Add grin package

Package https://pypi.python.org/pypi/grin, a grep-like program in Python with sane defaults for searching code.

if it's a cli tool, put it in all-packages.nix

I have moved the call to all-packages.nix and the derivation to tools/text/grin/default.nix (based on where gnugrep is located). Is that the right thing to do?

Yup, just one small note :)


test-bot: default to building testbottest.

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you written new tests for your changes? Here's an example.
[x] Have you successfully run brew tests with your changes locally?

This provides an integration test for test-bot.rb by performing
compilation of an actual formula (Library/Homebrew/test/testbottest.rb).

seems to have caused all bottles to get the same name


Apply method for VDomModifier

Equivalent to VNode.apply(modifiers*), we could have an apply on VDomModifier as well. Just transform the existing Modifier into a CompositeModifier.

I do not think, this is a good idea anymore. Because CompositeModifiers would unexpectedly change behaviour of the current node, while the apply of VNode actually applies it to a child node. This is semantically very different and should not be confused. Closing for now.


Test cmsis v1 mailq

Tests the mailq implementation for CMSIS V1

Codecov Report

Merging #9868 into master will increase coverage by 0.05%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #9868      +/-   ##
==========================================
+ Coverage   52.28%   52.34%   +0.05%
==========================================
  Files         213      213
  Lines       25964    25963       -1
  Branches     5598     5597       -1
==========================================
+ Hits        13576    13591      +15
+ Misses      10150    10140      -10
+ Partials     2238     2232       -6

Impacted Files
Coverage Δ

lib/cmsis_rtos_v1/cmsis_mailq.c
71.05% <100%> (+20.4%)
:arrow_up:

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 38a7950...7f5d93a. Read the comment docs.

@nniranjhana : added test cases for calling osMailCAlloc immediately after the memory is exhausted.


Could not run buildcfg

I've searched the issues listed here  and various singularity documents and I am unable to determine why I  get the following messages when I execute  sycri.   What am I missing?
sycri
#####################################################################
0328 15:10:50.359779   53541 network.go:112] Network configuration found: flannel
I0328 15:10:50.360154   53541 main.go:175] Singularity CRI server started on /var/run/singularity.sock
E0328 15:10:50.377733   53541 main.go:100] Could not start Singularity device plugin: could not create Singularity device plugin: could not get build config: could not run buildcfg command: exit status 1
I0328 15:10:50.377800   53541 main.go:178] Singularity CRI service exiting...
#####################################################################
singularity --version
singularity version 3.1.0
The singularity.conf and sycri.yaml files are attached as one file.
singularity.txt

Hello @coneheadusa! Can you confirm that singularity buildcfg is successfully run on your host?

If not, please, try to checkout v.3.1.1-rc1 tag in Singularity repo itself

buildcfg did not exist in my current version of singularity.  I checked out v3.1.1-rc1 and it looks like the seccomp issue has returned.
$ make
GO singularity
[+] GO_TAGS "containers_image_openpgp apparmor selinux seccomp"
github.com/sylabs/singularity/vendor/github.com/seccomp/libseccomp-golang
../vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:23:2: error: #error Minimum supported version of Libseccomp is v2.1.0
#error Minimum supported version of Libseccomp is v2.1.0
^
make: *** [singularity] Error 2

Did you run ./mconfig before make after checking out v3.1.1-rc1 in Singularity? Looks like issue may appear due to invalid libseccomp installation so that it is not found during build.

I've attached a file that lists all the commands I used to try to build singularity with v3.1.1-rc1.  The ./mconfig was included in the set.
singularitybuild-v3.1.1-rc1.txt

Hi @coneheadusa , to help us to figure out what happens please provide output of:

grep SCMP_VER_MAJOR /usr/include
pkg-config --cflags --libs libseccomp

And be sure you installed system dependencies like described at https://github.com/sylabs/singularity/blob/master/INSTALL.md for Centos/RHEL and also try the following compilation steps :
git clean -xfd
go clean -cache
./mconfig
make -C builddir
sudo make -C builddir install

I believe you can close this issue.  For what it's worth here is some background.
Singularity 3.1.0 built on the system prior to checking out v3.1.1-rc1 about a week ago.   The problems began when I tried to build v3.1.1-rc1.  During the ' find  /usr/include -type f -exec grep SCMP_VER_MAJOR {} ;'  command you suggested, the system crashed as a result of a disk failure.   I rebuilt both singularity and singularity-cri on a different system without any problems.  I assume the make process was having difficulty reading /usr/include directory on the original hardware thus causing the errors.   At any rate, I'm back on track.  Thank you for your help.

 Closing


Some bug fixes, some things disabled, some loss of functionality

First set of bug/compile fixes.

Trying to add little bug fix for TRegExpr


Auto Analysis throughs error when demangling a symbol

Describe the bug
When auto analyzing the QT binary libQt5core.so.5.12.7, Ghidra reports errors with respect to demangling which result in the disassembly not finishing after 12 hours for a 75 MB file.  With demangling disabled, disassembly completed in 10 minutes.
An excerpt of the errors can be found below:
ERROR Unable to demangle symbol at 001be826; name: _ZN15QMessagePattern15BacktraceParamsC1Ev. Message: class ghidra.program.database.data.TypedefDB cannot be cast to class ghidra.program.model.data.Structure (ghidra.program.database.data.TypedefDB and ghidra.program.model.data.Structure are in unnamed module of loader ghidra.GhidraClassLoader @279f2327) (DemanglerCmd)
ERROR Unable to demangle symbol at 001be842; name: _ZN15QMessagePattern15BacktraceParamsD1Ev. Message: class ghidra.program.database.data.TypedefDB cannot be cast to class ghidra.program.model.data.Structure (ghidra.program.database.data.TypedefDB and ghidra.program.model.data.Structure are in unnamed module of loader ghidra.GhidraClassLoader @279f2327) (DemanglerCmd)
ERROR Unable to demangle symbol at 001be85e; name: ZN15QMessagePattern15BacktraceParamsC1ERKS0. Message: class ghidra.program.database.data.TypedefDB cannot be cast to class ghidra.program.model.data.Structure (ghidra.program.database.data.TypedefDB and ghidra.program.model.data.Structure are in unnamed module of loader ghidra.GhidraClassLoader @279f2327) (DemanglerCmd)
:ERROR Unable to demangle symbol at 001bee26; name: ZN15QMessagePattern15BacktraceParamsC1EOS0. Message: class ghidra.program.database.data.TypedefDB cannot be cast to class ghidra.program.model.data.Structure (ghidra.program.database.data.TypedefDB and ghidra.program.model.data.Structure are in unnamed module of loader ghidra.GhidraClassLoader @279f2327) (DemanglerCmd)
To Reproduce
Steps to reproduce the behavior:
Disassemble the  QT binary libQt5core.so.5.12.7 with Demangling enabled in the auto analysis and run the analysis
Expected behavior
I expected the analysis to complete within 30 mins to an hour (worst case) ,but it didn't terminate.
Screenshots
If applicable, add screenshots to help explain your problem.
Attachments
I tried to attach the file as .7z, but even with ultra compression, it exceeds the threshold of 10 MB (~12 MB).
Environment (please complete the following information):

OS: Ubuntu 18.94
Java Version: OpenJKD 11
Ghidra Version: 9.1.1

Additional context
Please reach out to me and I can provide a  link to the file on my amazon cloud

The errors above are not catastrophic, in terms of analysis.   Also, they should not be contributing to the long analysis run time.
I have verified that Ghidra can demangle the symbols shown above, but is running into an error applying the output of the demangle to your binary.  Specifically, I can see at least one spot in the code where a cast to Structure is being made without verifying the type first.   In your case, some other analyzer has created a Typedef for QMessagePattern::BacktraceParams::~BacktraceParams() before the demangler is attempting to make a class structure for that name.
I will update the code to verify the type before making the cast.  This fix will be soon merged-in, along with various other demangling fixes.  At that point you can try to analyze again, but I suspect there will still be other unresolved issues.

@dragonmacher  Thanks for the quick response

The errors are fixed by 1161916.
I am not sure if the speed issue has been fixed.    There are speed improvements for demangling currently being worked.  Some of these will appear in 9.2.3 and some will be in the next major release.


pipenv update --outdated transposed info

Issue description
$ pipenv update --outdated
Shows transposed installed and what's available. Seems like an easy one to fix, I would like to do the PR if this is confirmed. Thanks.
Expected result
Package 'lxml' out-of-date: '==4.2.4' available, '==3.5.0' installed.
Package 'requests' out-of-date: '==2.19.1' available, '==2.9.1' installed.

Actual result
Package 'lxml' out-of-date: '==4.2.4' installed, '==3.5.0' available.
Package 'requests' out-of-date: '==2.19.1' installed, '==2.9.1' available.

Steps to replicate
Pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]

[packages]
coloredlogs = "==5.0"
argparse = "==1.2.1"
cachetools = "==1.1.6"
dj-database-url = "==0.3.0"
elasticsearch = "==1.6.0"
ijson = "==2.2"
ipaddress = "==1.0.14"
pilkit = "==1.1.13"
"psycopg2" = "==2.6.1"
statsd = "==3.1"
ua-parser = "==0.3.6"
user-agents = "==0.3.2"
ipdb = "==0.10.0"
ipython = "==4.2.0"
lxml = "==3.5.0"
requests = "==2.9.1"
six = "==1.10.0"
"Jinja2" = "==2.8"
Pillow = "==2.9.0"
Scrapy = "==1.5.1"
Twisted = "==15.3.0"
ipython_genutils = "==0.1.0"
SQLAlchemy = "==1.0.13"
"psycopg2cffi" = "*"
"progressbar2" = "*"
cssselect = "*"
cffi = "*"
cryptography = "*"

[requires]
python_version = "2.7"

$ pipenv --support
$ pipenv --support
Pipenv version: '2018.7.1'
Pipenv location: '/opt/anaconda3/lib/python3.6/site-packages/pipenv'
Python location: '/opt/anaconda3/bin/python'
Other Python installations in PATH:

2.7: /usr/bin/python2.7

2.7: /usr/bin/python2.7

2.7: /usr/bin/python2.7

3.6: /opt/anaconda3/bin/python3.6m

3.6: /opt/anaconda3/bin/python3.6

3.6: /usr/bin/python3.6

3.6: /usr/bin/python3.6

3.7: /home/mikob/.pyenv/shims/python3.7m

3.7: /home/mikob/.pyenv/shims/python3.7

3.7: /home/mikob/.pyenv/shims/python3.7

3.6.5: /opt/anaconda3/bin/python

2.7.15: /usr/bin/python

3.7.0: /home/mikob/.pyenv/shims/python

3.7.0: /home/mikob/.pyenv/shims/python

2.7.15: /usr/bin/python

2.7.15: /usr/bin/python2

2.7.15: /usr/bin/python2

3.6.5: /opt/anaconda3/bin/python3

3.6.5: /usr/bin/python3

3.7.0: /home/mikob/.pyenv/shims/python3

3.7.0: /home/mikob/.pyenv/shims/python3

3.6.5: /usr/bin/python3

PEP 508 Information:
{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-29-generic',
 'platform_system': 'Linux',
 'platform_version': '#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

XDG_SEAT_PATH
XDG_CONFIG_DIRS
LC_TELEPHONE
DISPLAY
SHLVL
LOGNAME
LANGUAGE
MANDATORY_PATH
LC_NAME
XDG_VTNR
USER
XAUTHORITY
XDG_GREETER_DATA_DIR
QT_QPA_PLATFORMTHEME
GTK_IM_MODULE
COLORTERM
XDG_SESSION_ID
DESKTOP_AUTOSTART_ID
GNOME_TERMINAL_SCREEN
DESKTOP_SESSION
XDG_SESSION_DESKTOP
GDMSESSION
GNOME_DESKTOP_SESSION_ID
DEFAULTS_PATH
LC_NUMERIC
LC_IDENTIFICATION
LC_PAPER
LC_MONETARY
DBUS_SESSION_BUS_ADDRESS
LC_MEASUREMENT
VTE_VERSION
CLUTTER_IM_MODULE
XDG_DATA_DIRS
PAPERSIZE
QT4_IM_MODULE
GNOME_TERMINAL_SERVICE
PWD
GTK_OVERLAY_SCROLLING
QT_ACCESSIBILITY
GDM_LANG
XDG_SESSION_TYPE
SHELL
LC_TIME
TERM
SESSION_MANAGER
GTK_MODULES
SSH_AGENT_PID
PATH
SSH_AUTH_SOCK
HOME
XDG_CURRENT_DESKTOP
QT_IM_MODULE
LC_ADDRESS
XDG_RUNTIME_DIR
XMODIFIERS
XDG_SEAT
XDG_SESSION_PATH
GPG_AGENT_INFO
OLDPWD
PYENV_ROOT
PYENV_SHELL
NVM_DIR
NVM_CD_FLAGS
NVM_BIN
TMUXIFIER
WORKON_HOME
VIRTUAL_ENV_DISABLE_PROMPT
KEYTIMEOUT
PKG_CONFIG_PATH
JAVA_HOME
EDITOR
INPUTRC
DEV_ENV
NODE_ENV
FZF_DEFAULT_COMMAND
MANPATH
FFX_PROFILE
DOCKER_IP
TSOCKS_CONF_FILE
PYTHONPATH
PGUSER
LANG
LC_ALL
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH

Pipenv–specific environment variables:
Debug–specific environment variables:

PATH: /opt/anaconda3/bin:/home/mikob/tools/google_appengine/:/usr/bin:/home/mikob/.pyenv/shims:/home/mikob/.pyenv/bin:/home/mikob/.tmuxifier/bin:/home/mikob/.nvm/versions/node/v10.5.0/bin:/home/mikob/.pyenv/shims:/home/mikob/.pyenv/bin:/home/mikob/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/mikob/.rvm/bin:/home/mikob/.zgen/jimeh/tmuxifier-master/bin:/home/mikob/.local/bin:/home/mikob/.fzf/bin
SHELL: /bin/zsh
EDITOR: vim
LANG: en_US.UTF-8
PWD: /home/mikob

I don’t seem to have the described issue
$ pipenv update --outdated
Package 'alabaster' out-of-date: '==0.7.10' installed, '==0.7.11' available.
Package 'black' out-of-date: '==18.6b2' installed, '==18.6b4' available.
Package 'idna' out-of-date: '==2.6' installed, '==2.7' available.
Package 'invoke' out-of-date: '==1.0.0' installed, '==1.1.1' available.
Package 'more-itertools' out-of-date: '==4.2.0' installed, '==4.3.0' available.
Package 'pluggy' out-of-date: '==0.6.0' installed, '==0.7.1' available.
Package 'py' out-of-date: '==1.5.3' installed, '==1.5.4' available.
Package 'pytest' out-of-date: '==3.6.1' installed, '==3.7.1' available.
Package 'pytz' out-of-date: '==2018.4' installed, '==2018.5' available.
Package 'requests' out-of-date: '==2.18.4' installed, '==2.19.1' available.
Package 'Sphinx' out-of-date: '==1.7.5' installed, '==1.7.6' available.
Package 'sphinx-rtd-theme' out-of-date: '==0.4.0' installed, '==0.4.1' available.
Package 'towncrier' out-of-date: '==18.5.0' installed, '==18.6.0' available.
Package 'tqdm' out-of-date: '==4.23.4' installed, '==4.24.0' available.
Package 'urllib3' out-of-date: '==1.22' installed, '==1.23' available.

$ pipenv run pip list  # partial result.
Package                  Version     Location
------------------------ ----------- -----------------------------------------------------------
alabaster                0.7.10
black                    18.6b2
idna                     2.6
invoke                   1.0.0
more-itertools           4.2.0
pluggy                   0.6.0
py                       1.5.3
pytest                   3.6.1
pytz                     2018.4
requests                 2.18.4
Sphinx                   1.7.5
sphinx-rtd-theme         0.4.0
towncrier                18.5.0
tqdm                     4.23.4
urllib3                  1.22

Is this fixed in master, or is there a deeper issue than simply the version output being reversed?

@uranusjr I didn't think something so obvious would not have an issue already open for it... hmm I will try running pipenv from master.

@mikob what was the result of the check? is this actually broken for you still?

@techalchemy @uranusjr I can't reproduce the issue. My python environment somehow got in a funky state and blowing away the lock file (among other things?) seems to have solved it. I will close this for now, unlikely I can reproduce it.


Analyze error: Dereference of null pointer - Update Firebase when nanopb releases fix

I have installed via SPM Analytics and Crashlytics. There are 2 warnings coming up:

They are flagged as logic error:

Hi @afern247, please provide all the details needed from the issue template. Thanks.

This is https://github.com/nanopb/nanopb/issues/667. The fix has been merged to the nanopb release branch, but has not yet been released.  Also referenced at #8134.
A Firebase resolution needs to wait for the nanopb release. I'll leave this issue open to track.

nanopb <IP_ADDRESS> published yesterday. It will be likely be too late for 9.0.0, so I'll target Firebase's update to 9.1.0

Is there a public date for 9.1.0?

It's currently targeted for the week of May 23rd.


Improve README

This commit will improve the README slightly:

It restructures the Piston links on top
It removes references to FreeType which is not longer required for huge parts of Piston
It adds links to specific projects

Nice!


Buggy sounds while window resizing

Minecraft: [1.18.2]
Mod: [2.2.1]
Details
Loud and buggy sound when resizing Minecraft window

Works only in inventory


Cross platform PullToRefreshView component

Both iOS and Android currently support some sort of native pull to refresh control but the API was very different. I tried implementing a component based on PullToRefreshViewAndroid but that works on both platforms.
I liked the idea of wrapping the ListView or ScrollView with the PullToRefreshView component and allow styling the refresh view with platform specific props if needed. I also like the fact that 'refreshing' is a controlled prop so there is no need to keep a ref to the component or to the stopRefreshing function.
It is a pretty rough start so I'm looking for feedback and ideas to improve on the API before cleaning up everything.
On iOS we could probably deprecate the onRefreshStart property of the ScrollView and implement the native stuff in a PullToRefreshViewManager. We could then add props to customize the look of the UIRefreshControl (tintColor). We could also deprecate the Android only component and remove it later.

I agree with the idea, and it's great that you're working on this. Probably worth reading this discussion though: https://github.com/facebook/react-native/pull/4205
I think we were leaning towards having the RefreshControl be a child or property of the ScrollView, rather than a wrapper. This matches the underlying implementation on iOS, and although Android uses a wrapper under the hood, conceptually it makes more sense that a control that appears inside a scrollview should be a child of it rather than its parent.
cc @dmmiller, @ide

I agree with @nicklockwood.  I think it makes more sense to have it be a property of the ScrollView.  If we had other components that had this behavior it would make more sense to have a wrapper view for something, but this is pretty much just ScrollView.
Incidentally, do HorizontalScrollViews support this in iOS?

@dmmiller iOS scrollViews are bidirectional - there's no separate horizontal scrollview control. But I'm pretty sure PTR only works when you pull down. I don't know what happens if you add it to a scrollview whose contentSize is wider than the view.

@nicklockwood I agree that a child or a prop would be a better api. I did it that way initially since it was easy to make the ios api be like the android one. I'll give it a try to what you suggested.
Few questions to help me get started:
Any preference for a child vs a prop on scrollview? Personally I like not having to add the extra prop on scrollview.
Should i make 2 different components for ios and android (RefreshControlIOS, RefreshControlAndroid) or only one with platform specific props to customize the look?
How would you go roughly about implementing this? I'm pretty new to react native development so I want to be sure to implement it the best way possible. I think I got a good idea on how to do it on ios but for android I'm not sure. Is the an other component that wraps itself with another view if it contains a specific prop?

Any preference for a child vs a prop on scrollview? Personally I like not having to add the extra prop on scrollview.

I'd prefer a child. I think @ide preferred a prop. For the most part it makes little different to the underlying implementation though (the RefreshControl component will in fact have to be a child, even if we don't expose that in the public API).

Should i make 2 different components for ios and android (RefreshControlIOS, RefreshControlAndroid) or only one with platform specific props to customize the look?

The latter, definitely.

How would you go roughly about implementing this? I'm pretty new to react native development so I want to be sure to implement it the best way possible. I think I got a good idea on how to do it on ios

We have a few examples of this sort of thing on iOS already (e.g how RCTText or RCTMap handles subviews), but basically in insertReactSubview on RCTScrollView, you'd detect if the view was a subclass of UIRefreshControl, and if so you'd attach it as the refreshControl for the view, otherwise add it to the contentView as normal.

but for android I'm not sure. Is the an other component that wraps itself with another view if it contains a specific prop?

I think on Android the ScrollView.js would probably detect if you'd added the RefreshControl child and then return the PullToRefreshView with a ScrollView inside it. A bit like how in Image.android.js, it returns a view with an RCTImage inside it if the image has children.
(I'm not an Android expert though, so perhaps defer to @dmmiller on that one).

Sounds good, I started the iOS implementation and created the native RefreshControl component I'll let you know if any issue arises. For Android I had the same idea, it should be pretty simple to implement it in ScrollView.js.

I implemented it in iOS and added support for tintColor and title. Title is an NSAttributedString is there any better way support for this? Right now I'm only passing a NSString so there is no way to change the style of the title. I'll work on the Android part later today.

@janicduplessis the only way to do rich text would be to permit a  node to be added as a child of the . I actually think that would be a pretty neat solution here, but maybe save that for a follow-up PR.

@nicklockwood Yes this should probably be in another pull request since it is less important and this one is getting bigger :).
I have done the Android implementation, I'm not 100% satisfied about it but it works well. Not sure if I should split it in 2 components for Android, one that is the actual native pull to refresh view rendered only by the scrollview and the other one that acts only as a configuration object that doesn't render anything and is put as a child of the scrollview. Right now I use the same component for both and only return null in render if there is no child component. Using 2 components would also allow to remove the ...View.propTypes from the RefreshComponent which doesn't really makes sense since it's not really a view in iOS.

Ok, I cleaned everything up if anyone is interested in reviewing this.
We should also settle on prop on ScrollView vs child component. One advantage of the prop for the implementation is it would avoid having to loop through the children of the ScrollView to find the RefreshControl.
cc @nicklockwood, @ide, @dmmiller

Ok, I cleaned everything up if anyone is interested in reviewing this.
We should also settle on prop on ScrollView vs child component. One advantage of the prop for the implementation is it would avoid having to loop through the children of the ScrollView to find the RefreshControl.
cc @nicklockwood, @ide, @dmmiller

Sorry about the long delay before review (Xmas happened). This looks utterly brilliant to me. Good point about having to search the subviews though - that sways me towards making it a prop (along with avoiding having to worry about what happens if people try to add two of them, etc).
In which case, I wonder if it still makes sense for RefreshControl.js to be a component, or whether that fact should be hidden as an implementation detail, and RefreshControl.js should just be a plain old JS object that we convert to a NativeComponent under the hood (on iOS, anyway).
Thoughts?

(one reason for it to be a component is so you can add <Text/> as a child of it in future as we discussed, but that could be done just as elegantly by changing the type of RefreshControl.title to string | Text)

@nicklockwood I think I like it better as a component just for the fact that it will allow to separate the doc and not clutter the ScrollView API too much.

@janicduplessis There's no reason why it couldn't be in a separate file with its own docs just because it's a regular object, is there?

@nicklockwood I don't think so, it could be a module that exports a RefreshControlPropType with the same shape as the current RefreshControl component. Not sure where is the best place to put the SIZE constants that are used on Android though.

Thanks for reviewing this, I made the adjustments and changed it from a child component to a prop on ScrollView. I also tested adding/removing the RefreshControl on iOS to make sure it was working. I left RefreshControl as a component for now until we figure out what we want to do.

+1. We need unified API for pull to refresh control on both iOS and Android. Happy to see this.

Any reason why the refreshControl prop shouldn't just be a component instead of a function? If it's a function it should probably be called renderRefreshControl, but I can't really see why you'd ever want to do any logic in there, and I can't see a clear benefit to constructing it lazily.

+1 to making refreshControl a prop whose value is a React element. The reason to use renderRefreshControl is if the scroll view needs to provide default props to the refresh control -- which it very well may in the future to support more interactive refresh controls -- but for now refreshControl={<RefreshControl />} should suffice.

@ide Cool, I'll change that when I ship it. @janicduplessis, if you'd strongly prefer a function, feel free to add a renderRefreshControl prop in another PR - I believe you were planning a follow-up anyway to add rich text support?

@facebook-github-bot shipit

No, I don't know why I made it a function it is not really needed.

Do we want to add a deprecation warning to the old APIs that points to this component? I could do that in another PR.

I'm not sure which APIs you're referring to. Do you mean the onRefreshStart callback?

onRefreshStart on ScrollView and PullToRefreshViewAndroid.

I've added a deprecation warning to onRefreshStart already. Not done anything with PullToRefreshAndroid yet though.

@janicduplessis @nicklockwood When would these be released?  As a part of v0.18 or something?  I'm on 0.17 right now and would love to use this -- maybe you could make this into its own npm package for installation for people that aren't using a GitHub master version of React Native?

It will part of 0.18.0, right now it is available as a release candidate on npm (0.18.0-rc). The doc isn't showing on the website yet but you can check https://github.com/facebook/react-native/blob/master/Examples/UIExplorer/RefreshControlExample.js for an example of how to use it.

@janicduplessis Any chances that RefreshControl will be implemented also for ListView? My concern is performance. ListView should be me suitable for large datasets

@mauron85 It is, ListView supports all ScrollView props :)

Ach. cool then. :-) Thanks

Ok. One more question. Is it possible to pull to refresh empty ListView? I've experience with some modules, where it was not possible.

I'm pretty sure it is but you'd have to test it.

Just did. Didn't :-(

I can check tonight, if it's not possible it's probably a bug.

Sorry.  But I was wrong. It works just fine.

All good :)


net/smtp: add support for AUTH LOGIN

The Microsoft Exchange SMTP server I connect to at work supports AUTH LOGIN.  It would be nice to have support for this in net/smtp.
After hunting around I found and adapted some MIT licensed code which implements this.  This works for me and I have checked it against Python's smtplib implementation.  It may, however, benefit from the same TLS checks that are in place in PlainAuth.Start as the credentials are similarly sent over the wire in plain text.
I am using go version go1.4.1 linux/amd64.

+1 for this feature request.

net/smtp is frozen, this issue can probably be closed.

Yeah, probably. This could move to a package on github it looks like.


Bring RSpec current with rails 5 beta 3

Biggest issue here is a regression introduced in the rails controller
testing gem which forces us to do a require of
action_controller/metal/rendering in order to not give a NameError
when booting our test app.

This closes #1571, right?

Also, I think the require issue just got fixed on Rails master: https://github.com/rails/rails/commit/12cce89c89b48b15dcf2fcdb41feaaa5b7c06991

@bquorning I worked with @sgrif from rails core on this, so it's likely they've got patches.

I think, if you rebase on master (after #1571) you’ll have just 1 failing spec.

@bquorning I've just pushed a rebased version of this. Let's see what happens.

Yes, there is now one spec example failing:
Failures:
  1) Action Mailer railtie hook in the development environment respects a custom `preview_path`
     Failure/Error:
       expect(
         capture_exec(
           custom_env.merge('CUSTOM_PREVIEW_PATH' => '/custom/path'),
           exec_script
         )
       ).to eq('/custom/path')

       expected: "/custom/path"
            got: #<struct CaptureExec io="/home/travis/build/rspec/bundle/ruby/2.2.0/gems/rb-inotify-0.9.7/lib/rb-inot...d/rspec/rspec-rails/tmp/example_app/spec/support/default_preview_path:9:in `<main>'", exit_status=0>

       (compared using ==)

       Diff:
       @@ -1,2 +1,2 @@
       -"/custom/path"
       +"#<struct CaptureExec io=\"/home/travis/build/rspec/bundle/ruby/2.2.0/gems/rb-inotify-0.9.7/lib/rb-inot...d/rspec/rspec-rails/tmp/example_app/spec/support/default_preview_path:9:in `<main>'\", exit_status=0>"

     # ./spec/verify_mailer_preview_path_spec.rb:62:in `block (3 levels) in <top (required)>'

Running specs locally while bisecting the Rails repository, it seems that https://github.com/rails/rails/commit/de6ad5665d2679944a9ee9407826ba88395a1003 is the first offending commit. And sure enough, commenting out config.file_watcher = ActiveSupport::EventedFileUpdateChecker from the generated config/environments/development.rb in our example app makes the spec pass.
Maybe just add one line to our example_app_generator/generate_action_mailer_specs.rb?
comment_lines 'config/environments/development.rb', /file_watcher/

Note: I haven’t investigated why that particular line causes the rspec-rails mailer specs to fail.

…or just use the --skip-listen flag when creating the example app – see https://github.com/rails/rails/commit/94dbc48887bf39c241ee2ce1741ee680d773f202

@rspec/rspec can I get a review on this?

:heart

Most of this can/should be reverted once Rails 5.0.0 is out, right?

@bquorning we'll assess which parts of it are necessary when the release candidate drops.


Add --all-extras flag to pip-compile

The goal is to make it easy to compile version locks for all runtime
dependencies in a way that is robust to human error. By using the
wildcard extra the risk of forgetting to list any extra is removed.

Is this a use case pip-tools wants to support?
If yes, is the current approach a good one?
Contributor checklist

[x] Provided the tests for the changes.
[x] Assure PR title is short, clear, and good to be included in the user-oriented changelog

Maintainer checklist

[ ] Assure one of these labels is present: backwards incompatible, feature, enhancement, deprecation, bug, dependency, docs or skip-changelog as they determine changelog listing.
[ ] Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

Certainly.
Thanks for being patient and guiding me through the process.


Rework tinkerbell hardware generation to lay ground work for extensible validation

As part of the Tinkerbell provider end-user workflow we generate files for registration in the Tinkerbell stack and management clusters. This is the start of a PR stack that introduces a more decoupled and cohesive set of capabilities that lay the groundwork for extensible validation of machine entries.
The approach adopts a ports and adapters style implementation that isolates reading machine configuration from a source and writing that configuration elsewhere. At a high level the generate hardware command will leverage hardware.Translate(reader, writer) to translate machine configurations from 1 format to another.
This PR focuses on the Machine value objects and Translate* functions.

Todo

Unit tests

/hold

/unhold

/unhold


libow: 3.2p3 -> 3.2p4

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/owfs/owfs/releases.
meta.description for libow is: "1-Wire File System full library"
meta.homepage for libow is: "https://owfs.org/"
meta.changelog for libow is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 3.2p4 with grep in /nix/store/bg1vm70v9mny7z8sxnhxkhcdvrh9ifim-libow-3.2p4

directory tree listing: https://gist.github.com/aa8c72a052c065ff95d9c88c57b57e44

du listing: https://gist.github.com/9ed84629a699dd7b830369ec2703f935

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

4 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
1 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
libow

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/bg1vm70v9mny7z8sxnhxkhcdvrh9ifim-libow-3.2p4 \
  --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 libow https://github.com/r-ryantm/nixpkgs/archive/88bb6a8e62b8a6884b43cfc0d523b6edf6923bf5.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/bg1vm70v9mny7z8sxnhxkhcdvrh9ifim-libow-3.2p4
ls -la /nix/store/bg1vm70v9mny7z8sxnhxkhcdvrh9ifim-libow-3.2p4/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 1

1 package built:

libow

Maintainer pings
cc @divi255 for testing.

@GrahamcOfBorg eval

@ofborg eval


Update request: sqlpage 0.15 → 0.20.5

Package name: sqlpage
Latest released version: 0.20.5

Current version on the unstable channel: 0.15.1
Current version on the stable/release channel: 0.20.5

[x] Checked the nixpkgs pull requests

Notify maintainers

@dit7ya

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

Can you fix the title?

done, sorry!

now sqlpage-v0.21.0. @dit7ya

The latest changes to the main branch of SQLPage should make the nix build process easier, since the build script now accepts pre-downloaded static assets: https://github.com/lovasoa/SQLpage/commit/7ea57559fd39d404eff59091a5bc2f14c8f327f7
Let me know if this helps.

We can now just place the artefacts in target/sqlpage_artefacts before compilation, and the build script picks them up:
❯ ll target/sqlpage_artefacts/
-rw-rw-r-- 1 olojkine olojkine 522K Jun 27 17:11 https___cdn.jsdelivr.net_npm_apexcharts_3.49.1_dist_apexcharts.min.js
-rw-rw-r-- 1 olojkine olojkine  19K Jun 27 17:11 https___cdn.jsdelivr.net_npm_list.js-fixed_2.3.4_dist_list.min.js
-rw-rw-r-- 1 olojkine olojkine 536K Jun 27 17:11 https___cdn.jsdelivr.net_npm__tabler_core_1.0.0-beta20_dist_css_tabler.min.css
-rw-rw-r-- 1 olojkine olojkine  30K Jun 27 17:11 https___cdn.jsdelivr.net_npm__tabler_core_1.0.0-beta20_dist_css_tabler-vendors.min.css
-rw-rw-r-- 1 olojkine olojkine 134K Jun 27 17:11 https___cdn.jsdelivr.net_npm__tabler_core_1.0.0-beta20_dist_js_tabler.min.js
-rw-rw-r-- 1 olojkine olojkine 2.3M Jun 27 17:11 https___cdn.jsdelivr.net_npm__tabler_icons-sprite_3.4.0_dist_tabler-sprite.svg
-rw-rw-r-- 1 olojkine olojkine  43K Jun 27 17:11 https___cdn.jsdelivr.net_npm_tom-select_2.3.1_dist_js_tom-select.popular.min.js

This should make it easier to simplify https://github.com/MikaelFangel/nixpkgs-upstream/blob/master/pkgs/servers/sqlpage/default.nix#L54-L76
The latest SQLPage is now v0.24.0

Done in https://github.com/NixOS/nixpkgs/pull/318678


Project may have multiple taskrunners

A "taskrunner" is gulp, aurelia-cli (for au watch) but also dotnet (for dotnet run). And a project can use both gulp and dotnet, so monterey should be able to handle the fact that a project may have multiple taskrunners

YES

That is what I am missing at most now - and did not even have the chance to say it (mind melding at its best)

to take into consideration: https://github.com/monterey-framework/monterey/issues/224

implemented with latest commits


switching between raw and table causes the app to show a vertical scrollbar

(in fact, it is quite easy to end up with both vertical and horizontal scrollbars)

Fixed with 4dec8b79c42610de3b99241238aef3bb0d21d548


Travis build fix

What is this PR for?
A lot of time travis fails with
Tests run: 11, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.77 sec <<< FAILURE! - in org.apache.zeppelin.notebook.NotebookTest
testSelectingReplImplementation(org.apache.zeppelin.notebook.NotebookTest)  Time elapsed: 0.025 sec  <<< ERROR!
org.apache.zeppelin.interpreter.InterpreterException: mock2 interpreter not found
	at org.apache.zeppelin.notebook.NoteInterpreterLoader.get(NoteInterpreterLoader.java:148)
	at org.apache.zeppelin.notebook.Note.run(Note.java:365)
	at org.apache.zeppelin.notebook.NotebookTest.testSelectingReplImplementation(NotebookTest.java:119)

.
.
.
.

Tests in error:
  NotebookTest.testSelectingReplImplementation:119 Â» Interpreter mock2 interpret...

This is fix for that error, this doesn't happens always. But here is a lot when this failed last time. https://s3.amazonaws.com/archive.travis-ci.org/jobs/102172625/log.txt
What type of PR is it?
Improvement
Todos

[x] - Clear registered interpreters after a test case is executed.

Is there a relevant Jira issue?
N/A

Thanks for the fix!
LGTM

Merge if there're no more discussions

looks good, good catch on the create dir


Adding status leds: ON/OFF/reading

It would be great to add 3 leds in order to display alarm status.
Just as an example:

OFF: red led
ON: green led
ARMING alarm (pending): blinking green
Reading: blue led

I don't know where to start with. Is this even possible with this project? Any thoughts?

Buzzer and Led special statuses will be added soon. I hope before 31.12.

Thanks for the answer. Is that something you ore anyone else on the team is working in?
Because I just saw another threat requesting same feature as me, and it was closed by a colleague, basically saying this is not in the roadmap.


[TensorDim] Change behaviour of default tensorDim constructor

Default tensor dim constructor sets up tensorDim of all 0 which are invalid to use by nature
Setting any dimension resets all the 0 dimensions to 1
This removes allocation of memory by tensor on default constructor yet allows using default constructor of tensor
Self evaluation:

Build test: [x]Passed [ ]Failed [ ]Skipped
Run test: [x]Passed [ ]Failed [ ]Skipped

Signed-off-by: Parichay Kapoor<EMAIL_ADDRESS>

:memo: TAOS-CI Version: 1.4.20191203. Thank you for submitting PR #408. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://nnsuite.mooo.com/.

:octocat: cibot: @kparichay, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnstreamer/nntrainer/wiki/.

:octocat: cibot: @kparichay, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://nnsuite.mooo.com/nntrainer/ci/repo-workers/pr-checker/408-202008051056500.27848196029663-eebcfa4abc4e3e6fa915c298d7c48baaab9c9d0c/.

Are we not gonna delete default constructor?

Are we not gonna delete default constructor?

As discussed offline, lets keep default constructor with zero size.

Could you put resolves #359?

:octocat: cibot: @kparichay, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnstreamer/nntrainer/wiki/.


timeular: 6.5.0 -> 6.6.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/timeular/versions.
meta.description for timeular is: Timetracking by flipping 8-sided dice
meta.homepage for timeular is: https://timeular.com
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 6.6.0 with grep in /nix/store/4cgfy9dnl691va51fnalzk0jk846mg23-timeular-6.6.0
found 6.6.0 in filename of file in /nix/store/4cgfy9dnl691va51fnalzk0jk846mg23-timeular-6.6.0

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

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
timeular

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/4cgfy9dnl691va51fnalzk0jk846mg23-timeular-6.6.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 timeular https://github.com/r-ryantm/nixpkgs/archive/832e8c5038b31490a18f47ce81de393845fe0e1c.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/832e8c5038b31490a18f47ce81de393845fe0e1c#timeular

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/4cgfy9dnl691va51fnalzk0jk846mg23-timeular-6.6.0
ls -la /nix/store/4cgfy9dnl691va51fnalzk0jk846mg23-timeular-6.6.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

1 package built:

timeular

Maintainer pings
cc @ktor for testing.

Result of nixpkgs-review pr 267780 run on x86_64-linux 1

1 package built:

timeular


allow setting a new records id from beforeCreate

I have a unique use-case where I need to be able to specify the id of new records from the beforeCreate hook because I'm wrapping records around data from a 3rd party external api that I am interacting with in the before___ hooks.

Closed by #679.


Default AMP theme's file paths

Hey guys :)
As seen in https://ghost.org/blog/amp-support/, Ghost supports Google's AMP since 2016. We're currently working with Casper and would like to make some modifications to the default AMP theme, but can't seem to find the amp.hbs or partials/amp-*.hbs files to work on.
My question is, after looking seemingly everywhere: where is Ghost pulling the default AMP template from? Where can I find those files?
(If it's useful, here is a link to a live AMP post)
Thanks in advance!
Edit: also I checked the default documentation on AMP and its link to the default amp.hbs seems to be down 🤔
Technical details

Casper Version: 2.10.5
Ghost Version: 2.0.0
Browser Version: Chrome (latest)

https://github.com/TryGhost/Ghost/blob/df7e64fafa122ec5d461c4772eca86d21938046b/core/frontend/apps/amp/lib/views/amp.hbs

The default amp template ships with Ghost itself instead of the theme.

In the docs it says you can put the amp.hbs in the theme's folder, and Ghost will load it from there. Haven't tried it yet.

That works. I did that for my own customization...
https://github.com/jessehouwing/jessehouwingnl-Casper/blob/customized/amp.hbs

The default amp template ships with Ghost itself instead of the theme.

https://github.com/TryGhost/Ghost/blob/df7e64fafa122ec5d461c4772eca86d21938046b/core/frontend/apps/amp/lib/views/amp.hbs

Thanks @jessehouwing! That's it. I'll send a heads up so that docs' link is updated.

In the docs it says you can put the amp.hbs in the theme's folder, and Ghost will load it from there. Haven't tried it yet.

You are right. As someone replied before, the default amp.hbs was in Ghost's itself folder.

@arlopezg It would be nice if the template was also part of the Ghost repo. It makes it much easier for us to stay up to date with the base version in custom themes.


Add support for iframes

This PR builds off of https://github.com/guardian/scribe/pull/221
First change is to have all document calls use scribe.targetDocument. Current API usage: scribeElement passed in is a div inside of an iframe and the options object has iframe set to true, e.g.
// scribeElement is an element inside an iframe
// Create an instance of Scribe
var scribe = new Scribe(scribeElement, { iframe: true });

I'm looking for opinions on how I should test the changes. I considered running the testsuite twice (once with the div inside an iframe, once not), but that may be going overboard.
@OliverJAsh @hmgibson23

@hmgibson23 I've setup a jsfiddle running the latest Scribe code on my branch. The iframe is visible, but works in Firefox.

Okay - well it looks like the build is passing now anyway. I'm happy for this to be merged.
:+1:
\cc @rrees for a second pair of eyes

Looks okay to me although I feel we should document the use of scribe.targetWindow and scribe.targetDocument

Created an issue for the documentation and will merge this. https://github.com/guardian/scribe/issues/317

@es Any suggestions on making the toolbar work inside the editor as well. We managed to get the content area working, but are struggling with the toolbar, which in our case is also inside an iframe.
Any thoughts?
many thanks in advance


[AutoPR] containerservices/resource-manager

Created to accumulate context: containerservices/resource-manager

(message created by the CI based on PR content)

Codecov Report

Merging #2954 into master will decrease coverage by 0.49%.
The diff coverage is 39.68%.

@@            Coverage Diff             @@
##           master    #2954      +/-   ##
==========================================
- Coverage   56.97%   56.48%    -0.5%
==========================================
  Files        7804     8494     +690
  Lines      160296   173748   +13452
==========================================
+ Hits        91334    98142    +6808
- Misses      68962    75606    +6644

Impacted Files
Coverage Δ

...re/mgmt/containerservice/models/managed_cluster.py
27.77% <ø> (ø)
:arrow_up:

...gmt/containerservice/models/managed_cluster_py3.py
27.77% <ø> (ø)
:arrow_up:

...ice/azure/mgmt/containerservice/models/__init__.py
100% <100%> (ø)
:arrow_up:

...odels/managed_cluster_service_principal_profile.py
62.5% <62.5%> (ø)

...s/managed_cluster_service_principal_profile_py3.py
62.5% <62.5%> (ø)

...re/mgmt/containerservice/models/tags_object_py3.py
66.66% <66.66%> (ø)

.../azure/mgmt/containerservice/models/tags_object.py
66.66% <66.66%> (ø)

...rservice/operations/managed_clusters_operations.py
16.41% <9.67%> (-1.23%)
:arrow_down:

...azure/mgmt/keyvault/key_vault_management_client.py
80% <0%> (-20%)
:arrow_down:

...8_02_01_preview/models/operation_definition_py3.py
38.46% <0%> (-18.69%)
:arrow_down:

... and 738 more

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 df0e798...375517d. Read the comment docs.


Cleanup

Fixed:

And some other clean up after pulling in UW UI Toolkit.
Still Broken:
Clicking on a nav item on mobile does not collapse the navbar. Guessing this is from @timlevett adding the sidebar controller, and the navbarCollapsed variable is in header controller. Will talk to @timlevett when he returns about the best way to fix this. I would recommend we merge this PR and fix the issue in a separate PR.

:+1:

:+1:


Add flake8-quotes to linting workflow

Double quotes are currently preferred by the style guide, but aren't enforced in any way in the project. This leaves the project in a bit inconsistent state ands adds more work for reviewers and contributors during the PR process.
The flake8-quotes plugin can be used to raise linting errors if the preferred quote type is not used. From testing, everything seems to work fine except for multi line strings with implicit concat https://github.com/zheller/flake8-quotes/issues/82, but this is easy to ignore and I haven't found any uses in a quick look through this project.
The main deterrent to this change would be the change to the existing codebase, at the time of writing the main branch raised
1044 errors, on 773 lines in 71 unique files. 14 of these files and 511 errors are in files under the tests folder.
While it would be a big change, it can be done as a mechanical process and merged quickly after the change if everything is discussed, so the long term disruption should be minimal.

I'm not sure if we really want to change them all at once, mainly for all the conflicts it will arise. We can just change them as we go on, and perhaps look at this once we only have a few double quotes remaining?
I am personally not a fan of the rule that enforces double quotes, I use each type of quote depending on the context. Also, this does not automatically change the quotes, which is pretty silly if you ask me, I'd rather have it as a precommit hook.
Poke @Xithrius, @jb3, @HassanAbouelela

I'm not sure if we really want to change them all at once, mainly for all the conflicts it will arise.

From a quick replace I found conflicts when merging #1602, #1568, #1539, #1487 and #836; it affects less PRs than I thought it would, but still a considerable number. Although conflicts coming from here should be mostly trivial to resolve.

We can just change them as we go on, and perhaps look at this once we only have a few double quotes remaining?

I really doubt this will ever happen, the existing code doesn't get change as much and quotes are easy to miss during reviews.

I am personally not a fan of the rule that enforces double quotes, I use each type of quote depending on the context.

The plugin will properly choose quotes to avoid escaping etc. in other cases the quotes would be against the style guide so I don't think those should be accommodated.

Also, this does not automatically change the quotes, [...], I'd rather have it as a precommit hook.

I didn't consider that, but it sounds better as quotes can differ between projects so having it taken care of automatically would be nice.
There is the double-quote-string-fixer hook but it works the other way around so we'd need to change it and either have it locally or have a repo for it (I haven't found anything that already does this). After the quote change it seems to work in the same way as the flake8 plugin.
I've also noticed that neither the plugion or the precommit hook will enforce the quotes within multi line f string literals where
f"""{'a'}"""

doesn't get flagged or changed

I agree with Numerlor about this all at once.
Regarding hook vs flake plugin, I prefer the plugin because I don't want us to tie ourselves up in maintaining and modifying the hook. A single person's changes will probably be minimal, and hopefully, they'll drop to 0 as they become more familiar with our code style.
To get over the initial hurdle of converting everything, I made a short script to go over the output of the flake plugin, and clean everything up. I tested AST equivalence, ran the test suite, and started the bot, and saw no problems.
The script is here, and my changes have been pushed to this branch. (Pffft, who needs git history anyways)

Regarding hook vs flake plugin, I prefer the plugin because I don't want us to tie ourselves up in maintaining and modifying the hook. A single person's changes will probably be minimal, and hopefully, they'll drop to 0 as they become more familiar with our code style. Manual compliance with the plugin is not all that difficult.

While I agree that it is a non issue after the first run, using the hook could make it easier for contribs, where they'd use their personal style that'd then be automatically changed at the end.
Apart from having to have the code somewhere I don't think maintaining it should be an issue as the file only got 10 commits in its entire 6 year history and I don't anticipate the grammar around strings changing anytime soon.
If changing out the few quote literals in the file gets the equivalent changes as the flake8 plugin I think it could be worth it, but both of the options are better to me than continuing to prolong the mixed style in the repo

We have talked about this internally and we decided on not adding a new linting dependency here. While there's some value in having linters for consistent code like this, there is a line to draw - it's not a great experience for contributors to have a contributor go back and modify their code just for changing the quotation style, especially since some developers tend to have fixed habits on their usage of quotes in Python.

We have talked about this internally and we decided on not adding a new linting dependency here. While there's some value in having linters for consistent code like this, there is a line to draw - it's not a great experience for contributors to have a contributor go back and modify their code just for changing the quotation style, especially since some developers tend to have fixed habits on their usage of quotes in Python.

What about the local pre-commit which would do it automatically along with the other checks like trailing spaces?
More so on the developers having habits on their own quoting style, how should this be handled in reviews?
The current Python Discord style is to use ", should this be pointed out in reviews (i.e. doing the same thing as the linting check but in a different place and by a human) or not?

Is it personal preference if it's the project's style set by the style guide?


Update text styles doc

Remove reference to non-existent textTransform prop

textTransform have been introduced by https://github.com/facebook/react-native-website/pull/254 in React Native 0.56.


Sov-celestia-local container needs Dockerfile so that we can modify, update and build other versions of celestia binaries

Summary
Currently sov-celestia-local is a hard baked image that is pushed to a public user dockerhub. This works for the single version that we currently use but cannot be customized, and developers/users cannot update the versions of the celestia binaries to test newer code. In order to solve this we want a Dockerfile that can build sov-celestia-local from scratch. The initial goal is just to have a file for 0.7.1 (the current version baked into sov-celestia-local)

What's the word on this? We noticed that emulation doesn't seem to work as we get the below M1 devices.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

We're looking to make it easer for M1 devs to work on our rollup, so we'd love to at least have it compiled for arm64.


Changing MIXER causes RC values to read incorrectly

Using the current master branch with the default parameter configuration, I am having the /rc_raw values jump to being between 985-989 after changing the MIXER parameter with the sticks centered and throttle down. I am using an frsky D4R-II receiver connected to an OpenPilot Revo via PPM.
Talking with @dpkoch and @BillThePlatypus we think it is likely due to the pwm_init function being called every time the MIXER parameter gets changed. This could be causing changes to the timer configuration for the timer used for reading the PPM.
One note, this caused the throttle to jump to 100% and the arm switch value to jump to 100% and hang regardless of the values on the controller. Luckily the vehicle I was working with wasn't armed when the MIXER switch was made, otherwise it would have been entirely uncontrollable.

By not armed, I mean that rosflight was not in the armed state.

That is a safety issue. You don't want a disarmed aircraft arming itself, especially when it can simultaneously misread the throttle command.

I've replicated the issue. I'm surprised we haven't seen this yet.

It might be worth working back through the history of rosflight and
airbourne to see if there’s a change that broke it.
On Thu, Feb 6, 2020 at 11:30 AM BillThePlatypus<EMAIL_ADDRESS>wrote:

I've replicated the issue. I'm surprised we haven't seen this yet.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/rosflight/firmware/issues/372?email_source=notifications&email_token=AHAS4ZVEZAFGFLR3LDEHYZ3RBRJMHA5CNFSM4KOA5ESKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELAJCDQ#issuecomment-583045390,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHAS4ZU7CDX2YN2YKEWK53LRBRJMHANCNFSM4KOA5ESA
.


Clone x:DataType after installed this package via NuGet

After installed DesktopNotifications packages, my axamls are appeared x:DataType twice.

I still wondering why this happen. I tried to create another project and copy all source code to other project, still happen this.
And I remembered, this happen could affected by installed NuGet packages recently. So I removed DesktopNotifications packages and my axamls no more shows x:DataType twice.

I guess creating a ticket never hurts. Can you post the link here then?


Add removePath()

Added a removePath() function that prevent any new modules from being loaded using that search path.

Thanks for the improvement @aputinski. The improvement looked reasonable and I didn't see any risk for breaking existing code so I published a new version<EMAIL_ADDRESS>Thanks, again.


FAI-3587: Validate Dashboard sync for Faros tenant's V2 graph

Description
Ensure falsy values like "" and 0 are valid field values.  This was discovered while reconciling Clio v1 vs. Hasura v2 Aion extract tables.  In a converter we explicitly set a field to "".  The prior logic was converting this back to undefined.
Type of change

[X] Bug fix
[ ] New feature
[ ] Breaking change

I have read the CLA Document and I hereby sign the CLA

recheck


[RFC] Add experimental flag to use flexbox gap in Stack

Motivation

The browser support is promising at 91.87% https://caniuse.com/?search=flexbox gap
The current approach uses margin via the selector '& > :not(style) + :not(style)' which is not a good DX when it comes to override.<Stack>
  <Button sx={{ mt: 1 }}>Test</Button> // the margin-top does not win.
</Stack>

Using gap reduces the complexity of the code because it works for both row and column direction.

It would fix:

https://github.com/mui/material-ui/issues/33810

API
Adding a flag useFlexGap to Stack to switch the implementation from margin to flexbox gap:
<Stack spacing={2}>...</Stack> // '& > :not(style) + :not(style)': { marginTop: 16px };

<Stack spacing={2} useFlexGap>...</Stack> // { gap: 16px };

To switch all stacks to use gap, do it via the theme:
createTheme({
  components: {
    MuiStack: {
      defaultProps: {
        useFlexGap: true,
      }
    }
  }
})

Note: I used to think about using CSS feature query @support but it does not work for gap because the property is identical to CSS Grid gap which supports in most browser already.

This would be an opportunity to solve this pain #28035.
Proof of concept: https://codesandbox.io/s/vigilant-mcclintock-pivrt3?file=/demo.tsx

No object with the name useFlexGap, it sounds better than my proposal!

The PR is ready for review! https://github.com/mui/material-ui/pull/36404

I just tried this out in the latest release. It works great and simplifies a lot of my components. Thank you so much for this new feature!

Why not keep both spacing and gap? They have different effects. The spacing just adds column-gap or row-gap depends on the flex direction, however gap adds gap.
Replacing spacing with gap should be a breaking change because some people may be using spacing + margin-bottom to make the gap effects.


Vim-format: Add option to ignore strings in vim-format

@vim-sroberge Do you mean to add a boolean flag into the VimLoader.loadFromBfast method and thus return null strings everywhere?

@vim-sroberge Please take a look if this is what you expected: https://github.com/vimaec/vim-ts/pull/14


Add Banting Memorial High School text file

The school website is http://ban.scdsb.on.ca/. The student domain is scdsb.on.ca, as it is a part of the Simcoe Country District School Board. Thank you.

@kadenscott Pull request merged. Thank you!