[requires.io] dependency update on master branch

Travis tests have failed
Hey @silasary,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
1st Build
View build log

     echo $CMD

python dev.py tests

     $CMD

$ $CMD
CONFIG: production=False
CONFIG: web_cache=.web_cache
CONFIG: redis_enabled=True
CONFIG: redis_host=localhost
CONFIG: redis_port=6379
CONFIG: redis_db=0
CONFIG: whoosh_index_dir=whoosh_index
Fetching https://mtgjson.com/json/version.json (cache ok)
CONFIG: slow_fetch=10.0
CONFIG: magic_database=cards
CONFIG: mysql_host=localhost
CONFIG: mysql_port=3306
CONFIG: mysql_user=root
CONFIG: mysql_passwd=
CONFIG: slow_query=5.0
Creating database cards
Database update required
Before BEGIN ([])
After BEGIN (['update_database'])
CONFIG: scratch_dir=.
Storing https://mtgjson.com/json/AllCards-x.json.zip in ./zip/zip.zip
Storing https://mtgjson.com/json/AllSets.json.zip in ./zip/zip.zip
Fetching https://pennydreadfulmtg.github.io/modo-bugs/bugs.json (cache ok)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'update_bugged_cards'])
Before COMMIT (['update_database', 'update_bugged_cards'])
After COMMIT (['update_database'])
Fetching http://whatsinstandard.com/api/v5/sets.json (cache ok)
Fetching http://pdmtgo.com/EMN_legal_cards.txt (no cache)
CONFIG: save_historic_legal_lists=False
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Fetching http://pdmtgo.com/KLD_legal_cards.txt (no cache)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Fetching http://pdmtgo.com/AER_legal_cards.txt (no cache)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Fetching http://pdmtgo.com/AKH_legal_cards.txt (no cache)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Fetching http://pdmtgo.com/HOU_legal_cards.txt (no cache)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Fetching http://pdmtgo.com/XLN_legal_cards.txt (no cache)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Fetching http://pdmtgo.com/RIX_legal_cards.txt (no cache)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Fetching http://pdmtgo.com/DOM_legal_cards.txt (no cache)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Fetching http://pdmtgo.com/M19_legal_cards.txt (no cache)
Before BEGIN (['update_database'])
After BEGIN (['update_database', 'set_legal_cards'])
Before COMMIT (['update_database', 'set_legal_cards'])
After COMMIT (['update_database'])
Before COMMIT (['update_database'])
After COMMIT ([])
Fetching http://pdmtgo.com/legal_cards.txt (no cache)
Before BEGIN ([])
After BEGIN (['set_legal_cards'])
Before COMMIT (['set_legal_cards'])
After COMMIT ([])
CONFIG: card_alias_file=./card_aliases.tsv
Rewriting index in whoosh_index
============================= test session starts ==============================
platform linux -- Python 3.6.3, pytest-4.0.0, py-1.5.2, pluggy-0.8.0
rootdir: /home/travis/build/PennyDreadfulMTG/Penny-Dreadful-Tools, inifile:
collected 178 items

decksite/deck_name_test.py ............................................. [ 25%]
.........................                                                [ 39%]
decksite/league_test.py ..                                               [ 40%]
decksite/smoke_test.py .                                                 [ 41%]
decksite/translation_test.py .                                           [ 41%]
decksite/view_test.py ...                                                [ 43%]
decksite/data/card_test.py ..                                            [ 44%]
decksite/data/deck_test.py .                                             [ 44%]
decksite/scrapers/decklist_test.py ..........                            [ 50%]
decksite/scrapers/gatherling_test.py .....                               [ 53%]
decksite/scrapers/scraper_test.py .F..                                   [ 55%]
discordbot/command_test.py .....                                         [ 58%]
discordbot/emoji_test.py .                                               [ 58%]
discordbot/functional_test.py x                                          [ 59%]
discordbot/unit_test.py ...........                                      [ 65%]
logsite/smoke_test.py ..                                                 [ 66%]
logsite/tests/importing_test.py ...                                      [ 68%]
magic/card_test.py .                                                     [ 69%]
magic/legality_test.py .                                                 [ 69%]
magic/mana_test.py .................                                     [ 79%]
magic/multiverse_test.py ..                                              [ 80%]
magic/oracle_test.py .....                                               [ 83%]
magic/rotation_test.py ...                                               [ 84%]
magic/whoosh_search_test.py x..............                              [ 93%]
shared/dtutil_test.py .........                                          [ 98%]
shared/text_test.py .                                                    [ 98%]
shared_web/template_test.py ..                                           [100%]

=================================== FAILURES ===================================
_______________________________ test_gatherling ________________________________

self = <urllib3.connection.VerifiedHTTPSConnection object at 0x7fdec50ec470>

    def _new_conn(self):
        """ Establish a socket connection and set nodelay settings on it.

        :return: New socket connection.
        """
        extra_kw = {}
        if self.source_address:
            extra_kw['source_address'] = self.source_address

        if self.socket_options:
            extra_kw['socket_options'] = self.socket_options

        try:
            conn = connection.create_connection(
>               (self._dns_host, self.port), self.timeout, **extra_kw)

../../../virtualenv/python3.6.3/lib/python3.6/site-packages/urllib3/connection.py:159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

