distribute data_files directory with package regardless of installation method (setup.py/requirements.txt/wheel) [$250]

The discoursegraphs package needs to distribute a directory (including subdirectories) called data that contains non-Python files . The package structure looks like this:
├── data
│   └── ...
├── MANIFEST.in
├── requirements.txt
├── setup.py
├── src
│   └── discoursegraphs
│       ├── ...

I managed to get this working for installations via setup.py and requirements.txt, but not
for sdist/wheel packages that I can upload to PyPI. (sdist seems to work, but never versions
of pip call bdist_wheel after downloading an sdist package.)
I need a clean solution for this seemingly simple problem. People should be able to
install this package via PyPI (with a current version of pip) as well as via setup.py
and requirements.txt (after getting the sources from github.)
Installation using setup.py
python setup.py install
python
>>> import discoursegraphs
>>> discoursegraphs.DATA_ROOT_DIR
'/home/arne/.virtualenvs/test/lib/python2.7/site-packages/discoursegraphs-0.3.0-py2.7.egg/data'
>>> len(discoursegraphs.corpora.pcc)
176

Installation using requirements.txt
pip install -r requirements.txt
python
>>> import discoursegraphs
>>> discoursegraphs.DATA_ROOT_DIR
'/home/arne/repos/discoursegraphs/data'
>>> len(discoursegraphs.corpora.pcc)
176

Installation using wheel
People installing the package via PyPI will run into the same problem.
python setup.py sdist bdist_wheel
pip install dist/discoursegraphs-0.3.0-py2-none-any.whl
python
>>> import discoursegraphs
>>> discoursegraphs.DATA_ROOT_DIR # this directory does not exist
'/home/arne/.virtualenvs/test/lib/python2.7/data'
>>> len(discoursegraphs.corpora.pcc) # therefore, we can't find the files ...
0

Hi,
We'll just have to wait and see what wheel mantainers do about this and that, but in the meantime perhaps this fix will help.
I realized that the code inside discoursegraphs/src/__init__.py wasn't handling correctly the different paths generated by different methods of installation (using setup.py, requirements.txt or wheel).
I'm specifically talking about this method which handles correctly the cases where the user installs discoursegraphs using setup.py and requirements.txt, but fails when using wheel (although the files ARE there) because DATA_ROOT_DIR ends up pointing to a wrong location within the package tree.
The data dir, the same one that is pointed to by DATA_ROOT_DIR when installing with requirements.txt, is just a couple more dirs above in the path.
Cheers!

