Slider thumb's center doesn't align with division's center

Steps to reproduce
This issue is just like https://github.com/flutter/flutter/issues/62567
But https://github.com/flutter/flutter/issues/62567 marked as closed - so I should post this again
Expected results
uncomment lines 153-155 - expected result
Actual results
thumb indicator center has some offset
more exactly
0 on center
+ or - 1 with each division (right or left respectively)
Code sample
Code sample
import 'dart:math';

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  double? sliderValue = 1;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: _StarSlider(
          onChanged: (value) => setState(() => sliderValue = value),
          value: sliderValue,
        ),
      ),
    );
  }
}

class _StarSlider extends StatelessWidget {
  const _StarSlider({
    required this.onChanged,
    required this.value,
    super.key,
  });

  final ValueChanged<double> onChanged;
  final double? value;

  @override
  Widget build(BuildContext context) {
    return SliderTheme(
      data: SliderTheme.of(context).copyWith(
        thumbShape: const _PolygonSliderThumb(radius: 16),
        tickMarkShape: const _StarTickMarkShape(radius: 16),
        valueIndicatorColor: value == null
            ? Colors.transparent
            : Theme.of(context).colorScheme.tertiary,
        activeTrackColor: Colors.transparent,
        inactiveTrackColor: Colors.transparent,
        activeTickMarkColor: value == null
            ? null
            : Theme.of(context).colorScheme.onSurfaceVariant,
      ),
      child: Slider(
        value: value ?? 1,
        onChanged: onChanged,
        min: 1,
        max: 5,
        divisions: 4,
      ),
    );
  }
}

class _PolygonSliderThumb extends SliderComponentShape {
  final double radius;

  const _PolygonSliderThumb({required this.radius});

  @override
  Size getPreferredSize(bool isEnabled, bool isDiscrete) {
    return Size.fromRadius(radius);
  }

  @override
  void paint(
    PaintingContext context,
    Offset center, {
    required Animation<double> activationAnimation,
    required Animation<double> enableAnimation,
    required bool isDiscrete,
    required TextPainter labelPainter,
    required RenderBox parentBox,
    required SliderThemeData sliderTheme,
    required TextDirection textDirection,
    required double value,
    required double textScaleFactor,
    required Size sizeWithOverflow,
  }) {
    Paint paint = Paint()
      ..color = sliderTheme.valueIndicatorColor ?? Colors.blue
      ..style = PaintingStyle.fill;

    final path = _getStarPath(radius: radius, center: center);
    context.canvas.drawPath(path, paint);
  }
}

class _StarTickMarkShape extends SliderTickMarkShape {
  final double radius;

  const _StarTickMarkShape({required this.radius});

  @override
  Size getPreferredSize({
    required SliderThemeData sliderTheme,
    required bool isEnabled,
  }) {
    assert(sliderTheme.trackHeight != null);
    return Size.fromRadius(radius);
  }

  @override
  void paint(
    PaintingContext context,
    Offset center, {
    required RenderBox parentBox,
    required SliderThemeData sliderTheme,
    required Animation<double> enableAnimation,
    required TextDirection textDirection,
    required Offset thumbCenter,
    required bool isEnabled,
  }) {
    assert(sliderTheme.disabledActiveTickMarkColor != null);
    assert(sliderTheme.disabledInactiveTickMarkColor != null);
    assert(sliderTheme.activeTickMarkColor != null);
    assert(sliderTheme.inactiveTickMarkColor != null);

    final double xOffset = center.dx - thumbCenter.dx;

    // BUG: wierd bug, thumbCenter is not exactly center
    // if (xOffset.abs() < 3) {
    //   center = thumbCenter;
    // }

    final (Color? begin, Color? end) = (Colors.red, Colors.red);

    final Paint paint = Paint()
      ..color = ColorTween(begin: begin, end: end).evaluate(enableAnimation)!;

    if (radius > 0) {
      final path = _getStarPath(radius: radius, center: center);
      context.canvas.drawPath(path, paint);
    }
  }
}

Path _getStarPath({required double radius, required Offset center}) {
  final path = Path();

  // Define points for the star
  for (int i = 0; i < 5; i++) {
    var angle = (72 * i - 90) * (pi / 180.0);
    var x = radius * cos(angle);
    var y = radius * sin(angle);
    if (i == 0) {
      path.moveTo(center.dx + x, center.dy + y);
    } else {
      path.lineTo(center.dx + x, center.dy + y);
    }

    angle = (72 * i + 36 - 90) * (pi / 180.0);
    x = (radius / 2) * cos(angle);
    y = (radius / 2) * sin(angle);
    path.lineTo(center.dx + x, center.dy + y);
  }

  path.close();

  return path;
}

Screenshots or Video

Screenshots / Video demonstration

Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-RU)
    • Flutter version 3.24.0 on channel stable at /opt/homebrew/Caskroom/flutter/3.10.4/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (2 weeks ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/geara0/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Users/geara0/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.4)
    • IntelliJ at /Users/geara0/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.91.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.92.0

[✓] Connected device (4 available)
    • iPhone 15 Pro Max (mobile)      • DD0BD5AF-6F73-4B6F-B5E1-922247A5BC5F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 127.0.6533.120
    ! Error: Browsing on the local area network for iPhone HOME. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Upd: fixed on master


End to end test example

Fix https://github.com/restatedev/node-template-generator/issues/18 and https://github.com/restatedev/sdk-typescript/issues/101, replaces https://github.com/restatedev/node-template-generator/pull/19

Also, can we add an example for the handler API as well?

Can I do this in a followup?

Error 404 during registration:

Perhaps you have an old image?

@slinkydeveloper That was indeed the issue.
Should we just for sake of documentation add this to the readme? Something like:
If you are encountering errors, try to do `docker pull docker.io/restatedev/restate:latest`.

I guess if I bump into this, I am not the only one.

LGTM!


Make timing based test more likely to pass

This assumed that the expect statement would run within 1us, whereas
we only care it runs in less than the 100ms to check that it got reset.

This failed in https://ci.pytorch.org/jenkins/job/caffe2-builds/job/py2-gcc5-ubuntu16.04-test/83/

Another example in https://ci.pytorch.org/jenkins/job/caffe2-builds/job/py3-gcc5-ubuntu16.04-test/98/
/var/lib/jenkins/workspace/caffe2/core/timer_test.cc:43
Expected: (timer.NanoSeconds()) < (1000), actual: 12324 vs 1000

Makes a lot of sense :)

@Yangqing Check out which error I see only now! Submitting another PR for it.
/var/lib/jenkins/workspace/caffe2/core/timer_test.cc:30
Expected: (timer.NanoSeconds()) > (0), actual: 0 vs 0

I could cancel the land just in time, so updated this PR to include the fix for the EXPECT_GT issue.

Failed tests are benign and addressed in #1625


Writing 1,800 jpeg images of streamed video in 1 minute ?

import numpy as np
import cv2
import socket

class VideoStreamingTest(object):
    def __init__(self):

        # self.server_socket = socket.socket()
        # self.server_socket.bind(('<IP_ADDRESS>', 8081))
        # self.server_socket.listen(0)
        # self.connection, self.client_address = self.server_socket.accept()
        # self.connection = self.connection.makefile('rb')
        # self.streaming()
        # self.socket.connect(('<IP_ADDRESS>', 8081))

        self.socket = socket.socket()
        self.connection = self.socket.connect(('<IP_ADDRESS>', 8081))
        self.streaming()

    def streaming(self):

        try:
            #print ("Connection from: ", self.client_address)
            print ("Streaming...")
            print ("Press 'q' to exit")
            frame = 0
            stream_bytes = b' '
            while True:

                stream_bytes += self.socket.recv(1024)
                first = stream_bytes.find(b'\xff\xd8')
                last = stream_bytes.find(b'\xff\xd9')
                if first != -1 and last != -1:
                    jpg = stream_bytes[first:last + 2]
                    stream_bytes = stream_bytes[last + 2:]
                    # Grayscale image
                    #image = cv2.imdecode(np.fromstring(jpg, dtype=np.uint8), cv2.IMREAD_GRAYSCALE)
                    # Color image
                    image = cv2.imdecode(np.fromstring(jpg, dtype=np.uint8), cv2.IMREAD_COLOR)
                    # To write/save the frames
                    # cv2.imwrite("stream_images/frame_%d.jpg" % count, image)
                    cv2.imwrite('stream_images/frame{:>05}.jpg'.format(frame), image)

                    cv2.imshow('image', image)

                    frame += 1

                    if cv2.waitKey(1) & 0xFF == ord('q'):
                        break
        finally:
            #self.connection.close()
            self.socket.close()

if __name__ == '__main__':
    VideoStreamingTest()

Thats the code im using.... now I'm able to have 1800 images(frames) saved in 1 minute, is this correct? everytime I run the program I over write them, is that correct as well?

Hi, I was only able to save about 10~15 frames/second. Yes, files are overwritten each time.

First of all thanks for taking the time to reply :-)
what algorithm did u use for the machine learning part ?

neural network

reso 320x240 , 50fps
I am trying to get rid of the date and time.. but I am unable to.. do u think I can make it work with the date and time on the frames?

How did you add the date and time to frames?

its from the motion.conf file given by the webserver for pi camera

Hello, I want to make this self driving car for my college project . Please help me how to do it...please guide me on this.

@R0na1d copying someone's work isn't a college project, it's copying someone's work.  if you can't  figure out from the instructions, you might want to pick a different project...like a baking soda volcano...


Adding in requirements and requirements-dev

I spotted a 'to-do' for requirements.txt in the project board.
Added in a requirements and requirements-dev file, I've avoided pinning versions with the exception on numba due to https://github.com/numba/numba/issues/2609.

LGTM, thanks!

Added pandas as per https://github.com/fastats/fastats/pull/62 - let me know if explicitly dropping it in here isn't preferable or anything.

@fastats/core - any reason not to merge?

Nice one, thanks @AaronCritchley.
Might be out of scope, but I wonder if maybe we should also read these in setup.py? https://github.com/fastats/fastats/blob/master/setup.py#L71
If done carefully, would also solve #62.
What do you think?

@pawroman I think that's totally reasonable and in my view, preferable to have one source of truth instead of two, but it looks like a very contentious issue - so just wanted to confirm that @dwillmer / @rjenc29 are happy with it too?
Some decent reads:

https://github.com/pypa/pipenv/issues/209
https://caremad.io/posts/2013/07/setup-vs-requirement/