address = ('gatherling.com', 443), timeout = None, source_address = None
socket_options = [(6, 1, 1)]

    def create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
                          source_address=None, socket_options=None):
        """Connect to *address* and return the socket object.

        Convenience function.  Connect to *address* (a 2-tuple ``(host,
        port)``) and return the socket object.  Passing the optional
        *timeout* parameter will set the timeout on the socket instance
        before attempting to connect.  If no *timeout* is supplied, the
        global default timeout setting returned by :func:`getdefaulttimeout`
        is used.  If *source_address* is set it must be a tuple of (host, port)
        for the socket to bind as a source address before making the connection.
        An host of '' or port 0 tells the OS to use the default.
        """

        host, port = address
        if host.startswith('['):
            host = host.strip('[]')
        err = None

        # Using the value from allowed_gai_family() in the context of getaddrinfo lets
        # us select whether to work with IPv4 DNS records, IPv6 records, or both.

        Convenience function.  Connect to *address* (a 2-tuple ``(host,
        port)``) and return the socket object.  Passing the optional
        *timeout* parameter will set the timeout on the socket instance
        before attempting to connect.  If no *timeout* is supplied, the
        global default timeout setting returned by :func:`getdefaulttimeout`
        is used.  If *source_address* is set it must be a tuple of (host, port)
        for the socket to bind as a source address before making the connection.
        An host of '' or port 0 tells the OS to use the default.
        """

        host, port = address
        if host.startswith('['):
            host = host.strip('[]')
        err = None

        # Using the value from allowed_gai_family() in the context of getaddrinfo lets
        # us select whether to work with IPv4 DNS records, IPv6 records, or both.
        # The original create_connection function always returns all records.
        family = allowed_gai_family()

        for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
            af, socktype, proto, canonname, sa = res
            sock = None
            try:
                sock = socket.socket(af, socktype, proto)

                # If provided, set socket level options before connecting.
                _set_socket_options(sock, socket_options)

                if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
                    sock.settimeout(timeout)
                if source_address:
                    sock.bind(source_address)
>               sock.connect(sa)
E               OSError: [Errno 113] No route to host

../../../virtualenv/python3.6.3/lib/python3.6/site-packages/urllib3/util/connection.py:70: OSError

During handling of the above exception, another exception occurred:

self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fdeed8af7b8>
method = 'GET'
url = '/eventreport.php?format=Penny+Dreadful&series=&season=&mode=Filter+Events'
body = None
headers = {'User-Agent': 'python-requests/2.20.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}
retries = Retry(total=0, connect=None, read=False, redirect=None, status=None)
redirect = False, assert_same_host = False
timeout = <urllib3.util.timeout.Timeout object at 0x7fdeed8710b8>
pool_timeout = None, release_conn = False, chunked = False, body_pos = None
response_kw = {'decode_content': False, 'preload_content': False}, conn = None
release_this_conn = True, err = None, clean_exit = False
timeout_obj = <urllib3.util.timeout.Timeout object at 0x7fdedeff1c18>
is_new_proxy_conn = False

    def urlopen(self, method, url, body=None, headers=None, retries=None,
                redirect=True, assert_same_host=True, timeout=_Default,
                pool_timeout=None, release_conn=None, chunked=False,
                body_pos=None, **response_kw):
        """
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param body:
            Data to send in the request body (useful for creating
            POST requests, see HTTPConnectionPool.post_url for
            more convenience).

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.

            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.

            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.

        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When False, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.

        :param int body_pos:
            Position to seek to in file-like body in the event of a retry or
            redirect. Typically this won't need to be set because urllib3 will
            auto-populate the value when needed.

        :param \\**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        """
        if headers is None:
            headers = self.headers

        if not isinstance(retries, Retry):
            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)

        if release_conn is None:
            release_conn = response_kw.get('preload_content', True)

        # Check host
        if assert_same_host and not self.is_same_host(url):
            raise HostChangedError(self, url, retries)

        conn = None

        # Track whether `conn` needs to be released before
        # returning/raising/recursing. Update this variable if necessary, and
        # leave `release_conn` constant throughout the function. That way, if
        # the function recurses, the original value of `release_conn` will be
        # passed down into the recursive call, and its value will be respected.
        #
        # See issue #651 [1] for details.
        #
        # [1] <https://github.com/shazow/urllib3/issues/651>
        release_this_conn = release_conn

        # Merge the proxy headers. Only do this in HTTP. We have to copy the
        # headers dict so we can safely change it without those changes being
        # reflected in anyone else's copy.
        if self.scheme == 'http':
            headers = headers.copy()
            headers.update(self.proxy_headers)

        # Must keep the exception bound to a separate variable or else Python 3
        # complains about UnboundLocalError.
        err = None

        # Keep track of whether we cleanly exited the except block. This
        # ensures we do proper cleanup in finally.
        clean_exit = False

        # Rewind body position, if needed.    Connects to the server I'm assuming.

         Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls whether
            we verify the server's TLS certificate, or a string, in which case it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        :rtype: requests.Response
        """

        try:
            conn = self.get_connection(request.url, proxies)
        except LocationValueError as e:
            raise InvalidURL(e, request=request)

        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

        chunked = not (request.body is None or 'Content-Length' in request.headers)

        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError as e:
                # this may raise a string formatting error.
                err = ("Invalid timeout {}.  This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method provided
           by :class:`.RequestMethods`, such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param body:
            Data to send in the request body (useful for creating
            POST requests, see HTTPConnectionPool.post_url for
            more convenience).

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.

            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.

            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.

        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When False, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of
            ``response_kw.get('preload_content', True)``.

        :param chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.

        :param int body_pos:
            Position to seek to in file-like body in the event of a retry or
            redirect. Typically this won't need to be set because urllib3 will
            auto-populate the value when needed.

        :param \\**response_kw:
            Additional parameters are passed to
            :meth:`urllib3.response.HTTPResponse.from_httplib`
        """
        if headers is None:
            headers = self.headers

        if not isinstance(retries, Retry):
            retries = Retry.from_int(retries, redirect=redirect, default=self.retries)

        if release_conn is None:
            release_conn = response_kw.get('preload_content', True)

        # Check host
        if assert_same_host and not self.is_same_host(url):
            raise HostChangedError(self, url, retries)

        conn = None

        # Track whether `conn` needs to be released before
        # returning/raising/recursing. Update this variable if necessary, and
        # leave `release_conn` constant throughout the function. That way, if
        # the function recurses, the original value of `release_conn` will be
        # passed down into the recursive call, and its value will be respected.
        #
        # See issue #651 [1] for details.
        #
        # [1] <https://github.com/shazow/urllib3/issues/651>
        release_this_conn = release_conn

        # Merge the proxy headers. Only do this in HTTP. We have to copy the
        # headers dict so we can safely change it without those changes being
        # reflected in anyone else's copy.
        if self.scheme == 'http':
            headers = headers.copy()
            headers.update(self.proxy_headers)

        # Must keep the exception bound to a separate variable or else Python 3
        # complains about UnboundLocalError.
        err = None

        # Keep track of whether we cleanly exited the except block. This
        # ensures we do proper cleanup in finally.
        clean_exit = False

        # Rewind body position, if needed. Record current position
        # for future rewinds in the event of a redirect/retry.
        body_pos = set_file_position(body, body_pos)

        try:
            # Request a connection from the queue.
            timeout_obj = self._get_timeout(timeout)
            conn = self._get_conn(timeout=pool_timeout)

            conn.timeout = timeout_obj.connect_timeout

            is_new_proxy_conn = self.proxy is not None and not getattr(conn, 'sock', None)
            if is_new_proxy_conn:
                self._prepare_proxy(conn)

            # Make the request on the httplib connection object.
            httplib_response = self._make_request(conn, method, url,
                                                  timeout=timeout_obj,
                                                  body=body, headers=headers,
                                                  chunked=chunked)

            # If we're going to release the connection in ``finally:``, then
            # the response doesn't need to know about the connection. Otherwise
            # it will also try to release it and we'll have a double-release
            # mess.
            response_conn = conn if not release_conn else None

            # Pass method to Response for length checking
            response_kw['request_method'] = method

            # Import httplib's response into our own wrapper object
            response = self.ResponseCls.from_httplib(httplib_response,
                                                     pool=self,
                                                     connection=response_conn,
                                                     retries=retries,
                                                     **response_kw)

            # Everything went great!
            clean_exit = True

        except queue.Empty:
            # Timed out by queue.
            raise EmptyPoolError(self, "No pool connections are available.")

        except (TimeoutError, HTTPException, SocketError, ProtocolError,
                BaseSSLError, SSLError, CertificateError) as e:
            # Discard the connection for these exceptions.
        Returns :class:`Response <Response>` object.

        :param method: method for the new :class:`Request` object.
        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of ``'filename': file-like-objects``
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple
        :param allow_redirects: (optional) Set to True by default.
        :type allow_redirects: bool
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a string, in which case it must be a path
            to a CA bundle to use. Defaults to ``True``.
        :param cert: (optional) if String, path to ssl client cert file (.pem).

        # Guard against that specific failure case.
        if isinstance(request, Request):
            raise ValueError('You can only send PreparedRequests.')

          Returns Response object.

        :param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
        :param stream: (optional) Whether to stream the request content.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple or urllib3 Timeout object
        :param verify: (optional) Either a boolean, in which case it controls whether
            we verify the server's TLS certificate, or a string, in which case it
            must be a path to a CA bundle to use
        :param cert: (optional) Any user-provided SSL certificate to be trusted.
        :param proxies: (optional) The proxies dictionary to apply to the request.
        :rtype: requests.Response
        """

        try:
            conn = self.get_connection(request.url, proxies)
        except LocationValueError as e:
            raise InvalidURL(e, request=request)

        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

        chunked = not (request.body is None or 'Content-Length' in request.headers)

        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError as e:
                # this may raise a string formatting error.
                err = ("Invalid timeout {}. Pass a (connect, read) "
                       "timeout tuple, or a single float to set "
                       "both timeouts to the same value".format(timeout))
                raise ValueError(err)
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)

        try:
            if not chunked:
                resp = conn.urlopen(
                    method=request.method,
                    url=url,
                    body=request.body,
                    headers=request.headers,
                    redirect=False,
                    assert_same_host=False,
                    preload_content=False,
                    decode_content=False,
                    retries=self.max_retries,
                    timeout=timeout
                )

            # Send the request.
            else:
                if hasattr(conn, 'proxy_pool'):
                    conn = conn.proxy_pool

                low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT)

                try:
                    low_conn.putrequest(request.method,
                                        url,
                                        skip_accept_encoding=True)

                    for header, value in request.headers.items():
                        low_conn.putheader(header, value)

                    low_conn.endheaders()

                    for i in request.body:
                        low_conn.send(hex(len(i))[2:].encode('utf-8'))
                        low_conn.send(b'\r\n')
                        low_conn.send(i)
                        low_conn.send(b'\r\n')
                    low_conn.send(b'0\r\n\r\n')

                    # Receive the response from the server
                    try:
                        # For Python 2.7, use buffering of HTTP responses
                        r = low_conn.getresponse(buffering=True)
                    except TypeError:
                        # For compatibility with Python 3.3+
                        r = low_conn.getresponse()

                    resp = HTTPResponse.from_httplib(
                        r,
                        pool=conn,
                        connection=low_conn,
                        preload_content=False,
                        decode_content=False
                    )
                except:
                    # If we hit any problems here, clean up the connection.


Disable loading configuration from .babelrc.

Fixes #92

Ok, just landed a PR that should have fixed CI, can you rebase this so we can get things green before landing?

Updated. Appveyor tests are still failing for node 4. I assume it is unrelated.

Yes, the failure seems to be during the npm install phase, and therefore pretty unlikely.

