Good way to eliminate duplicates in pot file

As the title says, I'm trying to find a way to eliminate duplicates in pot file.
The job can be achieved by using msguniq command and I can run it manually in Terminal but I'm wondering if I can do that from within this plugin. I know there is the processPot callback function to play with the resulted pot file, but I'm not quite familiar with how it should work.
Does anyone have experience with this? If yes can you let me know how it should be done?
Thank you all!

Hi @ngocphamm, duplicate strings should already be removed from the generated POT file if your'e using this module. Let me know if you're seeing duplicates after running it, though.

Thanks for super fast response @bradyvercher!
So for now I have this in Gruntfile.js
makepot: {
    plg: {
        options: {
            cwd: '<%= dir.dest %>',
            domainPath: '/languages',               // Where to save the POT file.
            mainFile: '<%= cfg.mainFile %>',        // Main project file.
            potFilename: '<%= cfg.slug %>.pot',     // Name of the POT file.
            type: 'wp-plugin',                      // Type of project (wp-plugin or wp-theme).
            exclude: [],                            // List of files or directories to ignore.
            potHeaders: {
                poedit: true,
                'report-msgid-bugs-to': '<%= cfg.contactLink %>',
                'plural-forms': 'nplurals=2; plural=n != ',
                'last-translator': '<%= cfg.langTeamEmail %>',
                'language-team': '<%= cfg.langTeamEmail %>',
                'x-textdomain-support': 'yes',
                'x-poedit-keywordslist': true
            },
            processPot: null
        }
    }
},```

Then the generated pot file has these 2 duplicated entries

#. Plugin Name of the plugin/theme
msgid "My Plugin Name"
msgstr ""
#: class/class-plugin.php:56
msgid "My Plugin Name"
msgstr ""```
because of this piece of code, I suppose.
add_action( 'admin_menu', function() {
			add_menu_page(
				__( 'My Plugin Name', 'plg-slug' ),       // Page title.
				__( 'My Plugin Name', 'plg-slug' ), // Menu title.
				'manage_options',
				SETTING_PAGE,
				array( '\MyPlugin\Plugin', 'config_page' ),
				Helper::get_base64_icon(),
				'99.999'
			);
		} );```

Should there not be duplicates in this case?

Hmm, I'm not sure about that one.
That first entry is the name of the plugin from the header in your main plugin file.
The second entry comes from that add_menu_page() call, but even though you have two gettext calls there with the same string, those aren't being duplicated.
Deduplication in this module relies on the gettext-parser module, so it may consider something about those strings to be unique. Maybe the presence of a comment for the plugin header entry? The delimiter is different (#. vs #:), so the comment may be serving as context to differentiate the strings.
I haven't looked into this before, so that's all I have for now without digging in deeper.

I think you are right, as the 2 lines for Page title and Menu title don't get duplicates.
But there's probably nothing to do for now. Do you have an idea of how to run the msguniq within processPot method? That could be one way to fix it at this time.

If the header is being disambiguated with context, then even msguniq should treat them as separate strings.
For example, you can try adding a call to _x( 'My Plugin Name', 'context comment', 'plg-slug' ) in one of your plugin files and running the makepot task. You should see a third entry for the same string.
processPot wouldn't be the best place to call msguniq if you wanted to go down that road. That callback lets you work with the POT object in JavaScript before it's serialized into a POT file. You would want to wait until after the makepot task had completed before running msguniq against the generated POT file.
If you really want to remove the plugin header, this example should help.

I ran msguniq against the resulted pot file and it did merge the entries so I guess it works.
Thanks for the example! I will look around for some more info. I really appreciate your help!

Thanks for letting me know about msguniq merging them and keep me updated if you discover anything new!

So now I have a separate task, which will be executed after makepot to make sure the pot file will only have unique msgids.
        exec: {
            potunique: {
                expand: true,
                cwd: '<%= dir.dest %>/languages',
                cmd: '/usr/local/bin/msguniq <%= cfg.slug %>.pot -o <%= cfg.slug %>.pot'
            }
        }```


Fix type for validateFiles prop on FileUploaderDropContainer

validateFiles gets called with an array of files. But the type declaration incorrectly indicates that it takes a single file.

Docs built :slightly_smiling_face:

Released in v0.61.0


Update Header UI to show GitHub stars

Summary
This feature fetches the number of stars from your GitHub repository using the GitHub API. Upon loading the webpage, JavaScript retrieves the star count and dynamically updates it beside the GitHub icon on the UI header. This ensures visitors can easily see the popularity of your repository at a glance, as the displayed count always reflects the current number of stars.
Examples
No response
Motivation
The purpose of this feature is to provide visitors with immediate visibility into the popularity of our GitHub repository. By fetching the number of stars using the GitHub API and dynamically updating it beside the GitHub icon
Search keywords: GitHub Star

@gurjeetsinghvirdee Is this a feature request for the Toolpad editor? I don't see how, but please elaborate on what this issue is about.

@gurjeetsinghvirdee We have a star count on the landing page already on https://mui.com/toolpad. Changing the GitHub icon in the header would require changes to the AppHeader which is shared across all product websites; so far we haven't considered adding a star count to header enough of a need so I would advise against creating an issue for this on the Material UI repo.

@gurjeetsinghvirdee If your intent was to add a functionality to Toolpad where the built application can include a functionality to fetch and display GitHub stars for any repository, please let me know and I'll reopen this issue as a request to be able to modify the header UI of applications built with Toolpad

@bharatkashyap
I'd be happy to work on this.
Could you please assign me the task!


Page changes is not reflected on site

I added a picture and changed the header on Page1 but nothing is cchanged in the view. I tried to clear the web browser cache also.

Hm, solved I pressed OK, but not SAVE which I found at the bottom now!


Filecoin transaction history - timezone conversion seems to ignore days

Describe the bug
Filecoin transactions seem to be adjusted for the local timezone the software runs in. Assuming the glif blackend being used as a source for the transaction data the will be delivered in GMT. If a transaction changes the day it occurred on after the tz conversion the transaction will be shown on the wrong day - the order is messed up.
[edit]
after talking to glif - they seems to not be the backend for the transaction data and the glif tag seems to be related to the derivation path of the addresses
To Reproduce
Needs  transactions that happened on the same day GMT and change the day after timezone conversion to the local instance of ledger-live.
(this is not fully tested due to mainnet env - just an assumption whats actually happening)
Expected behavior
All transactions being shown in the right order.
Screenshots

Desktop (please complete the following information):
2.46.0 Linux 64bit appimage
Additional context
juan@zondax and jonathan@glif are informed

Hi @f8-ptrk! Thank you so much for reporting this possible bug.
I have been trying to check what you reported here, and I am not sure if there is an issue with this.
This is a tx from glif

This is the timestamp of that tx
1655296860
This is the timestamp on human readable format

And this is how ledger live displays it

My timezone here is GMT-3, so everything looks correct.
Can you indicate me some specific tx id so I can try to check further? Thanks :)


requirements_dev.txt: notebook tests require package nc-time-axis

make test-notebooks error:
________________________________________________________________________ docs/source/notebooks/Bias_correcting_climate_data.ipynb::Cell 3 _________________________________________________________________________
Notebook cell execution failed
Cell 3: Cell execution caused an exception

Input:
import nc_time_axis
import cftime

group_month_nowindow = sdba.utils.Grouper('time.month')

Adj = sdba.DetrendedQuantileMapping(nquantiles=50, kind='+', group=group_month_nowindow)

Adj.train(ds_ref_sub['pr'],ds_his_sub['pr'])

Scen_pr = Adj.adjust(ds_fut_sub['pr'], interp="linear")

Adj.train(ds_ref_sub['tasmax'],ds_his_sub['tasmax'])

Scen_tasmax = Adj.adjust(ds_fut_sub['tasmax'], interp="linear")

Adj.train(ds_ref_sub['tasmin'],ds_his_sub['tasmin'])
Scen_tasmin = Adj.adjust(ds_fut_sub['tasmin'], interp="linear")

Traceback:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-4-7ce0cc47efec> in <module>
      1 # Apply the bias correction
----> 2 import nc_time_axis
      3 import cftime
      4
      5 # We will apply the statistics per month

ModuleNotFoundError: No module named 'nc_time_axis'

Overview
This PR fixes [issue id]
Changes:

Added ...

Related Issue / Discussion
Additional Information
Links to other issues or sources.

Actually I also found nc-time-axis in client_environment.yml.  What is the purpose of this file?
My workflow to run the notebooks test are:
conda env create -f environment.yml
conda activate raven
make develop
make start
make test-notebooks

Still good?

Actually I also found nc-time-axis in client_environment.yml.  What is the purpose of this file?
My workflow to run the notebooks test are:
conda env create -f environment.yml
conda activate raven
make develop
make start
make test-notebooks

Still good?

Notebooks error report, using the workflow from the previous comment https://github.com/Ouranosinc/raven/pull/348#issuecomment-770109726.
We are down to 3 errors and 2 warnings that probably are the root cause of the 36 cells failure.
@huard Looks like we are very close to get all the notebooks to pass, I am pretty stoked !!!
Note the wps server and notebook are both python 3.8 since launched from the same conda env.
@cjauvin there is one RAVENPY_TESTDATA_PATH env variable is not set left which is weird since I did pip install ravenpy with binaries and it did solve other similar errors.
platform linux -- Python 3.8.6, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
plugins: flake8-1.0.7, nbval-0.9.6, dependency-0.5.1, notebook-0.6.1
collected 166 items
36 failed, 128 passed, 2 skipped, 1 warning in 427.78s (0:07:07)

Bias_correcting_climate_data::ipynb
        **************************************************************
        Path : /tmp/pywps_process_otibp521/exec/model/p00
        **************************************************************
        ADVISORY : The required global parameter RAINSNOW_TEMP was autogenerated with value 0.150000
ERROR : CTimeSeries::Initialize: time series forcing data not available at beginning of model simulation

Traceback (most recent call last):
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_raven.py", line 138, in _handler
    self.run(model, ts, kwds)
  File "/zstore/repos/raven/raven/processes/wps_raven.py", line 103, in run
    model(ts=ts, **kwds)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 501, in __call__
    raise e
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 488, in __call__
    self.parse_results()
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 541, in parse_results
    raise exc
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 534, in parse_results
    fns = self._get_output(pattern, path=path)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 639, in _get_output
    raise UserWarning("No output files for {} in {}.".format(pattern, path))
UserWarning: No output files for test_bias_correction_HMETS*Hydrographs.nc in /tmp/pywps_process_otibp521/exec.