Yep, definitely, reading in from setup.py is an excellent suggestion,
Thanks!

FWIW it looks like pip 10 removed parse_requirements (or at least it's not documented, and it no longer imports in the same way as it did in pip 9).
The implementation at the moment is kinda gross, I'll have a look around and see if there's a documented, supported API for this in pip or setuptools.

I've seen a few other places take a similar approach to this, if you're not happy with it let me know and I'll find a better way to do it - no hard feelings. Otherwise I'm OK leaving it like this 😄

LGTM, thanks!


Implement Heatmap

Implement Heatmap with heatmap.js and webview. Currently it's WIP.

Got a start on this already. Will update end of week with progress.

Finished the heatmap. Not sure if it works on other devices.
https://www.opendota.com/matches/3538474686/laning

Great job!
Let me know when you’re ready to submit a PR for it. I have a friends wedding this weekend so the earliest that I can review the PR is Monday AU time (should be Sunday evening in US).

On 17 Nov 2017, at 3:20 pm, Chynh Vo<EMAIL_ADDRESS>wrote:
Finished the heatmap. Not sure if it works on other devices.
https://www.opendota.com/matches/3538474686/laning https://www.opendota.com/matches/3538474686/laning
https://user-images.githubusercontent.com/7953198/32929240-8751e7ca-cb0b-11e7-8008-efdc615d418a.png
https://user-images.githubusercontent.com/7953198/32929241-889fcb6a-cb0b-11e7-8bb7-db7c981e548e.png
https://user-images.githubusercontent.com/7953198/32929242-89cc5724-cb0b-11e7-9b7e-9bcfd1485c59.png
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/odota/mobile/issues/55#issuecomment-345141604, or mute the thread https://github.com/notifications/unsubscribe-auth/AK-3DVc4llIx8x80oS-XXi70qp0j6zF6ks5s3QmogaJpZM4PlLd3.

@vocosu Left some comment on your PR. It seems that there's some problem in iOS. Do you have access to Xcode?


Feature request for repo backups

Feature request for iamspeed: is there a way you can add an option to backup repositories for certain package managers to ?
For example backup cydia repositories since cydia cant load all repositories
Backup up zebra repositories (work with all repositories)
Saily is a new package manager (only works with certain repo
Sileo works with certain repositories
Installer works with most repositories.
With the name of the package managers on the txt files along with dates it was last updated since new repos gets added to package managers all the time. And a option to select all package managers. 🙏🏽

yes +1

After giving this some thought I've decided it's not likely to be implemented. Too reliant on package managers and I don't believe it can't be implemented in a clean way.


add FastNLPProcessor, and make default in conf

Added FastNLPProcessor as the default one in AnnotateText

decided not to update proc version for now


Sketch Shapes Draw Feature

Closes #474

Line
Square
Circle
Triangle
Arrow
Diamond

Currently not focusing on design. I am thinking to first build some basic features then I will improve the design of the sketch.

how did you create that gif so small in dimensions? did you recorded the screen and then converted it to gif? or do you use some extension?

how did you create that gif so small in dimensions? did you recorded the screen and then converted it to gif? or do you use some extension?

https://microsoftedge.microsoft.com/addons/detail/click-to-capture/jmiocoejabdcdefolopebbhnkgnohgco?hl=en-US

One suggestion: Make the arrow similar to the line so that we can have it in any direction by selecting it once. For changing direction(across an axis I mean), if we have to select another arrow button and continue, it would be less comforting while creating UML diagrams.
@anushbhatia Do you have any suggestions for the icons? perhaps something like feathericons?

how did you create that gif so small in dimensions? did you recorded the screen and then converted it to gif? or do you use some extension?

https://microsoftedge.microsoft.com/addons/detail/click-to-capture/jmiocoejabdcdefolopebbhnkgnohgco?hl=en-US

I am glad to see if we have such discussions beyond just individual contributions! Kudos to all of you

@smaranjitghose Yes, that will be nice. I will improve it along with my other PR.


Change stats wording when all exports are used

What kind of change does this PR introduce?
bugfix
Did you add tests for your changes?
yes
If relevant, link to documentation update:
n/a
Summary
Change stats wording when all exports are used:
Entrypoint main = bundle.js
 [0] ./a.js 13 bytes {0} [built]
     [exports: a]
-    [only some exports used: a]
+    [all exports used]

Does this PR introduce a breaking change?
no
Other information
Fixes #6995

Thanks


Build the page using NPM

Overhauled the repository to pull in MapLibre GL JS using NPM instead of hotlinking it from a third-party CDN. Replaced custom date filtering code with the new maplibre-gl-dates package. This PR includes a GitHub Actions workflow for deploying the site, as a replacement for the current default Jekyll build.
To try out the page locally, run npm install && npm start.
Working towards OpenHistoricalMap/issues#840.

After merging, change the “Build and deployment source” setting from “Deploy from a branch” to “GitHub Actions”.


Random ore spawner

About the PR

It is needed for placement when mapping to maps with ore (like, for example, moose (but old stones are used there)) to randomize the ore and avoid ore meta from the players.
Media

[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

no

@Kit0vras are you coming back to this.


sbt new should launch sbt after creating project

steps
$ sbt new $someTemplate

problem
Once this is done, need to cd into the new directory (first need to figure out what it's called) and run sbt again.
expectation
I end up in an sbt shell immediately after sbt new completes.
notes

This would be a useful enhancement to sbt and Giter8 cooperation.

*.local templates added in https://github.com/sbt/sbt/pull/7228:

creates a build on the same directory, and
launches into sbt session immediately
so I'd claim that as a win


update date format

When trying the examples I get an error like this:
➜  slider-cli git:(main) ./slider-cli --satellite=goes-16 --sector=conus --product=geocolor
4:41PM FTL unable to create loop: unable to get images: unable to download image for timestamp 2022-04-24 14:06:17 +0000 UTC: unable to download image: https://rammb-slider.cira.colostate.edu/data/imagery/20220424/goes-16---conus/geocolor/20220424140617/01/000_000.png: HTTP404

It seems they updated the date format in the URL?
A valid URL now has this date format with 2022/04/24: https://rammb-slider.cira.colostate.edu/data/imagery/2022/04/24/meteosat-8---full_disk/geocolor/20220424120000/03/001_002.png
I did a make locally and it seems to work, but didn't fully run any of the other checks.

Thanks! Merged.


Added min_chars & max_chars rules

Hi guys,
I have been using this library during today as I found it really intuitive and easy to implement with my Vue developments but I found there's no rule to check the max & min characters of a string.
Let me know what you think about this approach.
Initially, I tried to do it into the min & max ones already there that only check numbers, but I thought creating new ones would be less intrussive.

Hey @arkanos ,
Thanks a lot for contributing.
This package was experimental, we are about to release a new package, with a much easier api and with 25+ rules very soon (by the end of this week)
The min and max rules will support arrays, numbers and strings in the new package, I still merged your PR, so thanks again for the contribution.
I will keep you posted if you are interested.

Hey @arkanos , here is our new validation package:
https://github.com/PrimitiveSocial/clockwork

Sweet!


📝 Add individual demo links

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


RTMP DVR configuration not working for me

Hi,
I have been trying to turn ON the DVR feature to record a live RTMP stream from an android device. I am using VLC as my player and the live stream works but I am having trouble with the DVR feature.
I build the program with command: ./configure --with-dvr --with-ffmpeg --with-ingest && make
The feature says it is ON once I build it.
But no video file is saving to the default dvr_path:  ./objs/nginx/html
What should I do so that the DVR feature works and saves the video file to the default path?
Do i need to edit any of these files? full.conf file, dvr.path.conf, dvr.session.conf, dvr.segment.conf

Do you solve this problem?
can't enable vhost.dvr of defaultVhost

Follow DVR wiki.


Update SVG Bell icon and announcement badge/indicator

Current State
The current count does not render cleanly in the bounds of the red indicator. When the count is beyond 1 character the text overflows the red indicator entirely and becomes hard to read.

What this PR fixes
The SVG icon and badge have been updated to allow longer counts to display properly. The count retains its round shape at a single character and grows along the x-axis when the count extends beyond 1 character. The makes the count more visible. It also adds an aria-label="unread count" for the span of the count badge to make the count more accessible for assistive technologies
Examples comparing old and new design
Example Dark Background

Example with Light Background

New config option for showing only notification indicator without count
Keeping with the theme of updating the notification badge, this PR also added the option to show only a badge without a count if there are new notifications. The default option is to show the count, so this will not introduce any breaking changes.

Tests
The tests have been updated for the new icon SVG and are all passing. I added a new test for confirming the showCount config options works as expected.

This all looks awesome, thank you! 🙏
I'm a little busy at the moment with the day job and the run up to holiday season but will look to review / test it / merge it in over the next few weeks.

Hey, this is all looking great! I'm going to make a few changes to the fill colour of the bell icon however. Confused me at first during testing as it was set with a fill-transparent so it wasn't showing during testing.
The previous version defaulted to a white fill, although I know that wasn't perfect. I'm going to change it to default to "fill-black dark:fill-white" so it should cover most situations for users.
Again, great work though, thank you very much for doing the updates here!

Ahh yah, I set the icon itself to fill-transparent so that whatever background it was on would show through, and the stroke colour to "currentColor" so the icon outline would be whatever colour the font was set to. When I tested it was just light and dark backgrounds, so it may have looked off on other colours.
Thanks for making that change!


Work with shovel plugin

Hi.
I'm create work pyrabbit with shovel plugin. Can I create merge request?

I fork and update module. Welcome https://github.com/deslum/pyrabbit2


SimpleCov not reporting coverage for lines in application_controller tested with an anonymous controller helper.

Ideally coverage would be reported against the lines where after_sign_in_path_for if defined in application_controller.rb currently that's not the case.
I'm wondering if there might be a good starting place in the gem source to dig around to see why it might not be reporting coverage for these tests?

Include the SimpleCov version you are running in your report.

/box/gems/simplecov-0.15.0

Include your ruby -e "puts RUBY_DESCRIPTION".

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

Please also specify the gem versions of Rails (if applicable).

/box/gems/rails-4.0.4

Include any other coverage gems you may be using and their versions.

/box/gems/rspec-core-3.3.2
/box/gems/rspec-rails-3.3.3

Include how you run your tests and which testing framework or frameworks you are running.

docker-compose run web bundle exec rspec spec/controllers/application_controller_spec.rb

Otherwise, please ensure you are requiring and starting SimpleCov before requiring any application code. For example, if running via RSpec, this would be at the top of your spec_helper. ✔
SAMPLE (LEGACY?) CODE
describe ApplicationController do
  # Setup Anonymous Controller for testing
  controller do
    def after_sign_in_path_for(resource)
      super resource
    end
  end

  it { is_expected.to use_before_filter :authenticate_user! }

  describe 'Devise::Controllers::Helpers#after_sign_in_path_for' do
    before
      expect_any_instance_of(ApplicationController).to receive(:sign_out).once
      expect_any_instance_of(ApplicationController)
        .to receive(:new_user_session_path).once.and_call_original

      sign_in user
      @result = controller.after_sign_in_path_for user
    end

    it { expect(@result).to eq "/users/sign_in" }
  end
end

Hi there,
Thanks for the report 🎉
I'm not quite sure where you are missing coverage right now. Is it in the anonymous controller you define above? Mixing spec files with actual code to be covered might be a problem. It's also weird that your spec file doesn't end in _spec.rb I also can't see where simplecov is started here (the spec should require the spec/rails_helper that takes care of this).
A good place to start digging is if the standard library coverage reports the coverage if started in place of simplecov, because that's what simplecov relies upon.

Thank you for your response. Allow me to clarify.
The goal is to see coverage for app/controllers/application_controller.rb given a spec @ spec/controllers/application_controller_spec.rb

RE: Spec file doesn't end in _spec.rb.

I mistyped it in my first comment. Sorry for any confusion it caused.

RE: Mixing spec files with actual code.

It's effectively a mock controller that inherits from application controller. It would be the same as testing an actual controller inheriting from ApplicationController.
Here's a link to the technique
Here's the corresponding rspec docs

I have these lines at the top of spec/spec_helper.rb
require 'simplecov'
SimpleCov.start 'rails'

The top of my spec/rails_helper.rb looks so:
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'spec_helper'
require 'rspec/rails'

And my .rspec file has these flags set
--color
--require rails_helper

Also, I tried following the console commands for the standard library coverage reports and I'm not sure what I'm supposed to be looking for. Here's what I got.
❯ docker-compose run --service-ports web bundle exec rails c
Loading development environment (Rails 4.0.4)
irb(main):001:0> require 'coverage'
=> true
irb(main):002:0> Coverage.start
=> nil
irb(main):003:0> require 'app/controllers/application_controller.rb'
LoadError: cannot load such file -- app/controllers/application_controller.rb
        from /box/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
        from /box/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
        from /box/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
        from /box/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
        from (irb):3
        from /box/gems/railties-4.0.4/lib/rails/commands/console.rb:90:in `start'
        from /box/gems/railties-4.0.4/lib/rails/commands/console.rb:9:in `start'
        from /box/gems/railties-4.0.4/lib/rails/commands.rb:62:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'
irb(main):004:0> Coverage.result
=> {}
irb(main):007:0> Coverage.start
=> nil
irb(main):008:0> require 'spec/controllers/application_controller_spec.rb'
LoadError: cannot load such file -- spec/controllers/application_controller_spec.rb
        from /box/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
        from /box/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
        from /box/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
        from /box/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
        from (irb):8
        from /box/gems/railties-4.0.4/lib/rails/commands/console.rb:90:in `start'
        from /box/gems/railties-4.0.4/lib/rails/commands/console.rb:9:in `start'
        from /box/gems/railties-4.0.4/lib/rails/commands.rb:62:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'
irb(main):009:0> Coverage.result
=> {}

Hi, about coverage first - you are getting load errors when requiring the files. that way, of course no coverage can be measured.
Please also load and start simplecov before loading and starting ANYTHING else. I.e. it should be on top of your rails_helper. If your application controller gets loaded before simplecov is started, nothing will be seen.

Got it. Alright here's the top of my rails_helper.rb
require 'simplecov'
SimpleCov.start 'rails'
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'spec_helper'
require 'rspec/rails'

I thought because the README mentioned starting SimpleCov at the top of Spec Helper and because my spec_helper was required above rspec that I was good.
I realize the docs are also specific about those lines being added before any Rails code is loaded.
Forgive me for not realizing it was probably this line
require File.expand_path('../../config/environment', __FILE__)
That was loading the rails application code.
It's working now! Thank you so much for your help!


Images: audit competitor's download offers

Problem to be solved
Find out how competitor sites offer download options to see what our options our users are also exposed to.

Reviewed following sites for download patterns: Flickr, Google Images, Prado, NYPL, Getty Images, Istock Photos, Unsplash
The initial scope of the download feature is documented on #1301.


[Feature request]: NDataTable pagination prefix support total items

This function solves the problem (这个功能解决的问题)
Total number of items displayed
Expected API (期望的 API)
pagination: {
        page: 1,
        pageSize: 15,
        pageSizes: [15, 25, 50, 100],
        pageCount: 101,
        showQuickJumper: true,
        showSizePicker: true,
            prefix: (info) => {
              // here, `info.total`
              return `${info.startIndex + 1}-${
                info.endIndex + 1
              } item / total: ${info.total||0}`;
            },
      },

Total information will not be available in asynchronous state

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

itemCount is total, user must fill it

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

itemCount is total, user must fill it

In non-remote mode, we should fill it for user by data.length

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

itemCount is total, user must fill it

In non-remote mode, we should fill it for user by data.length

In non-remote mode, we should fill it for user by data.length
In remote mode, user fill it by itemCount

Total information will not be available in asynchronous state

User can fill it by pagination.itemCount

itemCount is total, user must fill it

In non-remote mode, we should fill it for user by data.length

In non-remote mode, we should fill it for user by data.length
In remote mode, user fill it by itemCount

Yes


Swift PM support

Since Swift 3 introduce Package Manager, any plans to support?

@JiLiZART I was thinking about this, SwiftPM and Carthage support is coming soon.
I'll keep you updated when it is supported

@JiLiZART Swift Package Manager support added in v1.4


Some minor fixes

Break out of loop once txIndex is found.
Get correct block height for txConfirmation.

I recently committed a pretty large change in master catching up some of our btcsuite libraries to their latest upstream versions within my fork. As a result, you'll need to rebase to master again before I can get this PR merged.
First, ensure that you've pulled the latest version of master into the master branch you have locally. I'm not sure how you've set up your git environment locally, but typically with another project, I'll work from that project's root (in the case: $GOPATH/github.com/lightningnetwork/lnd), then create a new remote which points to my forks on github. From my PoV this would entail executing:

git remote add roasbeef git@github.com:roasbeef/lnd.git

So then anytime I want to push a new branch to possibly be a PR to the mainline, or modify an existing PR, I'd do:

git push roasbeef new-branch-for-PR

Then if I needed to catch up my changes to the latest version of master, I'd execute:
* git checkout new-branch-for-PR
* git rebase -i master
An interactive rebase will pop up in your default text editor, if you see any lingering commits that are left over from a failed attempt (like the few that are on this branch now), simply deleting those lines will remove them from your rebased branch. After finishing the interactive rebase, you'll then force push to your remote branch: git push --force roasbeef new-branch-for-PR. It's typically a good idea to first back up your local branch by creating a new branch off of it before you mess with any rebase shenanigans.
If you need any help with the above process, or have any more questions, we now have the #lnd channel on Freenode.


Update jsDelivr links

jsDelivr switched to a fully automated system, that can serve files from npm and GitHub. This means all future releases will be available automatically, but will use a new link structure.
I updated the links now so you don't forget to do it when you release a new version.
You can find links for all files at https://www.jsdelivr.com/package/npm/css-mint.
Feel free to ping me if you have any questions regarding this change.

Thanks for the update @LukasDrgon.


Delete query doesn't dispatch onModelStateChanged event.

I already created a FlowContentObserver and added OnModelStateChangedListener. But when I use Delete query to clear the table, no onModelStateChanged event is dispatched.
I also tried to delete a model object (ex: model.delete()) and an onModelStateChanged event with Action.DELETE is successfully dispatched.

@rey5137 good point. Raw sql-wrapping queries do not dispatch an event to the FlowContentObserver. I believe that can be considered a bug, however it gets tricky when we get into more complicated queries. I will think of an improvement that may make this work in a good way.

For now, I call SqlUtils.notifyModelChanged() to notify it manually. May be you should make it clear in Wiki.


tf.image.random_flip_left_right should be also to apply to a list of tsor

System information

TensorFlow version (you are using): 2.2.0
Are you willing to contribute it (Yes/No): yes

Describe the feature and the current behavior/state.
Add support to randomly flip image for a list o tensor images instead a single tensor. tf.image.random_flip_left_right, random_flip_top_bottom..
The problem is that for segmentation training, we wants to use data augment to randomly flip the input left or right. But there is no way the flip the ground true (the labels) together.
Since  we don't know which direction the random flip api is flipping to. Batching make it worse since each image will flip randomly. We need to  modify the api to take  either a single tensor or a list of tensors and flip the images together in the same direction. which is required  for  image segmentation.
Will this change the current api? How?
No. We can detect the input argument is a list or single tensor
Who will benefit with this feature?
Any Other info.

@ek9852
Do you have any use case that requires the feature you are interested in? Please feel free to submit a PR if you have use cases that supports that feature.Thanks!

@ravikyram  I already state the use case.
I want to train a network  with image segmentation.
How can I randomly flip input image and  ground true label (which is another image) to the same direction randomly for data augmentation ?

You could feed the multiple images for random_flip_left_right, see the example here. Thanks!


Calander sets not working (bug)

I don't find an option to use calendar sets.
I installed the latest version of obsidian this is what the periodic notes settings looks like (*** no calander sets feature ***)

Hi sorry, I’ve been busy getting the README ready in anticipation of the big release, I forgot to put a disclaimer. The calendar sets feature is still for beta users only. If you use the BRAT you can enable the periodic notes beta from there.

Hi sorry, I’ve been busy getting the README ready in anticipation of the big release, I forgot to put a disclaimer. The calendar sets feature is still for beta users only. If you use the BRAT you can enable the periodic notes beta from there.

Thank you for your response❤. I really appreciate your work on these plugins.
I will try test out the feature in the beta version.


Version 0.39 doesn't exist.

We are trying to download the latest version with the latest link https://github.com/gruntwork-io/terragrunt/releases/latest/download/terragrunt_linux_amd64 which redirects to this -> [0.39.0](https://github.com/gruntwork-io/terragrunt/releases/download/v0.39.0/terragrunt_linux_amd64) and it doesn't exist. (404)

Is there now. Was failing to download earlier.


Remove duplicated content in helpful-material.html

Ready to do !!
I would like to know, what exactly it's a duplicated content in the helpful-material.html
Because I see a lot of links <a href = "x"> .... </a>

@rafagarciac If you look at this image we have multiple instances of helpful material title and would only like to keep one of those :)

Closing this because its is now fixed with #720 😃

@richie-south
Good Job @sarahperea, but you missed a lot of unnecessary & duplicated code and content...
I think that I'm doing one better version and maybe we'll have to re-open the issue.
Thanks for your attention.

@rafagarciac Make you changes and then notify me here :)


Set size of terminal for demo output

Fixes #270

Here is explanation, if there is missing preset size of terminal (envs LINES and COLUMNS) it tries to autodetect using proc_open() which is forbidden: https://github.com/symfony/console/blob/5.x/Terminal.php#L27
Somehow this condition passes: https://github.com/symfony/console/blob/5.x/Terminal.php#L153
I tried to debug locally and it returned null, so it is kind of magic why it does not stop on demo.

That's an interesting magic :) thanks for the fix 👍


Allow creating a JDBC connector without CredentialProviderModule

@findepi @kokosing Could one of you merge this? I'm not authorized for merging yet.

Merged, thanks!


Stabilization path for asm!()

Inline assembly is critical functionality for a significant class of potential Rust applications, even if in only a few functions at the core of some central library. We'll want to support it on stable eventually. But is the current macro the design we want forever? Are we OK living with what LLVM hands to us for this?
The current implementation needs a lot of love and tests before I'd be comfortable shipping it, if we want to stick with it.

This wants to be a discuss thread: https://internals.rust-lang.org/t/stabilization-path-for-asm/2610


Add support for homebridge-config-ui-x

Could you tell me what is this for? I already have the homebridge-config-ui-x and my plugin is working there without this json...

This config schema file allows the UI to expose the config parameters for this plugin in the “plugins” section. I’ll upload a screenshot of this (for other plugins with this feature) as soon as I get home

Yes, please do that.

In the "Plugins" section you can see the "Settings" button for the modules installed (only the ones with the config.schema.json file in it):

If you click on them, you have a form view to set the configs of the module (updating config.json in the background).

I hope these screenshots are clear enough :)

Oh, ok. Now i got it. Thanks for the screnshots.
I am wondering if that much people use it that it is worth to keep that file always up to date when this is merged?

👍 for this PR!

Ok, we at least got 1 other person who would be interested in this :) That is something 👍