This change will disable ember-cli-babel from attempting to load configuration from .babelrc and package.json. That functionality was never intended to be enabled (I didn't realize this flag had to be specific disabled), but has worked for the duration of ember-cli-babel@6 so far. A number of folks have opened issues related to this and it is tricky to even know this is going on, but technically it could be considered a breaking change.  I personally would categorize it as a "breaking bugfix", and think we should land it.
@stefanpenner / @Turbo87 - I'm 👍  on this, but want y'all to be aware and confirm that you agree with this change also before landing.

@Turbo87 @rwjblue I added a line to the readme.

Rebased to kick off another round of CI.


Raspberry camera v2 video appears to be purplish in the jetson nano

Hi @MuhammedRishdhi, you may want to try this post:   https://jonathantse.medium.com/fix-pink-tint-on-jetson-nano-wide-angle-camera-a8ce5fbd797f
If that doesn't help, please post about it to the Jetson Nano forum here:  https://forums.developer.nvidia.com/c/agx-autonomous-machines/jetson-embedded-systems/jetson-nano/76


Support for Connect ?

I'd love to see support for Stripe Connect.

Hi Marcus - do you mean subscriptions through Stripe Connect?
Or React hooks to help integrate Stripe Connect (e.g. useStripeConnect?)

@colinclerk both would be great.


fix: Remove unused inherit that break with nix 2.21

With latests nix (2.21) we have an error about undefined variable (even when not used)
       error: undefined variable 'system'
       at /nix/store/dnldnw2fvdx6x2vhhxh0kxkm67g3l4sx-source/flake.nix:62:36:
           61|         default = pkgs.callPackage ./pkgs/kubenix.nix {
           62|           inherit (self.packages.${system});
             |                                    ^
           63|           evalModules = self.evalModules.${pkgs.system};

It seems that this line was useless (inheriting nothing), removing it fixed the issue

Merged the other fix submitted for this (not for any good reason, just happened to look at it first), #58. So I'll close this one. Thanks!


vesting::retire should be limited by active withdrawals

Currently retire limited only by unlocked_vesting:
https://github.com/GolosChain/golos.contracts/blob/aaa75d7ced128ef99f331339f05d2760c1601836/golos.vesting/golos.vesting.hpp#L70-L71
This allows user to start withdraw, then retire vesting, then get fail or negative value. To prevent this, retire action should search for active withdrawal and prevent retiring more than remainig balance.

PR #745


Calling SetMusic() After option.music Change doesn't Modify Playing Music

Description
Calling setMusic on a player after updating the loaded music (e.g. ap.option.music[0] = {...}) does not change the loaded music.
The Steps to Reproduce

Load music into APlayer instance.
Play music.
Change music loaded into APlayer (e.g. ap.option.music[0] = {...}).
Call setMusic() (e.g. ap.setMusic(0)) to update the playing audio in the player.

Expected Behavior: The player should stop the previous playback (if playing) and load the new music.
Actual Behavior: The player loads all metadata information except the actual audio.
Demo of the Problem
Please see this JSFiddle for an example. Do the following to see it:

Press the Play button.
Press the custom Swap button.

Version Information
APlayer: 1.6.0
Browsers: All
Extra Information
This is likely caused by not updating the audio element's src field when an <audio> element exists before the setMusic() function is called (e.g. when it is called again). While the code appears to have changed between 1.6.0 and current master branch version, the issue seems to still exist in this clause (where no audio.src = this.music.url as in this line).

This issue should be closed as it was fixed by #174.


update open-cluster-management sdk-go

update sdk-go to avoid race conditions among the agent's go routines
https://github.com/open-cluster-management-io/sdk-go/pull/81

/cc @clyang82

/ok-to-test


.Net framework example

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
Hi Team,
i am not getting any of graphql project which is not implemented in .net framework . Will you please share the example repository if you have it.
Steps to reproduce

.net framework example repo
it should just contain any example

Relevant log output
No log file

Additional Context?
Example
Product
Hot Chocolate
Version
12.0.0

Hot Chocolate from version 11 on dropped support for .NET Framework Classic...
The new version will only support:

.NET Core 3.1
.NET 5
.NET 6
.NET 7

However, the Hot Chocolate Core does support .NET Standard, but you will need to implement the transport on your own.
Alternatively you could use Hot Chocolate 10 which still has support.
https://github.com/ChilliCream/hotchocolate/tree/main-version-10/examples/AspNetClassic.StarWars
However, we do no longer provide bug fixes for version 10.


Ban circular dependencies

Signed-off-by: Sebastian Malton<EMAIL_ADDRESS>

I think this is way too big change for a patch release. Moving to next minor.

I starting to think that this is a bit big. Will split it up into several PRs.


samd21 device adding support in USB and gpio

Related to @bradleyharden's recent PR #371. Leaving the old but also adding the new for folks who want to transition to v2. I left the old stuff but wasn't sure if it was even necessary. Happy to make adjustments as need be!

@jaredwolff, I just saw this. You shouldn't need to modify existing code at all to be compatible with the new GPIO module. You only need to perform a conversion between v1 and v2 Pin types. The v1 Pin type is now implemented as a newtype wrapper of the corresponding v2 Pin, so the conversion is trivial, and I have From/Into implementations for it.
In this specific case, if you're using v2 Pins but want to use the ADC module, just do
let Pa8<_> = pins.pa08.into()

where pins is from v2 and Pa8 is a v1 type.
I still owe you some better documentation for migration. I think that will help. I've been trying to finish up my SPI module. Now that it's in a PR, I'll drop back and look at the docs.

Ahh I totally missed that @bradleyharden. I'll give it a whirl and report back.

I'm going to close this PR and we can discuss more in #403 403


Outdoor Dataset

Hello, thanks a lot for your project!
I would like to know whether Gaussian-SLAM would work or not with an outdoor dataset (like images from a drone).
Thanks!

Thanks for your interest in our work! We never tested it outdoors. However, the quality of the RGB and depth images is the most important. The more blurry and incomplete they are, the worse the tracking.

ah ok thanks!


Send message to a connection

how to send a message to a specific connection?
                 for ($j = 0; sizeof($this->conexao_atendentes[$i]["setor"]) > $j; $j++) {
                            if ($setor == $this->conexao_atendentes[$i]["setor"][$j]) {

                                 echo  "Enviar para " . $this->conexao_atendentes[$i]["conn"] . " \n";

                                 $this->clients[$this->conexao_atendentes[$i]["conn"]]->send("Oie");
                            }
                        }

You have to know the target connection id, use it to get the target connection, and send, as your did in the last line.


[Feature Request]: Add txtai as a vector store

Feature Description
As @davidmezzetti pointed out, LlamaIndex could use txtai as a vector store.
This would be useful to users like me who have an existing txtai store and want to use advanced LlamaIndex features for certain use cases in addition to my txtai-oriented application features.
Reason
AFAIK a basic txtai interface would be straightforward to add. Any txtai features beyond the vector store would obviously be inaccessible.
Value of Feature
It would be wonderful for users like me who have an existing txtai vector store to be able to take advantage of advanced retrieval features offered by LlamaIndex.

Hi, can I work on this?

@MarouaneMaatouk go for it 👍🏻

(added to request for contribution board: https://github.com/orgs/run-llama/projects/2/views/1)

@MarouaneMaatouk thank you for making this happen so quickly! Cheers!


AIY VOICE KIT - Assistant Demo does not work (assistant_grpc_demo)

Hi,
I am getting an error code when I am trying to run the assistant demo (assistant_grpc_demo).
pi@raspberrypi:~ $ ~/AIY-projects-python/src/examples/voice/assistant_grpc_demo.py
DEBUG:google.auth.transport.requests:Making request: POST https://oauth2.googleapis.com/token
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): oauth2.googleapis.com:443
DEBUG:urllib3.connectionpool:https://oauth2.googleapis.com:443 "POST /token HTTP/1.1" 200 None
INFO:aiy.assistant.grpc:device_model_id: voice-assistant-279901-voice-kit
INFO:aiy.assistant.grpc:device_id: voice-assistant-279901-voice-kit-3d2df07c-eea4-483b-be5b-6bf659af8ac1
DEBUG:google.auth.transport.requests:Making request: POST https://oauth2.googleapis.com/token
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): oauth2.googleapis.com:443
DEBUG:urllib3.connectionpool:https://oauth2.googleapis.com:443 "POST /token HTTP/1.1" 200 None
INFO:aiy.assistant.grpc:Connecting to embeddedassistant.googleapis.com
/opt/aiy/projects-python/src/aiy/board.py:218: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(channel, GPIO.OUT)
INFO:root:Press button to start conversation...
INFO:root:Conversation started!
INFO:aiy.assistant.grpc:Recording started.
aplay: playback:2787: read error
INFO:aiy.assistant.grpc:Recording stopped.
Traceback (most recent call last):
File "/home/pi/AIY-projects-python/src/examples/voice/assistant_grpc_demo.py", line 57, in
main()
File "/home/pi/AIY-projects-python/src/examples/voice/assistant_grpc_demo.py", line 54, in main
assistant.conversation()
File "/opt/aiy/projects-python/src/aiy/assistant/grpc.py", line 190, in conversation
keep_talking = self._assist(recorder, wrapped_play, deadline)
File "/opt/aiy/projects-python/src/aiy/assistant/grpc.py", line 135, in _assist
for response in self._assistant.Assist(self._requests(recorder), deadline):
File "/usr/local/lib/python3.5/dist-packages/grpc/_channel.py", line 363, in next
return self._next()
File "/usr/local/lib/python3.5/dist-packages/grpc/_channel.py", line 357, in _next
raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Invalid 'dialog_state_in': unsupported language_code."
debug_error_string = "{"created":"@1592060445.981045201","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1099,"grpc_message":"Invalid 'dialog_state_in': unsupported language_code.","grpc_status":3}"

Any help much appreciated.
Thanks.

@cckeung123 I see this error : "unsupported language_code". Did you try to change the language of the Assistant ?
From which country are you trying to run grpc demo ?

@manoj7410
I come from Hong Kong.
How do I change the language of the Assistant? What language should I change?
Thanks.

Google Assistant SDK supports languages listed at : https://developers.google.com/assistant/sdk/reference/rpc/languages
I have seen this issue in the past form other users from Hong Kong. A user just changed his internet connection and his Assistant language got changed automatically. You should be able to change the language at : https://github.com/google/aiyprojects-raspbian/blob/bc3a748140b391bec562d73c0d518dcf60840859/src/aiy/assistant/grpc.py#L257


No hint path defined for [admin].

Hi guys,
currently I try to move the admin package to an module, because it's easier for me to make changes in a private environment.
Current state is the following: https://github.com/noxify/modules-admin
Everytime I try to open the page http://<server>/admin I got the following error:
No hint path defined for [admin].

The Admin Package is not installed.
Current composer.json (root dir) is the following:
{
	"name": "laravel/laravel",
	"description": "The Laravel Framework.",
	"keywords": ["framework", "laravel"],
	"license": "MIT",
	"require": {
		"laravel/framework": "4.2.*",
		"pingpong/modules": "dev-master",
		"barryvdh/laravel-debugbar": "1.*",
		"noxify/laravel-fileupload": "dev-master",
		"cartalyst/sentry": "2.1.*",
		"pingpong/testing": "1.*",
        "pingpong/menus": "1.0.*",
        "pingpong/presenters": "1.0.*",
        "pingpong/trusty": "1.0.*",
        "pingpong/validator": "1.*",
        "intervention/image": "~2"
	},
	"autoload": {
		"classmap": [
			"app/commands",
			"app/controllers",
			"app/models",
			"app/database/migrations",
			"app/database/seeds",
			"app/tests/TestCase.php"
		],

        	"psr-4": {
            	"Modules\\": "Modules"
        	}

	},
	"scripts": {
		"post-install-cmd": [
			"php artisan clear-compiled",
			"php artisan optimize"
		],
		"post-update-cmd": [
			"php artisan clear-compiled",
			"php artisan optimize"
		],
		"post-create-project-cmd": [
			"php artisan key:generate"
		]
	},
	"config": {
		"preferred-install": "dist"
	},
	"minimum-stability": "stable"
}

Active modules are:

Admin - prio: 0
Sentry - prio: 1 ( I also try to change the auth method :) )

I added some debug prints in the Module package, and the admin module is the first which will be loaded.
Any ideas?
Thanks :)

Got it :)
Without the Resources/views it can't work :D


add FloReader datapipe