Climatological_ESP_forecasting.ipynb: Many of these repeated warnings:
/home/lvu/.conda/envs/raven/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvc'
  return self._open_to_write(zinfo, force_zip64=force_zip64)

Extract_geographical_watershed_properties::ipynb,
gridded_data_subset::ipynb,
Full_process_example_1::ipynb: many repeated same traceback:
Traceback (most recent call last):
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_nalcms_zonal_stats.py", line 151, in _handler
    raster_bytes = gis.get_raster_wcs(bbox, geographic=False, layer=raster_url)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/utilities/gis.py", line 208, in get_raster_wcs
    wcs = WebCoverageService("http://boreas.ouranos.ca/geoserver/ows", version="2.0.1")
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/owslib/wcs.py", line 53, in WebCoverageService
    return wcs201.WebCoverageService_2_0_1.__new__(
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/owslib/coverage/wcsBase.py", line 47, in __new__
    obj.__init__(url, xml, cookies, auth=auth)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/owslib/coverage/wcs201.py", line 67, in __init__
    self._capabilities = reader.read(self.url, self.timeout)
AttributeError: 'WebCoverageService_2_0_1' object has no attribute 'timeout'

Hydrological_hindcasting::ipynb,
Hydrological_realtime_forecasting::ipynb: many of those repeated warnings
/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/rv.py:368: UserWarning: Units are not what Raven expects for pr.
Actual: m
Expected: mm/d
Make sure to set linear_transform to perform conversion.

Perform_Regionalization::ipynb
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_regionalisation.py", line 146, in _handler
    nash, params = read_gauged_params(model_name)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/utilities/regionalization.py", line 191, in read_gauged_params
    f = get_local_testdata(f"regionalisation_data/{model}_parameters.csv")
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/utilities/testdata.py", line 39, in get_local_testdata
    raise RuntimeError("RAVENPY_TESTDATA_PATH env variable is not set")
RuntimeError: RAVENPY_TESTDATA_PATH env variable is not set

Notebooks error report, using the workflow from the previous comment https://github.com/Ouranosinc/raven/pull/348#issuecomment-770109726.
We are down to 3 errors and 2 warnings that probably are the root cause of the 36 cells failure.
@huard Looks like we are very close to get all the notebooks to pass, I am pretty stoked !!!
Note the wps server and notebook are both python 3.8 since launched from the same conda env.
@cjauvin there is one RAVENPY_TESTDATA_PATH env variable is not set left which is weird since I did pip install ravenpy with binaries and it did solve other similar errors.
platform linux -- Python 3.8.6, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
plugins: flake8-1.0.7, nbval-0.9.6, dependency-0.5.1, notebook-0.6.1
collected 166 items
36 failed, 128 passed, 2 skipped, 1 warning in 427.78s (0:07:07)

Bias_correcting_climate_data::ipynb
        **************************************************************
        Path : /tmp/pywps_process_otibp521/exec/model/p00
        **************************************************************
        ADVISORY : The required global parameter RAINSNOW_TEMP was autogenerated with value 0.150000
ERROR : CTimeSeries::Initialize: time series forcing data not available at beginning of model simulation

Traceback (most recent call last):
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_raven.py", line 138, in _handler
    self.run(model, ts, kwds)
  File "/zstore/repos/raven/raven/processes/wps_raven.py", line 103, in run
    model(ts=ts, **kwds)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 501, in __call__
    raise e
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 488, in __call__
    self.parse_results()
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 541, in parse_results
    raise exc
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 534, in parse_results
    fns = self._get_output(pattern, path=path)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 639, in _get_output
    raise UserWarning("No output files for {} in {}.".format(pattern, path))
UserWarning: No output files for test_bias_correction_HMETS*Hydrographs.nc in /tmp/pywps_process_otibp521/exec.

Climatological_ESP_forecasting.ipynb: Many of these repeated warnings:
/home/lvu/.conda/envs/raven/lib/python3.8/zipfile.py:1517: UserWarning: Duplicate name: 'raven-gr4j-cemaneige.rvc'
  return self._open_to_write(zinfo, force_zip64=force_zip64)

Extract_geographical_watershed_properties::ipynb,
gridded_data_subset::ipynb,
Full_process_example_1::ipynb: many repeated same traceback:
Traceback (most recent call last):
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_nalcms_zonal_stats.py", line 151, in _handler
    raster_bytes = gis.get_raster_wcs(bbox, geographic=False, layer=raster_url)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/utilities/gis.py", line 208, in get_raster_wcs
    wcs = WebCoverageService("http://boreas.ouranos.ca/geoserver/ows", version="2.0.1")
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/owslib/wcs.py", line 53, in WebCoverageService
    return wcs201.WebCoverageService_2_0_1.__new__(
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/owslib/coverage/wcsBase.py", line 47, in __new__
    obj.__init__(url, xml, cookies, auth=auth)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/owslib/coverage/wcs201.py", line 67, in __init__
    self._capabilities = reader.read(self.url, self.timeout)
AttributeError: 'WebCoverageService_2_0_1' object has no attribute 'timeout'

Hydrological_hindcasting::ipynb,
Hydrological_realtime_forecasting::ipynb: many of those repeated warnings
/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/rv.py:368: UserWarning: Units are not what Raven expects for pr.
Actual: m
Expected: mm/d
Make sure to set linear_transform to perform conversion.

Perform_Regionalization::ipynb
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_regionalisation.py", line 146, in _handler
    nash, params = read_gauged_params(model_name)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/utilities/regionalization.py", line 191, in read_gauged_params
    f = get_local_testdata(f"regionalisation_data/{model}_parameters.csv")
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/utilities/testdata.py", line 39, in get_local_testdata
    raise RuntimeError("RAVENPY_TESTDATA_PATH env variable is not set")
RuntimeError: RAVENPY_TESTDATA_PATH env variable is not set

@cjauvin Looks like there are 2 paths in ravenpy that access the binaries and the one below is fixed by pip installing with binaries but the one I found in the previous comment https://github.com/Ouranosinc/raven/pull/348#issuecomment-770118401 is not fixed.
docs/source/notebooks/Bias_correcting_climate_data::ipynb::Cell 7 Traceback (most recent call last):
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_raven.py", line 117, in _handler
    model = self.model(request)
  File "/zstore/repos/raven/raven/processes/wps_raven.py", line 52, in model
    return self.model_cls(workdir=self.workdir)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/emulators.py", line 171, in __init__
    super().__init__(*args, **kwds)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/emulators.py", line 49, in __init__
    super().__init__(*args, **kwds)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 104, in __init__
    raise RuntimeError(
RuntimeError: Could not find raven binary in PATH, and RAVENPY_RAVEN_BINARY_PATH env variable is not set

@cjauvin Looks like there are 2 paths in ravenpy that access the binaries and the one below is fixed by pip installing with binaries but the one I found in the previous comment https://github.com/Ouranosinc/raven/pull/348#issuecomment-770118401 is not fixed.
docs/source/notebooks/Bias_correcting_climate_data::ipynb::Cell 7 Traceback (most recent call last):
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_raven.py", line 117, in _handler
    model = self.model(request)
  File "/zstore/repos/raven/raven/processes/wps_raven.py", line 52, in model
    return self.model_cls(workdir=self.workdir)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/emulators.py", line 171, in __init__
    super().__init__(*args, **kwds)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/emulators.py", line 49, in __init__
    super().__init__(*args, **kwds)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/models/base.py", line 104, in __init__
    raise RuntimeError(
RuntimeError: Could not find raven binary in PATH, and RAVENPY_RAVEN_BINARY_PATH env variable is not set

client_environment I think was meant to provide a slimmed down version of what is required to run the notebooks (not the server). It's not actually tested however, so your mileage might vary. But you should make sure that every dependency in there is part of your jupyter env. What i mean is that those dependencies are necessary, but may not be sufficient.
I don't understand the timeout error. The timeout attribute was introduced in owslib 0.21 https://geopython.github.io/OWSLib/#id6
The warnings are known, I don't think they point to serious issues. I've made a not to investigate the zip thing.

client_environment I think was meant to provide a slimmed down version of what is required to run the notebooks (not the server). It's not actually tested however, so your mileage might vary. But you should make sure that every dependency in there is part of your jupyter env. What i mean is that those dependencies are necessary, but may not be sufficient.
I don't understand the timeout error. The timeout attribute was introduced in owslib 0.21 https://geopython.github.io/OWSLib/#id6
The warnings are known, I don't think they point to serious issues. I've made a not to investigate the zip thing.

I don't understand the timeout error. The timeout attribute was introduced in owslib 0.21 https://geopython.github.io/OWSLib/#id6

I have owslib=0.22.0=pyhd8ed1ab_0, so this missing timeout attrib error should not have happened, weird.

I don't understand the timeout error. The timeout attribute was introduced in owslib 0.21 https://geopython.github.io/OWSLib/#id6

I have owslib=0.22.0=pyhd8ed1ab_0, so this missing timeout attrib error should not have happened, weird.

I don't understand the timeout error. The timeout attribute was introduced in owslib 0.21 https://geopython.github.io/OWSLib/#id6

@huard FYI, I might have found the cause, see https://github.com/geopython/OWSLib/pull/730/files#r567188656

I don't understand the timeout error. The timeout attribute was introduced in owslib 0.21 https://geopython.github.io/OWSLib/#id6

@huard FYI, I might have found the cause, see https://github.com/geopython/OWSLib/pull/730/files#r567188656

Perform_Regionalization.ipynb
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/pywps/app/Process.py", line 249, in _run_process
    self.handler(wps_request, wps_response)  # the user must update the wps_response.
  File "/zstore/repos/raven/raven/processes/wps_regionalisation.py", line 146, in _handler
    nash, params = read_gauged_params(model_name)
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/utilities/regionalization.py", line 191, in read_gauged_params
    f = get_local_testdata(f"regionalisation_data/{model}_parameters.csv")
  File "/home/lvu/.conda/envs/raven/lib/python3.8/site-packages/ravenpy/utilities/testdata.py", line 39, in get_local_testdata
    raise RuntimeError("RAVENPY_TESTDATA_PATH env variable is not set")
RuntimeError: RAVENPY_TESTDATA_PATH env variable is not set

related to https://github.com/CSHS-CWRA/RavenPy/issues/51


accuracy with scan

Hi,
When using the scan section of the tool, I noticed the results are not that accurate.
local> scan github.com
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
+----------+------+--------+-------------+
there isn't any opened port

local> scan github.com -p 1-500
0+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
+----------+------+--------+-------------+
there isn't any opened port

With nmap it takes a bit longer but the results are accurate:
> nmap -sT github.com

Starting Nmap 7.31SVN ( https://nmap.org ) at 2016-11-14 22:47 PST
Nmap scan report for github.com (<IP_ADDRESS>)
Host is up (0.077s latency).
Other addresses for github.com (not scanned): <IP_ADDRESS>
Not shown: 996 filtered ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
9418/tcp open  git

Nmap done: 1 IP address (1 host up) scanned in 84.02 seconds

Hm, weird. Works for me. Tried both from Linux and macos from different networks:
local> scan github.com
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   22 | Open   |             |
| TCP      |   80 | Open   |             |
| TCP      |  443 | Open   |             |
+----------+------+--------+-------------+

The git-port doesn't show but thats probably because mylg defaults to only scan up to port 500. :) How about you @mehrdadrad, does it work for you?

Looks like I have different results this morning from the same machine:
local> scan github.com -p 1-50000
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   80 | Open   |             |
| TCP      |   22 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 22.624 seconds

Still skipping 443 and 9418.
Running again, it's picking up 9418:
local> scan github.com -p 1-50000
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      | 9418 | Open   |             |
+----------+------+--------+-------------+
Scan done: 1 opened port(s) found in 21.766 seconds

Are results cached or something??
Running for a third time:
local> scan github.com -p 1-50000
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
+----------+------+--------+-------------+
there isn't any opened port

Try with a site you've never scanned...
local> scan scanme.nmap.org -p 1-10000
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      | 9929 | Open   |             |
| TCP      |   22 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 3.720 seconds

local> scan scanme.nmap.org -p 1-10000
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      | 9929 | Open   |             |
| TCP      |   22 | Open   |             |
| TCP      |   80 | Open   |             |
+----------+------+--------+-------------+
Scan done: 3 opened port(s) found in 3.889 seconds

local> scan scanme.nmap.org -p 1-10000
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      | 9929 | Open   |             |
+----------+------+--------+-------------+
Scan done: 1 opened port(s) found in 3.735 seconds

local> scan scanme.nmap.org
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
+----------+------+--------+-------------+
there isn't any opened port

local> scan scanme.nmap.org -p 1-10000
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   80 | Open   |             |
| TCP      | 9929 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 3.827 seconds

Very weird. Results aren't cached and these results are from the first run. Have you tried from multiple locations btw @jungle-boogie ?
Macos on my home network:
$ ./mylg scan scanme.nmap.org ; sleep 10 ; ./mylg scan scanme.nmap.org ; sleep 10 ; ./mylg scan scanme.nmap.org ; sleep 10 ; ./mylg scan scanme.nmap.org
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   80 | Open   |             |
| TCP      |   22 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 2.299 seconds
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   22 | Open   |             |
| TCP      |   80 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 2.306 seconds
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   80 | Open   |             |
| TCP      |   22 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 2.433 seconds
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   80 | Open   |             |
| TCP      |   22 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 2.326 seconds

Linux on DO:
# ./mylg scan scanme.nmap.org ; sleep 10 ; ./mylg scan scanme.nmap.org ; sleep 10 ; ./mylg scan scanme.nmap.org ; sleep 10 ; ./mylg scan scanme.nmap.org
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   22 | Open   |             |
| TCP      |   80 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 0.375 seconds
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   22 | Open   |             |
| TCP      |   80 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 0.308 seconds
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   80 | Open   |             |
| TCP      |   22 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 0.293 seconds
+----------+------+--------+-------------+
| PROTOCOL | PORT | STATUS | DESCRIPTION |
+----------+------+--------+-------------+
| TCP      |   22 | Open   |             |
| TCP      |   80 | Open   |             |
+----------+------+--------+-------------+
Scan done: 2 opened port(s) found in 0.328 seconds

And on a related note, results from the scan should probably be sorted by the port number. More intuitive.

hi @gummiboll ,
No, this is all from one location and on the same machine. Is there some kind of verbose logging I can enable to see what calls it actually makes?

No, no verbose logging.
I suspect you are hitting this err for some reason. Either because of too many open files or for some other reason. That could explain why you see no/few open ports sporadically.
Could you try to temporary raise your ulimit and see if you get the same result?
Maybe that wg/for-loop needs to be a bit reworked, what do you think @mehrdadrad ?

Hi @gummiboll,
This is what I have right now:
% limit
cputime         unlimited
filesize        unlimited
datasize        512MB
stacksize       64MB
coredumpsize    unlimited
memoryuse       unlimited
memorylocked    64kB
maxproc         5547
descriptors     28431
sockbufsize     unlimited
vmemorysize     unlimited
pseudoterminals unlimited
swapsize        unlimited
kqueues         unlimited
UMTXP           unlimited

Can some kind of verbose logging flag be added? During an nmap scan, v can be used to increase the verbosity.

@gummiboll,
I think you may be right about file descriptors.
mylg scan scanme.nmap.org -p 1-1000 generated 25039 syscalls.
I used dtrace -n 'syscall:::entry { @num[execname] = count(); }'
scanning ports 1-500 generated 13013 syscalls.

### Files opened by process,
# dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'
CPU     ID                    FUNCTION:NAME
  0  56068                       open:entry mylg /dev/urandom
  0  56068                       open:entry mylg /dev/urandom
  0  56068                       open:entry mylg /etc/nsswitch.conf
  0  56068                       open:entry mylg /etc/pwd.db
  0  56068                       open:entry mylg /home/sean/.mylg.config
  0  56068                       open:entry mylg /etc/pwd.db
  0  56068                       open:entry mylg /home/sean/.mylg.config
  0  56068                       open:entry mylg /etc/nsswitch.conf
  0  56068                       open:entry mylg /etc/resolv.conf
  0  56068                       open:entry mylg /etc/hosts
  0  56068                       open:entry mylg /tmp/mylg.ns

Is mylg really doing something with /etc/pwd.db?

I think that's related to NAT and how much it already has load. it works w/ my home AP, and valid ip address but it didn't work properly once I was at a public place. I tried tcpdump and noticed the NAT returns wrong packets!!! the main reason is the scan feature tries to use different src ports to connect target at same time  (depends how many ports should be scanned) that's why NAT became oversubscribe. if you try few ports it should be fine like:
local>scan github.com -p 80-81

I'm working on a prototype to see if it can fix this issue. I'll keep open this issue and update you guys.
@jungle-boogie @gummiboll thank you for testing and investigation.

hi @mehrdadrad,
Yes, if I limit it to small rages each time, it will work fine. For that reason, could you please consider implementing some kind of verbose mode?

@jungle-boogie sure

@jungle-boogie can you try this prototype and see how it works pls?
https://github.com/mehrdadrad/prototype/blob/master/netscan.go
the remote host should be passed as argument like below:
go run netscan.go github.com
it tries to scan github.com from port tcp 1-500

I'd like to see the result.

hi @mehrdadrad,
Working better but
a) duplicates results only for github.com
b) -p option doesn't work.
c) root rights are needed, probably because you're now using a pcap package
You're probably aware of those things, though.
% /usr/bin/time sudo bin/prototype/netscan github.com
scanning github.com (<IP_ADDRESS>) port 1-500
TCP 22(ssh)
TCP 80(http)
TCP 22(ssh)
TCP 22(ssh)
TCP 443(https)
TCP 443(https)
TCP 22(ssh)
        8.63 real         0.47 user         0.24 sys

% /usr/bin/time sudo bin/prototype/netscan <IP_ADDRESS>
scanning <IP_ADDRESS> (<IP_ADDRESS>) port 1-500
TCP 22(ssh)
TCP 53(domain)
TCP 88(kerberos)
        8.79 real         0.46 user         0.06 sys

@jungle-boogie Thanks for testing!

Did you merge this to mylg? If so, the results are not better. Your stand alone file netscan still works better.
% sudo bin/gopath/bin/mylg scan github.com
Scan github.com (<IP_ADDRESS>)
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
| TCP      |  443 | Open   |
+----------+------+--------+
Scan done: 1 opened port(s) found in 2.073 seconds

% bin  sudo bin/prototype/netscan github.com
scanning github.com (<IP_ADDRESS>) port 1-500
TCP 22(ssh)
TCP 80(http)
TCP 22(ssh)
TCP 22(ssh)
TCP 443(https)
TCP 443(https)
TCP 22(ssh)

% sudo bin/gopath/bin/mylg scan scanme.nmap.com
Scan scanme.nmap.com (<IP_ADDRESS>)
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
+----------+------+--------+
there isn't any opened port

% sudo bin/prototype/netscan scanme.nmap.com
scanning scanme.nmap.com (2600:3c01::f03c:91ff:fe18:bb2f) port 1-500
TCP 22(ssh)
TCP 80(http)

mylg doesn't resolve the ipv6 address by default but somehow, netscan does.

update your code and try it w/ -s
mylg scan scanme.nmap.com -s

looks good!
% sudo bin/gopath/bin/mylg scan scanme.nmap.com -s
Scan scanme.nmap.com (<IP_ADDRESS>) TCP ports 1-500
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
| TCP      |   22 | Open   |
| TCP      |   80 | Open   |
+----------+------+--------+
Scan done: 2 opened port(s) found in 4.004 seconds

% sudo bin/gopath/bin/mylg scan github.com -s
Scan github.com (<IP_ADDRESS>) TCP ports 1-500
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
| TCP      |   22 | Open   |
| TCP      |   80 | Open   |
| TCP      |  443 | Open   |
+----------+------+--------+
Scan done: 3 opened port(s) found in 4.005 seconds

% sudo bin/gopath/bin/mylg scan github.com -s -p 443-9500
Scan github.com (<IP_ADDRESS>) TCP ports 443-9500
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
| TCP      |  443 | Open   |
+----------+------+--------+
Scan done: 1 opened port(s) found in 55.377 seconds
55.886 real, 1.081 user, 1.857 sys;  page: 0 hard/6364 soft, swap: 0, I/O: 0/0
Mem: 36808KB (10046KB shared + 3728KB data/stack = 13774KB), VCSW: 302441 IVCSW: 53571

The last one is still missing the git port of 9418.
% sudo bin/gopath/bin/mylg scan github.com -s -p 9100-9500
Scan github.com (<IP_ADDRESS>) TCP ports 9100-9500
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
| TCP      | 9418 | Open   |
+----------+------+--------+
Scan done: 1 opened port(s) found in 3.410 seconds

now it finds it.

@jungle-boogie cool, thanks for testing!

@gummiboll @jungle-boogie I think it's better to set SYN scan as default same as nmap and create a new switch -c for connect scan, what do you think?
https://nmap.org/book/man-port-scanning-techniques.html

After reading the link, that makes sense to me.

Seems reasonable! 👍

Looks like it does something funky with ipv6 hosts:
2600:3c01::f03c:91ff:fe18:bb2f) TCP ports 1-500
listen ip6:tcp: lookup [::]: invalid domain name
there isn't any opened port

good news! syn scan is much more accurate!
sudo bin/gopath/bin/mylg scan github.com -p 400-9500
Scan github.com (<IP_ADDRESS>) TCP ports 400-9500
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
| TCP      |  443 | Open   |
| TCP      | 9418 | Open   |
+----------+------+--------+
Scan done: 2 opened port(s) found in 64.417 seconds

@jungle-boogie thanks for testing :) IPv6 issue needs a minor change to fix.
- 333		conn, err = net.ListenPacket(s.network+":tcp", "[::]")
+ 333		conn, err = net.ListenPacket(s.network+":tcp", "::")