👍

👍


Provide a way to extend EntityGenerator

There is currently no way to extend the EntityGenerator.
You can make custom types but the stubs methods will always be generic getters and setters. Which can, with certain types be really innapropriate.
It would be really useful to have a way to interact with EntityGenerator->generateEntityStubMethods.

Not gonna happen: there are other components for this (such as https://github.com/zendframework/zend-code), as well as IDEs that can generate methods for you.
The code generator in doctrine ORM is just meant to get you kickstarted once at the beginning of a project, and then you are supposed to edit the code yourself, manually.
Ref: https://github.com/symfony/symfony-docs/issues/5070
Ref: https://github.com/doctrine/DoctrineBundle/issues/412
Ref: https://github.com/doctrine/doctrine2/pull/5733

Ok, I get it. But still if I can't customize the stubs for my custom type is there a way to prevent the incorrect getters/setters being generated ?
Let's take a practical example, if I got a Set datatype I'll want add, remove and get methods. But the entity generator will keep on adding a set method. What's the best practice here ?

What's the best practice here ?

@ywg grepping the set methods, then removing manually


Rename API artifact to census-api

census-core doesn't indicate the fact that it's pure API. Because grpc-core depends on the API artifact, people may mistake census-core as an implementation and raise concern over grpc-core's dependency on it.

I'll look into it when we make the next release - if there are any problems/concerns, I'll let you know.

This was done in the last release.


EvaluatedModelReporter: Fix logging the duration

This is a fixup for 6088c3a.

Obsolete with https://github.com/oss-review-toolkit/ort/pull/2954.


block commands

Can you block commands in discord bv. /stop
I have a public MC server on Aternos and i want to
block /stop want players do /stop and than stops the server. Is there a possible way
To block that command?

@sleeyax

And is it possible to give people premission without doing to execute commands
And that they can do /start always

See https://github.com/sleeyax/aternos-discord-bot/discussions/11#discussioncomment-2561932 it answers part of your question.

Discord now provides a built-in way to manage slash command permissions in your Discord server. There's no more need for an in-house solution!


Only Key Emulation Module

Hello,
I built a new PC and had to reinstall DCS, DCS-BIOS and DSCFP.  The issue I get is I only have Key Emulation in the module drop down list.
DCS Open Beta
DCS-BIOS 0.7.44
DCSFP 4.6.8117.1 (with json setting point to DCS Open Beta saved file folder)
Can you help please?
Thank you

I'm guessing DCSFP doesn't find the DCS-BIOS files. Go to settings and point DCS-BIOS to the correct folder.

Is your guess right?  Here's where it point to my user path:   ...\Saved Games\DCS.openbeta\Scripts\DCS-BIOS

Then it's something else. I can't figure it out right now.

Have you tried deleting and reinstalling dcs-bios in case of a corrupted download?

Yes, I redownload and reinstalled.


perf: lazily load plugins [APE-1422]

What I did
This shaves almost a second off of time ape. None of the plugins are loaded if they are not needed (but they are loaded if they are needed).
How I did it
Use iterators mostly.
How to verify it

Checklist

[ ] All changes are completed
[ ] New test cases have been added
[ ] Documentation has been updated

seeing about a 12% performance improvement with this on my machine :rocket:

seeing about a 12% performance improvement with this on my machine 🚀

my goal rn is to not load plugins for any of the helps.
i think ape ledger still does because of some of account tools, so im going to fix that now

[ ] fix account tool lazy stuff

but disclaimer here: if you run any cmd that loads plugins, there shouldnt be any performance gains by this PR alone. in the future, we want to load only plugins needed but thatll likely require a bigger refactor

seeing about a 12% performance improvement with this on my machine 🚀

You will see a bigger one on commands like ape run --help (sub command helps).


Ch server side test 151206881

What does this PR do?
Try to fix bug preventing test suites not to run on travis CI
Description of Task to be completed?
N/A
How should this be manually tested?
Run the script npm test
Any background context you want to provide?
N/A
What are the relevant pivotal tracker stories?
151206881
Screenshots (if appropriate)
N/A
Questions:
N/A

Changes Unknown when pulling 8aa3c6b178cfb294102039050c03db85ab498a56 on ch-server-side-test-151206881 into ** on develop**.


IntelliJ-ext: prepareSandbox task does not throw an exception if the source files don't exist

We should check if the dylib and so files exist in the working directory or not for this task as we ended up bundling only the .so files in the previous releases and saw no errors

Note, I cant seem to exclude prepareSandbox task using -x like so: ./gradlew buildPlugin -x prepareSandbox for test CI since it does not really matter if we copy the extensions


Doesn't work on Windows

When run on Windows, npw exits with ENOENT:
$ npw i the-answer
node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

Error: spawn npm ENOENT
←[90m    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)←[39m
←[90m    at onErrorNT (node:internal/child_process:477:16)←[39m
←[90m    at processTicksAndRejections (node:internal/process/task_queues:83:21)←[39m {
  errno: ←[33m-4058←[39m,
  code: ←[32m'ENOENT'←[39m,
  syscall: ←[32m'spawn npm'←[39m,
  path: ←[32m'npm'←[39m,
  spawnargs: [ ←[32m'audit'←[39m ]
}

On this platform, child_process.swpan() should be called with the shell flag set, as the npm launcher actually is a .cmd file : https://nodejs.org/docs/latest-v16.x/api/child_process.html#spawning-bat-and-cmd-files-on-windows
I've tried setting the flag to true and it works nicely. However, this uses the shell defined in %ComSpec%, which is cmd.exe by default and I think most people would prefer to use some other shell (GitBash in my case). I'm not sure what the best way to handle this is, though.

Oh, and as a side note, the error output is broken as shown above, with color codes showing as plain text.
I don't know the reason but this can easily worked around by outputting some text before spawning npm. This is what I used:
  if (root == null) {
    console.error('Failed to find workspace root')
    process.exit(1)
  }
+  console.log('Found workspace root at', path.relative(root, cwd) || 'current directory.')

Cheers and thank you for the very useful tool!

Thanks for the issue! I've only used *nix systems, so had no idea this was an issue. I'll get a bugfix shortly.


Add ability to draw animations of complete roulettes

Is your feature request related to a problem? Please describe.
Add ability to draw animations of spirographs changing as a function of input lengths i.e. we draw the full spirograph from 0 to 2pi but each frame of the animation would increment radius of the fixed circle, etc.

Hi,
@chris-greening
I want to work on this issue. Can you assign this to me, So I can start working on this soon?

Hey @UzairURK - thanks so much for your interest in contributing! :D
Goal here is to draw the trochoids or cycloids across varying input parameters like shown here:

Using the hypotrochoid for example we can define a single "frame of the animation" like so:
from spyrograph import Hypotrochoid
import numpy as np

hypotrochoid = Hypotrochoid(
    R = 300,
    r = 200,
    d = 100,
    thetas = np.arange(0, 2*np.pi, .1)
)

screen = hypotrochoid.trace()

To create an animation similar to the one I showed above we can increment one of the input radii (R, r) or distance (d) and create many hypotrochoids each with slightly different inputs. Upon linking the animation together of the complete drawing together we get a continuous animation like above (see the GIF below to understand what I mean: the animation is the total book and each "frame" is like a single piece of paper)

Something along the lines of:
from spyrograph import Hypotrochoid
import numpy as np

hypotrochoids = [hypotrochoid(R=300, r=r, d=100, thetas=np.arange(0, 2*np.pi, .1) for r in range(200, 300)]

We'll have to think of a good way to integrate this into the library since one instance is "one frame". Perhaps a classmethod that takes similar inputs as an individual instance?
Feel free to submit a draft PR so we can get an open dialogue going!

Great! I will keep updating you on my progress!

I have understood the above all. Even If I get stuck, I will ask you right away.

Hi,
@chris-greening,
can you just tell me where to start like which is the main file to run, although I have installed all libraries (requirments.txt)

VS Code is perfect!
This project is a Python package so there isn't really a main entrypoint - users can import the package and use any of its features as needed. I'd recommend taking a look at the Quickstart and the docs to get an idea of how the library is used!
The user-facing API is essentially a collection of child classes that inherit from a _Trochoid abstract base class that defines most of the tracing, plotting, etc. functionality so this is a good place to start as defining the animation method here will inherit down to the concrete implementations (i.e. Hypotrochoid, Epitrochoid, etc.)
I think a good place to start would be to take a look at _Roulette.trace as this is the workhorse that does the turtle drawing. You can instantiate a turtle.Screen object, pass it to _Roulette.trace and it will draw on the screen and return the turtle.Screen object back. This allows you to pass the screen back and forth and draw new shapes on it iteratively
Try running this as some sample code to get an idea of what the animation will look like and how you can draw it:
from spyrograph import Hypotrochoid
import numpy as np
import turtle

screen = None
for R in np.arange(200, 300, .5):
    hypotrochoid = Hypotrochoid(
        R=R,
        r=149,
        d=24,
        theta_start=0,
        theta_stop=10*np.pi,
        theta_step=.1,
    )
    screen = hypotrochoid.trace(screen=screen)
    screen.clear()

Right now the animation is gonna be pretty jittery because of how the frame updating works but that's okay! Just want to get some basic functionality in
I'm going to go open a PR with some sample code in so you know exactly where to get started! Will tag and assign you in it as soon as its ready.
Thank you so much for your interest in contributing btw! :D

@UzairURK alrighty check out the latest commits over in #60, these should set you on the right path!
I created a create_range classmethod that will create a list of objects over a given input parameter range - you can leverage this to create the objects, iterate over them like I showed above, then trace each individual shape
Let me know if that makes sense!

@chris-greening
I was about to finish but you have done well.

@UzairURK how do you mean?

Aahhhh I accidentally closed the task... yeah the feature's not complete but no worries, apologies for the confusion

@chris-greening
I got too confused because I have started working on it as It was assigned to me.
Should I resume working on it?

@UzairURK completely my fault, I didn't realize the Issue was linked to one of the sample branches I was working on and it closed it accidentally
Please feel free to continue working on it, again very sorry about the confusion!

@chris-greening
No Problem, resuming working on it.

Heyo @UzairURK! just checking in for a status update - how are things going with this?

I would open PR this weekend hopefully.

Completed #108


check existence of bucket when instantiating GCSFile()

Addresses https://github.com/dask/gcsfs/issues/33

This is reasonable, but I'm not convinces it's necessary: there may be various reasons that you cannot write to a file, such as permissions.

Understood as exists() does indeed check on permission (through ls). We
are not impacted by this (anymore) – was just cleaning up. The current
generic error is good enough. Let me cancel the PR and close the issue.
From: Martin Durant<EMAIL_ADDRESS>Sent: Thursday, February 21, 2019 12:00 PM
To: dask/gcsfs<EMAIL_ADDRESS>Cc: Yannick Einsweiler<EMAIL_ADDRESS>Author <
<EMAIL_ADDRESS>Subject: Re: [dask/gcsfs] check existence of bucket when instantiating
GCSFile() (#134)
This is reasonable, but I'm not convinces it's necessary: there may be
various reasons that you cannot write to a file, such as permissions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/dask/gcsfs/pull/134#issuecomment-466079226, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AYDkSZoKmdagVAcuxgxb46B6dohxwAbdks5vPtCHgaJpZM4bH14o
.


ImportError: No module named carla_ros_bridge.bridge

Hi. I am ready to use carla_ros_bridge on carla 0.8.4.When I test the installation,running rostest carla_ros_bridge ros_bridge_client.test ,appear as follows:
[ROSUNIT] Outputting test results to /home/rcj_robot/.ros/test_results/carla_ros_bridge/rostest-test_ros_bridge_client.xml
Traceback (most recent call last):
  File "/home/rcj_robot/ros/catkin_ws_for_carla/src/carla_ros_bridge/src/carla_ros_bridge/client.py", line 9, in <module>
    from carla_ros_bridge.bridge import CarlaRosBridge
ImportError: No module named carla_ros_bridge.bridge
[Testcase: testtestTopics] ... ERROR!
ERROR: max time [20.0s] allotted for test [testTopics] of type [rostest/publishtest]
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostest/runner.py", line 148, in fn
    self.test_parent.run_test(test)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rostest/rostest_parent.py", line 132, in run_test
    return self.runner.run_test(test)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 684, in run_test
    (test.time_limit, test.test_name, test.package, test.type))
--------------------------------------------------------------------------------

[ROSTEST]-----------------------------------------------------------------------

SUMMARY
 * RESULT: FAIL
 * TESTS: 0
 * ERRORS: 1
 * FAILURES: 0

System configuration:
ubuntu16.04
python2.7
How can I solve this problem?

Hello @chengjinjack again!
Did you solve this issue? In #582 you talked about similar (but not the same) error.

@danil-tolkachev
Yes. I have solved this issue.Thanks!

Hi @chengjinjack
Could you explain how did you solve this problem? I met the same error. Thanks in advance.

@ChiZhang95
Hi.
When I run intot the issue,I uninstalled  protobuf  ,then  re-install it .As follows:
1.sudo apt-get remove python-protobuf 2.sudo pip2 uninstall protobuf . 3.sudo pip2 install  protobuf
Hope it helps you！

Hi @chengjinjack , Thanks very much. But it seems the error is still there.
My system configuration is Ubuntu 16.04 and python 2.7.12.


Error

http://pastebin.com/CH2dJ11f

I have the same problem: http://pastebin.com/qJc5cj6d
I have the last version: 217

WaterfallMC/Waterfall-Old#74


Configure Azure Pipelines

This pipeline configuration builds the application and produces a build for the Release configuration.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: tarun-ksahu sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


[Explore]: Test PRs securely on Concourse

Background
Testing PRs on Concourse poses security risks, as it would allow anyone to run arbitrary code on our workers. We want to set up a system that allows us to manually approve the PRs that we want to be tested, so that we can vet the changes before they run.
One way of doing this would be:

enable the Dismiss stale pull request approvals when new commits are pushed GitHub setting
use the required_review_approvals param on the github-pr-resource

This way only approved PRs would be tested, and the code couldn't be changed without requiring a new approval. Having to approve every commit on a PR could be inconvenient though, so let's see if we can find something better.
Acceptance Criteria
A proposed Concourse/GitHub configuration that allows us to test PRs on Concourse with confidence.

This is partially implemented by #904. Instead of depending on at least one approval (which can be tedious for foundation team members) we made the github pr resource trigger only if a special e2e-allowed label is set on the PR. The label can be set in one of two ways:

Out korifi-bot is automatically setting it on PRs which has an author who is on the team (a concourse job does that), because team members are trusted
A team member can set it on a PR filed by an external contributor after looking at the code if the code looks safe to run on the test cluster.

The slight problem with the current implementation is that we are depending on assignableUsers as returned by the gh cli. We are not totally sure what is the lifecycle of that group and how people go in and out of it (it looks like a superset of the team). Maybe a better approach will be to list the github handles of @cloudfoundry/cf-k8s using the Github API (as the gh cli does not seem to be able to do that).
Here is the current script: https://github.com/cloudfoundry/cf-k8s-ci/blob/main/pipelines/scripts/allow-e2e.sh

I've made the change:

use GET https://api.github.com/orgs/cloudfoundry/teams/cf-k8s-members to list the team members
use POST https://api.github.com/repos/cloudfoundry/korifi/issues/PR_NUMBER/labels to add the label.

Unfortunately, the korifi-bot needs to be in the cloudfoundry org, otherwise the first request returns a 404. So I've switched over to one of my tokens in the vault config for now. Once we get the korifi-bot added to cloudfoundry, we can put its values back in concourse/main/github/pr-label-setter in the username and token fields.

Now korifi-bot is part of the cloudfoundry org, it can list the cf-k8s team members. I've switched vault concourse/main/github/pr-label-setter to the korifi-bot credentials and the label setter still works. So this issue looks done to me.


Stop using poetry as a build backend

Due to some concerns listed in https://github.com/python-poetry/poetry/issues/3332 poetry does not as of yet support the PEP-621 form of shared metadata information.
As I want to be able to more easily switch build backends in the future let's switch to the pip build backend.

Just FYI—pip is a build frontend, not a backend. Setuptools, flit_core, Hatchling, pdm and poetry are all build backends (though some also offer build frontends too, at least for their own build system).

Ah, thanks for the clarification :)

Done and switched to pdm.


Edge drawn to Polygon does not connect properly

The edge to the activation conditions (hexagon polygon element) does not connect properly, but terminates somewhere above the shape. When moving the shape, the position it 'connects' to floats even further away from the actual shape..
It probably means we're doing something wrong with calculating where it should connect to. Solving this should include getting rid of the magic offsetX/Y values (https://github.com/ESI-FAR/INA-tool/pull/19/files#r1617226329)

Closed with #32


ENH: check coreg output subject name

This PR prompts a dialog when the name of the subject chosen to save the scaled anatomy already exists.
It's still work in progress. I ran into issues because the dialog does not start from the main thread.
It's an item of #8833

I ran into issues because the dialog does not start from the main thread.

The dialog must be created on the main thread and the request to show must be made indirectly with a signal. I had to do some Qt gymnastics to support this. It's the idea behind the convenience class _QtDialogCommunicator.

An idea for another PR would be to organize all the dialogs in _configure_dialogs and reuse them instead of creating a new instance each time.

This is ready for review @larsoner, @agramfort

It seems like it's mostly there, but I did find a few bugs by testing the code on some simple cases.
Discard
Unrelated to this PR, but something we should fix, is another bug related to the Discard business. On my Ubuntu Linux system running Gnome-shell, I get:
Traceback (most recent call last):
  File "/home/larsoner/python/mne-python/mne/viz/backends/_qt.py", line 67, in func
    callback(button_name)
  File "/home/larsoner/python/mne-python/mne/gui/_coreg.py", line 1799, in _close_dialog_callback
    assert button_name == "Discard"
AssertionError

In my case it's "Close without Saving", but I really think we should stop trying to find every variant of "discard"-like things that the given OS / UI can decide to put as the "discard" text. It seems fragile, and I don't think it adds much value.
Incorrect prompt on exit
First bug, I don't have any MRI fiducials for sample. if I do this:
$ mne coreg -s sample -d subjects --fif MEG/sample/sample_audvis_raw.fif --trans MEG/sample/sample_audvis_raw-trans.fif

then lock fids, change to uniform scale mode, set to 99, put subject name as "test", then click the X to exit, I get a prompt to save the scaled subject anatomy (good!). But if I click "Save":

It saves the MRI fiducials, even though I wasn't prompted about it (probably no prompt because I did not modify the MNI-pos fiducials, which is good, but it's bad that it wrote it out anyway):

This seems like a bug that we should fix before 1.0

During this save operation, the UI is totally frozen. That's okay, but if we could change the mouse pointer to be a "busy" one while hovering over the Qt window, that's at least a minimal sign to the user that they shouldn't expect any of their inputs to work. Someday maybe we can add a progress bar with UI updates -- let's add a progressbar to the TODO. Hopefully the "busy" cursor is easy and doable here, but if not, add that to the TODO as well.

Enhancement
When the user enters text into the "Save scaled anatomy" text entry box, it should be easy enough to check to see if the text that they entered is in the set(subjects) in the given subjects_dir (this check should take < 1 ms, so with every key stroke should be fine). If it is, you could modify the save button to indicate this. I'm not sure if there is a standard way to do this, but even something like button.setStyleSheet("border:2px solid #ff0000;") might be enough to indicate to the user that they have typed in a "taken" subject name, which could save them from needing to click to find out via the prompt. Then, the prompt is really there just to make sure they're certain that they want to overwrite.
Bug
Remove subjects/sample/bem/sample-fiducials.fif if it exists. Run the command line above from "Incorrect prompt on exit". Click "Lock" to accept the MNI fids. Scale mode to uniform. Enter 90. Enter "test" as the subject name. (It should already exist from trying the "Incorrect prompt on exit" before. If it doesn't just save it, and restart this process.) Clicking "Save scaled anatomy" correctly prompts for overwrite, but "Cancel" and "No" are both provided, even though in this case (when not in "Exiting" mode) they do the same thing in principle, right? So it seems like "Cancel" is not needed here. When exiting, you do need both, because "no" means "discard the edits and exit" while "cancel" just means "cancel the save and cancel the exit, return me to the UI without doing anything".
Another bug here is that, even if I click "No", the MRI fiducials are written to disk again.

It saves the MRI fiducials

The function _save_subject() was always saving fiducials. I think it was needed before but now that we have a dialog to handle that, I can remove it.

Clicking "Save scaled anatomy" correctly prompts for overwrite, but "Cancel" and "No" are both provided, even though in this case (when not in "Exiting" mode) they do the same thing in principle, right?

To be exact, the function _save_subject() also handles BEM computation. I'll rework the scenario for "No" and remove "Cancel".

I'll update once https://github.com/mne-tools/mne-python/pull/10397 is merged

I removed some unused traits, fixed a bug with cursor and implemented your suggestions @larsoner
I also spent some time trying to fix the issue with Test Notebook but I did not find anything so far.
When I tested using pyvista-wheels on a remote server, I ran into errors with GLIBC.

It works much better!

fixed a bug with cursor and implemented your suggestions @larsoner

For me the spinning cursor works/appears if my mouse is over the main window, but not if it's over the modal dialog save/close/discard dialog, or over the overwrite dialog (if that's also opened, in this case it is -- I have already clicked "yes" to overwrite here):
https://user-images.githubusercontent.com/2365790/156604565-761c4d91-54df-4a24-8546-1656f513fab9.mp4
This is not a deal breaker, but if you can find a quick fix for this then that's even better! If you don't feel like looking now or it turns out not to be easy, though, feel free to add it to the coreg TODO list for future work.
One thing that might be good to fix is that, if the subject name already exists (here, test), and you scale, click exit, get a dialog to save, say yes, then get a dialog to overwrite, and say no, this shouldn't exit but rather be the same as saying cancel. That way there is no risk of lost work. In other words, this is wrong/dangerous ('test' already exists for me starting this):
https://user-images.githubusercontent.com/2365790/156605739-5469f607-f8c5-475c-a41d-1155f536acf4.mp4
I know "cancel" was an option on that second dialog, but I have a feeling users will readily click "no" here. So the first (close) dialog should only actually close / accept the close event if all subsequent dialogs that are spawned successfully save. Or maybe better, that second dialog needs to say "Close without saving" rather than "No", since "No" does not make it clear that this really ends up being a "Discard"-like operation.

I replaced "No" by "Discard" :sweat_smile:

And I hope the issue with the cursor is solved as well

And I hope the issue with the cursor is solved as well

It's not, this is after clicking "yes" to save, see how the cursor stays an arrow on the modal dialog even though now it should be spinning there, too:
https://user-images.githubusercontent.com/2365790/156773696-944f9c4a-6904-403b-bc1a-992684c27839.mp4
I pushed a little commit to set/unset the cursor for the dialog itself during the callback. It fixes this behavior above for me @GuillaumeFavelier :
https://user-images.githubusercontent.com/2365790/156774207-2226ed5f-5ed0-41f2-9ece-5b7cf6e36c63.mp4
I can't figure out how to get the spinning cursor to show even on the window decorations, but this is probably good enough. (Maybe QApplication.setOverrideCursor, but this seems like overkill!) Let me know if you're happy with this and I'll merge!

So it needs to be set for each widget even though I set the parent of the dialog to be the window? Alright, I'm okay with a WaitCursor to wait until the end of the callback :+1:

Let me know if you're happy with this and I'll merge!

BTW @larsoner, I opened https://github.com/mne-tools/mne-python/pull/10411 to deal with Test Notebook. It does not seem to finish in here.

Thanks @GuillaumeFavelier !


[BUG] multiple lsp_server.py processes are spawned for each folder in a multi-root workspace

I've been trying to troubleshoot some slowness from VSCode and have followed clues that have led me to some observations about the pylint extension. I'm hoping for some clarity on the behavior or perhaps some reassurance that there is a bug.
When I go to Help > Open Process Explorer I see two pylint subprocess families, each of which contains sub-nodes (sub-processes?) for every folder in my multi-root workspace.

I only expected one process to be running per folder in my workspace, so this felt like a likely source of duplicative work.

NOTE: My .code-workspace file contains one folder for the root ("path": ".") and then folders for every package ("path": "pkg-a") - of which there are quite a few.
redacted `.code-workspace` file

{
  "folders": [
    {
      "path": "."
    },
    {
      "path": "pkg-a"
    },
  ],
  "settings": {
    "python.languageServer": "Pylance",
    // "python.defaultInterpreterPath": ".venv/bin/python" is defined per-component in [dir]/.vscode/settings.json
    "pylint.args": [
      "--rcfile=${workspaceFolder:datachat}/.pylintrc", // shared pylint config for all packages.
    ],
}

redacted root `.vscode/settings.json` file

{
  "python.defaultInterpreterPath": "pyenv exec python",
  "python.analysis.include": [
    "fake" // disable analysis at the root folder, since it will be handled for all relevant sub-folders.
  ],
  "python.testing.pytestEnabled": false,
  // NOTE: I'd like to do something like `"pylint.enable": false` here to disable the extension in specific sub-folders, but don't see a way to do that...
}

redacted `pkg-a/.vscode/settings.json` file

{
  "python.testing.pytestEnabled": true,
  "python.defaultInterpreterPath": ".venv/bin/python",
}

The logs seem to support the fact that two identical pylint lsp_server.py processes are running. Everything is logged twice in rapid succession (full logs below):
2023-12-13 09:47:09.023 [info] Server run command: /Users/tyler/.pyenv/versions/3.11.6/bin/python /Users/tyler/.vscode/extensions/ms-python.pylint-2023.10.1/bundled/tool/lsp_server.py
2023-12-13 09:47:09.029 [info] Server: Start requested.
2023-12-13 09:47:09.029 [info] Server run command: /Users/tyler/.pyenv/versions/3.11.6/bin/python /Users/tyler/.vscode/extensions/ms-python.pylint-2023.10.1/bundled/tool/lsp_server.py
2023-12-13 09:47:09.029 [info] Server: Start requested.
2023-12-13 09:47:10.212 [info] CWD Server: /Users/tyler/dev/workspace
2023-12-13 09:47:10.212 [info] CWD Server: /Users/tyler/dev/workspace

Full pylint extension startup log
Questions

Why does the pylint extension have two process families? Are they redundant? If so, is the current behavior a "bug"?
Is there a way (or can it be added) to disable the pylint extension for specific folders in a multi-root workspace?

I'm happy to add a separate issue for this, if it would amount to a feature request.

Is there a work-around that would allow me to achieve a similar result as "pylint.enable": false?

e.g. pylint will actually run for the folder, but it would exit almost immediately without doing any work (or something to that effect).

If my multi-root workspace has both the root "." and a subdirectoy "./pkg-a" and I save changes to ./pkg-a/main.py, will two separate pylint processes perform the lining, or will the extension avoid that redundancy?

What's the best way to avoid this redundancy (if any)?

Why does the pylint extension have two process families? Are they redundant? If so, is the current behavior a "bug"?

FWIW - I tried the pre-release version and I now only see a single process family. Maybe this part has already been addressed... confirmation that that was an identified issue and has been intentionally addressed would be great.
I'd still love some input on my other questions, but I can open a separate issue if that would help.
Thanks in advance!

UPDATE:: Nevermind, the issue is still present in the pre-release version. In fact, certain actions seem to trigger spawning ADDITIONAL pylint process families, multiplying the problem.

Steps I took to provoke this (not sure which might be relevant or superfluous):

Use VSCode VCS branch pane to switch to a different branch
Remove "pylint.args" setting from .code-workspace and move it to a specific folder's .vscode/settings.json file (and save those changes)
Open a __init__.py file from a package directoy and save it.

There now seem to be anywhere from 4-6 pylint processes for every folder:
2023-12-13 11:33:09.238 [info] /opt/homebrew/bin/python3 -m pylint --reports=n --output-format=json --version --clear-cache-post-run=y --from-stdin /Users/tyler/dev/workspace/pkg-a/web-server/migrations/__init__.py
2023-12-13 11:33:09.238 [info] /opt/homebrew/bin/python3 -m pylint --reports=n --output-format=json --version --clear-cache-post-run=y --from-stdin /Users/tyler/dev/workspace/pkg-a/web-server/migrations/__init__.py
2023-12-13 11:33:09.238 [info] /opt/homebrew/bin/python3 -m pylint --reports=n --output-format=json --version --clear-cache-post-run=y --from-stdin /Users/tyler/dev/workspace/pkg-a/web-server/migrations/__init__.py
2023-12-13 11:33:09.238 [info] /opt/homebrew/bin/python3 -m pylint --reports=n --output-format=json --version --clear-cache-post-run=y --from-stdin /Users/tyler/dev/workspace/pkg-a/web-server/migrations/__init__.py
2023-12-13 11:33:09.239 [info] CWD Linter: /Users/tyler/dev/workspace/pkg-a
2023-12-13 11:33:09.239 [info] CWD Linter: /Users/tyler/dev/workspace/pkg-a
2023-12-13 11:33:09.239 [info] CWD Linter: /Users/tyler/dev/workspace/pkg-a
2023-12-13 11:33:09.239 [info] CWD Linter: /Users/tyler/dev/workspace/pkg-a

I'm guessing that whatever is causing this, could be a contributor to #454, also. Just a hunch.

Is there a work-around that would allow me to achieve a similar result as "pylint.enable": false?

e.g. pylint will actually run for the folder, but it would exit almost immediately without doing any work (or something to that effect).

FWIW, I tried --disable=all, but then pylint emits non-json output (No files to lint: exiting.) and causes a JSON parsing error from the extension. The extension should probably gracefully handle this case (probably by checking the exit code).

Use VSCode VCS branch pane to switch to a different branch

Switching branches seems to be a somewhat reliable reproduction for me.

@tboddyspargo Can you elaborate on the actions that seem to trigger this?

Why does the pylint extension have two process families? Are they redundant? If so, is the current behavior a "bug"?

There should be 1 process family per VS Code instance. lsp_server is the main coordinator, and it will spawn processes under it depending on the python selected for the various folders in the multi-root case. The sub processes will be using lsp_runner. Basically if there is a settings change, then it triggers launching of these processes. But, the life-time is controlled by VS Code.
I think in your case moving between branches, is changing some setting that is triggering this.

Is there a way (or can it be added) to disable the pylint extension for specific folders in a multi-root workspace? I'm happy to add a separate issue for this, if it would amount to a feature request.

I just merged this feature. It will be in pre-release tomorrow. Basically pylint.enabled: false would turn it off for that workspace folder.

Is there a work-around that would allow me to achieve a similar result as "pylint.enable": false? e.g. pylint will actually run for the folder, but it would exit almost immediately without doing any work (or something to that effect).

See above answer. PR here https://github.com/microsoft/vscode-pylint/pull/475

If my multi-root workspace has both the root "." and a subdirectoy "./pkg-a" and I save changes to ./pkg-a/main.py, will two separate pylint processes perform the lining, or will the extension avoid that redundancy? What's the best way to avoid this redundancy (if any)?

It will (should) only run under ./pkg-a. We try to go from the file to the nearest parent that is a workspace folder.

The issue with https://github.com/microsoft/vscode-pylint/issues/454 is different. ruff and pylint use the same server base. ruff is able to manage with lint on change, but pylint is not, and the blocker here is due to time it takes to process all the queued requests. ruff run fast enough that the que gets cleared immediately.
The solution there is to switch to a mode where the IDE requests for the problems rather than the LSP server reporting problems on open, save, or close. That way, IDE has more control over when such request needs to be raised, and it could control cancellation of those requests.

Thanks for your responses, @karthiknadig! I'm excited to hear that enable configuration option will be arriving soon.

@tboddyspargo Can you elaborate on the actions that seem to trigger this?

Why does the pylint extension have two process families? Are they redundant? If so, is the current behavior a "bug"?

... Basically if there is a settings change, then it triggers launching of these processes. But, the life-time is controlled by VS Code.
I think in your case moving between branches, is changing some setting that is triggering this.

As I think about which settings changes might be coming along as part of the branch change, I examined a diff of the recent branch change I did (corresponding to my screenshot above). The only changes I see are:

Added a new folder to .code-workspace file
Added a corresponding .vscode/settings.json file in that folder (matching the pkg-a/.vscode/settings.json example from above).

Could changes to the members of the folders key in a .code-workspace file trigger this kind of process duplication? In my examples, the number of additional processes doesn't really seem to correspond to the number of added folders, but there could be other contributing factors.
FWIW, when I just make manual modifications to the .code-workspace file or any settings.json file in my multi-root workspace (no branch changes), I do see the single pylint extension parent process restarting all of its folder-specific subprocesses without any extraneous process families being spawned.

As I think about which settings changes might be coming along as part of the branch change, I examined a diff of the recent branch change I did (corresponding to my screenshot above). The only changes I see are:

Added a new folder to .code-workspace file
Added a corresponding .vscode/settings.json file in that folder (matching the pkg-a/.vscode/settings.json example from above).

I just restarted VSCode and then performed another branch switch in which non-pylint config changes were made to .code-workspace and the roo .vscode/settings.json file. Two new pylint process families were spawned (bringing total up to 3, each with subprocesses for every workspace folder).
Changes in the files included:

changing to "editor.defaultFormatter": "ms-python.black-formatter" and "editor.formatOnSaveMode": "file"
Adding "ruff.lint.args"
Removing some "python.analysis" options
Adding "python.testing.pytestEnabled": false, to the root settings.json file

My folder theory doesn't seem to hold water.
Next, and without restarting VSCode, I switched to another branch that contained no .code-workspace or settings.json differences with the previous branch. An alarming number of process families were spawned and VSCode became quite sluggish:


Unix domain socket crashes program

I get a program crash while using Unix domain sockets.
I am still working on a Redis client. While adding Unix domain support, I found that Crystal crashes my program for larger messages.
This program shows the issue (requires a Redis server with a Unix domain socket at /tmp/redis.sock):
require "socket"

io = UNIXSocket.new("/tmp/redis.sock")
6.times do |i|
  io << "*3\r\n"
  io << "$3\r\n"
  io << "SET"
  io << "$#{i.to_s.length}\r\n"
  io << "foo\r\n"
  io << "#{i.to_s}\r\n"
end
io.flush

I get 3 different behaviours, completely random.
First, a simple crash:
$ crystal run experiments/unixsocket-hanging.cr
Using compiled compiler at .build/crystal
Program terminated abnormally with error code: 13

Second, a crash with stacktrace:
$ crystal run experiments/unixsocket-hanging.cr
Using compiled compiler at .build/crystal
Error writing file: Socket is not connected (Errno)
*Exception@Exception#initialize<Errno, String>:Array(String) +46 [4461984222]
*Errno#initialize<Errno, String>:Array(String) +128 [4461984160]
*Errno::new<String>:Errno +119 [4461984007]
*UNIXSocket@FileDescriptorIO#write<UNIXSocket, Slice(UInt8), Int32>:Nil +247 [4461983495]
*UNIXSocket@IO#write<UNIXSocket, Slice(UInt8)>:Nil +61 [4461983229]
*String#to_s<String, UNIXSocket>:Nil +90 [4461971946]
*UNIXSocket@IO#<<<UNIXSocket, String>:UNIXSocket +22 [4461983142]
__crystal_main +864 [4461961392]
main +32 [4461963264]
Program terminated abnormally with error code: 256

Third, the program terminates seemingly successfully:
$ crystal run experiments/unixsocket-hanging.cr
Using compiled compiler at .build/crystal

Since we got major changes to IO in current head, could you please note which version you tested against?

Ups... I should have included this information right away.
I compiled my Crystal from master branch. Latest commit is 315aaf2.

With TCPSocket, the program works just fine.

Here is a simpler program that triggers the same crash:
require "socket"

io = UNIXSocket.new("/tmp/redis.sock")
6000.times do
  io << "SET foo 100"
end
io.flush

I'm trying to reproduce this but I get Error connecting to '/tmp/redis.sock': No such file or directory (Errno).
I start redis-server but no luck. It seems it doesn't write /tmp/redis.sock. I also try specifying a config file with that location for the unixsocket but nothing happens.
@stefanwille How can I tell redis-server to use that file? This is on a Mac.

Hi @asterite, I am working on a Mac too.
Please edit redis.conf (mine is at /usr/local//etc/redis.conf, created through Homebrew) and uncomment these two lines:
#unixsocket /tmp/redis.sock
#unixsocketperm 755

Then restart Redis.

Well, I debugged it but I can't find what's wrong. One thing we are not doing is setting sockaddr_un's member "sun_len". But I tried that and I also get a failure. I even tried a C program and it fails. But Ruby "works": I get a write: Broken pipe (Errno::EPIPE) after about 5960 writes.
I don't know if this fails in linux too, somebody with linux will have to try it. Might only be failing in darwin...

I also tried this with a C program and for me too it failed with a 'Broken pipe'. I think this is Redis closing the connection, as it expects "\r\n" and doesn't receive it in the simpler program. I have added the CR/LF and now it works in C. The Crystal program with CR/LF hangs though, most of the time.
require "socket"

io = UNIXSocket.new("/tmp/redis.sock")
6000.times do
  io << "SET foo 100\r\n"
end

I removed the call to io.flush btw.
I assumed that Crystal might hang because a lot of data piles up to be received. So when I add a call to io.gets, it works in Crystal too:
require "socket"

io = UNIXSocket.new("/tmp/redis.sock")
6000.times do
  io << "SET foo 100\r\n"
  io.gets
end

The call to io.gets should not be necessary though, and it isn't in the C version.
Also, the more complex program from above still crashes with the added io.gets:
require "socket"

io = UNIXSocket.new("/tmp/redis.sock")
6.times do |i|
  io << "*3\r\n"
  io << "$3\r\n"
  io << "SET"
  io << "$#{i.to_s.length}\r\n"
  io << "foo\r\n"
  io << "#{i.to_s}\r\n"
  io.gets
end

#triage Attempt to recreate on 0.16.0
redis-server startup command, simplified:
$ redis-server --unixsocket /tmp/redis.sock --unixsocketperm 755
# 2nd terminal
$ redis-cli
<IP_ADDRESS>:6379> monitor
OK
# 3rd terminal, try sending a payload to the unix socket
$ echo "SET foo 1" | nc -U /tmp/redis.sock
+OK
# 2nd terminal (monitor) displays:
1463236492.868717 [0 unix:/tmp/redis.sock] "SET" "foo" "1"

Running this example produces no error, and updates the value of foo in redis to the number of the iteration looped:
io = UNIXSocket.new("/tmp/redis.sock")
6000.times do |iter|
  io << "SET foo #{iter}\r\n"
end

MONITOR output:
...
1463236857.620739 [0 unix:/tmp/redis.sock] "SET" "foo" "5998"
1463236857.620750 [0 unix:/tmp/redis.sock] "SET" "foo" "5999"

So the simple example uses a line ending, no .flush or .gets.
Taking the more complex example, I was able to also produce valid Redis messages, with some modifications:
io = UNIXSocket.new("/tmp/redis.sock")
600.times do |iter|
  key = "foo"

  io << "*3\r\n"
  io << "$3\r\n"
  io << "SET\r\n"
  io << "$#{key.size}\r\n"
  io << "#{key}\r\n"
  io << "$#{iter.to_s.size}\r\n"
  io << "#{iter}\r\n"
  # io.gets - does not change behavior, responds with "+OK\r\n"
end

String no longer has .length so I used .size
I added the iter modifier for some noise to see the value change
Didn't require use of io.flush or io.gets to see the values appear in redis db

The Redis protocol requires enumerating each element's size, something that was missing from the original example.
This leads me to believe that this is not a bug in the UnixSocket library, rather incorrect implementation of the wire protocol.
Recommend review for closure.

I will retest once I get my hands on my computer, which will be in 2 weeks.

I retested and I don't see the issue anymore. Thanks @miketheman 😄


⚠ ClamAV has degraded performance

In 300b64a, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 63 ms

Resolved: ClamAV performance has improved in 9b1e41d.


⚠ Bofrost.at has degraded performance

In a732354, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2453 ms

Resolved: Bofrost.at performance has improved in 83f0445 after 7 minutes.


Vi movement bindings 't' and 'f' were off by one.

Ref: https://github.com/dbcli/mycli/issues/167
'dt' and 'df' are off by one in the Vi mode.

Thanks @amjith for pointing out the issue.
However, the patch is not completely correct. It fixes df and dF, but breaks f again.
It's supprising actually, because "dw" for instance does not delete the target character of "w", nor does it happen with any of the other key bindings.
I think it would be better to give the CursorRegion class an additional parameter, include_character_below_cursor or something like that, which when True, also be copies/cut/delete the target character.

You're right. The patch is not quite complete.
I was trying to change the create_transform_handler function to handle this case but it had no effect.

This has been fixed. (Not yet released on Pypi.)
Most of-by-one stuff has been fixed in: https://github.com/jonathanslenders/python-prompt-toolkit/commit/f56a75a96160b5ee3112ee1603eaf4087a09d092
Thanks to @yyt16384.
So now we also have separate key bindings for Vi text objects (motions) and operators.


Hydrated files are read-only

This was done to give the impression that the pak file is only virtualized, but it really doesn't matter if people edit them. If they delete the projected folder after making changes it's their own fault.

Released in v1.1.0


C# implicit operator method uses expression-bodied syntax in C# 5 mode

This is not valid for C# 5:
public static implicit operator Instruction(long Integer) => new Instruction{Integer = Integer};

Oh damn.  I'll fix it.


[enhancement] Open the floating label mark box in the right side of the image instead bottom

BEHAVIOR:

EXPECTED:
An option to open the box in the right side of the image to be more visible.

@leo-smi Is it possible to attach the image too?

@leo-smi Is it possible to attach the image too?

Sorry, which image? The tomato or the screenshot of the expected behavior?

Sure:

@leo-smi  the fixes are merged into the master branch.

Thank you, it's working.


Export MediaStoreClass interface

The MediaStoreClass interface is private and used by public exports, which then breaks TS compilation for projects using Tina.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@brookjeynes-ssw @kldavis4 @ncn-ssw @jeffsee55 @JackDevAU could we get some attention to this?
It's a simple 6 character PR that exports the MediaStoreClass without any downsides but helps us setting up a custom media store without any TS errors.

Steps to replicate:
npx create-tina-app@latest

Choose npm, my-tina-app, NextJS starter
cd my-tina-app
npm install next-tinacms-s3

Edit the tina/config.tsx:
import { defineConfig } from "tinacms";

import Post from "./collection/post";
import Global from "./collection/global";
import Author from "./collection/author";
import Page from "./collection/page";

const config = defineConfig({
  clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID!,
  branch:
    process.env.NEXT_PUBLIC_TINA_BRANCH! || // custom branch env override
    process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF! || // Vercel branch env
    process.env.HEAD!, // Netlify branch env
  token: process.env.TINA_TOKEN!,
  media: {
+    loadCustomStore: async () => {
+      const pack = await import("next-tinacms-s3");
+      return pack.TinaCloudS3MediaStore;
+    },
-    // If you wanted cloudinary do this
-    // loadCustomStore: async () => {
-    //   const pack = await import("next-tinacms-cloudinary");
-    //   return pack.TinaCloudCloudinaryMediaStore;
-    // },
-    // this is the config for the tina cloud media store
-    tina: {
-      publicFolder: "public",
-      mediaRoot: "uploads",
-    },
  },
  build: {
    publicFolder: "public", // The public asset folder for your framework
    outputFolder: "admin", // within the public folder
  },
  schema: {
    collections: [Page, Post, Author, Global],
  },
});

export default config;

Edit the tsconfig.json and turn on composite:
{
  "compilerOptions": {
    "target": "ES2020",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
+    "composite": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "plugins": [
      {
        "name": "next"
      }
    ]
  },
  "exclude": ["node_modules"],
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"]
}

Go back to the config file and you will get this error:
Exported variable 'config' has or is using name 'MediaStoreClass' from external module "./my-tina-app/node_modules/tinacms/dist/index" but cannot be named.ts(4023)

Or just run npx tsc (but you will get a bunch more type errors as well):
tina/config.tsx:8:7 - error TS4023: Exported variable 'config' has or is using name 'MediaStoreClass' from external module "./my-tina-app/node_modules/tinacms/dist/index" but cannot be named.

8 const config = defineConfig({
        ~~~~~~

Repository: https://github.com/jaschaio/tina-mediastore-ts

Thanks for that! Works for me


⚠ Bofrost.de has degraded performance

In 13a7121, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 2652 ms

Resolved: Bofrost.de performance has improved in 58db8fc after 13 minutes.


Can not run yarn test

hello
I git clone this Repositories and Run yarn ganache in a separate terminal
but when I type yarn test ,it gose wrong:
ubuntu@ip-172-31-15-69:~/counterfactual$ yarn test
yarn run v1.9.4
$ yarn ganache &> ganache.log & yarn build:pre && yarn build:packages && wsrun test $PKG --exclude-missing && yarn build:post
$ ./bin/prebuild
$ ganache-cli --gasLimit 0xfffffffffff --port 9545 --account="${npm_package_config_unlockedAccount}" -m "${npm_package_config_mnemonic}"
$ wsrun build $PKG --fast-exit -r --serial --exclude-missing
@counterfactual/configs has no  build script, skipping missing
@counterfactual/run-with-ganache has no  build script, skipping missing
@counterfactual/typescript-typings has no  build script, skipping missing
@counterfactual/test-utils
$ tsc --project tsconfig.json.modified
 | error TS5014: Failed to parse file 'packages/test-utils/tsconfig.json.modified/tsconfig.json': Unexpected token u in JSON at position 0.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
`yarn build` failed with exit code 1
Stopping 1 active children
Aborted execution due to previous error
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ubuntu@ip-172-31-15-69:~/counterfactual$ Ganache CLI v6.1.7 (ganache-core: 2.2.0)
Error: listen EADDRINUSE <IP_ADDRESS>:9545
    at Server.setupListenHandle [as _listen2] (net.js:1336:14)
    at listenInCluster (net.js:1384:12)
    at doListen (net.js:1510:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:266:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

system configuration
ubuntu@ip-172-31-15-69:~/counterfactual$ uname -a
Linux ip-172-31-15-69 4.4.0-1061-aws #70-Ubuntu SMP Fri May 25 21:47:34 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ip-172-31-15-69:~/counterfactual$ node -v
v10.8.0
ubuntu@ip-172-31-15-69:~/counterfactual$ nodejs -v
v8.11.3
ubuntu@ip-172-31-15-69:~/counterfactual$ yarn -v
1.9.4
ubuntu@ip-172-31-15-69:~/counterfactual$

NEED HELP!

@zhouzhou84 I was unable to repro the issue with the same system configuration as you posted.
So the sequence of steps you ran was

git clone
yarn
yarn ganache
yarn test

correct?
Seems like this is the offending line is
Failed to parse file 'packages/test-utils/tsconfig.json.modified/tsconfig.json'

as that's not a valid path.
What do ls packages/test-utils and cat packages/test-utils/package.json show?

@zhouzhou84 the build scripts have been updated so you shouldn't have problems if you clone and follow the steps again. You can let me know by making an issue if you do run into other problems.


Error: package or namespace load failed for 'tidyverse' Combine_Results.R

Dear Dr. Neavin,
I successfully ran multiple doublet detecting wrapper scripts through the singularity image. I am having trouble combining the results together with the Combine_Results.R script. I consistently have the error
Error: package or namespace load failed for 'tidyverse' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/stornext/HPCScratch/home/brown.d/R/x86_64-pc-linux-gnu-library/4.1/dplyr/libs/dplyr.so':
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /stornext/HPCScratch/home/brown.d/R/x86_64-pc-linux-gnu-library/4.1/dplyr/libs/dplyr.so)
Even the help command triggers this error
singularity exec Demuxafy.sif Combine_Results.R -h

My understanding is the singularity image contains all the dependancies including tidyverse. Can you offer some assistance please? I am running Image_version: = 1.0.3

Hello! Thanks for reaching out.
I'm pretty sure that this is happening because your system is trying to load packages from your local location, not from the singularity image. For past scripts, I have hardcoded in the library location but it looks like I overlooked that with this script. I'll be sure to update that and release the new version soon but I don't have access to the computer that I use to build singularity images for a couple of weeks (so can't update it till then)
In the meantime, could you try setting R_LIBS_USER to "/usr/local/lib/R/site-library" before running the singularity command? And if that doesn't work, try setting R_LIBS_SITE to the same path as well. I'm hoping that will force it to pull from within the singularity image.
You might also try running
singularity exec Deumuxafy.sif which R

To make sure that it's calling R from the image as opposed to on in your $PATH
Please let me know if any of those options work in the short term.
-Drew

Hi Drew,
Thanks changing both variables solved the issue. Please hardcode the path in the next version.