Hello Hernán,
thank you for your pull request! It works for installing the package from a local wheel file,
but not when installing from PyPI.
I uploaded the package to PyPI using these steps:
~/repos/discoursegraphs $ rm dist/*
~/repos/discoursegraphs $ python setup.py sdist bdist_wheel
~/repos/discoursegraphs $ twine upload dist/*

Here are my installation results:
installing from PyPI without sudo
$ python --version
Python 2.7.6

$ pip --version
pip 8.1.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)

$ python -c "import discoursegraphs"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named discoursegraphs

$ pip install discoursegraphs --user
Collecting discoursegraphs
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached discoursegraphs-0.3.1-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): networkx in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): nltk in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): pydotplus in /usr/local/lib/python2.7/dist-packages/pydotplus-2.0.2-py2.7.egg (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): pygraphviz in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): unidecode in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): pydot2 in /usr/local/lib/python2.7/dist-packages/pydot2-1.0.33-py2.7.egg (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): lxml in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): brewer2mpl in /usr/local/lib/python2.7/dist-packages/brewer2mpl-1.4.1-py2.7.egg (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): decorator>=3.4.0 in /usr/local/lib/python2.7/dist-packages (from networkx->discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): pyparsing>=2.0.1 in /usr/local/lib/python2.7/dist-packages (from pydotplus->discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from pydot2->discoursegraphs)
Installing collected packages: discoursegraphs
Successfully installed discoursegraphs

$ python -c "import discoursegraphs as dg; print dg.SRC_ROOT_DIR; print dg.DATA_ROOT_DIR; print len(dg.corpora.pcc)"
/home/arne/.local/lib/python2.7/site-packages/discoursegraphs
/home/data
0

installing from PyPI with sudo
$ python --version
Python 2.7.6

$ pip --version
pip 8.1.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)

$ python -c "import discoursegraphs as dg; print dg.DATA_ROOT_DIR; print len(dg.corpora.pcc)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named discoursegraphs

$ sudo pip install discoursegraphs
The directory '/home/arne/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/arne/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting discoursegraphs
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading discoursegraphs-0.3.1-py2-none-any.whl (2.7MB)
    100% |████████████████████████████████| 2.7MB 258kB/s
Requirement already satisfied (use --upgrade to upgrade): networkx in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): nltk in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): pydotplus in /usr/local/lib/python2.7/dist-packages/pydotplus-2.0.2-py2.7.egg (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): pygraphviz in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): unidecode in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): pydot2 in /usr/local/lib/python2.7/dist-packages/pydot2-1.0.33-py2.7.egg (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): lxml in /usr/local/lib/python2.7/dist-packages (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): brewer2mpl in /usr/local/lib/python2.7/dist-packages/brewer2mpl-1.4.1-py2.7.egg (from discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): decorator>=3.4.0 in /usr/local/lib/python2.7/dist-packages (from networkx->discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): pyparsing>=2.0.1 in /usr/local/lib/python2.7/dist-packages (from pydotplus->discoursegraphs)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from pydot2->discoursegraphs)
Installing collected packages: discoursegraphs
Successfully installed discoursegraphs-0.3.1

$ python -c "import discoursegraphs as dg; print dg.SRC_ROOT_DIR; print dg.DATA_ROOT_DIR; print len(dg.corpora.pcc)"
/usr/local/lib/python2.7/dist-packages/discoursegraphs
/usr/local/lib/python2.7/data
0

installing from PyPI in a virtualenv
$ mkvirtualenv dgtest
New python executable in dgtest/bin/python
Installing setuptools, pip, wheel...done.

(dgtest)$ which python
/home/arne/.virtualenvs/dgtest/bin/python

(dgtest)$ python --version
Python 2.7.6

(dgtest)$ which pip
/home/arne/.virtualenvs/dgtest/bin/pip

(dgtest)$ pip --version
pip 7.1.0 from /home/arne/.virtualenvs/dgtest/local/lib/python2.7/site-packages (python 2.7)

(dgtest)$ python -c "import discoursegraphs"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named discoursegraphs

(dgtest)$ pip install discoursegraphs
/home/arne/.virtualenvs/dgtest/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
You are using pip version 7.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting discoursegraphs
/home/arne/.virtualenvs/dgtest/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached discoursegraphs-0.3.1-py2-none-any.whl
Collecting networkx (from discoursegraphs)
  Using cached networkx-1.11-py2.py3-none-any.whl
Collecting nltk (from discoursegraphs)
Collecting pydotplus (from discoursegraphs)
Collecting pygraphviz (from discoursegraphs)
Collecting unidecode (from discoursegraphs)
Collecting pydot2 (from discoursegraphs)
Collecting lxml (from discoursegraphs)
Collecting brewer2mpl (from discoursegraphs)
  Using cached brewer2mpl-1.4.1-py2.py3-none-any.whl
Collecting decorator>=3.4.0 (from networkx->discoursegraphs)
  Using cached decorator-4.0.9-py2.py3-none-any.whl
Collecting pyparsing>=2.0.1 (from pydotplus->discoursegraphs)
  Using cached pyparsing-2.1.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./.virtualenvs/dgtest/lib/python2.7/site-packages (from pydot2->discoursegraphs)
Installing collected packages: decorator, networkx, nltk, pyparsing, pydotplus, pygraphviz, unidecode, pydot2, lxml, brewer2mpl, discoursegraphs
Successfully installed brewer2mpl-1.4.1 decorator-4.0.9 discoursegraphs-0.3.1 lxml-3.6.0 networkx-1.11 nltk-3.2.1 pydot2-1.0.33 pydotplus-2.0.2 pygraphviz-1.3.1 pyparsing-2.1.1 unidecode-0.4.19

(dgtest)$ python -c "import discoursegraphs as dg; print dg.SRC_ROOT_DIR; print dg.DATA_ROOT_DIR; print len(dg.corpora.pcc)"
/home/arne/.virtualenvs/dgtest/local/lib/python2.7/site-packages/discoursegraphs
/home/arne/.virtualenvs/data
0

Best regards,
Arne

Hi Arne, thank you for your comments.
Would you consider re-opening this issue? Since it seems the fix I provided didn't work :(
I'm going to keep working on that PR.

Hello Hernán,
sorry, I didn't realize that I automatically closed the issue. I just reopened it.
Thank you for working on this!
Best,
Arne

Hi Arne,
Sorry for taking so long to make the changes. I believe it's fixed now, but when you have time please check the latest commits I pushed to the feature branch and see if it works for you.
Thank you,

Hi Arne,
I see you've merged #147
Did it work? Do you think this issue should be closed now, or is more work needed?

Dear Hernan,
I will test the code manually in a virtualenv, upload it to pypi and let you know.
Kind regards,
Arne

Dear Hernan,
thanks a lot for the effort! You seem to have solved the issue. I would have preferred a solution using data_files instead of package_data, but I guess there's not much we can do about it right now.
Best regards,
Arne

I'm glad it worked. I tried to make as little modifications as I could to make the change less drastic, but it seems that they're moving away from data_files as you can see in this comment and this other one.
In any case, I'm happy this solution works for you.
Best regards,
Hernán.


Cleanup vector tile service documentation

This is getting a little unwieldily, and doesn't promo the wiki enough.

Done in a few commits, including https://github.com/mapzen/vector-datasource/commit/3790c0aaffc1000ae4c5edee5adc7737ed3b8adb.


refactor(api, shared-data): use pipette offset in hardware control

Overview
This PR incorporates pipette offset calibration data in hardware motion by updating the pipette's critical point.
closes #6427, closes #6534
Changelog

add new property nozzleOffset to pipetteModelSpecs to represent the true distance from the mount to the pipette nozzle
load nozzle_offset to pipette config
load pipette offset calibration during cache_instruments and pass to Pipette

default offset is [0, 0, 0] if data do not exist

use pipette offset and nozzle offset to determine critical point, instead of using the instrument and model offset
update to tests to reflect the above changes

Review requests
To test this PR, make sure your robot has the changes in #6586 and to remove all old pipette offset data.

Risk assessment
Medium, new features are behind a feature flag but they affect robot motion. Any old deck/pipette offset calibration should be cleared and recalibrated before testing these changes.

I test it on my robot and it looked good there as well, so I'm good to merge once we get that value loaded from config


Error submitting payment for Walmart

Is there a debug window that's more indicative than the terminal window that opens up? log files? python app hangs at submitting payment

Please refer to our documentation. Thanks!


PayPal error: "Cannot read property 'error' of undefined"

PayPal response payload is not what is expected:
{
  "responseEnvelope": {
    "timestamp": "2020-05-07T16:19:39.277-07:00",
    "ack": "Success",
    "correlationId": "43644d05d666",
    "build": "apapiserv-0.0.1_20200423071356971"
  },
  "paymentExecStatus": "ERROR",
  "payErrorList": {
    "payError": [
      {
        "receiver": {
          "amount": "1100.00",
          "email"<EMAIL_ADDRESS>          "primary": "false",
          "paymentType": "SERVICE"
        },
        "error": {
          "errorId": "579045",
          "domain": "PLATFORM",
          "severity": "Error",
          "category": "Application",
          "message": "The amount exceeded the individual transaction limit of user 1100.00",
          "parameter": [
          ]
        }
      }
    ]
  },
  "httpStatusCode": 200
}

https://github.com/opencollective/opencollective-api/blob/master/server/lib/transactions.js#L97
Let's check if it's isolated or if they changed their API.

As of today, no new occurrence of the error in the logs. Searched for `"Cannot read property 'error' of undefined"``` in PaperTrail.

I'm having this issue when trying to pay with paypal. What do I do?

@daegontaven Sorry, missed your message. Using Open Collective? Try again and contact support if that doesn't work.

One occurrence in the last 7 days:


Closes #61 - Update Angular to v18, activate SonarCloud and dependabot for kadai-web

Thanks for your PR! Please fill out the following list :)

[x] I put the ticket or multiple tickets in review
[x] Commit message format → Closes #<Issue Number> - Your commit message.
[x] Sonarcloud link : https://sonarcloud.io/summary/new_code?id=CRoberto1926_kadai&branch=chore%2Fissue-61-angular-18
[x] No documentation update needed
[ ] Link to PR with documentation update: <add the link here>
[x] No Release Notes needed
[ ] Release Notes :

There is a difference in behavior compared to our deployed demo app. To replicate, you need to do following steps:
1. Go to Workplace and then select "Task Search"

2. Search Task "Task99"

3. Go to "Workbaskets" in Workplace

4. Then, you see that no Workbaskets are displayed

Could you look into this?

I am not sure, but I don't think it depends on Angular 18:
https://github.com/user-attachments/assets/eaf67d45-d0fd-48ca-a9f4-fef11f692fa8
As you can see from the video, the problem that you describe happens on our demo app...
Could you try again to reproduce it?


error with nvd3

I'm trying to use with nvd3, and I get an error "TypeError: Cannot read property 'replace' of undefined(…)" on the line var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""), 10);
I can provide code if needed

Well this just looks like font-size isn't set on the element? There are limitations to JavaScript reading styles from elements unless they're set on the inline style. Maybe you need to investigate getComputedStyle?

I haven't actually tested, but it looks like a regular DOM element would have an empty string font-size in this situation.
Are you saying that where react-faux-dom differs in implementation from the actual dom, the onus is on the client to provide a workaround?

Yes, if you took a native DOM node and used .style.fontSize you'd probably get undefined too. The faux DOM is in keeping with this style. If you haven't set the font-size before this line you mentioned, it will be undefined.

Nope, empty string
> document.createElement("div").style.fontSize
< ""

I'm going to need some more context around this to help I'm afraid. I might
be able to help, but I don't know the context yet.
On 20 April 2016 at 17:14, arolson101<EMAIL_ADDRESS>wrote:

Nope, empty string

document.createElement("div").style.fontSize
< ""

—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/Olical/react-faux-dom/issues/45#issuecomment-212495498

Here's an example adapted from https://nvd3-community.github.io/nvd3/examples/lineChart.html
export const CurrencyChart = () => {
  // Wrapping in nv.addGraph allows for '0 timeout render', stores rendered charts in nv.graphs, and may do more in the future... it's NOT required
  var chart;
  var data;
  var randomizeFillOpacity = function() {
      var rand = Math.random(0,1);
      for (var i = 0; i < 100; i++) { // modify sine amplitude
          data[4].values[i].y = Math.sin(i/(5 + rand)) * .4 * rand - .25;
      }
      data[4].fillOpacity = rand;
      chart.update();
  };

  chart = nv.models.lineChart()
      .options({
          transitionDuration: 300,
          useInteractiveGuideline: true
      })
  ;
  // chart sub-models (ie. xAxis, yAxis, etc) when accessed directly, return themselves, not the parent chart, so need to chain separately
  chart.xAxis
      .axisLabel("Time (s)")
      .tickFormat(d3.format(',.1f'))
      .staggerLabels(true)
  ;
  chart.yAxis
      .axisLabel('Voltage (v)')
      .tickFormat(function(d) {
          if (d == null) {
              return 'N/A';
          }
          return d3.format(',.2f')(d);
      })
  ;
  data = sinAndCos();

  const svg = ReactFauxDOM.createElement('svg');
  d3.select(svg)
      .datum(data)
      .call(chart);
  nv.utils.windowResize(chart.update);

  function sinAndCos() {
      var sin = [],
          sin2 = [],
          cos = [],
          rand = [],
          rand2 = []
          ;
      for (var i = 0; i < 100; i++) {
          sin.push({x: i, y: i % 10 == 5 ? null : Math.sin(i/10) }); //the nulls are to show how defined works
          sin2.push({x: i, y: Math.sin(i/5) * 0.4 - 0.25});
          cos.push({x: i, y: .5 * Math.cos(i/10)});
          rand.push({x:i, y: Math.random() / 10});
          rand2.push({x: i, y: Math.cos(i/10) + Math.random() / 10 })
      }
      return [
          {
              area: true,
              values: sin,
              key: "Sine Wave",
              color: "#ff7f0e",
              strokeWidth: 4,
              classed: 'dashed'
          },
          {
              values: cos,
              key: "Cosine Wave",
              color: "#2ca02c"
          },
          {
              values: rand,
              key: "Random Points",
              color: "#2222ff"
          },
          {
              values: rand2,
              key: "Random Cosine",
              color: "#667711",
              strokeWidth: 3.5
          },
          {
              area: true,
              values: sin2,
              key: "Fill opacity",
              color: "#EF9CFB",
              fillOpacity: .1
          }
      ];
  }

  return svg.toReact();
};

I'm really not sure if I can help here I'm afraid. .style just doesn't work like that.
Unless you set font-size on the element directly through D3, it will be undefined. Stylesheets don't allow you to access their values through .style. I hope you solved your issue or found a way around though! :smile:

Hi @Olical,
Great work on react-faux-dom! I'm having the same problem as @arolson101.

Yes, if you took a native DOM node and used .style.fontSize you'd probably get undefined too.

anyNode.style.fontSize should return an empty string if the fontSize is not set. The NVD3 lib expects this. It would be great if react-faux-dom could mimmick this behaviour. https://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ElementCSSInlineStyle
There doens't seem to be a workaround, because you're not able to directly set the fontSize of the label in nvd3 (it expects you to use css).

@nextminds Defaulting to an empty string makes sense to me, if you'd like to open an issue or PR I'll get around to it soon.

Ooh, this is timely! I've just run into the same issue :smile:
Interestingly, for me, I didn't even get as far as seeing this error until after I'd patched D3 to use the version of getComputedStyle() on the window associated with the element, rather than the global window object. I did this by changing this line:
if (n < 2) return d3_window.getComputedStyle(this.node(), null).getPropertyValue(name);

to this:
var win = this.node().ownerDocument.defaultView;
if (n < 2) return win.getComputedStyle(this.node(), null).getPropertyValue(name);

This would seem like the kind of change that one might reasonably expect D3 to accept a pull-request for, except it's not clear to me why D3 is maintaining its own reference to the window object rather than referencing it directly.


Whitespace breaks use of conditional within event handler assignment in template

Description:
This event handler works: on-click="{{#if true}}handler{{/if}}"
This event handler never gets assigned: on-click=" {{#if true}}handler{{/if}}"
When whitespace is present before the {{#if ...}} or after the {{/if}}, the even handler is not bound. Whitespace within the {{#if}}...{{/if}} is ok, and whitespace ok if there is no conditional at all, but using whitespace in the crack between the quote and the {{#if}} somehow confuses the parser.
Edit to mention: It doesn't bother me if whitespace is not allowed in this situation; the problem is that there is no exception or error of any kind from the parser or the runtime, even in debug mode. The event handler silently fails, making debugging this kind of problem very difficult in a complex template.
Versions affected:
Known: 0.8.9, 0.8.11  Probably: 0.8.0 through 0.8.11
Platforms affected:
All
Reproduction:
JSFiddle: https://jsfiddle.net/frenchroasted/r07fphky/
Code:

Event Handlers and Spaces (Ractive 0.8.11)

  If an event handler is declared with an internal conditional, any whitespace in the wrong place will break the event binding.

var r = new Ractive({
		el: 'main',
    template: '#myTemplate',
    data: {}
});

r.on('alertMe', function(){
	alert('Clicked!');
});

This is an unfortunate side-effect of how old-style events are parsed, which is why they are deprecated in 0.8 and removed in 0.9. The parsing for mustaches inside event directives is very touchy. I think this can be worked around by ignoring empty strings while processing tokens in the directive value, but it would be better to switch to a different construct.
Starting with 0.8, you can make the whole event directive conditional e.g. <button {{#if true}}on-click="alertMe"{{/if}}>This also works</button>

Where is the write-up on the deprecation and removal of the "old-style events"? I looked through the 0.8 migration guide and the 0.9 changelog page and didn't see anything about removing "on-event='label'" syntax for attaching event handlers to nodes. While researching the problem I was having in my template, the only mention I could find about combining conditionals with event declarations was an old issue, I think, where it was mentioned that the preferred pattern was to do it inside the quotes. There is no mention of it in the API docs that I've seen, though I may be looking in the wrong place.
In any case, if the event handler declaration is changing for 0.9, that would be a huge undertaking for a large web application like the one I'm working on. What is the new syntax? How different is it from the old?
Meanwhile, the workaround suggested above is fine, but I would still point out that, for at least 0.8.x, a usage that breaks so completely as this one should generate some kind of parsing error. I would be equally happy with a code change that trimmed leading/trailing whitespace or else a parse error in this situation - makes no difference to me, I just think one of the two would be appropriate here. The current behavior is to silently fail, so anything would be an improvement.

Old-style events would be proxy events with arguments e.g. on-click="foo:{{bar}},{{baz}}". The first entry under deprecations in the migration guide has the details for 0.8. The first breaking changes entry in 0.9 mentions the removal of argumented proxy events. The relevant issue at the root of these changes would be #1172, and there are a number of other issues and PRs linked from there.
The overall event mechanism is still on-${event}="handler", it's just that what goes in handler has changed a bit. It is now either a single string to be proxied e.g. on-click="someEvent", which will fire a someEvent event to be handled by ractive.on('someEvent', ...) or one or more expressions, which may be something like on-click="@this.set('foo', 42)" or on-click="@this.fire('someEvent', event, 42)" or on-click="@this.toggle('show'), @this.fire('showing'), false". With 0.9, there's a reasonable approximation for argumented proxy events in on-click="['someEvent', 42]", which is still just an expression, but the event directive special cases expressions that evaluate to an array with a string first element to handle conversion to the appropriate fire` call.

This is now fixed in v0.8-dev and will go out with 0.8.12 when it is cut. Thanks for the report!


distributed table data insert

Is it possible to insert data into a distributed table in a distributed way?
For example, there is a 3-node cluster. I create tables  as follows:
CREATE TABLE NATION_local  ( N_NATIONKEY  Int32 , FakeDate   Date) ENGINE = MergeTree(FakeDate, (N_NATIONKEY), 8192);
CREATE TABLE NATION AS NATION_local ENGINE = Distributed(perftest_3shards_1replicas,  tpch,  NATION_local, N_NATIONKEY );
The above SQL statements were executed on each nodes.
Is it possible to insert data into table "NATION" from 3 nodes at the same time?

Yes, you can insert data concurrently to Distributed tables on every server.
PS. Note that the performance will be better if you split your data on application side and then insert into local tables on each server. (This is more complicated but performance is better due to less copying on disk and over network).


docs(samples): Write API tutorial

Porting this tutorial to https://github.com/googleapis/java-bigquerystorage/pull/1498. Thank you!


Add gpsuo git alias

This alias is for pushing a new git branch to the origin remote.


Adding filter and service name options

Adding support for filters and service names to wait on a subset of services in a stack. This should resolve PR #8

@a-abella PTAL

Regarding the service name argument, there could be some semantic problems with what constitutes a "service name." Service names returned by docker-compose configs --services are just the service names as defined in the compose file, but names returned by docker service ls --format {{.Name}}  explicitly include the stack name. This could pose a problem if a user parses docker service output to get a subset of deployed services to then pass the results as arguments to docker-stack-wait.sh
Since docker-stack-wait.sh expects a required stack name argument, it may be necessary to specify that the service name argument should not include a stack name portion. There would be no easy way to determine if a passed argument includes the stack name since underscores are valid characters for service names.

Thanks for the feedback. I updated the docs to say "do not include the stack name prefix".


Add LevelDB to PostgreSQL Data Migration command

Depends on https://github.com/hyperledger/firefly-transaction-manager/pull/93

Codecov Report

Merging #91 (cb8ce93) into main (3e341dc) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #91   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           23        23
  Lines         1480      1486    +6
=========================================
+ Hits          1480      1486    +6

Impacted Files
Coverage Δ

cmd/evmconnect.go
100.00% <100.00%> (ø)