This is not needed right now, but helps @krshrimali who is porting the Sintel "legacy" dataset to prototypes. This has quite a few parallels to what we do for MNIST:
https://github.com/pytorch/vision/blob/6d9a42c322cb815516d5ea556b751d0c7e767c7f/torchvision/prototype/datasets/_builtin/mnist.py#L42
We can probably merge these two in the future.
cc @pmeier @bjuncek

After some more offline discussion with @NicolasHug, I've refactored the PR to use numpy for reading the data since it natively is able to handle the endianness.
Note that we cannot use numpy.fromfile, because it doesn't support reading from compressed files like the ones the MNIST dataset uses:
import gzip
import tempfile

import numpy as np

data = np.array([0.0])

path = tempfile.mktemp()
with open(path, "wb") as file:
    file.write(gzip.compress(data.tobytes()))

with open(path, "rb") as compressed_file:
    with gzip.open(compressed_file, "rb") as file:
        print(np.fromfile(file))

        file.seek(0)
        print(np.frombuffer(file.read()))

[7.1653857e+161 5.9808143e+197]
[0.]

If we go through with this design, we should revisit #4598. It probably than should be reverted for consistency. cc @datumbox

My main concern wasn't just about using numpy vs pytorch it was mostly about code complexity. The original flow decoding function is extremely simple, seld-contained, and easy to understand:
https://github.com/pytorch/vision/blob/bbd9ff8fb936846aa0412996abab19b563677e5b/torchvision/datasets/_optical_flow.py#L365-L379
I personally see no strong reason to create a new class or a new helper that will add maintenance overhead - we don't need a helper for anything. I would just copy paste it and be done with it.

If we go through with this design, we should revisit #4598. It probably than should be reverted for consistency

Not necessarily, I don't think we need to worry about consistency between the use of np.frombuffer vs torch.frombuffer. We should just use which tool gets the best job done, while accounting for factors like code simplicity (i.e. maintainability) / robustness.

My main concern wasn't just about using numpy vs pytorch it was mostly about code complexity. The original flow decoding function is extremely simple, seld-contained, and easy to understand

That is true with two caveats:

We can't use PyTorch dtypes to indicate the datatypes. Before diving into this, I had no idea what "<f4" meant. IMO, using dtype=torch.float32, byte_order="little" is a lot more expressive and does not require you to look up documentation.

Your implementation assumes that everything stays as numpy.ndarray and thus does not need to care how the data is stored in memory. As soon as you want to convert the result into a torch.Tensor your system also needs to be little endian. In other words: if I'm on a big-endian system, your implementation is broken without manually fixing the byte order:
>>> torch.from_numpy(np.array([0.0], dtype=np.dtype(">f4")))
ValueError: given numpy array has byte order different from the native byte order. Conversion between byte orders is currently not supported.

(This example uses the inverted logic, i.e. having big endian data on a little endian system, but it will be the same the other way around)

As for simplicity, my implementation is even shorter and hides all of the complexity above from the user. Plus it is as self-contained as your version in the sense that both implementations let another function do the heavy lifting for them.

Not necessarily, I don't think we need to worry about consistency between the use of np.frombuffer vs torch.frombuffer. We should just use which tool gets the best job done, while accounting for factors like code simplicity (i.e. maintainability) / robustness.

#4598 was specifically about using torch.frombuffer over np.frombuffer in a situation where endianness matters. Thus, the new implementation is more complex in favor of using a PyTorch native approach. If we go by your sentiment, we should revert the PR.

I guess I should have  started with this: why are we implementing a new version of the MNIST thing and _read_flow in the prototype folder?
Both current implementations work fine (module a minor bug in _read_flo as we previouly discussed). If we merge this, we'll have 2 implementations for both functions - surely we want to avoid that kind of duplication.
Shouldn't we have this refactoring discussion outside of the prototype concerns?

I guess I should have started with this: why are we implementing a new version of the MNIST thing and _read_flow in the prototype folder?

For MNIST the functionality we had always reads the complete file whereas now we only read one image / label at the time. This is why we need a custom datapipe.
This is not necessary for read_flo and thus it is just a function. The difference between the current implementation and this PR is that we also need to be able to pass a file handle directly instead of a path. I'll push a commit shortly that shows the changes to the current _read_flo that we need to make in order for it to also work with the prototype datasets.

Shouldn't we have this refactoring discussion outside of the prototype concerns?

I'm also fine with that. Note however for an implementation that is also used by the prototype datasets, the functionality need to be able to handle open files instead of just paths and should return a tensor (we could also have a thin wrapper for that).

I would also be curious if you could run some quick benchmark to see if there's a significant time difference between the 2.

import contextlib
import pathlib
import time

import torch
from torchvision.datasets._optical_flow import _read_flo as read_flo_baseline
from torchvision.prototype import datasets
from torchvision.prototype.datasets.utils._internal import read_flo as read_flo_new

files = [
    file
    for file in (pathlib.Path(datasets.home()) / "sintel" / "training" / "flow").glob("**/*")
    if file.suffix == ".flo"
]

@contextlib.contextmanager
def timeit(label):
    start = time.perf_counter()
    yield
    stop = time.perf_counter()
    print(label, f"{(stop - start) / len(files) * 1e3:.1f} milliseconds per file")

with timeit("baseline"):
    for file in files:
        torch.from_numpy(read_flo_baseline(file).astype("f4", copy=False))

with timeit("baseline+copy"):
    for file in files:
        torch.from_numpy(read_flo_baseline(file).astype("f4"))

with timeit("new"):
    for file in files:
        with open(file, "r+b") as f:
            read_flo_new(f)

baseline 0.3 milliseconds per file
baseline+copy 2.2 milliseconds per file
new 2.3 milliseconds per file

So roughly 8x slower than before, but in absolute terms probably insignificant within the image training loop. The memcopy is the offender. If we add this to the old implementation, the difference is negligible.

I've added support for dropping the memcopy if the file is opened in update mode (r+b or w+b). This is even faster than the original solution. In addition, calling bytearray() on the read bytes if we are not in update mode is faster than letting numpy do the copy. With the latest commit and this addition
with timeit("new+update"):
    for file in files:
        with open(file, "r+b") as f:
            read_flo_new(f)

the benchmark script now gives:
baseline 0.3 milliseconds per file
baseline+copy 2.1 milliseconds per file
new 1.3 milliseconds per file
new+update 0.1 milliseconds per file


Navigation settings menu is jumping width

Navigation settings menu is jumping width

Please remove from the commit ront-end/studio/yarn.lock
we shouldn't commit .lock changes


Fix window scrolling after rustfmt is run

Hello,
I tried investigating the window scrolling after rustfmt is run (this issue has been referenced in various forms in issues #268 #231 #251) as I am still experiencing it and imo it's pretty annoying.
I'm not an elisp expert, but I think a quick fix/workaround could be to simply nail the window start position and restore it after rustfmt has finished.
I think there may be still cases where the code reformatting can be a bit confusing (f.e. rustfmt'ing a big messed up file), but at least I'm not getting mad every time I compulsively save a buffer :-)
Can you let me know what you think of this little patch? I tested it a bit and it has greatly improved my coding experience with rustfmt.
Thanks for your time!
EDIT: I did some checks, but I'm not sure how to fix those warning that make the CI fail
EDIT2: maybe fixed (not sure if fix is correct though)

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.

Works nicely for me. I'd suggest using a let binding instead of defvar, which creates a persistent global variable:
(let ((w-start (window-start)))
 .....
)

@jjwest thanks, appreciated! I've pushed a patch to reflect your suggestion.

Issue #256 looks like also related

Isn't this is the reason that save-excursion exists? I think it should be possible to just use:
(save-excursion
    (rust--format-call (current-buffer)))

@drrlvn save-excursion uses markers that might be deleted by rust--format-call, see https://emacs.stackexchange.com/a/7577/15635

@sebastiencs I see.
I tried looking at how clang-format does this as I've not had this issue in C++ code and it looks like the cursor position is passed as an argument and then the json output contains the location the cursor should be moved to. See the source.
Is there such an option in rustfmt, and if not would it maybe be possible to add it? I imagine every editor would need something like this.

review @nikomatsakis? anyone? suggestions?
thanks

FYI it seems I was able to fix this issue by not using stdin in the before-save-hook. Since the buffer gets saved anyway it's no problem to run rustfmt on the files and revert the buffers afterwards. I think this should also work for rust-mode, but I'm not sure.

This looks like a pretty simple patch :)

@nikomatsakis I'm sorry I had lost track of this issue :-) you mean this patch can be pushed forward? I think I've been using it since.

Ill try to take a look at this this week.
It would be interesting to try to figure out how to make a regression test for this ...

@apiraino seems ok to me to merge in this case. I don't really know how to judge if it will work, but I take your word for it. =) Would of course be nice to have a test, as @pnkfelix says.

@nikomatsakis thanks for having a look at this patch. I can verify the effect of the patch on a sample Rust source file. However I'm afraid I can't provide an elisp test because my knowledge on that is pretty limited. If anyone is willing to help, I'd be really happy to provide a test case for the regression.
In any case here's how to reproduce:

Ensure you have installed rust-mode from melpa (currently rust-mode-20181008.1628.el)
Download this gist
Open the downloaded file in emacs
Follow the instructions in the Rust test file
You should experience that the buffer moves at the end of the current window

With my patch step (5) does not happen
Hope this helps

@apiraino You have to install rust and rustfmt in the travis config first. Then you can start with a simple test that formats a buffer. Afterwards you can write the regression test with save-some-buffers.

@brotzeit sorry for the long hiatus, got a lot going on.
So, I did a little reseach and tried writing a test for this PR. I believe what I need to test is the window-start value before and after running rust-format-buffer.
I tried allocating a temporary buffer as in other tests (with-temp-buffer) but window-start always return nil. I'm not sure I'm on the right path.
How should the test work in order to get meaningful values for window-start?
Here's a gist of what I am at this moment:
https://gist.github.com/apiraino/4c8abac8d23398b2bd6dcd5d3d54e1df