@mehrdadrad,
You did it! I tested and built locally.
% sudo ./mylg scan yahoo.com
Scan yahoo.com (2001:4998:58:c02::a9) TCP ports 1-500
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
| TCP      |   80 | Open   |
| TCP      |  443 | Open   |
+----------+------+--------+
Scan done: 2 opened port(s) found in 4.003 seconds

final comment...
results when scanning yahoo.com match with nmap!
% sudo nmap -sS -p 1-1024 yahoo.com

Starting Nmap 7.31 ( https://nmap.org ) at 2016-12-02 10:32 PST
Nmap scan report for yahoo.com (<IP_ADDRESS>)
Host is up (0.057s latency).
Other addresses for yahoo.com (not scanned): 2001:4998:58:c02::a9 2001:4998:44:204::a7 2001:4998:c:a06::2:4008 <IP_ADDRESS> <IP_ADDRESS>
rDNS record for <IP_ADDRESS>: ir1.fp.vip.gq1.yahoo.com
Not shown: 1022 filtered ports
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https

Nmap done: 1 IP address (1 host up) scanned in 13.06 seconds

% sudo ./mylg scan yahoo.com -p 1-1024
Scan yahoo.com (2001:4998:58:c02::a9) TCP ports 1-1024
+----------+------+--------+
| PROTOCOL | PORT | STATUS |
+----------+------+--------+
| TCP      |   80 | Open   |
| TCP      |  443 | Open   |
+----------+------+--------+
Scan done: 2 opened port(s) found in 7.856 seconds

myLG 7.856 seconds vs nmap 13.06 seconds 👍 💯


Using mrb_realloc() with stack_extend_alloc()

Raising a SystemStackError exception in an out-of-memory situation will generate backtrace information. This can eventually lead to a NoMemoryError exception, and this process flow is completely undesirable.
In effect, this change means that it will include a revert of commit 0dbb9e6e411572b0c37e7be723d6dc3895387f96.

So do you mean it's OK to cancel #5307?

So do you mean it's OK to cancel #5307?

Yes, I will cancel.
#5307 was trying to take advantage of the original code if (newstack == NULL).
However, in practice, I think it is preferable to raise the NoMemoryError exception as is.


Introduce "handle metadata" for functions

Replaces the full function proto in the context of _initialize_from_proto. This lets us have a much lighter weight proto with only the fields necessary for users of the handle, rather than all the info needed to execute the function. It has two advantages:

We can use it in serialization/deserialization of individual objects to get functioning Handles on deserialization, without any RPC calls or similar.
We can "hydrate" an app (AppGetObjects) without having to get a bunch of backend data
in #466 we can let the "preload" phase of functions return a handle proto, letting serialized functions encode references to other function handles, or even to themselves.

The concept is general for all _Handles but only needed for FunctionHandles at this time. Will be used in a new version of #466 to avoid having to load an entire app to rehydrate a serialized handle.
As a followup backend PR, we'll add rpc support for returning FunctionHandles in AppGetObjects, AppLookupObject and FunctionCreate. Since the protos share data types and indices, we should be able to do this in a backwards compatible way

Nice! I think this should make #466 a bit cleaner.
One thought about FunctionHandleMetadata is we could make it just a "dict" or similar to make it simpler. The benefit of that is that it's entity-neutral. But it's not obvious to me what's the best representation. Maybe that's an argument for keeping it the way you did it since it's fully backwards compatible – if we realize we want to support lots of attributes for other objects (or maybe in the future, make it possible for a function created in one language to be imported in another languate?) then I guess we can always change this later.

I thought about making it a dict but opted for proto mostly for ergonomics of nested entities and compatibility with the existing "full" proto making the transition simple. Easy to change later as you say

You're changing the serialized data which might cause compatibility issues between clients of different versions – but I don't think it's a problem in practice

You're changing the serialized data which might cause compatibility issues between clients of different versions – but I don't think it's a problem in practice

Yeah I think it should be relatively safe thanks to keeping the same proto types/indices as in the larger structure (and us not using any of the other fields anyways). One gotcha that I ran into though was that it's not safe to pass the wrong datatype into a proto constructor where the field is a message, even if all the field names and types line up - it segfaults the python interpreter due to a bug in protobuf :O (https://github.com/protocolbuffers/protobuf/issues/12373)


Easier setup for an unbound UDP channel

Hi, I am working on writing UDP client that uses an "unbound" UDP socket.
I wanted to raise two issues that I ran into with the current implementation.

There is no way to make a truly "unbound" channel (or if there is, the documentation is lacking), the API feels unintuitive to me, the fact that it needs to call bind, seems wrong since I want an unbound channel.

let bootstrap = DatagramBootstrap(group: group)
    .channelInitializer { (channel) in
        // Additional Setup

}
let connectFuture = bootstrap.bind(host: "::1", port: 0)
channel = try connectFuture.wait()

bootstrap.bind(host: "::1", port:0) generates a SocketAddress.v6 (or a SocketAddress.v4), which has the effect that it can only where the SocketAddress matches the protocol of the "bound" address.

I think an API where the DatagramBootstrap has a method like unboundChannel() or setup() would be more intuitive.
I am happy to start working a PR for this issue, however, as far as I can see, allowing the DatagramChannel to not bound to a socket, is non-trivial change(at least while I was reading through it), which is why wanted to check if I've missed anything or if this is the desired behaviour for a reason.

Hey, thanks for filing!

There is no way to make a truly "unbound" channel (or if there is, the documentation is lacking), the API feels unintuitive to me, the fact that it needs to call bind, seems wrong since I want an unbound channel.

This wrinkle is because there is no such thing as an unbound UDP socket. The socket API is good at hiding this, but any socket on which you call connect without calling bind implicitly has a bind call made, to port 0.
The effect of calling connect (or indeed sendto) on a UDP socket without calling bind is not to leave it unbound: instead, it is to implicitly bind an appropriate address and then use that to send the datagrams. In the case of connect it will also lead to kernel-level datagram filtering.
You can validate this by performing your regular usage pattern, either using connect or sendto, and then using getsockname or lsof to validate that the port is in fact bound.

which has the effect that it can only where the SocketAddress matches the protocol of the "bound" address.

Again, the same rule applies to an unbound socket. The difference, again, occurs when you are using dual-stack sockets, in which a bound IPv6 socket may receive IPv4 packets as well. NIO will operate in this mode.
Now, we could support "unbound" (or, more accurately, "late-bound") datagram channels, but I'm not sure how useful that is. Is there a reason the bound datagram channel is not sufficient for the use-case?

Hi,
sorry, the fact that the DatagramBootstrap was is used for Server and Clients threw me off. My mistake.
The only thing that would have been nice is, if the DatagramChannel would have warned me about the fact that I am sending and AddressedEnvelope that it can't deliver due to the a mismatch in the IP Protocol version.
But - that probably belongs into a separate issue.

That one I’d expect to be covered by the write promise failing. Did it?


Fix #22 (in GitHub)

I edited this in GitHub, so we can see what Travis says. If you'd like a test case, I can add one.

Nah, yolo


Implement a Hook system

Hooks holds a list of  functions (func error) to call whenever the set is
triggered.

https://github.com/donutloop/toolkit/pull/22


⚠ Bofrost.at has degraded performance

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

HTTP code: 200
Response time: 2405 ms

Resolved: Bofrost.at performance has improved in 650504d.


PBCCalculator fails on instantiation with Atoms.cell

With python3.5 or python3.6, and ase==3.19.3 or 3.20.1, when calling the PBCCalculator:
PBCCalculator(atoms.cell)
the following error occurs:
  File "sitator/util/PBCCalculator.pyx", line 31, in sitator.util.PBCCalculator.PBCCalculator.__init__   File "stringsource", line 658, in View.MemoryView.memoryview_cwrapper   File "stringsource", line 349, in View.MemoryView.memoryview.__cinit__ TypeError: a bytes-like object is required, not 'Cell'
I suspect this is some special case of how an ase.Cell is treated.
Replacing the call with
PBCCalculator(atoms.cell[:])
alleviates this issue. There are however many calls to PBCCalculator in the sitator package, so there might be a different solution to this problem.

This issue occurs on v2.0.0, so maybe this has been fixed already in recent commits @Linux-cpp-lisp

Are you on develop? I hotfixed this on master a while ago (see commit) but only put those changes into develop yesterday (commit). Try pulling again?

The solution is just an np.asarray(cell) in the constructor of PBCCalculator since ase.Cell exposes an array interface (same result as your atoms.cell[:], but without rewriting all those calls you mentioned).

Before I was on v2.0.0 (which didn't have the fix), but now I switched to master and the problem seems to persist.

Weird... the np.asarray is definitely there on master: https://github.com/Linux-cpp-lisp/sitator/blob/master/sitator/util/PBCCalculator.pyx#L27. Can you try a full uninstall of sitator, clone, and reinstall?
When I install fresh from master, this works:
from sitator.util import PBCCalculator
import ase.build
a = ase.build.bulk('Cu')
print(repr(a.cell)) # => Cell([[0.0, 1.805, 1.805], [1.805, 0.0, 1.805], [1.805, 1.805, 0.0]])
p = PBCCalculator(a.cell)
print(np.asarray(p.cell_centroid)) # => array([1.805, 1.805, 1.805])

I cannot reproduce the issue. A full uninstall and reinstall now works (also python3.6 ). So I will close this issue since it has been long resolved

I cannot reproduce the issue. A full uninstall and reinstall now works (also python3.6 ). So I will close this issue since it has been long resolved


WSL tmux catppuccin not working after rechanging repo name via FORKing into my repo

Is there an existing issue outlining your problem?

[X] I have searched the existing issues and they do not solve my problem.

Describe your problem.
Due to the naming conflict, I tried to change the name from tmux to tmux-catppuccin, but still even after the plugin is downloaded with the ctrl + B, I, the plugin theme are not being used by tmux.
Paste your configuration.
# run '~/.config/tmux/plugins/tmux-catppuccin/catppuccin.tmux'

set-option -g default-terminal 'screen-256color'
set-option -g terminal-overrides ',xterm-256color:RGB'

set -g prefix ^B
set -g base-index 1              # start indexing windows at 1 instead of 0
set -g detach-on-destroy off     # don't exit from tmux when closing a session
set -g escape-time 0             # zero-out escape time delay
set -g history-limit 1000000     # increase history size (from 2,000)
set -g renumber-windows on       # renumber all windows when any window is closed
set -g set-clipboard on          # use system clipboard
set -g status-position top       # macOS / darwin style
set -g default-terminal "${TERM}"
setw -g mode-keys vi
set -g pane-active-border-style 'fg=magenta,bg=default'
set -g pane-border-style 'fg=brightblack,bg=default'

set -g @fzf-url-fzf-options '-p 60%,30% --prompt="   " --border-label=" Open URL "'
set -g @fzf-url-history-limit '2000'

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'mike-rambil/tmux-catppuccin'
set -g @catppuccin_flavour 'mocha'
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}"
set -g @catppuccin_status_modules_right "directory date_time"
set -g @catppuccin_status_modules_left "session"
set -g @catppuccin_status_left_separator  " "
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{b:pane_current_path}"
set -g @catppuccin_date_time_text "%H:%M"

run '~/.config/tmux/plugins/tpm/tpm'

Attach screenshots.
Before ctrl + B, I

When pressing the button, it refreshes

Afterwards the packages are downloaded

What tmux version are you seeing the issue on?
tmux 3.2a
Any additional comments?
My version as listed above is tmux 3.2a. Don't know if this is a problem?
I have also commented out in the config, line 1 as I assume I don't have to source the file since it's automated by tpm? sourcing it here never helped either(I tried uncommenting it to see if that helps)

rm -rf ~/.tmux/plugins and rm -rf $XDG_CONFIG_HOME/tmux/plugins like the response in the pinned comment suggested and try again.
Also there should be no conflict eith another plugin looking at the provided config.


How to implement?

This project is exciting, but I can't implement it (even though I followed your instructions). Can you recheck your instruction and update in README. Very thank you again.

@KudoKhang Hey what exact issue are you having? And, can you try again please?


add some more hype to the readme

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 83.137%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2474

Relevant Lines:
3041

💛  - Coveralls


linting errors in .ts, .tsx files when tsserver and deno are installed

Describe the bug
linting errors in .ts, .tsx files when tsserver and deno are installed #366
Expected behavior
Should attached just the tsserver. not the deno server
Screenshots

System info (please complete the following information):

OS: macOS 12.1
Neovim version: NVIM v0.6.0-dev+604-g725cbe7d4

previously I was not using nvim-lsp-installer. I was having the same issue. the following lines fixed it
function file_exists(name)
    local f = io.open(name, 'r')
    if f ~= nil then io.close(f) return true else return false end
end

if file_exists(os.getenv('PWD')..'/package.json') then
    require'lspconfig'.tsserver.setup {}
else
    require'lspconfig'.denols.setup{}
end

How I can do something like that

Hello! You could translate that as-is
local package_json_exists = file_exists(vim.loop.cwd() .. '/package.json')

lsp_installer.on_server_ready(function (server)
    if server.name == "denols" and package_json_exists then
        return
    elseif server.name == "tsserver" and not package_json_exists then
        return
    end
    server:setup {}
end)

I'd however recommend looking into the root_dir mechanism of lspconfig to control when servers are started instead (see :h lspconfig-root-dir). It can be a bit tricky at first and you have to read up on how it works, but something like this ought to achieve the same thing:
local lsp_installer = require("nvim-lsp-installer")
local lspconfig_util = require("lspconfig.util")

local tsserver_root_dir = util.root_pattern "package.json"
local denols_root_dir = util.root_pattern("deno.json", "deno.jsonc", "tsconfig.json", ".git")

lsp_installer.on_server_ready(function (server)
    local opts = {}
    if server.name == "denols" then
        opts.root_dir = function (fname)
            return not tsserver_root_dir(fname) and denols_root_dir(fname)
        end
    elseif server.name == "tsserver" and not package_json_exists then
        opts.root_dir = tsserver_root_dir
    end
    server:setup(opts)
end)


vimPlugins.marks-nvim: update owner's name

Description of changes
chentau/marks.nvim has moved to chentoast/marks.nvim.
The plugin installed from the old url warns:

I have recently changed my github username. please
update your plugin managers to pull from 'chentoast/marks.nvim'
instead. thanks and sorry for the inconvenience!

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

arf this is an old change I thought I had merged already. Thanks !


Add support to Kibana 7.2

This PR is for #71
Pushing to this 6-dev branch since 7-dev branch not available. You probably want to create 7-dev branch and change this PR base branch.

This PR is for #71
Pushing to this 6-dev branch since 7-dev branch not available. You probably want to create 7-dev branch and change this PR base branch.

You are right!, I just created the branch 7-dev, could you please change the PR?
Thank you very much, nice work!!!


Allow for more complex version comparison

Allow for letters in version names
Add tests for version info
Addresses https://github.com/fishtown-analytics/dbt/issues/557

hey @mturzanska - we've been bad about getting these PRs merged, but I'm going to have some time to dig in this week. Do you mind if I try to take this over the line?

@drewbanin sure, go ahead


support ICS008 wrapper type for host client and consensus state

Feature Summary

Now that ibc-go comes with wasm-08, client state of an ibc-rs chain maybe stored as wasm wrapped format in wasm-08 enabled chain.
So when MsgConnectionOpenTry or MsgConnectionOpenAck is received at ibc-rs, it should expect two cases:

normal client state. e.g., the chain is using vanilla tendermint engine, so the counterparty ibc-go chain uses ibc-go implementation of ics07.
wasm wrapped client state. e.g., the chain is using a custom consensus, so the counterparty ibc-go chain uses wasm client via wasm-08

Proposal

We need to introduce an enum:
pub enum HostClientState<T> {
    Native {
        state: T,
    },
    Wasm {
        state: T,
        checksum: Vec<u8>,
        latest_height: Height,
    },
}

Then, use HosClientState<Ctx::HostClientState> in the following places:
https://github.com/cosmos/ibc-rs/blob/2378cd4ba45094b8ed856ff7dba5f1d0882f59ae/ibc-core/ics03-connection/src/handler/conn_open_ack.rs#L52
https://github.com/cosmos/ibc-rs/blob/2378cd4ba45094b8ed856ff7dba5f1d0882f59ae/ibc-core/ics03-connection/src/handler/conn_open_try.rs#L42

Maybe we can add another generic associated type to ValidationContext:
https://github.com/cosmos/ibc-rs/blob/2378cd4ba45094b8ed856ff7dba5f1d0882f59ae/ibc-core/ics24-host/src/context.rs#L28-L31
    type HostClientStateAtCounterparty<V>: Into<V>;

And, later, we use it as::
Ctx::HostClientStateAtCounterparty<Ctx::HostClientState>::try_from(
    msg.client_state_of_a_on_b.clone()
  )
  .map_err(Into::into)?
  .into();

Looks like, the similar is required for host consensus state. In the following, we need to wrap the consensus state in wasm consensus state and then check for proofs.
https://github.com/cosmos/ibc-rs/blob/2378cd4ba45094b8ed856ff7dba5f1d0882f59ae/ibc-core/ics03-connection/src/handler/conn_open_ack.rs#L119-L120
https://github.com/cosmos/ibc-rs/blob/2378cd4ba45094b8ed856ff7dba5f1d0882f59ae/ibc-core/ics03-connection/src/handler/conn_open_try.rs#L115-L116


proposal: x/net/html: add PrependChild and InsertAfter to Node

I have already made a PR, but @neild said I should create a proposal.
The following is the commit message of the commit in my PR:
html: add PrependChild and InsertAfter

These methods complement the already existing AppendChild and
InsertBefore methods in allowing for easy and safe manipulation of
Node trees.

For example code like

oldChild.Parent.InsertBefore(newChild, oldChild.NextSibling)

can now be written like

oldChild.Parent.InsertAfter(newChild, oldChild)

and code like

node.InsertBefore(newNode, node.FirstChild)

can now be written like

node.PrependChild(newNode)

Can you give a short example showing when a program would want to use these new methods?  Thanks.

Sure. I am writing a static site generator which renders pages by combining a layout HTML file with HTML files containing the content of each page. The repetitive parts of the pages reside in the layout file and the unique content are in the content files. The content files start with a front-matter containing metadata about the page, such as its title and description.
For example if we have the content page

here is a paragraph

And a subheading

And another paragraph

the program would first insert all elements after the front-matter into the layout. It would then insert a h1 and p based on the metadata:
// Insert the page title heading
pageTitle := &html.Node{
Type: html.ElementNode,
Data: "h1",
DataAtom: atom.H1,
}
pageTitle.AppendChild(&html.Node{
Type: html.TextNode,
Data: titleFieldInFrontMatter,
})
main.PrependChild(pageTitle)

// Insert the page description paragraph
pageDescription := &html.Node{
Type: html.ElementNode,
Data: "p",
DataAtom: atom.P,
}
pageDescription.AppendChild(&html.Node{
Type: html.TextNode,
Data: descriptionFieldInFrontMatter,
})
pageTitle.Parent.InsertAfter(pageDescription, pageTitle)

Sorry, this did not turn out short after all :D

The methods that are already there - AppendChild and InsertBefore - are a complete set in the sense that they provide all possible functionality. Do we really need to add a second complete set?
Also, if your program finds that it needs these frequently, it is easy to write them as local helper functions, either using AppendChild and InsertBefore or using direct manipulation of the Nodes.

Based on the discussion above, this proposal seems like a likely decline.
— rsc for the proposal review group

No change in consensus, so declined.
— rsc for the proposal review group


New languages: Modula-3 and Quake

This commits adds new language support for Modula-3 and Quake, a small scripting language primarily used for writing makefiles for Modula-3 projects.
Description
Please see issue #4136 for details.
Checklist:

[x] I am adding a new language.

[x] The extension of the new language is used in hundreds of repositories on GitHub.com.

Search results for each extension:

https://github.com/search?utf8=✓&type=Code&ref=searchresults&q=extension%3Am3+MODULE+NOT+nothack
https://github.com/search?utf8=✓&q=extension%3Ai3+INTERFACE+NOT+nothack&type=Code
https://github.com/search?utf8=✓&q=extension%3Aig+GENERIC+INTERFACE+NOT+nothack&type=Code
https://github.com/search?utf8=✓&q=extension%3Amg+GENERIC+MODULE+NOT+nothack&type=Code

[x] I have included a real-world usage sample for all extensions added in this PR:

Sample source(s):

https://github.com/modula3/cm3/blob/master/m3-libs/libm3/src/rw/Rd.i3
https://github.com/modula3/cm3/blob/master/m3-libs/libm3/src/rw/RdClass.i3
https://github.com/modula3/cm3/blob/master/m3-libs/libm3/src/rw/Rd.m3
https://github.com/modula3/cm3/blob/master/m3-libs/digraph/src/DiGraph.ig
https://github.com/modula3/cm3/blob/master/m3-libs/digraph/src/DiGraph.mg

Sample license(s): I can’t be sure just yet.  But since these files are published on GitHub they should have been permissibly licensed.

[x] I have included a syntax highlighting grammar.
[ ] I have included a change to the heuristics to distinguish my language from others using the same extension.   [This commit introduces no conflicts with existing filename extension.]

[ ] I am associating a language with a new file extension.

[ ] The new extension is used in hundreds of repositories on GitHub.com

Search results for each extension:

https://github.com/search?utf8=✓&type=Code&ref=searchresults&q=extension%3AFOOBAR+KEYWORDS+NOT+nothack

[ ] I have included a real-world usage sample for all extensions added in this PR:

Sample source(s):

[URL to each sample source, if applicable]

Sample license(s):

[ ] I have included a change to the heuristics to distinguish my language from others using the same extension.

[ ] I am fixing a misclassified language

[ ] I have included a new sample for the misclassified language:

Sample source(s):

[URL to each sample source, if applicable]

Sample license(s):

[ ] I have included a change to the heuristics to distinguish my language from others using the same extension.

[ ] I am changing the source of a syntax highlighting grammar

Old: https://github-lightshow.herokuapp.com/
New: https://github-lightshow.herokuapp.com/

[ ] I am adding new or changing current functionality

[ ] I have added or updated the tests for the new or changed functionality.

The license should have automatically put in the right place when you ran script/add-grammar when adding the grammar. You may have missed adding it when committing all the files.

Sample license(s): I can’t be sure just yet. But since these files are published on GitHub they should have been permissibly licensed.

Unfortunately you can’t make that assumption.

I’ll take a closer look later, but from a quick glance several of these extensions don’t appear to meet the minimum “hundreds of repos” popularity requirement

Let’s resolve this “missing cached license” issue first.  I tried to run add-grammar again, but the license was still missing.
jc@[******]:~/work/linguist$ git checkout -- .

jc@[******]:~/work/linguist$ sudo ./script/add-grammar --replace m3 https://github.com/newgrammars/m3
Checking docker is installed and running
$ docker ps
Deregistering: vendor/grammars/m3
$ git submodule deinit vendor/grammars/m3
$ git rm -rf vendor/grammars/m3
$ script/grammar-compiler update -f
Registering new submodule: vendor/grammars/m3
$ git submodule add -f https://github.com/newgrammars/m3 vendor/grammars/m3
$ script/grammar-compiler add vendor/grammars/m3
Confirming license
$ script/licensed
Updating grammar documentation in vendor/README.md
$ bundle exec rake samples
$ script/sort-submodules
$ script/list-grammars

jc@[******]:~/work/linguist$ ls ./vendor/licenses/grammar/*m3*
ls: cannot access './vendor/licenses/grammar/*m3*': No such file or directory

Or is there something wrong with https://github.com/newgrammars/m3 or https://github.com/newgrammars/quake?

Ooof. Looks like Licensed 1.0.1 breaks things for us:
$ script/licensed --module /Users/lildude/tmp/trash/jcchu-linguist/vendor/grammars/m3
Caching licenes for jcchu-linguist:
  grammar dependencies:
caching /Users/lildude/tmp/trash/jcchu-linguist/vendor/grammars/m3
    Using m3 ()
License caching complete!
* jcchu-linguist grammar dependencies: 1
$ ls vendor/licenses/grammar/m3.txt
ls: vendor/licenses/grammar/m3.txt: No such file or directory
$

If I force the use of Licensed 1.0.0:
$ git diff github-linguist.gemspec
diff --git a/github-linguist.gemspec b/github-linguist.gemspec
index 246bfd66..951928e2 100644
--- a/github-linguist.gemspec
+++ b/github-linguist.gemspec
@@ -27,6 +27,6 @@ Gem::Specification.new do |s|
   s.add_development_dependency 'rake'
   s.add_development_dependency 'yajl-ruby'
   s.add_development_dependency 'color-proximity', '~> 0.2.1'
-  s.add_development_dependency 'licensed', '~> 1.0.0'
+  s.add_development_dependency 'licensed', '= 1.0.0'
   s.add_development_dependency 'licensee'
 end
$ bundle update
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
[...]
Fetching licensed 1.0.0 (was 1.0.1)
Installing licensed 1.0.0 (was 1.0.1)
[...]
Bundle updated!
$

... and try again, it works...
$ script/licensed --module /Users/lildude/tmp/trash/jcchu-linguist/vendor/grammars/m3
Caching licenes for jcchu-linguist:
  grammar dependencies:
caching /Users/lildude/tmp/trash/jcchu-linguist/vendor/grammars/m3
    Caching m3 ()
License caching complete!
* jcchu-linguist grammar dependencies: 1
$ ls vendor/licenses/grammar/m3.txt
vendor/licenses/grammar/m3.txt
$

@jonabc Any idea what's going on here? My suspicion is https://github.com/github/licensed/pull/21 may be related.

How about I handwrite m3.txt and quake.txt and check them in now?

On the linguist side, it might be good if linguist provided version metadata for each grammar's license content. In similar situations I've used the most recent commit SHA for a given folder as the version string. This would allow licensed to know if/when the license data has changed. It would also add chattiness around version updates in the license files as submodules are synced and SHAs updated. Completely up to you whether the cost/benefit makes sense.

Interesting idea. Lets discuss this outside the context of this PR.

Is there any other missing information?  @pchaigno

https://github.com/search?utf8=✓&q=extension%3Atmpl+"readonly+proc"+NOT+nothack&type=Code [Not all Quake files are covered by this search.]

According to this search query, the .tmpl extension is in use in 127 repositories across 120 users---a bit short according to our contribution guidelines. Any other common keywords we could use to try and get a more exhaustive list of Quake files?

Unfortunately, the 14 keywords and those of the CM3-specific builtins that are really used in most makefiles (like interface, implementation, module, and perhaps import) are all pretty common, everyday-ish words and not specific enough to Quake.
Realistically, though, the number of Quake files isn’t going to be in the same order of magnitude as Modula-3 source files.  Each CM3 program or library exists in a package—see any folder here for an example—which may have just a single “m3makefile”.

@pchaigno The extension “.tmpl” has been removed, but CI is blocked by the same issue affecting #4157.

The test failures appear to be caused by recent changes to licensee which has resulted in a slightly modified hash for the four licenses in question. I'll address this in #4152.

Merging master into your branch should fix the failing tests.


Gh 3152 mystery test coverage changes for two files

 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.


Segment Executor not running in background

I have an api like this
   @GetMapping("/async-test")
    public String api2() throws InterruptedException {
        log.info("Before async");
        myService.myAsync();
        log.info("after async");
        return "nothing important";
    }

And myService.myAsync implementation like this
@Async
    public void myAsync() {
        CompletableFuture.supplyAsync(() -> {
            try {
                log.info("before thread ....");
                Thread.sleep(3000);
                log.info("after thread ....");
            } catch (InterruptedException e) {
                throw new IllegalStateException(e);
            }
            log.info("before returning result ....");
            return "Result of the asynchronous computation";
        }, SegmentContextExecutors.newSegmentContextExecutor());
    }

The issue here is that API waits for 3 seconds to reply when using SegmentContextExecutors.newSegmentContextExecutor(), but if I remove the segment executor, the function run in the background successfully, but for sure I lose the segment logging.
So what should be done to fix this ?
Tech stack
Spring boot v.2.7.2
Java 11
Aws x-ray v.2.11.2

Hi,
XRay SDK does not support asyn scenario very well because Segment(Subsegment) and SegmentContext are not decoupled. So XRay SDK can handle async case child subsegment gets closed early than parent Segment, but is hard to handle async case child subsegment starts later than parent, or close later than parent.
Sorry that we know this issue for a long time but have no bandwidth working on it. Alternatively we recommend user move on to opentelemetry, it automatically covers async scenario in context.
Please refer to ADOT doc.


Clean up data export (CSV/tabular data) for experiment analysis

From the tech doc:

For analysis by experiment: provide CSV/tabular data for data export.
Flatten data. Every stage has its own set of columns.
Principles: be able to replay the experiment

@cjqian What exactly do you have in mind for this? Could it basically be the current JSON download, but in column form? Or are we missing anything?

Good question; I think current JSON is probably fine for now. Let's keep this in the backlog until we have our first batch of feedback from experimenters (e.g. Mael, Clementine).


Upgrade cert manager

Description of changes:

Upgrade Cert manager version
CAPI uses the latest version of cert-manager: https://github.com/kubernetes-sigs/cluster-api/blob/d2f6ae112017d91caac80b3cddff0c2babcc4069/cmd/clusterctl/client/config/cert_manager_client.go#L32
Restructured the patches and make sure they work with the latest version

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/retest
Ephemeral Athena problem maybe?

This PR depends on this issue getting fixed upstream: https://github.com/cert-manager/cert-manager/issues/5750

Although it's true capi uses 1.11, we haven't upgraded capi yet. So I'm not sure we bump this until we do that. Unless there is a way to do it but keep using 1.9 when installing for capi.

/retest

/retest

/hold

/retest

/retest

/retest cert-manager-tooling-presubmit

/test cert-manager-tooling-presubmit

/test cert-manager-tooling-presubmit

This PR upgrades cert-manager: https://github.com/aws/eks-anywhere-build-tooling/pull/1726


'Rebuilding relocations and splitting' index out of bounds crash with OoT JP Wii VC

While following dtk-template Getting Started using the OoT JP Wii VC 00000001.app (.app sha1 47546e48467ae14d712b8c207e911821586d1043) as the dol (renaming 00000001.app -> main.dol) I encountered the following crash:
$ ninja
[1/3] TOOL build/tools/dtk
Downloading https://github.com/encounter/decomp-toolkit/releases/download/v0.6.2/dtk-linux-x86_64 to build/tools/dtk
[2/3] SPLIT config/NACJ/config.yml
FAILED: build/NACJ/config.json
build/tools/dtk dol split config/NACJ/config.yml build/NACJ
 INFO Loading config/NACJ/config.yml
 INFO Loading and analyzing 1 module (using 1 thread)
 WARN module{name=oot_vc}: Conflicting size for Control: was 0x190, now 0x18C
 WARN module{name=oot_vc}: Conflicting size for Control: was 0x190, now 0x18C
 WARN module{name=oot_vc}: Conflicting size for InitMetroTRK: was 0x94, now 0x98
 INFO Initial analysis completed in 0.825s (found 4323 functions)
 INFO Rebuilding relocations and splitting
thread '<unnamed>' panicked at src/obj/symbols.rs:308:36:
index out of bounds: the len is 0 but the index is<PHONE_NUMBER>3709551615
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
ninja: error: rebuilding 'build.ninja': subcommand failed

The same crash occurs if I manually run (on the 0.6.4 release)
./dtk dol config main.dol -o config.yml
./dtk dol split config.yml output

This will be fixed in v0.7.0.
Here's the configuration I used with linker GC/3.0a3 while testing: NACJ01.zip


Helmfile destroy with helm 3

Follow up on https://github.com/roboll/helmfile/issues/853
Issue
helmfile destroy doesn't work with helm3, as --filter flag is not passed to helm:
Listing releases matching ^prometheus$
exec: /usr/local/bin/helm3 list ^prometheus$ --kube-context helm3
exec: /usr/local/bin/helm3 list ^prometheus$ --kube-context helm3:
err: helm3 exited with status 1:
  Error: "helm list" accepts no arguments

Working command
 /usr/local/bin/helm3 list  --filter ^prometheus$ --kube-context helm3

Used versions
helm3 version:
version.BuildInfo{Version:"v3.0.0-rc.3", GitCommit:"2ed206799b451830c68bff30af2a52879b8b937a", GitTreeState:"clean", GoVersion:"go1.13.4"}
helmfile version:
v0.90.8
Debug output
helmfile --helm-binary $(which helm3) --log-level debug  --environment helm3 --selector name=prometheus destroy
processing file "helmfile.yaml" in directory "."
first-pass rendering starting for "helmfile.yaml.part.0": inherited=&{helm3 map[] map[]}, overrode=<nil>
first-pass uses: &{helm3 map[] map[]}
first-pass rendering output of "helmfile.yaml.part.0":
 0: repositories:
 1:   - name: stable
 2:     url: https://kubernetes-charts.storage.googleapis.com/
 3:   - name: incubator
 4:     url: https://kubernetes-charts-incubator.storage.googleapis.com/
 5:
 6: helmDefaults:
 7:   kubeContext: helm3
 8:
 9: environments:
10:   dev-cookie:
11:     values:
12:       - values/dev-environment.yaml
13:   prod-cherry:
14:     values:
15:       - values/prod-environment.yaml
16:   minikube:
17:     values:
18:       - values/minikube-environment.yaml
19:   helm3:
20:
21:
22: releases:
23:   - name: prometheus
24:     namespace: default
25:     labels:
26:       minikube: deploy
27:     chart: ./prometheus-9.3.1.tgz
28:     # values:
29:     #   - values/default/httpbin.yaml
30:
31:

first-pass produced: &{helm3 map[] map[]}
first-pass rendering result of "helmfile.yaml.part.0": {helm3 map[] map[]}
vals:
map[]
defaultVals:[]
second-pass rendering result of "helmfile.yaml.part.0":
 0: repositories:
 1:   - name: stable
 2:     url: https://kubernetes-charts.storage.googleapis.com/
 3:   - name: incubator
 4:     url: https://kubernetes-charts-incubator.storage.googleapis.com/
 5:
 6: helmDefaults:
 7:   kubeContext: helm3
 8:
 9: environments:
10:   dev-cookie:
11:     values:
12:       - values/dev-environment.yaml
13:   prod-cherry:
14:     values:
15:       - values/prod-environment.yaml
16:   minikube:
17:     values:
18:       - values/minikube-environment.yaml
19:   helm3:
20:
21:
22: releases:
23:   - name: prometheus
24:     namespace: default
25:     labels:
26:       minikube: deploy
27:     chart: ./prometheus-9.3.1.tgz
28:     # values:
29:     #   - values/default/httpbin.yaml
30:
31:

merged environment: &{helm3 map[] map[]}
Listing releases matching ^prometheus$
exec: /usr/local/bin/helm3 list ^prometheus$ --kube-context helm3
exec: /usr/local/bin/helm3 list ^prometheus$ --kube-context helm3:
err: helm3 exited with status 1:
  Error: "helm list" accepts no arguments

  Usage:  helm list [flags]
in ./helmfile.yaml: helm3 exited with status 1:
  Error: "helm list" accepts no arguments

  Usage:  helm list [flags]

Thanks to everyone involved in this project!

@daniel-gut Thanks!
Could you verify that you did set HELMFILE_HELM3=1 when running helmfile with Helm v3?

Thank you @mumoshu
That helped, sorry for bothering.

@daniel-gut Thanks a lot for the confirmation! Glad to see it worked.
I think we need to prioritize https://github.com/roboll/helmfile/issues/923 higher. The need to set the envvar to just try out v3 is absolutely non-sense…


Intersector.intersectRayTriangle failures (again)

I have found another issue with intersectRayTriangle. How to reproduce:
Vector3 t1 = new Vector3(90.0f, -150.0f, 1077.0f);
Vector3 t2 = new Vector3(90.0f, -120.0f, 1109.0f);
Vector3 t3 = new Vector3(120.0f, -150.0f, 1076.0f);

Ray ray = new Ray(new Vector3(90.0f, -150.0f, 1077.1f), new Vector3(-0.0f, 0.99503726f, 0.099503726f));
System.out.println(Intersector.intersectRayTriangle(ray, t1, t2, t3, null); // error: print false

It's not obvious there is an intersection, but it is at: [90.0, -149.89658, 1077.1104]
Suggested fix (adapted from the Möller-Trumbore algorithm):
private static final float epsilon = 0.00001f;

public static boolean intersectRayTriangle (Ray ray, Vector3 t1, Vector3 t2, Vector3 t3, Vector3 intersection) {
	Vector3 edge1 = v0.set(t2).sub(t1);
	Vector3 edge2 = v1.set(t3).sub(t1);

	Vector3 pvec = v2.set(ray.direction).crs(edge2);
	float det = edge1.dot(pvec);
	if (det > -epsilon && det < epsilon) {
		p.set(t1, t2, t3);
		if (p.testPoint(ray.origin) == PlaneSide.OnPlane && isPointInTriangle(ray.origin, t1, t2, t3)) {
			if (intersection != null) intersection.set(ray.origin);
			return true;
		}
		return false;
	}

	det = 1.0f / det;

	Vector3 tvec = i.set(ray.origin).sub(t1);
	float u = tvec.dot(pvec) * det;
	if (u < 0.0f || u > 1.0f) return false;

	Vector3 qvec = tvec.crs(edge1);
	float v = ray.direction.dot(qvec) * det;
	if (v < 0.0f || u + v > 1.0f) return false;

	float t = edge2.dot(qvec) * det;
	if (t < 0) return false;

	if (intersection != null) {
		if (t < epsilon) {
			intersection.set(ray.origin);
		} else {
			ray.getEndPoint(intersection, t);
		}
	}

	return true;
}

The only difference with the original algorithm is that the method returns true when the ray origin is inside the triangle. It is clear this new code should be tested thoroughly to make sure it doesn't break existing applications.
Should I send a new pull request?

I smell unit tests! :nose:

Sure ;) Where are libgdx unit tests?
The only one I can find is com.badlogic.gdx.utils.BitsTest in gdx/test/...

I could not find that test anywhere.
I'm not sure we have any unit tests. I thought a while ago, the JUnit dependency was added to libgdx, but right now I can't find any unit tests.

@nooone https://github.com/libgdx/libgdx/blob/master/gdx/test/com/badlogic/gdx/utils/BitsTest.java

thanks @fwolff could you send a new PR?

Done: pull request https://github.com/libgdx/libgdx/pull/3291.
Thanks!

New PR from a fresh fork: https://github.com/libgdx/libgdx/pull/3301.
Hope this one is good ;)

Hello!
You have a new message, please read http://from5pounds.com/beach.php?m
<EMAIL_ADDRESS>


Clear by tag functionality

Fixes #43

Codecov Report

Merging #113 (4043712) into master (423d2f6) will decrease coverage by 0.12%.
The diff coverage is 55.55%.

@@             Coverage Diff              @@
##             master     #113      +/-   ##
============================================
- Coverage     57.91%   57.79%   -0.13%
- Complexity      464      468       +4
============================================
  Files            96       97       +1
  Lines          1908     1931      +23
  Branches        209      212       +3
============================================
+ Hits           1105     1116      +11
- Misses          737      748      +11
- Partials         66       67       +1

Impacted Files
Coverage Δ
Complexity Δ

...ava/seedu/address/logic/commands/ClearCommand.java
42.85% <40.00%> (-57.15%)
3.00 <2.00> (+1.00)
:arrow_down:

...seedu/address/logic/parser/ClearCommandParser.java
100.00% <100.00%> (ø)
3.00 <3.00> (?)

...ava/seedu/address/logic/parser/HeliBookParser.java
72.72% <100.00%> (ø)
12.00 <0.00> (ø)

Continue to review full report at Codecov.

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


M1. Test complete deploymento on Debian 11/Ubuntu

2 complete test to be performed following the instructions.

test done.


Problem with setting "curly"

This config turns off curly by default but that seems inconsistent with Prettier's stance about braces:

Here are a few examples of things that are out of scope for Prettier:

Adding/removing {} and return where they are optional.

https://prettier.io/docs/en/rationale.html#what-prettier-is-_not_-concerned-about
In addition, given that this config should be put last in the "extends" list, it prevents any other previous configs to set the rule and forces to explicitly configuring the rule in the "rules" section.
IMO the following line has to be removed.
https://github.com/prettier/eslint-config-prettier/blob/3dfe8c6301897260486e13bc22712e824958c422/index.js#L10
Would really appreciate your thoughts on this.

Hi! Have you read the documentation? https://github.com/prettier/eslint-config-prettier#curly

Closing because no response.


Fix restart file index and nc write

Trying to fix the restart of fsi simulations from precursor when there are multiple separate turbines (and hoping this contributes to being able to restart multiple turbines)

Is this PR still needed?  @deslaughter, or is this covered in your fix for FSI coupling?

@ndevelder PR #2365, merged into dev today, resolves the issue with the OpenFAST restart when using the C++ interface. Do you still want this change merged?
@gantech I don't understand the change in this PR, does it look right to you?

I'm pretty sure this is important for properly indexing the restart files, using "turb_id" as set in the input file as opposed to the index pulled out from the turbines glob. I do have these lines with this change in my current_fsi branch that we've been using.


Search app paths

For #18

@sdondley  Cool 👍 Did you add its windows-only dependency on Win32::Registry to META6.json?

I was wondering about that myself last night after I posted. Usually my IDE takes care of that and I don't have to think about it. I'm not sure why it didn't do it for me. I'll look into it.

OK, modified META6 and cleaned up some sloppy, crufty code.

Thanks 👍


Translation Missing for :en

I am using rails3.0.9 with active_admin0.3.2. I didn't set any specific locale in config/application.rb or any additional code in initializers/active_admin.rb. I supposed that activeadmin will add locales files on load. But I met two issues:
i). While after I loggoed in admin, it throws message "translation missing: en.active_admin.dashboard_welcome.welcome".
I solved the issue by coping file active_admin/lib/active_admin/locales/en.yml to config/locales. But I really doubt that. Should activeadimn be supposed to load the locale files?
ii). If I checked one of my resources, it will throw error "translation missing: en.time.formats.long".
I solved this issue by coping rails-i18n/rails/locale/en-US.yml into config/locales/en.yml. Why activeadmin doesn't include these into its locales yml files?

https://github.com/gregbell/active_admin/blob/master/lib/active_admin/locales/en.yml

thanks!

No Problem!
On Thu, Dec 29, 2011 at 9:05 PM, regdog <
<EMAIL_ADDRESS>
wrote:

thanks!

Reply to this email directly or view it on GitHub:
https://github.com/gregbell/active_admin/issues/596#issuecomment-3310939

--
Khang Pham


Improve docs

https://github.com/Kong/kong/pull/5810#discussion_r511427611

@sunilbhara I have no idea what your intent is, but it seems you are randomly opening PR's.


Digital Measure Import tripping up

Most import errors prevent the imports from completing - with the assumption right now being that we'll see the error, fix the problem right away, and then the import will begin to succeed again. Probably the best that we can do is really broadly capture the errors, log information about them somewhere, and try to notify someone. That's already happening, but it's really only West Arete that has total visibility into the errors and it's only West Arete that gets any kind of notification.
We need to update visibility into the errors for Penn State, and have Penn State receive notification of the errors on this import.

log information about them somewhere, and try to notify someone

This is too nebulous for me to implement, I don't know what tools PSU wants me to use. Where should these errors  be logged and how and who?

@rschenk Yes, this is nebulous. We have a bunch of different automated data imports that run all of the time. This is just one of them. Sometimes these imports encounter an intermittent error and die, but then they succeed the next time they run. Other times they begin to encounter the same error on every run, and so they never complete successfully from that point on.
What we care most about is making sure that none of the imports are ever permanently failing. Logging error info is important but secondary, and notification is tertiary, I would say.
For now, my plan for this (and other import errors) was to catch any errors raised by the import processes that aren't otherwise handled and just log the error info in the database where all RMD admins and developers can easily see it. Sort of like how I'm already doing with email errors. Only this would be something like import_errors and it would track the type of import (Activity Insight in this case), the type of error, and other error info/stacktrace/etc.
That's my thought anyway. We could also continue to send error info to Bugsnag and look at sharing access to the Bugsnag project. Or if Bugsnag works well enough then we could do that instead of logging in the DB. Again, the key thing here is to make sure that the imports can proceed in the face of one-off errors regardless of how we log/notify about the errors.
Bugsnag is the place to look currently for any unhandled errors that are being raised by imports (rake tasks).


URL strategy redefinition

Should /assets/carbon-charts/library-assets turn into:
- /libraries/carbon-charts/assets
- /assets/libraries/carbon-charts/assets
- something else
is a library an asset? if not, can we remove the first '/asset' before getting to the library?
Is /assets/button ever a valid url? Or is it always /assets/some-library-name/button?
At the moment, there's a mismatch between the breadcrumb and the URL (see screenshot). Assets, Libraries, and a specific library are referenced as navigation contexts on the page, but the URL is missing the indication of the specific library being nested under the set of all libraries.

(This applies to urls throughout the whole app, not just the library asset detail page)
see discussion on:
https://github.com/carbon-design-system/carbon-platform/pull/509#discussion_r849667790

@francinelucca thanks for opening this issue. I have a draft PR open that can be used to help answer these and other questions stated in sprint 15 design goals.

Like what we did in https://github.com/carbon-design-system/carbon-platform/pull/596:

[ ] /libraries - libraries index page
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref] - library detail page
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/assets - library assets page
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset] - asset detail page (overview tab)
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset]/usage - asset usage page
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset]/style - asset style page
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset]/code - asset code page
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset]/accessibility - asset accessibility page
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/design-kits - library design kits page
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/pages/[...page] - library pages that come from the navData schema (in the pages path to avoid conflicts)
[ ] /libraries/[host]/[org]/[repo]/[library]/[ref]/versions - library versions page
[ ] /catalogs/components
[ ] /catalogs/functions
[ ] /catalogs/patterns
[ ] /catalogs/templates
[ ] /collections/data-visualization

With this, we can just have these Next.js rewrites so we can have short URLs for latest versions like /libraries/carbon-charts/latest/assets/alluvial:
async rewrites() {
    const rewrites = []

    for (const [slug, library] of Object.entries(libraries)) {
      rewrites.push({
        source: `/libraries/${slug}`,
        destination: `/libraries/${library.host}/${library.org}/${library.repo}/${slug}/latest`
      })

      rewrites.push({
        source: `/libraries/${slug}/:ref*`,
        destination: `/libraries/${library.host}/${library.org}/${library.repo}/${slug}/:ref*`
      })
    }

    return rewrites
  }

Agree!!
Just would say I'm not sure how complex/possible it'll be to have the overview tab be /libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset] and have other tabs be /libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset]/[tab] , we'll have to do some hacking/hardcoding definitely to be able to empower the tabs component to know how to route

@francinelucca we should be able to do that if the overview tab is:
/libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset]/index.js
and then the other pages use the template:
/libraries/[host]/[org]/[repo]/[library]/[ref]/assets/[asset]/[page].js
where the [page].js checks to see if it's valid in static props (e.g. given all the route slugs and our indexed data, should this request of page === usage return a valid page and if not, return 404.)

(@francinelucca although I didn't look up the Next.js docs in writing this issue so I might be off a bit on how Next.js routing does things 😅.)

Hey team! Please add your planning poker estimate with ZenHub @alisonjoseph @andreancardona @francinelucca @jdharvey-ibm


Add option to include vendor specific prefixes to output CSS file

Vendor specific prefixes:
-webkit, -moz, -mz, -o, etc.

Vendor specific prefixes are automatically added when you use a class that requires them. What did you have in mind?

I was doing some work for my personal website and I was trying to apply the grayscale class to some images. However, it wasn't being applied properly because only the filter class as produced on the css file. When I manually edited the css file to include -webkit-filter, the grayscale option was applied properly.

That's strange. Playing around with with Tailwind Play the grayscale seems to work ok. The filters do some stuff with CSS variables. Have you used the preflight -p option?

I do see some vendor specific prefixes for tags other than grayscale. For context I am using Google Chrome and was loading my CSR website using the trunk crate. I suspect it must stem from that in some fashion. I even tried TailwindCSS proper, and it was giving me a similar result when loading with trunk. I will go ahead a close this issue as I don't believe it to be a railwind specific problem.


Upgrade to eslint 0.20.0

I wouldn't expect any major issues.

I'm gonna be making some enhancements to our eslint w.r.t. React later today or tomorrow. I'll bump the version to the latest as well.

Cool. http-server also has 0.8.0. There is probably not much difference in either but if you have -g installed them you need to uninstall them and downgrade since they are peerDependencies of beaker.


BUG Pyjulia update broke on macOS

The latest pyjulia release (0.5.6 on the 14/09/2020) seems to have broken the CI on OSX and consistently cause a segfault.

It was working until this build on the 15/09 6:52AM.
It broke down with SEGFAULT without changes on this build on the 15/09 3PM.

Maybe we should pin the version to 0.5.5 while this is not resolve?

yes pin the version


Outdated estimators explained in goldenspike

The goldenspike.ipynb markdown cell called "Estimate photo-z posteriors" contains written descriptions of randomPZ, trainZ, and BPZ_lite, while the notebook's code has since been updated to use BPZ_lite, KNearNeighPDF, and FZBoost.
These explanations should be updated to match.
There may be other discrepancies throughout the notebook--trying to wrap something up so I haven't checked.

I can try to clean this up, it's likely that I'm the one that forgot to update the notebook. I'll assign myself now and update the notebook tomorrow.

Actually, I'll wait until #372 is merged to avoid conflicts and make sure that I'm writing updates that are current with any changes there.


Feature/auditable wallets

Coverage increased (+0.1%) to 94.897% when pulling 5cb5461a23adae69e8ccb1c92325856271506ece on isocolsky:feat/no-privacy into d974638cfefd4d68f8b7114109f27758d25915ac on bitpay:master.

Coverage increased (+0.1%) to 94.918% when pulling f13d6860d92bf9903c9f0291b412fd1bd7750f18 on isocolsky:feat/no-privacy into d974638cfefd4d68f8b7114109f27758d25915ac on bitpay:master.

Coverage increased (+0.2%) to 94.98% when pulling b0925e04b82ac075dc264984c586080c31b666ad on isocolsky:feat/no-privacy into d974638cfefd4d68f8b7114109f27758d25915ac on bitpay:master.

ACK! Great Job.


Fix custom resources directory

Use the directory where files were initially copied.

Oh I see, you are right. I had mistakenly only seen the custom_resources_path variable and had put my scripts there, incorrectly.