Sorry for long hiatus. I'm kind of overwhelmed with review requests and haven't really had time to try this out.
Maybe @mookid or @brotzeit can review?

Hi @apiraino,
Looks good.
About the test, the problem is with the let:

(defun rust-test-fn (code expected-result)
  (with-temp-buffer
    (rust-mode)
    (insert code)
    (message "%S" (selected-window))
    ;; check window before formatting
    (let ((w-start (window-start)))
      (message "before: %s" w-start))
    (rust-format-buffer)
    (should (equal expected-result (buffer-string)))

    ;; check window start after formatting
    (let ((w-start (window-start)))
      (message "%s" w-start))))


Location prefix behind reverse proxy

Hello
I'm continuing #52
Example already on readme.md file
Thanks.

Hello,
I just want to know, how to run behind reverse proxy with some prefix path. For example I want is :: http://xxx.xxx.xxx.xxx/nginx-ui
Is there any environment variable to pass ? Something like APP_PATH_PREFIX ?
Thanks 🙂

Hi @schenkd
Hopefully, you check the newly updated file.
Thanks.


Adjust keyboard height in IOS/iPadOS

I am subscribing to keyboard notifications and publishing changes.  I  use this on a ViewModifier to pad the bottom with the size of the keyboard.  This works for TextField, but is not working with  TextVIew.  Any insights/solutions?
Better solutions for adjusting screen to keyboard?

Try setting an explicit height and modifying that height instead of adding padding. Does that work?

What is actually happening is that padding is added but the form does not scroll so that the TextView remains hidden behind the keyboard.
Will need to work around that.

On May 11, 2020, at 6:24 PM, Ken Mueller<EMAIL_ADDRESS>wrote:
Try setting an explicit height and modifying that height instead of adding padding. Does that work?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/kenmueller/TextView/issues/20#issuecomment-626997918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENJQIETNAAYPMONLSQXUY3RRB3JZANCNFSM4M533QNA.

Hi @kenmueller I also wonder how I can work with the keyboard properly. I'm new to SwiftUI and have no clue how to push up the form I render. My current issue is that the keyboard is overlapping the TextView and I can't see what I'm typing after a few lines.
Is there any best practices I don't know about or is it a bug? Thank you very much for this project - it helped me quite a lot already 😄

Tiny follow-up: I found this Gist and it helped me perfectly well after I reworked the TextView to not be inside a Form anymore but in a VStack with some custom styling. The problem is solved for me now, maybe it helps others with a similar issue https://gist.github.com/scottmatthewman/722987c9ad40f852e2b6a185f390f88d

I'll look into this and get back soon!


Different promotion behavior between numpy.right_shift and jax.numpy.right_shift for scalars

Description
Hi, Thank you for your all efforts developing such a great library!
I'm trying to use jax.numpy.left_shift and jax.numpy.right_shift method for bitwise calculation.
And I found that the jax.numpy.right_shift operation does nothing if I do shift operation with jnp.array.
Here is what I've tried,
# Working fine
bit_idx = np.random.randint(0, 31, size=(2, ))
mask = ~jnp.zeros((2, ))
mask = (mask << bit_idx).astype(jnp.uint32)
# if bit_idx = [8, 8]
# [11111111_11111111_11111111_11111111, 11111111_11111111_11111111_11111111] ->
# [11111111_11111111_11111111_00000000, 11111111_11111111_11111111_00000000]

# Working fine
bit_idx = np.random.randint(0, 31, size=(2, ))
mask = ~jnp.zeros((2, ))
mask = jnp.left_shift(mask, bit_idx).astype(jnp.uint32)
# if bit_idx = [8, 8]
# [11111111_11111111_11111111_11111111, 11111111_11111111_11111111_11111111] ->
# [11111111_11111111_11111111_00000000, 11111111_11111111_11111111_00000000]

# Not working
bit_idx = np.random.randint(0, 31, size=(2, ))
mask = ~jnp.zeros((2, ))
mask = (mask >> bit_idx).astype(jnp.uint32)
# if bit_idx = [8, 8]
# [11111111_11111111_11111111_11111111, 11111111_11111111_11111111_11111111] ->
# [11111111_11111111_11111111_11111111, 11111111_11111111_11111111_11111111]

# Not working
bit_idx = np.random.randint(0, 31, size=(2, ))
mask = ~jnp.zeros((2, ))
mask = jnp.right_shift(mask, bit_idx).astype(jnp.uint32)
# if bit_idx = [8, 8]
# [11111111_11111111_11111111_11111111, 11111111_11111111_11111111_11111111] ->
# [11111111_11111111_11111111_11111111, 11111111_11111111_11111111_11111111]

And here is the code for printing bit string.
def show_bits(number):
    bit_string = bin(number).replace('0b', '')
    return bit_string.zfill(32)
vshow_bits = np.vectorize(show_bits)

Is this a bug or did I miss something to use right_shift operator, or does my show_bits function matter?
Regards,
What jax/jaxlib version are you using?
jax==0.4.8 jaxlib==0.4.7+cuda11.cudnn86
Which accelerator(s) are you using?
GPU
Additional system info
Python 3.10.6 / Ubuntu 22.04 with Docker
NVIDIA GPU info
All RTX 3090
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06   Driver Version: 525.125.06   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:19:00.0 Off |                  N/A |
|  0%   30C    P8    19W / 350W |   7870MiB / 24576MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  NVIDIA GeForce ...  Off  | 00000000:1A:00.0 Off |                  N/A |
|  0%   30C    P8    22W / 350W |    812MiB / 24576MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   2  NVIDIA GeForce ...  Off  | 00000000:67:00.0 Off |                  N/A |
|  0%   31C    P8    25W / 350W |      8MiB / 24576MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   3  NVIDIA GeForce ...  Off  | 00000000:68:00.0  On |                  N/A |
|  0%   31C    P8    19W / 350W |  23442MiB / 24576MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

Actually, I'm not so sure any more.
NumPy's behavior seems to differ between scalars and arrays:
In [1]: import jax.numpy as jnp, numpy as np

In [2]: np.arange(5, dtype=np.uint16) >> np.arange(5, dtype=np.int32)
Out[2]: array([0, 0, 0, 0, 0], dtype=int32)

In [3]: np.arange(5, dtype=np.uint16) >> np.arange(1, dtype=np.int32)
Out[3]: array([0, 1, 2, 3, 4], dtype=int32)

In [4]: np.arange(5, dtype=np.uint16) >> np.array(1, dtype=np.int32)
Out[4]: array([0, 0, 1, 1, 2], dtype=uint16)

JAX doesn't distinguish between scalars and arrays (this is an intentional difference from NumPy).
@jakevdp What do you think?

This is a corner case that is poorly affected by the design of JAX's X64 flag. The type promotion result for int32, uint32 in both JAX and NumPy is int64, and you can see with int64 enabled that JAX produces the expected output:
import jax
import jax.numpy as jnp
jax.config.update('jax_enable_x64', True)
x = jnp.array(0xFFFFFFFF, jnp.uint32)
y = jnp.array(1, jnp.int32)
out = x >> y
print(out, out.dtype)
#<PHONE_NUMBER> int64

Unfortunately, with X64 disabled, this gets squashed to int32 that causes problematic type casting leading to an unexpected result.
I'm not sure what to suggest, beyond perhaps using explicit casting of inputs to avoid these problematic corner cases. Beyond that, we should probably fix this by changing how the X64 flag operates, but that's a piece of technical debt that's so tightly entwined with the core uses of JAX that it's proven incredibly difficult to change.

Note this isn't just a problem about type squashing. It's certainly relevant to scalar handling, also. e.g., even JAX_ENABLE_X64.
In [1]: import jax.numpy as jnp, numpy as np

In [2]: np.arange(5, dtype=np.uint64) >> np.array(1, np.int64)
Out[2]: array([0, 0, 1, 1, 2], dtype=uint64)

In [3]: jnp.arange(5, dtype=np.uint64) >> jnp.array(1, np.int64)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[3], line 1
----> 1 jnp.arange(5, dtype=np.uint64) >> jnp.array(1, np.int64)

File ~/p/jax/jax/_src/numpy/array_methods.py:256, in _defer_to_unrecognized_arg.<locals>.deferring_binary_op(self, other)
    254 args = (other, self) if swap else (self, other)
    255 if isinstance(other, _accepted_binop_types):
--> 256   return binary_op(*args)
    257 if isinstance(other, _rejected_binop_types):
    258   raise TypeError(f"unsupported operand type(s) for {opchar}: "
    259                   f"{type(args[0]).__name__!r} and {type(args[1]).__name__!r}")

    [... skipping hidden 12 frame]

File ~/p/jax/jax/_src/numpy/ufuncs.py:207, in right_shift(x1, x2)
    204 x1, x2 = promote_args_numeric(np.right_shift.__name__, x1, x2)
    205 lax_fn = lax.shift_right_logical if \
    206   np.issubdtype(x1.dtype, np.unsignedinteger) else lax.shift_right_arithmetic
--> 207 return lax_fn(x1, x2)

    [... skipping hidden 7 frame]

File ~/p/jax/jax/_src/lax/lax.py:1557, in naryop_dtype_rule(***failed resolving arguments***)
   1555       typename = dtype_to_string(aval.dtype)
   1556       typenames = ', '.join(t.__name__ for t in types)
-> 1557       raise TypeError(msg.format(name, typename, i, i, typenames))
   1558 check_same_dtypes(name, *avals)
   1559 return result_dtype(*avals)

TypeError: shift_right_arithmetic does not accept dtype float64 at position 0. Accepted dtypes at position 0 are subtypes of integer.

NumPy handles a scalar RHS differently here.

Numpy scalars are akin to JAX weak types, and JAX and NumPy act similarly in these cases:
>>> jnp.arange(5, dtype=np.uint64) >> 1
Array([0, 0, 1, 1, 2], dtype=uint64)

If you have a strongly-typed (non-scalar) value in NumPy, you see the same error as in JAX:
>>> np.arange(5, dtype=np.uint64) >> np.ones(5, np.int64)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-6-e3fb0f2d7b50>](https://localhost:8080/#) in <cell line: 1>()
----> 1 np.arange(5, dtype=np.uint64) >> np.ones(5, np.int64)

TypeError: ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''


Remove HubSpot form capture

Story
No response
Description
We seem to be capturing people who reset their FF Cloud password in HubSpot. We don't need to be doing this. I believe this is because we have some HubSpot javascript on our site that automatically captures any form completion. We have converted all the relevanant forms to HubSpot forms so this javascript is no longer needed.

Looks like we should be able to add a tag with id="CollectedForms-1234" to block capturing any forms on a given page
https://community.hubspot.com/t5/Lead-Capture-Tools/Ignore-a-specific-non-Hubspot-form-from-being-collected/m-p/246957

This is likely to be an issue within the FlowForge core repo, rather than the Website I believe.


Warnings with react v0.15.2

I'm seeing the following warnings when upgrading to React v0.15.2
-Warning: Unknown prop `mapHolderRef` on <span> tag.
-Remove this prop from the element.
-For details, see https://fb.me/react-unknown-prop

Stack trace
-    in span (created by ReactTransitionGroup)
-    in ReactTransitionGroup (created by ReactCSSTransitionGroup)
-    in ReactCSSTransitionGroup (created by ProfilesMap)
-    in div (created by GoogleMapHolder)
-    in GoogleMapHolder (created by GoogleMap)
-    in GoogleMap (created by Map)
-    in Map (created by ProfilesMap)

I have the same problem
Warning: Unknown props lat, lng, $hover, $getDimensions, $dimensionKey, $geoService, $onMouseAllow, $prerender on <div> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop     in div (created by GMap)     in div (created by GoogleMapMarkers)     in div (created by GoogleMapMarkers)     in GoogleMapMarkers (created by Unknown)     in div (created by Unknown)     in Unknown (created by GoogleMap)     in div (created by GoogleMap)     in GoogleMap (created by GMap)     in GMap (created by ContactInfo)     in div (created by ContactInfo)     in section (created by ContactInfo)     in ContactInfo (created by Contact)     in div (created by Contact)     in div (created by Contact)     in div (created by Contact)     in Contact (created by Connect(Contact))     in Connect(Contact) (created by Root)     in div (created by StyleRoot)     in StyleRoot (created by Root)     in Root (created by Connect(Root))     in Connect(Root)     in Provider

This should be fixed in 6.0.0. Please consider upgrading.
Also,  6.0.0 is released on npm beta tag now. See the changelog here. We also have a new demo page. Feel free to try it:
https://tomchentw.github.io/react-google-maps/

This is still isssue in present?
Is it updated in main branch of npm install?

I'm still getting this issue in 6.0.1


Add content for November 2022 second publish

Learn Build status updates of commit 8edef37:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sysinternals/downloads/index.md
:white_check_mark:Succeeded
View

sysinternals/downloads/process-explorer.md
:white_check_mark:Succeeded
View

sysinternals/downloads/sysinternals-suite.md
:white_check_mark:Succeeded
View

sysinternals/downloads/sysmon.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel


listDatasetFileDetails unexpected failures

After this commit https://github.com/dmwm/WMCore/commit/2afc01ae571390f5fa009dd258be757adac89c28 we got a KeyError (see https://hypernews.cern.ch/HyperNews/CMS/get/computing-tools/489.html) here:
Traceback (most recent call last):
  File "/afs/cern.ch/user/m/mmascher/repos/CRABServer/src/python/TaskWorker/Actions/DBSDataDiscovery.py", line 78, in execute
    filedetails = dbs.listDatasetFileDetails(kwargs['task']['tm_input_dataset'], True)
  File "/afs/cern.ch/user/m/mmascher/repos/WMCore/src/python/WMCore/Services/DBS/DBS3Reader.py", line 258, in listDatasetFileDetails
    files[p['logical_file_name']]['Parents'].extend(p['parent_logical_file_name'])
KeyError: '/store/mc/Fall13dr/QCD_Pt-470to600_Tune4C_13TeV_pythia8/GEN-SIM-RAW/castor_tsg_PU40bx50_POSTLS162_V2-v1/00001/9E4CDF6D-539E-E311-BEB5-0025905A60DE.root'
Traceback (most recent call last):
  File "/afs/cern.ch/user/m/mmascher/repos/CRABServer/src/python/TaskWorker/Actions/DBSDataDiscovery.py", line 111, in <module>
    fileset.execute(task={'tm_input_dataset':dataset, 'tm_taskname':'pippo1', 'tm_dbs_url': config.Services.DBSUrl})
  File "/afs/cern.ch/user/m/mmascher/repos/CRABServer/src/python/TaskWorker/Actions/DBSDataDiscovery.py", line 83, in execute
    " and contact the experts if the error persists.\nError reason: %s" % str(ex)) #TODO addo the nodes phedex so the user can check themselves

The dataset was /store/mc/Fall13dr/QCD_Pt-470to600_Tune4C_13TeV_pythia8/GEN-SIM-RAW/castor_tsg_PU40bx50_POSTLS162_V2-v1/00001/9E4CDF6D-539E-E311-BEB5-0025905A60DE.root and the user used the useParent flag

I will fix this

Sorry Marco for the inconvenience. Was that the case following two calls returns different set of lfns?
files = self.dbs.listFileParents(block_name = fileBlockName)
fileDetails = self.listFilesInBlock(fileBlockName, lumis)

No, these two calls returned a different set of files: fileDetails = self.dbs.listFiles(dataset = datasetPath, validFileOnly = 1, detail=True) and self.dbs.listFileParents(block_name = fileBlockName)
With validFileOnly = 1 everything is fine.

Ah, I see. Thanks,


test e2e case for Federated CRD resources failed in helm chart case because RBAC

It only happens when federation is enabled by helm chart.
For deploy-federation.sh, it is fine.
In helm chart case, ClusterRole for controller has no access right to "example.com". However, federated CRD case need it.
I'm working on it.

It is actually an code error in PR #525.  federation-admin is not created in the scripts. Fixed.


Solved hackerrank problem (Apple and Orange)

Please add hacktoberfest label

Hey @sonijogesh  Thank you for your PR , but please follow the guidelines mentioned in CONTRIBUTING.MD to get the PRs accepted .
Changes need to be done are -

[ ] Add readme.md in your folder with the question details, constraints and sample Input / Output

Keep doing the good work 👍


Error in gridding_cuda_forward: an illegal memory access was encountered

When I use the model on my own dataset and data_loader, errors occur when training for some epoches, I tried with different pytorch and cuda version, but it still exists:
[DEBUG] 2024-05-22 00:44:33,174 Parameters in GRNet: 76713770.
/home/ubuntu/SRT/code/GRNet/models/furthestPointSampling/fps.py:23: UserWarning: The torch.cuda.*DtypeTensor constructors are no longer recommended. It's best to use methods such as torch.tensor(data, dtype=*, device='cuda') to create tensors. (Triggered internally at /opt/conda/conda-bld/pytorch_1712608851799/work/torch/csrc/tensor/python_tensor.cpp:78.)
  output = torch.cuda.IntTensor(B, npoint)
[INFO] 2024-05-22 00:44:35,531 [Epoch 1/150][Batch 1/111] BatchTime = 2.195 (s) DataTime = 1.787 (s) Losses = ['676.9331', '675.5205']
[INFO] 2024-05-22 00:44:36,685 [Epoch 1/150][Batch 2/111] BatchTime = 1.155 (s) DataTime = 1.047 (s) Losses = ['680.1070', '677.2239']
[INFO] 2024-05-22 00:44:38,940 [Epoch 1/150][Batch 3/111] BatchTime = 2.254 (s) DataTime = 2.094 (s) Losses = ['668.1997', '663.4119']
[INFO] 2024-05-22 00:44:40,143 [Epoch 1/150][Batch 4/111] BatchTime = 1.203 (s) DataTime = 1.101 (s) Losses = ['646.1142', '644.6344']
[INFO] 2024-05-22 00:44:41,230 [Epoch 1/150][Batch 5/111] BatchTime = 1.087 (s) DataTime = 0.977 (s) Losses = ['673.4921', '671.2493']
Error in gridding_cuda_forward: an illegal memory access was encountered
Traceback (most recent call last):
  File "runner.py", line 82, in <module>
    main()
  File "runner.py", line 64, in main
    train_net(cfg)
  File "/home/ubuntu/SRT/code/GRNet/core/train.py", line 155, in train_net
    sparse_ptcloud, dense_ptcloud = grnet(data)
  File "/home/ubuntu/anaconda3/envs/grnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/ubuntu/anaconda3/envs/grnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/ubuntu/SRT/code/GRNet/models/grnet.py", line 129, in forward
    pt_features_64_c1 = self.gridding(c1).view(-1, 1, 64, 64, 64)
  File "/home/ubuntu/anaconda3/envs/grnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/ubuntu/anaconda3/envs/grnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/ubuntu/SRT/code/GRNet/extensions/gridding/__init__.py", line 48, in forward
    return torch.cat(grids, dim=0).contiguous()
RuntimeError: CUDA error: an illegal memory access was encountered
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Is the extension 'griding' has some cuda memory problem? like @https://github.com/hzxie/GRNet/issues/19#issuecomment-1435471500 #Its output tensors refuse to be readed, even if get printed, or refered to a specific GPU device.

@hzxie any suggestion will be helpful

Refer to #19


Record is not saved to the DB, model reports false on #new_record?

I have a Message and MessageThread classes. After creating a new Message (in the after_create callback), a new MessageThread must be created, unless it already exists for the participants of the discussion.
Problem is, when I use browser to create a new Message, MessageThread record is not created in the db, although the model reports false on #new_record? The fascinating thing is that everything works as expected (MessageThread record gets created in the db) with the same development environment in the console.
Here's a full code for both models:
class Message

  include Mongoid::Document
  include Mongoid::Timestamps

  field      :text
  field      :is_read,           :type => Boolean, :default => false
  field      :notification_sent, :type => Boolean, :default => false
  belongs_to :author, :class_name => "Account", :inverse_of => :sent_messages
  belongs_to :recipient, :class_name => "Account", :inverse_of => :received_messages

  index [:author_id, :recipient_id]

  validates_presence_of :text, :author, :recipient

  after_create do
    mt = MessageThread.all_in(:accounts => [author_id, recipient_id]).first
    if mt.nil?
      mt = MessageThread.new(:accounts => [author_id, recipient_id])
    end
    if recipient.notifications.unread_messages == false
      recipient.notifications = recipient.notifications.merge({ :unread_messages => true })
      recipient.save
    end
    mt.set_recent_message(id, recipient)
    mt.save
  end

end

class MessageThread

  include Mongoid::Document
  include Mongoid::Timestamps

  field                 :accounts, :type => Array; index :accounts
  field                 :recent_messages, :type => Hash, :default => {}
  validates_presence_of :accounts
  validate                         :validate_uniqueness_of_accounts, :on => :create

  def recent_message_id(me)
    m = recent_messages[me.id.to_s]
    # if there's no recent message for me from the other person,
    # than return my most recent message to the other person.
    m.blank? ? recent_messages[recipient_id(me).to_s] : m
  end

  def set_recent_message(message_id, recipient)
    rm = { recipient.id.to_s => message_id }
    write_attribute(:recent_messages, recent_messages.merge(rm))
  end

  def recipient_id(me)
    @recipient ||= accounts[0] == me.id ? accounts[1] : accounts[0]
  end

  after_create do
    puts "********************************************************************"
    puts self.new_record?   # -> false
    p MessageThread.last  # -> `nil` if the message was created using a web-interface,
                   # but returns an actual record when a message is created in console.
                   # This, of course, assumes there was 0 MessageThreads before.
    puts "********************************************************************"
  end

  private

    # Manually checking unqueness here, because standart method
    # checks not just the contents of the array, but also its order.
    def validate_uniqueness_of_accounts
      errors.add(:accounts, "MessageThread already exists for these accounts") if MessageThread.all_in(:accounts => [accounts[0], accounts[1]]).first
    end

end

Since the behavior is only present when I use browser, I'm not sure this has to be a mongoid issue, but I was just hoping someone would help to shed light on this. Thanks.

Also, it's most certainly a recent development, maybe 3 month old (not sure as I've just spotted it). Initially it worked just fine.

Hey mate. Since the problem only occurs through the web UI, my first instinct is to blame the params that're passed to the controller action. Look into those.
Also, you're saving documents, but not checking the outcome of those saves. I recommend adding some logic to determine if saving was successful.

Nick, that was my first instinct too. However, the after_create callback in MessageThread gets executed both when I'm in console and in a browser and it always returns false upon calling the #new_record?
I also set this persist_in_safe_mode to true to ensure nothing happens while the record is being saved.
Also, given that everything worked at some point before that and that the controller code, or the form in views, have not changed, I don't think that's the problem. Thanks for the reply, I'll keep looking.

Can you post the exact controller code that is getting called, along with the parameters please?

Can you post the exact controller code that is getting called, along with the parameters please?

Sure, here it is:
def create
  @message = Message.create(params[:message].merge({:author => current_account}))
  if @message.errors.empty?
    render :json => { :html => render_to_string("_my_message") }
  else
    render :json => { :error => @message.errors }
  end
end

Sure, here it is:
def create
  @message = Message.create(params[:message].merge({:author => current_account}))
  if @message.errors.empty?
    render :json => { :html => render_to_string("_my_message") }
  else
    render :json => { :error => @message.errors }
  end
end

oh, and the params:
Started POST "/messages" for <IP_ADDRESS> at 2012-01-01 23:17:46 +0400
  Processing by MessagesController#create as JSON
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"gETMnGzF9ATmGpO/VzW5STQFscG7aeIx0+s0S93gpds=", "message"=>{"recipient_id"=>"4ee875e7d4d8db2fb9000052", "text"=>"Hi dude"}}

oh, and the params:
Started POST "/messages" for <IP_ADDRESS> at 2012-01-01 23:17:46 +0400
  Processing by MessagesController#create as JSON
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"gETMnGzF9ATmGpO/VzW5STQFscG7aeIx0+s0S93gpds=", "message"=>{"recipient_id"=>"4ee875e7d4d8db2fb9000052", "text"=>"Hi dude"}}

Just to be safe: Are there any errors in @message.errors?

@snitko Can you show the MongoDB log right before the message gets "persisted" now? I'd like to see if it's actually putting it in the db or not in this case.

i0rek: checked - no errors in @messages after it gets created.
durran: give you 2 logs, the first one is from the case, when I use my browser
Started POST "/messages" for <IP_ADDRESS> at 2012-01-10 19:56:51 +0400
  Processing by MessagesController#create as JSON
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"Qp14Hl3/5BI2liXa6/d4iL6SkxNGbSXSUTnzonR5GjQ=", "message"=>{"recipient_id"=>"4ee6c340d4d8db62a4000013", "text"=>"hello world"}}
MONGODB ac_development['system.namespaces'].find({})
MONGODB ac_development['accounts'].find({:_id=>BSON::ObjectId('4ee40de0d4d8db62fe000001')}).limit(-1).sort([[:_id, :asc]])
MONGODB ac_development['accounts'].find({:_id=>BSON::ObjectId('4ee40de0d4d8db62fe000001')}).limit(-1).sort([[:_id, :asc]])
MONGODB ac_development['accounts'].find({:_id=>BSON::ObjectId('4ee6c340d4d8db62a4000013')}).limit(-1).sort([[:_id, :asc]])
MONGODB ac_development['system.namespaces'].find({})
MONGODB ac_development['message_threads'].find({:accounts=>{"$all"=>[BSON::ObjectId('4ee40de0d4d8db62fe000001'), BSON::ObjectId('4ee6c340d4d8db62a4000013')]}}).limit(-1).sort([[:_id, :asc]])
MONGODB ac_development['message_threads'].find({:accounts=>{"$all"=>[BSON::ObjectId('4ee40de0d4d8db62fe000001'), BSON::ObjectId('4ee6c340d4d8db62a4000013')]}}).limit(-1).sort([[:_id, :asc]])
MONGODB ac_development['system.namespaces'].find({})
MONGODB ac_development['messages'].insert([{"recipient_id"=>BSON::ObjectId('4ee6c340d4d8db62a4000013'), "text"=>"hello world", "_id"=>BSON::ObjectId('4f0c5fc3d4d8db3508000003'), "is_read"=>false, "notification_sent"=>false, "author_id"=>BSON::ObjectId('4ee40de0d4d8db62fe000001'), "updated_at"=>2012-01-10 15:56:51 UTC, "created_at"=>2012-01-10 15:56:51 UTC}, {"accounts"=>[BSON::ObjectId('4ee40de0d4d8db62fe000001'), BSON::ObjectId('4ee6c340d4d8db62a4000013')], "_id"=>BSON::ObjectId('4f0c5fc3d4d8db3508000004'), "recent_messages"=>{"4ee6c340d4d8db62a4000013"=>BSON::ObjectId('4f0c5fc3d4d8db3508000003')}, "updated_at"=>2012-01-10 15:56:51 UTC, "created_at"=>2012-01-10 15:56:51 UTC}])
MONGODB ac_development['system.namespaces'].find({})
MONGODB ac_development['people'].find({"account_id"=>BSON::ObjectId('4ee40de0d4d8db62fe000001')}).limit(-1).sort([[:_id, :asc]])
MONGODB ac_development['system.namespaces'].find({})
MONGODB ac_development['photos'].find({"person_id"=>BSON::ObjectId('4ee40de0d4d8db62fe000002')}).limit(-1).sort([[:_id, :asc]])
Rendered messages/_my_message.haml (123.4ms)
Completed 200 OK in 310ms (Views: 4.8ms)

Second one is when I use rails console:
MONGODB admin['$cmd'].find({:ismaster=>1}).limit(-1)
MONGODB ac_development['system.namespaces'].find({})
MONGODB ac_development['messages'].insert([{"text"=>"hello world", "_id"=>BSON::ObjectId('4f0c603fd4d8db3a1b000001'), "is_read"=>false, "notification_sent"=>false, "author_id"=>BSON::ObjectId('4ee40de0d4d8db62fe000001'), "recipient_id"=>BSON::ObjectId('4ee6c340d4d8db62a4000013'), "updated_at"=>2012-01-10 15:58:55 UTC, "created_at"=>2012-01-10 15:58:55 UTC}])
MONGODB ac_development['system.namespaces'].find({})
MONGODB ac_development['message_threads'].find({:accounts=>{"$all"=>[BSON::ObjectId('4ee40de0d4d8db62fe000001'), BSON::ObjectId('4ee6c340d4d8db62a4000013')]}}).limit(-1).sort([[:_id, :asc]])
MONGODB ac_development['message_threads'].find({:accounts=>{"$all"=>[BSON::ObjectId('4ee40de0d4d8db62fe000001'), BSON::ObjectId('4ee6c340d4d8db62a4000013')]}}).limit(-1).sort([[:_id, :asc]])
MONGODB ac_development['message_threads'].insert([{"accounts"=>[BSON::ObjectId('4ee40de0d4d8db62fe000001'), BSON::ObjectId('4ee6c340d4d8db62a4000013')], "_id"=>BSON::ObjectId('4f0c603fd4d8db3a1b000002'), "recent_messages"=>{"4ee6c340d4d8db62a4000013"=>BSON::ObjectId('4f0c603fd4d8db3a1b000001')}, "updated_at"=>2012-01-10 15:58:55 UTC, "created_at"=>2012-01-10 15:58:55 UTC}])

Again, only in the second case MessageThread gets created.
For now, the fix I was able to apply is to move MessageThread creating to controller. Ugly, but for some reason it works.

@snitko Can you potentially give me read only access to this application's repo?

Yes, I can do this. But I don't want you to be investigating issues that are my headache, meaning that if you think this is a Mongoid bug (which I'm not sure myself) - then go ahead. But I'd be feeling pretty damn stupid if this turns out to be something not mongoid related and you wasted your time :) That said, let me know if you really need the access and I'll do it tomorrow.

At this point I am not sure, so I don't think it's a waste of my time... If it turns out to be a Mongoid bug it's something that I would consider major and I need to get it fixed immediately, even if it is an edge case.

@snitko Any word on access to the repo?

Here's me locally against the latest 2.4.0-stable Mongoid... Works fine from the UI:
Started POST "/messages" for <IP_ADDRESS> at 2012-01-15 12:38:23 +0100
  Processing by MessagesController#create as JSON
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"qA6DJnIrCerwV1Bcm0lhx9jDI9BmLhD+qD4sVBTEB9c=", "message"=>{"recipient_id"=>"4f12b2458ad548736b00001b", "text"=>"test"}}
Rendered shared/_button.haml (0.3ms)
Rendered search/_search_menu_item.html.haml (4.4ms)
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['accounts'].find({:_id=>BSON::ObjectId('4f12b1588ad548736b000003')}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['accounts'].find({:_id=>BSON::ObjectId('4f12b2458ad548736b00001b')}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['messages'].insert([{"is_read"=>false, "notification_sent"=>false, "_id"=>BSON::ObjectId('4f12bab08ad54877f8000007'), "recipient_id"=>BSON::ObjectId('4f12b2458ad548736b00001b'), "text"=>"test", "author_id"=>BSON::ObjectId('4f12b1588ad548736b000003'), "updated_at"=>2012-01-15 11:38:24 UTC, "created_at"=>2012-01-15 11:38:24 UTC}])
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['message_threads'].find({:accounts=>{"$all"=>[BSON::ObjectId('4f12b1588ad548736b000003'), BSON::ObjectId('4f12b2458ad548736b00001b')]}}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['message_threads'].find({:accounts=>{"$all"=>[BSON::ObjectId('4f12b1588ad548736b000003'), BSON::ObjectId('4f12b2458ad548736b00001b')]}}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['message_threads'].insert([{"recent_messages"=>{"4f12b2458ad548736b00001b"=>BSON::ObjectId('4f12bab08ad54877f8000007')}, "_id"=>BSON::ObjectId('4f12bab08ad54877f8000008'), "accounts"=>[BSON::ObjectId('4f12b1588ad548736b000003'), BSON::ObjectId('4f12b2458ad548736b00001b')], "updated_at"=>2012-01-15 11:38:24 UTC, "created_at"=>2012-01-15 11:38:24 UTC}])
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['people'].find({"account_id"=>BSON::ObjectId('4f12b1588ad548736b000003')}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['photos'].find({"person_id"=>BSON::ObjectId('4f12b1588ad548736b000004')}).limit(-1).sort([[:_id, :asc]])
Rendered messages/_my_message.haml (49.9ms)
Completed 200 OK in 198ms (Views: 5.7ms)

In Mongoid 2.4.0 it does not work for me:
Started POST "/messages" for <IP_ADDRESS> at 2012-01-15 12:41:24 +0100
  Processing by MessagesController#create as JSON
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"qA6DJnIrCerwV1Bcm0lhx9jDI9BmLhD+qD4sVBTEB9c=", "message"=>{"recipient_id"=>"4f12b2458ad548736b00001b", "text"=>"hiya"}}
Rendered shared/_button.haml (0.3ms)
Rendered search/_search_menu_item.html.haml (3.7ms)
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['accounts'].find({:_id=>BSON::ObjectId('4f12b1588ad548736b000003')}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['accounts'].find({:_id=>BSON::ObjectId('4f12b1588ad548736b000003')}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['accounts'].find({:_id=>BSON::ObjectId('4f12b2458ad548736b00001b')}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['message_threads'].find({:accounts=>{"$all"=>[BSON::ObjectId('4f12b1588ad548736b000003'), BSON::ObjectId('4f12b2458ad548736b00001b')]}}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['message_threads'].find({:accounts=>{"$all"=>[BSON::ObjectId('4f12b1588ad548736b000003'), BSON::ObjectId('4f12b2458ad548736b00001b')]}}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['messages'].insert([{"recipient_id"=>BSON::ObjectId('4f12b2458ad548736b00001b'), "text"=>"hiya", "_id"=>BSON::ObjectId('4f12bb648ad54878c7000001'), "is_read"=>false, "notification_sent"=>false, "author_id"=>BSON::ObjectId('4f12b1588ad548736b000003'), "updated_at"=>2012-01-15 11:41:24 UTC, "created_at"=>2012-01-15 11:41:24 UTC}, {"accounts"=>[BSON::ObjectId('4f12b1588ad548736b000003'), BSON::ObjectId('4f12b2458ad548736b00001b')], "_id"=>BSON::ObjectId('4f12bb648ad54878c7000002'), "recent_messages"=>{"4f12b2458ad548736b00001b"=>BSON::ObjectId('4f12bb648ad54878c7000001')}, "updated_at"=>2012-01-15 11:41:24 UTC, "created_at"=>2012-01-15 11:41:24 UTC}])
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['people'].find({"account_id"=>BSON::ObjectId('4f12b1588ad548736b000003')}).limit(-1).sort([[:_id, :asc]])
MONGODB awesomecrowd_development['system.namespaces'].find({})
MONGODB awesomecrowd_development['photos'].find({"person_id"=>BSON::ObjectId('4f12b1588ad548736b000004')}).limit(-1).sort([[:_id, :asc]])
Rendered messages/_my_message.haml (106.7ms)
Completed 200 OK in 253ms (Views: 5.4ms)

Ok, wait, could you clear this up? You've just posted two examples, one working and one not, saying you got both of them with mongoid 2.4.0

So I really don't have any idea at the moment why it doesn't work on 2.4.0, but on the latest version of 2.4.0-stable, which will be 2.4.1 released tomorrow, it works for me just fine. I thought at first it may be another gem that's interfering with the persistence but I cannot confirm this...

@snitko Yeah the working version is the latest Mongoid on the 2.4.0-stable branch which will get released tomorrow as 2.4.1... The non-working example is the current release of 2.4.0, which is just at the v2.4.0 tag.

@snitko You can point at the 2.4.0-stable branch of Mongoid from your Gemfile and this is resolved.

Understood. Thanks for taking the time to look at it. It's great that it works.

No worries...
gem "mongoid", git: "git://github.com/mongoid/mongoid.git", branch: "2.4.0-stable"


All metadata categories that are not inferred cell types show only one value ("Not defined") in the plots

For every metadata field that I’m choosing that is not inferred cell type, I get only “Not defined” values. See for instance https://wwwdev.ebi.ac.uk/gxa/sc/experiments/E-MTAB-9067/results?colourBy=age or any other metadata field there and compare to https://www.ebi.ac.uk/gxa/sc/experiments/E-MTAB-9067/results?colourBy=metadata&metadata=age
In public/fallback:

Whereas in dev:

I see this behaviour across all the experiments I have tried so far. It doesn't seem to happen though with "Inferred cell type fields".

The data does make it to the tooltip though, so I suspect this is just an issue with the plotting. I had also checked before, and the data is there in solr.

After conversation with @upendrakumbham it seems to be that the current codebase is expecting to retrieve the metadata from the database, but like the tooltip, this needs to come from the the scxa-analytics Solr index where cells metadata is stored (and that should include the inferred celltypes). Currently inferred cell types coloring works because we have groups of cells in the database for inferred cell types (this is needed for generating marker genes for the anatomograms and heatmap by cell types), but this shouldn't be the source for metadata for that category either. Probably the part of the code that was doing that got washed out when bringing in the UMAP changes.

after discussion with @pcm32, I verified the code again to see any contacts with the Solr while dealing with cluster and expression end points.
This is my view after the code walkthrough:
When I compare with previous release endpoints, these endpoints got changed as per UMAP feature:

/json/experiments/{experimentAccession}/tsneplot/{parameter}/clusters/variable/{variable}

Corresponding SQL query:

/json/experiments/{experimentAccession}/tsneplot/{plotOption}/expression

These two endpoints are contacting database to get data like x,y,cell_id,cluster_id,expression_level. During this process, I didn't see any contact to Solr to fetch metadata. This behavior is the same for the previous release also (202104).
Once we received a set of cell_ids. For the Tooltip, we are calling another metadata endpoint:

json/experiment/{experimentAccession}/cell/{cellId}/metadata

This endpoint contacting Solr and getting metadata for each cell_id. we repeat this endpoint calling for each cell-id to see corresponding metadata.

Looking good now:

Tried on other datasets and also looking as expected. Thanks!


some elements is not customizable

e.g. step number text color, text of copy button, accent text color, all are always white

You can inject your own stylesheet to customize styles however you want.
new EmbedBox({
  embedCode: "<script src='http://embedbox.io/examples/library.js'></script>",
  name: "Example Stylesheet App",
  style: "" +
  ".header .title {" +
  "  color: hotpink;" +
  "  text-shadow: 0 0 4px pink;" +
  "}"
})