(Proposal) Move the "Text Selection Tool" & "Hand Tool" items next to "Save" item

Configuration:

Web browser and its version: Firefox v120.0.1 (64-bit)
Operating system and its version: Windows 11 Pro 22631.2715 (64-bit)
Is a browser extension: No, this issue is unrelated to any extension.

Steps to reproduce the problem:

Open Firefox,
Open PDF Reader,
Look at the toolbar.

What is the expected behaviour?

Text Selection Tool & Hand Tool items should be located in the toolbar because they are important items.
E.g. in Paint.net or Photoshop, similar items are located in the toolbar and not somewhere in the menu, making them easily accessible. Also, this change would be useful for touch devices.

What went wrong?

The "Text Selection Tool" & "Hand Tool" items are not in the toolbar but in the menu instead.
I'm attaching a screenshot. To avoid misunderstanding, the red arrows point to the mentioned items, and the small blue line is where these items should be located.

Other details:

Bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1867960
Related discussion: https://github.com/black7375/Firefox-UI-Fix/discussions/834

Bugzilla bug: bugzilla.mozilla.org/show_bug.cgi?id=1867960

Let's duplicate this to that one then, since there's no need to file "duplicate" reports in both GitHub and Bugzilla.

Wait! I closed that as won't fix on BugZilla!

Please keep in mind that these buttons have always been placed in the secondaryToolbar, since this isn't often used functionality; hence it's not entirely clear (at least to me) that this is a necessary change.

To re-evaluate the placement of these toolbar buttons, we'd need input from Firefox UX/UI developers. (I believe there's already work planned to maybe re-design the viewer toolbar.)
Hence, please note that Bugzilla really is the more appropriate place for this report (and the bug was still open when I made my comment).

But how do I re-open it on Bugzilla?

I reopened the bug on Bugzilla.

Thank you.


[2.0] Update dependencies to supported versions

In composer.json some allowed versions of dependencies are not supported anymore; ex: symfony/console < 2.8. Maybe it is a good time to update the dependencies versions in composer.json ?

Given support for 2.8 ends in November I'm fine with bumping stuff to 3.4.

Should we up the rest of dependencies to their latest version also ?

Yeah, I think why not. We can always lower them if needed

Closing as #1845 was merged


Add Social Vulnerability Index (SVI)  subpackage

This is my first draft attempt at the svi client.
TODO: fill in below sections.
Additions

Removals

Changes

Testing

Notes

Todos

Checklist

[ ] PR has an informative and human-readable title
[ ] PR is well outlined and documented. See #12 for an example
[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows project standards (see CONTRIBUTING.md)
[ ] Passes all existing automated tests
[ ] Any change in functionality is tested
[ ] New functions are documented (with a description, list of inputs, and expected output) using numpy docstring formatting
[ ] Placeholder code is flagged / future todos are captured in comments
[ ] Reviewers requested with the Reviewers tool :arrow_right:

@jarq6c

If the data source is inherently spatial, would it make sense for get to return a geopandas.GeoDataFrame? The canonical standard already includes a geometry column for this purpose.

If the data source is inherently spatial, would it make sense for get to return a geopandas.GeoDataFrame? The canonical standard already includes a geometry column for this purpose.

Thanks for asking! I was planning on bringing this up as I got further along with this PR. My thinking is, as a user I want the ability to have the geospatial data and not to have the geospatial data. The geospatial data column will contribute more to memory usage and I would like the ability to limit memory consumption if my problem does not require geospatial data.
However, as I read back over what I just wrote and consider the meaning of "canonical," I think I am persuading myself towards your view point. We have a canonical format and I think it makes sense to include all fields from the canonical format when a dataset has those fields. Do you share that view? And, what are your thoughts on having a method that returns data that includes the geospatial data and one that excludes the geospatial data?

If the data source is inherently spatial, would it make sense for get to return a geopandas.GeoDataFrame? The canonical standard already includes a geometry column for this purpose.

Thanks for asking! I was planning on bringing this up as I got further along with this PR. My thinking is, as a user I want the ability to have the geospatial data and not to have the geospatial data. The geospatial data column will contribute more to memory usage and I would like the ability to limit memory consumption if my problem does not require geospatial data.
However, as I read back over what I just wrote and consider the meaning of "canonical," I think I am persuading myself towards your view point. We have a canonical format and I think it makes sense to include all fields from the canonical format when a dataset has those fields. Do you share that view? And, what are your thoughts on having a method that returns data that includes the geospatial data and one that excludes the geospatial data?

Emphasis on inherently spatial. If the original data source is a spatial format like a Shapefile, GeoJSON, or GeoCSV then I think we'd want to include a geometry column and return the data as a GeoDataFrame. There are other data sources like NWM NetCDF or NWIS JSON/WaterML that include spatial data but aren't necessarily inherently spatial data formats (i.e. lacking in explicit vector geometry). These formats might return latitude and longitude columns in a pandas.DataFrame instead.

If the data source is inherently spatial, would it make sense for get to return a geopandas.GeoDataFrame? The canonical standard already includes a geometry column for this purpose.

Thanks for asking! I was planning on bringing this up as I got further along with this PR. My thinking is, as a user I want the ability to have the geospatial data and not to have the geospatial data. The geospatial data column will contribute more to memory usage and I would like the ability to limit memory consumption if my problem does not require geospatial data.
However, as I read back over what I just wrote and consider the meaning of "canonical," I think I am persuading myself towards your view point. We have a canonical format and I think it makes sense to include all fields from the canonical format when a dataset has those fields. Do you share that view? And, what are your thoughts on having a method that returns data that includes the geospatial data and one that excludes the geospatial data?

Emphasis on inherently spatial. If the original data source is a spatial format like a Shapefile, GeoJSON, or GeoCSV then I think we'd want to include a geometry column and return the data as a GeoDataFrame. There are other data sources like NWM NetCDF or NWIS JSON/WaterML that include spatial data but aren't necessarily inherently spatial data formats (i.e. lacking in explicit vector geometry). These formats might return latitude and longitude columns in a pandas.DataFrame instead.

For this work, I agree with you and ill make the change to only return geopandas.GeoDataFrame's from the get method. However, the design decision to let a data source's format dictate our output format is not something i'm overly keen about. I don't think that's exactly what you meant, but I just wanted to say it more plainly. My opinion is that we try to ensure a common interface for a data source, even if that data source's source format and composition changes.

I think we have some leeway since objects like geopandas.GeoDataFrame and dask.dataframe.DataFrame inherit from pandas.DataFrame and can be coerced into the canonical format. If we wanted to adhere to a strictly pandas based standard, you could include a switch parameter as you suggested.
For example, the nwm_client_new get method includes an analogous boolean switch called compute that returns a pandas.DataFrame if True (default behavior) or a dask.dataframe.DataFrame if `False.

CDC_Social_Vulnerability_Index_2018 (FeatureServer)
https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest/services/CDC_Social_Vulnerability_Index_2018/FeatureServer

Looking back at this work, I think it would be helpful for me moving forward if we could decide what SVI fields our "flagship" api will support. I would like to support a "raw" svi api for users who want to use our tools to just get data svi in a dataframe format. This comment should provide background and enough information to get us started. Ill include my thoughts / opinions in a separate comment below.
Background
To, hopefully, start the conversation, the SVI has been released 5 times (2000, 2010, 2014, 2016, and 2018).  The SVI calculates a relative percentile ranking in four themes categories for a give geographic extent:

Socioeconomic
Household Composition & Disability
Minority Status & Language
Housing Type & Transportation

The values used to calculate the percentile ranking for each of the four themes are summed, for each record, to calculate an overall percentile ranking.
Rankings are calculated relative to a given state or the entire United States. For all editions of the SVI, rankings are computed at the census tract spatial scale. Meaning, if you were to retrieve the 2018 SVI at the census tract scale, at the state coverage for the state of Alabama, you would receive 1180 records (number of census tracts in AL in 2010 census) where each ranked percentile is calculated relative to census tracts in Alabama. From 2014 onward, the SVI is also offered at the county scale in both the state and U.S. coverage products. The state coverage products allow inter-state comparison and the U.S. coverage allow national comparison at the census tract or county scales (2014 onward).
Luckily, facets used to calculate each theme are included in all datasets. Facets being one of the fields contributing to the calculation of a themes value (e.g. Per capita income). In the 2018 edition, there are 124 column headers. This number has fluctuated (mainly only increased) with new released of the SVI:
number of cols for each release:

2000: 79
2010: 107
2014: 127
2016: 125
2018: 124

Question
The main question I would like to address through discussion is, what fields should be included in the canonical output for the flagship svi client get method? The question boils down to what location metadata fields and SVI fields do we think should be included?
Additional Information
Below are links for SVI documentation broken down by year:
"2000": "https://www.atsdr.cdc.gov/placeandhealth/svi/documentation/pdf/SVI2000Documentation-H.pdf"
"2010": "https://www.atsdr.cdc.gov/placeandhealth/svi/documentation/pdf/SVI-2010-Documentation-H.pdf"
"2014": "https://www.atsdr.cdc.gov/placeandhealth/svi/documentation/pdf/SVI2014Documentation_01192022.pdf"
"2016": "https://www.atsdr.cdc.gov/placeandhealth/svi/documentation/pdf/SVI2016Documentation_01192022.pdf"
"2018": "https://www.atsdr.cdc.gov/placeandhealth/svi/documentation/pdf/SVI2018Documentation_01192022_1.pdf"

My thoughts are this flagship get api should include a limited subset of fields from the SVI. If a user wants all the raw fields, they can use a get_all_fields method (I am very open to a more intuitive method name). For starters, the included fields should be <name: description>:
state_fips: State FIPS code
state_name: State name
county_name: County name
fips: Census tract or county fips code
svi_edition: year corresponding to svi release (this assumes 2 SVI's will not be release in a given year in the future)
geometry: County or census tract simple features geometry
rank_theme_1: Socioeconomic
rank_theme_2: Household Composition / Disability
rank_theme_3: Minority Status / Language
rank_theme_4: Housing Type / Transportation
rank_svi:  aggregated  overall percentile ranking
value_theme_1: Socioeconomic
value_theme_2: Household Composition / Disability
value_theme_3: Minority Status / Language
value_theme_4: Housing Type / Transportation
value_svi:  aggregated overall value; sum of values from themes 1, 2, 3, 4.
As always, this is a conversation and I hope we can find the best for hydrotools users together! I would really value some opinions on this topic!
Pinging @jarq6c.

That synopsis is extremely useful! I may share that widely. Thanks a lot.
I have no objections to this initial subset for get. I think the only thing that irks me is the wide-format. Each dataframe row is a unique county or census tract, so we end up with really wide dataframes. In the future, we might consider a long_format parameter to generate dataframes more similar to the canonical format.
Something like this:
  state_fips state_name county_name  fips svi_edition geometry    value_theme value
0       0000         ZZ         foo  1111        2018  POLYGON  Socioeconomic  99.9
1       4444         XX         bar  2222        2018  POLYGON            All  26.3

As for additional metadata, you might consider:

get returning a wide dataframe based on some parameter
get returning multiple dataframes based on some parameter
punting retrieval of metadata to a separate method with an interface similar to get (i.e. get_metadata)

Thanks for putting this together!

That synopsis is extremely useful! I may share that widely. Thanks a lot.

Great! Please do!
Right, I see that we share the same irk. There are just sooo many columns. I like your proposed solution. I think long term get should return a long-formatted dataframe. Alternatively, the shape of this data makes it a good candidate for using pandas multi-indexes, however I am hesitant. Ive not seen many libraries that return multi-index dataframes "in the wild" as they are a little niche. If you disagree, please interject.
Moving forward, I think we are on the same page for next steps for this PR. I will work get returning a wide-formated dataframe that follows the column schema I listed above. I am still learning details about the SVI so I think it makes sense to stay in a wide format during this "discovery" phase. Then as the PR moves forward and hopefully after a first review, we can revisit and formalize the long-format we want to implement and release 0.0.1 with the long format and any other relevant get_x_metadata methods. Thoughts?

Would it make sense to extend the get api using some kwargs?  For example
#get the basic data (default fields, "wide format")
basic_data = client.get(arg1, arg2)
#get the basic data (default fields, "long format")
long_data = client.get(arg1, arg2, long_form=True)
all_fields = client.available_fields(year)
#get all data
all_data = client.get(arg1, arg2, fields=all_fields)
#get a single field
single_data = client.get(arg1, arg2, fields=all_fields[0])
#get data with multi index
data = client.get(arg1, arg2, multi_index=True)

The backend can organized around some common functions/transformations, and the get api always returns data, but takes into account some of the ways a user may want to use it.

Would it make sense to extend the get api using some kwargs? For example
#get the basic data (default fields, "wide format")
basic_data = client.get(arg1, arg2)
#get the basic data (default fields, "long format")
long_data = client.get(arg1, arg2, long_form=True)
all_fields = client.available_fields(year)
#get all data
all_data = client.get(arg1, arg2, fields=all_fields)
#get a single field
single_data = client.get(arg1, arg2, fields=all_fields[0])
#get data with multi index
data = client.get(arg1, arg2, multi_index=True)

The backend can be organized around some common functions/transformations, and the get api always returns data, but takes into account some of the ways a user may want to use it.

Yeah, this makes sense to me.

Would it make sense to extend the get api using some kwargs? For example
#get the basic data (default fields, "wide format")
basic_data = client.get(arg1, arg2)
#get the basic data (default fields, "long format")
long_data = client.get(arg1, arg2, long_form=True)
all_fields = client.available_fields(year)
#get all data
all_data = client.get(arg1, arg2, fields=all_fields)
#get a single field
single_data = client.get(arg1, arg2, fields=all_fields[0])
#get data with multi index
data = client.get(arg1, arg2, multi_index=True)

The backend can be organized around some common functions/transformations, and the get api always returns data, but takes into account some of the ways a user may want to use it.

I am not keen to use kwargs to change the output format in the get method. It would differ from other hydrotools' get methods convention. I would rather just use a long format by default and provide an example for going from the long format back to a wide format in documentation.

Alright, so I am getting close to something that is reviewable. Over the weekend I made a fair amount of progress and decided to switch the data source I was getting SVI values from to a CDC hosted ESRI feature service. The source I am now using powers this map for context. This data source was a lot easier and faster to use. In the future it could support more complex SQL queries to retrieve data if we want to support that as well (i.e. get me SVI > 0.9 in the state of Kansas). There are unknowns with this data source (when is maintenance, will they vanish overnight?) so Ive baked in a straight forward path to roll back to other data sources if necessary. This feature has not been introduced yet, but the mechanisms and most of the work has been completed to add this functionality.
However, the only downside is, this data source does not have SVI rankings calculated at the state geographic context, only the national context (that's not completely true, but good enough for conversation). So for now, the SVI client will only support SVI rankings calculated at the national geographic context. All years are supported and this data source has calculated SVI at the county and census tract geographic scales for all years (this is great, county scale SVI data for 2000 and 2010 is not even available from the cdc download tool).
I decided to go with a long dataframe format as requested by @jarq6c. Thanks for the suggestion! Im happy with how it turned out. Below are the fields I went with:
"state_name"
"state_abbreviation"
"county_name"
"state_fips"
"county_fips"
"fips"
"theme"
"rank"
"value"
"svi_edition"
"geometry"

Likewise here are theme names I decided on:
socioeconomic # theme 1
household_comp_and_disability # theme 2
minority_status_and_lang # theme 3
housing_type_and_trans # theme 4
svi # all

These are certainly up for debate and please provide your opinions. My thinking was to remove spaces if someone wanted to easily go back to a wide format and not deal with spaces and shorten the theme names slightly. I am not settled on this, so please let me know what you think.
Ive added a list of TODOs below for myself. Once I add exceptions to the code, this should be reviewable. Obviously unit tests and integration tests will be added before we merge.
TODOs:

[ ] add exceptions and error messages (I have a slew of place holders)
[ ] add unit tests
[ ] add integration tests
[ ] update PR description

@jarq6c and @hellkite500, the code itself is now in a working order and is ready for review. there are still a few non-code related things that I would like to include in the PR, but my thinking is the reviewing effort and me adding other things effort are not really related and can be done async.
A note on the state of the code, I think there is some module renaming and refactoring that should be done in the future. I think it makes sense to rename / refactor modules when the SVI provider rollback functionality is added.

I added integration tests for the SVIClient.get method. They appear to be failing, so I will look into that tomorrow.

The svi_client was not being installed in the existing gh actions. I pushed up a change that should fix that issue.

@aaraney older versions can use from typing_extensions import Literal.
See here:
https://pypi.org/project/typing-extensions/

Also note: Python 3.7 is EOL 2023-06. Should we write a test/time bomb for that?

Wow there are a lot of tests.

 'X-Amz-Cf-Pop': 'IAD66-C2', 'X-Amz-Cf-Id': 'ii7DXKcsjxbgUbtPvvW9ZR6sI8JK5VvNGM1a09vsOPLl7uF5uGsMWQ==', 'Age': '180')>

    async def json(
        self,
        *,
        encoding: Optional[str] = None,
        loads: JSONDecoder = DEFAULT_JSON_DECODER,
        content_type: Optional[str] = "application/json",
    ) -> Any:
        """Read and decodes JSON response."""
        if self._body is None:
            await self.read()

        if content_type:
            ctype = self.headers.get(hdrs.CONTENT_TYPE, "").lower()
            if not _is_expected_content_type(ctype, content_type):
>               raise ContentTypeError(
                    self.request_info,
                    self.history,
                    message=(
                        "Attempt to decode JSON with " "unexpected mimetype: %s" % ctype
                    ),
                    headers=self.headers,
                )
E               aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/ArcGIS/rest/services/Overall_2016_Tracts/FeatureServer/0/query?returnExceededLimitFeatures=true&where=1%3D1&f=pgeojson&outFields=STATE,ST_ABBR,COUNTY,ST,STCNTY,FIPS,RPL_THEME1,RPL_THEME2,RPL_THEME3,RPL_THEME4,RPL_THEMES,SPL_THEME1,SPL_THEME2,SPL_THEME3,SPL_THEME4,SPL_THEMES&returnGeometry=true')

env/lib/python3.8/site-packages/aiohttp/client_reqrep.py:1097: ContentTypeError

I thought I might need to instally pytest-aiohttp, but I get this error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
hydrotools-restclient 3.0.5 requires aiohttp<=3.7.4.post0, but you have aiohttp 3.8.1 which is incompatible.

@aaraney older versions can use from typing_extensions import Literal.
See here for backports: https://pypi.org/project/typing-extensions/

Thanks for pointing me in the direction of this package. I am now pulling it in as a dep for the svi_client and using it instead of typing.Literal. The min python version is now 3.7 again. I also added an inline code note to switching to typing.Literal when the min python version supported is 3.8.

Wow there are a lot of tests.

Yeah, sorry about that. Ive been using pytest-xdist locally to speed up testing. It allows you to run pytests in parallel (e.g. pytest -n auto). I think it makes sense to change this in our github actions that run tests to increase testing speeds.

 'X-Amz-Cf-Pop': 'IAD66-C2', 'X-Amz-Cf-Id': 'ii7DXKcsjxbgUbtPvvW9ZR6sI8JK5VvNGM1a09vsOPLl7uF5uGsMWQ==', 'Age': '180')>

    async def json(
        self,
        *,
        encoding: Optional[str] = None,
        loads: JSONDecoder = DEFAULT_JSON_DECODER,
        content_type: Optional[str] = "application/json",
    ) -> Any:
        """Read and decodes JSON response."""
        if self._body is None:
            await self.read()

        if content_type:
            ctype = self.headers.get(hdrs.CONTENT_TYPE, "").lower()
            if not _is_expected_content_type(ctype, content_type):
>               raise ContentTypeError(
                    self.request_info,
                    self.history,
                    message=(
                        "Attempt to decode JSON with " "unexpected mimetype: %s" % ctype
                    ),
                    headers=self.headers,
                )
E               aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/ArcGIS/rest/services/Overall_2016_Tracts/FeatureServer/0/query?returnExceededLimitFeatures=true&where=1%3D1&f=pgeojson&outFields=STATE,ST_ABBR,COUNTY,ST,STCNTY,FIPS,RPL_THEME1,RPL_THEME2,RPL_THEME3,RPL_THEME4,RPL_THEMES,SPL_THEME1,SPL_THEME2,SPL_THEME3,SPL_THEME4,SPL_THEMES&returnGeometry=true')

env/lib/python3.8/site-packages/aiohttp/client_reqrep.py:1097: ContentTypeError

I thought I might need to install pytest-aiohttp, but I get this error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
hydrotools-restclient 3.0.5 requires aiohttp<=3.7.4.post0, but you have aiohttp 3.8.1 which is incompatible.

Yeah, I should have mentioned that in a comment. The four integration tests that are failing are requesting census tract scale svi data for the entire country in geojson from an ESRI feature service. I haven't looked into why the requests are failing, but after testing that you can retrieve census tract data for the entire country in the ESRI protobuf format, I think this is likely a data serialization and response timeout issue on the ESRI feature server's side.
On Friday, I verified that can request census tract data for the entire country in ESRI pbf and verified that I can de-serialize the response using this protobuf schema. Moving forward, I think it makes sense to use the esri protobuf format to get around this issue. What this means is I will need to generate python bindings for the aforementioned pbf schema and use the bindings to go from pbf to json to generate the dataframe. I think in general this is a good idea as it will reduce download time and size for users.
While this sounds like a large undertaking, it really shouldnt be that bad and I dont foresee needing to change that much code, so I think the review can proceed while I work to add this feature.

Also note: Python 3.7 is EOL 2023-06. Should we write a test/time bomb for that?

Its a shame there is not a joy emoji as a github reaction. Yeah, I think that is a good idea. I think it makes sense to add that sort of test or alert at the top namespace level. So, I would propose adding a new dir at the repo root, tests, that would hold package wide scheduled notifications if you will. Thoughts? I can throw in a PR that adds that if we are in agreement.

Sounds like a good idea to me.

Yeah, I should have mentioned that in a comment. The four integration tests that are failing are requesting census tract scale svi data for the entire country in geojson from an ESRI feature service. I haven't looked into why the requests are failing, but after testing that you can retrieve census tract data for the entire country in the ESRI protobuf format, I think this is likely a data serialization and response timeout issue on the ESRI feature server's side.
On Friday, I verified that can request census tract data for the entire country in ESRI pbf and verified that I can de-serialize the response using this protobuf schema. Moving forward, I think it makes sense to use the esri protobuf format to get around this issue. What this means is I will need to generate python bindings for the aforementioned pbf schema and use the bindings to go from pbf to json to generate the dataframe. I think in general this is a good idea as it will reduce download time and size for users.
While this sounds like a large undertaking, it really shouldnt be that bad and I dont foresee needing to change that much code, so I think the review can proceed while I work to add this feature.

@jarq6c, So having started down the road to use ESRI protobufs, I would need to implement more code than I initially thought. So, instead I decided to use the restclient's mget method to make concurrent requests instead of fooling around with protobufs. I think protobufs would make the tool faster overall, but for now I think its a bit of over engineering given this tool is just retrieving static data.
I verified that the tests pass locally, so once I update the README, PR description, and we are comfortable merging, we should be all set.

All tests passed locally for me, as well. Note the deprecation warnings from geopandas have been resolved:
https://github.com/geopandas/geopandas/issues/2083

I'm having some trouble understanding the output, even after looking at the documentation. Here's an example:
from hydrotools.svi_client import SVIClient

client = SVIClient()
gdf = client.get(
    location="WY",
    geographic_scale="county",
    year="2016",
    geographic_context="national"
    )

gdf.to_file("wyoming_svi_county.geojson", driver="GeoJSON")

print(client.svi_documentation_url(2016))

Once I've got wyoming_svi_county.geoson I load it up into QGIS and view the attribute table

Notice there are five entries for albany county for the svi theme. The rank is the same, but the values are different. This pattern repeats for the other themes. Is this expected output?

I'm having some trouble understanding the output, even after looking at the documentation. Here's an example:
from hydrotools.svi_client import SVIClient

client = SVIClient()
gdf = client.get(
    location="WY",
    geographic_scale="county",
    year="2016",
    geographic_context="national"
    )

gdf.to_file("wyoming_svi_county.geojson", driver="GeoJSON")

print(client.svi_documentation_url(2016))

Once I've got wyoming_svi_county.geoson I load it up into QGIS and view the attribute table
Notice there are five entries for albany county for the svi theme. The rank is the same, but the values are different. This pattern repeats for the other themes. Is this expected output?

Thanks for finding this issue, @jarq6c! The issue was how I was melting the dataframes. Ive pushed a change that resolves the issue you brought to light. Thanks!

You might consider using categories for some values. Categories reduced the memory footprint from 15.0 MB to 1.0 MB in this example.
...

Awesome! Thanks for suggesting this! Ive pushed a change that now casts string columns to categories!

It looks like pip removed --use-feature=in-tree-build in 22.1.
Usage:
  /opt/hostedtoolcache/Python/3.9.12/x64/bin/python3 -m pip install [options] <requirement specifier> [package-index-options] ...
  /opt/hostedtoolcache/Python/3.9.12/x64/bin/python3 -m pip install [options] -r <requirements file> [package-index-options] ...
  /opt/hostedtoolcache/Python/3.9.12/x64/bin/python3 -m pip install [options] [-e] <vcs project url> ...
  /opt/hostedtoolcache/Python/3.9.12/x64/bin/python3 -m pip install [options] [-e] <local project path> ...
  /opt/hostedtoolcache/Python/3.9.12/x64/bin/python3 -m pip install [options] <archive url/path> ...

option --use-feature: invalid choice: 'in-tree-build' (choose from '2020-resolver', 'fast-deps')

I removed this option when installing subpackages in all our github actions.

also, it seems like pytest does not like it when two test files have the same name even if they are in separate directories. see this gh actions log.

alright, so with the additions I made today, this is pretty much ready to be merged. I just need to add documentation in the form of a readme and add description to the PR. However, the tool is now functional!

We'll pin a release before and after merging this in. I'll pin a release after #191 is merged.

Great find regarding to_file's incompatibility. Do you think it merits mentioning that in documentation somewhere, @jarq6c?

Great find regarding to_file's incompatibility. Do you think it merits mentioning that in documentation somewhere, @jarq6c?

Might be a good idea to at least add to the README.md example.

Live on pypi.

Thanks! I was going to take this chance to look over the other packages before pinning a HydroTools v3.0.0 release with the svi_client. If you've got any pet issues you want resolved before the next major release feel free to mention them.


BMP height is negative

https://sourceforge.net/p/mediainfo/feature-requests/485/

As top down stuff does not everywhere (e.g. Firefox wrongly displays the image), can we add e.g.
Fill(Stream_Image, 0, "Method", "Top down");

when the value is negative?

const char* Bmp_CompressionMethod(int32u CompressionMethod)
{
switch(CompressionMethod)
{
case 0 : return "RGB";
case 1 : return "RLE";
case 2 : return "RLE";
Replace
case 1 : return "RLE8";
case 1 : return "RLE4";
?
/* constants for the biCompression field */
#define BI_RGB        0L
#define BI_RLE8       1L
#define BI_RLE4       2L
#define BI_BITFIELDS  3L
#define BI_JPEG       4L
#define BI_PNG        5L

I imagined that 8 and 4 are bitdepth, but looks like it is wrong.
OK for changing to REL4/RLE8.


Return all keys in a document without knowing them

Hi ivan,
i had an idea to create a generic way to export data from a Django app to a docx file. There for i would need a function which returns me all keys within a document without knowing them.
like:
keys = get_all_keys("document_Name.docx")
Do you have an idea how to get this? Since you are already very familiar with word documents, I thought I could ask you.

Hello! Yeah, there is simple way to do it. You could navigate through the paragraph texts applying a regex to get all the keys. I can introduce it for you in a next version. You can create a PR as well, we can do it together.


Differentiate between indexed and non-indexed dynamic-array event fields

Right now graph-node can properly distinguish between indexed and non indexed dynamic arrays (arrays, strings, bytes) when indexing an event. (I believe this is rooted in parity eth-abi)
The outlier problem is this - when we start to track generic interface events, i.e. not supplying a contract address, there is ambiguity we have to deal with. (see https://github.com/ensdomains/resolvers/issues/13#issuecomment-488829262 )
Example:
event TextChanged(bytes32 indexed node, string indexed indexedKey, string key);
event TextChanged(bytes32 indexed node, string indexedKey, string key);
The above two events have the exact same event signature, however the data they return is different. The top one returns string indexed indexedKey as bytes32 (because the string is hashed and stored as such), and the second one string indexedKey is handled as a string - which makes multiple bytes32 to represent the variable length.
The way graph-node is implemented now, it can only deal with data type for the event field. We need to allow it to support both. This is a minor blocker on ENS, and an edge case, but it is worthy of us to support it.
Suggestions:

look at the ABI for the event and determine if it is indexed: true or false. Then , combine that with the event signature, so that we cab distinguish them from each other

Some way to pick one and gracefully handle errors for the other would be a good workaround here. In the example above, we only care about the former, but don't want errors from the latter to torpedo event decoding.

(For that matter: What happens if someone just submits an event with the wrong data format? Will it torpedo our entire subgraph? That's easy to do once you're capturing events without a sending address specified.)

The fact that the indexed hint doesn't make it into the event topic in Ethereum is unfortunate. It means that
event Foo(indexed uint256, indexed uint256)
event Foo(uint256, uint256)

both get the same signature, despite their data being encoded differently. Without the right event ABI, you therefore can't decode any event safely.
I think we can solve this though. Let me think through the different areas that affected:
Event signatures in the manifest
First, we could allow event signatures in the manifest to include indexed, e.g. with
- eventHandlers:
    - event: Foo(indexed uint256,indexed uint256)

That would allow us to distinguish overloaded events from each other.
We could auto-migrate existing subgraphs to the new signatures as part of graph codegen, graph build and graph deploy. The list of events available in ABIs would need to be updated to prefix indexed params with indexed. When validating a subgraph, we'd then fail if an event in the manifest is missing indexed hints (due to the auto-migration, this won't happen).
Decoding incoming events
Decoding events is where the ambiguity kicks in. Let's say we receive an event whose topic matches the above Foo(indexed uint256,indexed uint256). We can't be sure the event is actually this variant or another without indexed parameters.
In other words, https://github.com/graphprotocol/ethabi/blob/graph-patches/ethabi/src/event.rs#L122 could fail parsing the event using the Foo(indexed uint256,indexed uint256) ABI.
We have different options on how to handle this situation:

Fail the subgraph. According to https://github.com/graphprotocol/graph-node/blob/85b9ec73a65f3b95324db6bcc1c2caa15384fb1c/runtime/wasm/src/host.rs#L710-L723, this is our current behavior.
Log a warning and skip the event. Clearly, it's not matching our ABI.

If we switch to 2, mismatches in the event data would be handled gracefully.
Code generation
We already enumerate the classes generated for overloaded event variants, so we're safe here. This part doesn't need changing.

I just encountered a real-world issue with this on another event. Having the whole subgraph fail when an event can't be decoded means that, for filters that don't specify a source address, effectively anyone can cause your subgraph to fail by publishing an invalid (or just different) event to the chain.
The error message isn't great, either:
Subgraph instance failed to run: Failed to process trigger: Failed to parse parameters of event: OwnerChanged(address): Invalid data, code: SubgraphSyncingFailure, id: QmZPYMTQQmeV9jUEg977sB8bjSv4h17NYQA5GrWTU5k2XV, updates: 0

There are over 600 transactions in the block that failed; it'd be useful to know which one caused the failure.
As a first step, could you change the node to only issue a warning and skip the event if decoding fails?


Pixabay

Source Site
https://pixabay.com/
Value Provided
High quality curation, solid community, good inventory
Licenses Provided
https://pixabay.com/service/license/
Implementation

[ ] 🙋 I would be interested in implementing this feature.

I was going to close this issue but I found a contact form for questions about the API. I've reached out with the following text to see if they would be able to facilitate querying either by license or publication date:

Hello Pixabay,
I am reaching out on behalf of the WordPress Foundation's Openverse project. Openverse (formerly CC Search) is a search engine for openly licensed media. You can read more about the project here: https://openverse.org/about
We've noticed that Pixabay hosts CC licensed content for works published prior to January 9, 2019 (according to your Terms of Service) and hope to be able to include these in Openverse. However, the API does not appear to have any mechanism for filtering works by publication date or license. Is it possible such a feature could be added to facilitate inclusion in Openverse?
Openverse catalogues works from dozens of sources, including Flickr, Wikimedia, Jamendo, and Nappy. You can read more about our sources here: https://openverse.org/sources.
Openverse does not have any means to facilitate a custom license like Pixabay's proprietary license, so we would only be able to include the works licensed under CC0.
We hope to hear back soon and look forward to partnering with y'all if possible.
Many thanks and warm regards,
Sara on behalf of the Openverse maintainers

@zackkrida ccing you as MSR this week. I created this via the contact form rather than Help Scout, so I can't add a note, but if we hear back this week can you update this issue to reflect the response? If they reject the request, please close the issue as won't do.


ext_authz with HTTP uses path from request

Title: ext_authz with HTTP uses path from request instead of URI
Description:
When configuring envoy to use an external auth service to authenticate requests, the URI of the configured auth service is ignored. Instead the path of the incoming request is also used for the auth service request.
Repro steps:

docker compose build
docker compose up
curl -i -L localhost:8080/ -> OK {"title":"The index page"}
curl -i -L localhost:8080/lenny -> NOT_FOUND {"detail":"Not Found"}

Follow the steps in the example repo: https://github.com/aemaem/envoy-proxy-ext-auth-sample
Admin and Stats Output:
admin-stats.txt
admin-clusters.txt
admin-serverinfo.txt
Config:
admin:
  access_log:
    name: envoy.access_loggers.file
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
      path: "/dev/null"
  address:
    socket_address:
      address: <IP_ADDRESS>
      port_value: 8888
static_resources:
  listeners:
    - name: sample
      address:
        socket_address:
          address: <IP_ADDRESS>
          port_value: 8080
      filter_chains:
        - filters:
            - name: envoy.filters.network.http_connection_manager
              typed_config:
                "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
                stat_prefix: ingress_http
                route_config:
                  name: service
                  virtual_hosts:
                    - name: service
                      domains: ["*"]
                      routes:
                        - match:
                            prefix: "/"
                          route:
                            cluster: sample-service
                http_filters:
                  - name: envoy.filters.http.ext_authz
                    typed_config:
                      "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
                      transport_api_version: V3
                      http_service:
                        server_uri:
                          uri: http://auth-service:8080/authenticate
                          cluster: auth-service
                          timeout: 5s
                        authorization_response:
                          allowed_upstream_headers:
                            patterns:
                              - exact: x-current-user
                  - name: envoy.filters.http.router
                    typed_config:
                      "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
  clusters:
    - name: sample-service
      connect_timeout: 10s
      type: STRICT_DNS
      lb_policy: ROUND_ROBIN
      load_assignment:
        cluster_name: sample-service
        endpoints:
          - lb_endpoints:
              - endpoint:
                  address:
                    socket_address:
                      address: sample-service
                      port_value: 8080
    - name: auth-service
      connect_timeout: 10s
      type: STRICT_DNS
      lb_policy: ROUND_ROBIN
      load_assignment:
        cluster_name: auth-service
        endpoints:
          - lb_endpoints:
              - endpoint:
                  address:
                    socket_address:
                      address: auth-service
                      port_value: 8080

Logs:
auth-service
INFO:     <IP_ADDRESS>:50136 - "GET / HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:54662 - "GET /lenny HTTP/1.1" 404 Not Found
sample-service
INFO:     <IP_ADDRESS>:38562 - "GET / HTTP/1.1" 200 OK

I think this is working as designed, but it's not documented very well. The http auth request uses the original request path by default to convey what path the auth request is for, and the path portion of the configured auth URI is ignored. In fact, the only part of server_uri that is used is the cluster name; the rest is ignored.
Setting path_prefix may solve this problem for you.

@ggreenway thanks for the clarification. Seems like an odd way of propagating the request's path information. However with that information I could implement the auth service accordingly. But as I want to use an already existing auth endpoint, I will implement it with a custom extension.

Honestly, I've never tried to deal with it because I use the gRPC version, which doesn't have this issue. If you have the tooling to set it up as a gRPC service instead, that may be the easiest path.

Thanks for the hint!

I think this is working as designed, but it's not documented very well. The http auth request uses the original request path by default to convey what path the auth request is for, and the path portion of the configured auth URI is ignored. In fact, the only part of server_uri that is used is the cluster name; the rest is ignored.

Yes, this is so unfortunate. And it's recorded here: https://github.com/envoyproxy/envoy/issues/5357 I think I made an attempt to make it work but need to revive the relevant PR.

Setting path_prefix may solve this problem for you.

This @aemaem, the currently available hack is to set path_prefix to something like: /validate?url= hence you can implement yours using /validate as the entry point :).

Thanks @dio, this is a very good workaround!

@dio but when I did the same
 - name: envoy.filters.http.ext_authz                     typed_config:                       "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz                       transport_api_version: V3                       http_service:                         path_prefix: /api/v1/authz?url=                         server_uri:                           uri: be-identity:8080                           cluster: be_identity_cluster                           timeout: 0.250s
I can not send GET request
When I do GET sth like /XXXX, it always add a path_prefix to the url
{     "statusCode": 404,     "message": "Cannot GET /api/v1/authz?url=/XXXX",     "error": "Not Found" }

@dnson do you mean the path sent to the upstream is changed (prefixed)?

@dnson the workaround works fine. I updated the sample configuration , which exactly does what @dio described.

@aemaem  @dio  ah I misunderstand, I thought the path sent to the upstream is change.
currently my currently auth api using POST so I create another api using GET and it works.

thanks @dio & @aemaem

Sorry for posting in such an old issue.
Am i right in understanding that the issue is not solved or might not even be considered a bug?
The only way to work around the problem is setting prefix_path (unfortunately doesn't work in my case), right?

@toreluntang Unfortunately you are right. As far as I know there is still no fix for it.

Is this issue sorted. We are seeing the same issue.


Upgrade to 230923-e59851350

nano Makefile
make makesum
make package
make makeplist >pkg-plist
nano pkg-plist
make deinstall install

Thanks!


rhtap: update Dockerfile to get a clean git hash

The cachi2 pipelinerun task in RHTAP modifies the Dockerfile to inject the cached dependency information into the build. This causes the git version - which is injected into the CLI version output - to include a -dirty suffix.
The modification in this commit stashes those changes, and then gets the git hash, storing it in the GIT_VERSION environment variable, then pops those changes back off of the stash and runs the build as before.
The commit also contains some optimizations so that most of the RUN commands are consolidated into one.

/cherry-pick redhat-v2.1.1

/cherry-pick midstream-v2.1.1


[backport to release/3.3.x] fix(tracing/propagation): set parent span correctly (#11468)

backport of https://github.com/Kong/kong/pull/11468
Summary
Fix an issue where the parent span was set incorrectly when the balancer instrumentation was disabled (the parent span ID was set to a temporary balancer span that was never reported).
Checklist

[x] The Pull Request has tests
[x] There's an entry in the CHANGELOG
[x] (no) ~There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE~

Full changelog

[Implement ...]

Issue reference
https://konghq.atlassian.net/browse/KAG-2281
closes https://github.com/Kong/kong/issues/11294

closing: taken care of by https://github.com/Kong/kong/pull/11650


Using the option --storagekey for the prepdocs script might fail

When using the option --storagekey for the prepdocs script the value might contain == base64 padding at the end. This will fail to successfully login because the script just removes the = signs during the split action. Copied the version from the app/start.ps1 which is better suited here.
Purpose

make the prepdocs script work with the --storagekey parameter with the value $env:AZURE_STORAGE_KEY that contain base64 padding characters

Does this introduce a breaking change?

[ ] Yes
[ X] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Get the code
Get the StorageKey from the Azure Storage and make sure it has bas64 padding at the end (==)
Add the AZURE_STORAGE_KEY to the azd environment azd env set AZURE_STORAGE_KEY <<value>>
add the --storagekey $env:AZURE_STORAGE_KEY parameter to the script invocation in the prepdocs.ps1 file
run the script it will complain about invalid padding because the equal signs have been stripped of
with this fix it will work correctly

What to Check
Verify that the following are valid

processdocs script works

Other Information

Thanks! Assuming not an issue for shell script as that doesnt look for =.
CCing @jongio and @vhvb1989 in case there are other azd samples using same logic.

Just for the record, the shell script is fine and identical in both app/start and loadenv

Thanks for confirming! Will merge Monday to avoid weekend merges.


Terminal: Text color error

VSCode Version: Code 1.10.2 (8076a19fdcab7e1fc1707952d652f0bb6c6db331, 2017-03-08T14:02:52.799Z)
OS Version: Windows_NT ia32 10.0.14393
Extensions:

Extension
Author
Version

theme-monokai-dark-soda
AdamCaviness
0.0.5

vscode-theme-onedark
akamud
1.3.1

nord-visual-studio-code
arcticicestudio
0.1.1

theme-jsfiddle-like-syntax-vscode
davidmart
0.0.6

EditorConfig
EditorConfig
0.6.2

Theme-Amber
gerane
0.0.2

vscode-ghc-mod
hoovercj
1.2.0

hopscotch
idleberg
0.1.4

spacegray-vscode
ionutvmi
1.1.4

theme-material-theme
jprestidge
1.0.1

language-haskell
justusadam
2.1.0

cpptools
ms-vscode
0.10.4

Theme-MaterialKit
ms-vscode
0.1.1

material-icon-theme
PKief
2.0.1

language-stylus
sysoev
1.6.0

ayu
teabyii
0.2.1

Steps to Reproduce:

Everytime i run mocha or npm, it results in very bad color output, so i try to run it on cmd or powershell, everything is still ok. i have changed the color theme and font-family but it does not work

The contrast on the cmd window at the end is terrible?
Regardless, it looks like mocha is making the background yellow. Do you have any settings in your User settings.json file?

// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 16,
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code",
"editor.quickSuggestions": true,

"typescript.check.tscVersion": false,
"terminal.integrated.shell.windows": "C:\\WINDOWS\\system32\\cmd.exe",

"languageStylus.useSeparator": false,

"workbench.iconTheme": "material-icon-theme",
"workbench.editor.showTabs": false,

"files.exclude": {
    "**/.git": false
},
"editor.minimap.renderCharacters": false,
"editor.minimap.enabled": true,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.cursorBlinking": "blink",

"editor.insertSpaces": false,
"editor.cursorStyle": "block",
"editor.wrappingIndent": "same",
"editor.renderIndentGuides": true,
"editor.renderWhitespace": "none",
"window.zoomLevel": 0,
"workbench.colorTheme": "JSFiddle-like-syntax-vscode"

}

It's marked as xterm-bg-color-11

What's this $Yeild thing in your prompt?

it's just the command prompt. sorry about that! 😃

How did you set that up? It's possible that is related to this, I notice the line in between the regular prompt and $Yeild has a yellow background in one of the screenshots.

I just change the environment variable. But when i change it back to default cmd prompt or even delete the variable, it still remains error!

Maybe try updating mocha? Have you experienced this with any other programs other than mocha?

Yeap, it usually happens when webpack or npm logs out some warnings or errors

I think that it change the background color when it logs warrning but somehow it forgets to turn back to normal
Or maybe it can not receive the correct signal from the external terminal

Yeah, i've just found an interesting info. That color comes from cmd default properties. When i change the background color back to black, everything is ok! ;v

@clitetailor good to know, closing as designed then as there's no way we can determine cmd's color scheme.


Is it possible to use PROXY protocol?

Hello,
Thank you for your work regarding varnish-operator! I'm investigating this right now and run into one problem:
I'm exploring now, how  to enable PROXY support at varnish cluster provisioned by operator. This generally illustrate my use-case: https://www.varnish-software.com/developers/tutorials/proxy-protocol-varnish/#proxy-protocol-over-tcp.
According to docs, I should add something "-a :8443,PROXY" parameter.
Unfortunately, operator doesn't allow me to add this option. Is there a way to put varnish in "PROXY" mode, or simply bypass operator validation?

Thanks for the issue @jsobiecki. Unfortunately, we did not anticipate this use case and have explicitly blocked users from using the -a option. @tomashibm is going to work on a PR to address this issue. For our own edification, can you talk about your use case a bit? How are you using varnish and how is it setup? Thanks!

@jsobiecki you should be able to append additional -a options with the latest release

Thank you for prompt response! I can confirm it works.
@cin It's bit of experiment. What I wanted to achieve was something like
[ WORLD ] => [ LOAD BALANCER / SSL TERMINATION ] => [VARNISH CLUSTER] => [INGRESS NGINX]
So I wanted to make sure that all traffic (for specific load balancer) goes through varnish, varnish provides cache or redirects traffic to external servers (eg. it works as S3 gateway).
I wanted to use PROXY protocol, as load balancer supports this, so I wanted to maintain correct client ips).
I have seen this setup seemed to work (after adding PROXY support). Unfortunately, looks I will need to change it (cloud controller for my provider is bit limited and it's not possible to have SSL termination and working HTTP port (not related to varnish).  Because of that, I'll probably change the setup and resign from SSL termination at load balancer and inject separate ingress to handle SSL and route all traffic through varnish.

Thanks for the details @jsobiecki. Can you not configure or change out your load balancer to support SSL termination? Hopefully adding an extra layer for SSL termination won't be too costly but it'd definitely be nice to not have to do that. Hopefully @tomashibm's updates last week will at least allow you to use proxy mode now. Let us know how things go!

Hi guys, thanks to proxy protocol support, I was able to implement my use case. I had to change ingress controller from nginx to haproxy, but finally, it worked as expected.
Generally it's [WORLD] => [ SSL TERMINATION] => PROXY PROTOCOL => HAPROXY => PROXY PROTOCOL => VARNISH =>....


Examples does not work

async/consumer returns an array of two channels. But when I fixed that it didn't work either

it should be more something like this (untested)
(let [[events-ch control-ch] (async/consumer {:bootstrap.servers "localhost:9092"
                                              :group.id (str (java.util.UUID/randomUUID))}
                                             (client/string-deserializer)
                                             (client/string-deserializer))
      topic  "tests"]

  (a/go-loop []
    (when-let [record (a/<! events-ch)]
      (println (pr-str record))
      (recur)))
  (a/put! control-ch {:op :partitions-for :topic topic})
  (a/put! control-ch {:op :subscribe :topic topic})
  (a/put! control-ch {:op :commit})
  (a/put! control-ch {:op :pause :topic-partitions [{:topic topic :partition 0}
                                                    {:topic topic :partition 1}
                                                    {:topic topic :partition 2}
                                                    {:topic topic :partition 3}]})
  (a/put! control-ch {:op :resume :topic-partitions [{:topic topic :partition 0}
                                                     {:topic topic :partition 1}
                                                     {:topic topic :partition 2}
                                                     {:topic topic :partition 3}]})
  (a/put! control-ch {:op :stop}))

works fine,  here is my code
        [events-ch control-ch] (async/consumer {:bootstrap.servers servers
                                                :group.id username
                                                :security.protocol "SASL_PLAINTEXT"
                                                :sasl.mechanism "PLAIN"
                                                :sasl.jaas.config config}
                                               (client/string-deserializer)
                                               (client/string-deserializer))
        topic topic]

    (a/go-loop []
      (when-let [record (a/<! events-ch)]
        (log/error record)
        (if (contains? record :value)
          (a/>!! w/in-chan (:value record))
          (log/error "meta info of kafka >>> " record))
        (recur)))
    (a/put! control-ch {:op :subscribe :topic topic})
    (a/put! control-ch {:op :commit})))

I tried @robertzhouxh code-example and it worked fine.

The examples have been removed since the async facade will not be shipped with the base artifacts anymore


chore: upgrade todo-list-spfx sample to SPFx v1.16.1

This change has been committed to release branch, so close this one.


"xmldom": "^0.3.0" CVE-2021-21366 resolved in 0.5.0

package-lock.json
I confirm (by marking "x" in the [ ] below: [x]):

[ ] This is not a troubleshooting question. Troubleshooting questions go here: https://docs.mattermost.com/install/troubleshooting.html.
[ ] This doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
[ ] I have read contributing guidelines.

Summary

Environment

Operating System:
Mattermost Desktop App version: X.X.X
Mattermost Server version: X.X.X

Steps to reproduce
Expected behavior
Observed behavior

Possible fixes

Closed by https://github.com/mattermost/desktop/pull/2421


Needed custom params to refetch function

First of all, congratulations to the author for this wonderful lib. It made all sense to me when writting components, and my applications became faster.
I believe that I am facing a very edge case. I read all (I think) the docs and didn't found anything about this. In advance, sorry in case this is a common case or too obvious. In my application, I have a board (trello like) that I need to mount. To make the loading process more friendly, I have to make several requests to the server.
So, here is my problem: in a piece of my code, I have to make a request for each of the lanes. However, I can't declare a hook inside a function. The first thing that came to my mind was to make my second request manual, and use the refetch function to manually make this call using the laneId param needed to this. However refetch seems to ignore custom params passed.
What is the recomendation for this case? I would like to have my data of cards cached, so I imagine that those custom params passed to refetch should be considered to the cache rule too.
Here is a example of my code. My custom hooks useGetLanes and useGetCards simply declare a async function and return useQuery:
const useLanes = () => {
  const { data, status } = useGetLanes();
  const { data: cards, refetch: getCards } = useGetCards({ manual: true });

  const isLoading = status === 'loading';
  let lanes = null;

  if (!isLoading) {
    lanes = data.reduce((result, { id, description }) => {
      getCards(id) // ---> id (laneId) is ignored
      return {
        ...result,
        [id]: {
          id: `${id}`,
          title: description,
          isLoading: true
        }
      };
    }, {});
  }

  return [isLoading, lanes];
};

Any time you are faced with the idea or restriction of using hooks in loops, that means it time to break out your loop into new child component instances. This allows you, in a way, to use hooks within a loop, as long as you are creating a new parent component for the hooks within each item.
On May 8, 2020, 1:34 PM -0600, Caio Rios de Souza<EMAIL_ADDRESS>wrote:

First of all, congratulations to the author for this wonderful lib. It made all sense to me when writting components, and my applications became faster.
I believe that I am facing a very edge case. I read all (I think) the docs and didn't found anything about this. In advance, sorry in case this is a common case or too obvious. In my application, I have a board (trello like) that I need to mount. To make the loading process more friendly, I have to make several requests to the server.
So, here is my problem: in a piece of my code, I have to make a request for each of the lanes. However, I can't declare a hook inside a function. The first thing that came to my mind was to make my second request manual, and use the refetch function to manually make this call using the laneId param needed to this. However refetch seems to ignore custom params passed.
What is the recomendation for this case? I would like to have my data of cards cached, so I imagine that those custom params passed to refetch should be considered to the cache rule too.
Here is a example of my code. My custom hooks useGetLanes and useGetCards simply declare a async function and return useQuery:
const useLanes = () => {
const { data, status } = useGetLanes();
const { data: cards, refetch: getCards } = useGetCards({ manual: true });
const isLoading = status === 'loading';
let lanes = null;
if (!isLoading) {
lanes = data.reduce((result, { id, description }) => {
getCards(id) // ---> id (laneId) is not
return {
...result,
[id]: {
id: ${id},
title: description,
isLoading: true
}
};
}, {});
}
return [isLoading, lanes];
};
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

I see what you mean. In the end, the problem lies in how I implemented my board component. Right now it only expects a few little props and is not able to receive custom components.
Thank you for clarify my problem @tannerlinsley.


⚠ Bofrost.at has degraded performance

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

HTTP code: 200
Response time: 1443 ms

Resolved: Bofrost.at performance has improved in 6192899 after 59 minutes.


Couldn't get it to work

see https://stackoverflow.com/questions/28791613/route-requests-based-on-the-accept-header-in-flask/47838604#47838604
why i tried this.
after having put:
# Content negotiation
# https://pypi.org/project/flask_accept/
flask_accept

in my requirements.txt and install thing with pip the example import
from flask_accept import accept did not work - showed and error in my IDE liclipse that the import was not available.
python --version
Python 3.6.10
...
pip 20.0.2

pip uninstall flask_accept Found existing installation: flask-accept 0.0.6 Uninstalling flask-accept-0.0.6:   Would remove:     /Users/wf/Library/Python/3.7/lib/python/site-packages/flask_accept-0.0.6.dist-info/*     /Users/wf/Library/Python/3.7/lib/python/site-packages/flask_accept/* Proceed (y/n)? y   Successfully uninstalled flask-accept-0.0.6
will downvote the answer now and try another option until it's clear what is going on

Sorry, there's not enough information here. What error did you get when you tried to do from flask_accept import accept?

thx for the swift reply - so let's go again
./install  | grep flask
Requirement already satisfied: flask_accept in /private/var/root/Library/Python/3.7/lib/python/site-packages (from -r requirements.txt (line 29)) (0.0.6)

auto completion in Eclipse/Liclipse doesn't offer flask accept after refreshing the project:

unresolved import:

running from command line:
Traceback (most recent call last):
  File "ptp/webserver.py", line 10, in <module>
    from flask_accept import accept
ModuleNotFoundError: No module named 'flask_accept'

You mentioned Python 3.6.10 in the first comment, but this says it's installed for Python 3.7:
Requirement already satisfied: flask_accept in /private/var/root/Library/Python/3.7/lib/python/site-packages (from -r requirements.txt (line 29)) (0.0.6)

Which Python version are you actually using?

You are right. It's one of the reasons i work with scripts:
python3 --version Python 3.7.7
The whole project is available at https://github.com/WolfgangFahl/ProceedingsTitleParser - I'll check in the version i suspect is not working so that travis will try it's think and might not work in multiple python versions - let's see.

I'd like to implement https://github.com/WolfgangFahl/ProceedingsTitleParser/issues/20

There is now a specific commit for this issue:
The local test result in the MacOSX / Macports environment is:

ERROR: tests.test_WebServer (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_WebServer
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/Users/wf/Documents/pyworkspace/ProceedingsTitleParser/tests/test_WebServer.py", line 8, in <module>
    from ptp.webserver import app
  File "/Users/wf/Documents/pyworkspace/ProceedingsTitleParser/ptp/webserver.py", line 14, in <module>
    from flask_accept import accept
ModuleNotFoundError: No module named 'flask_accept'

while https://travis-ci.org/github/WolfgangFahl/ProceedingsTitleParser/jobs/707146166 looks just fine
cat .travis.yml
dist: bionic
# see https://docs.travis-ci.com/user/languages/python/
language: python
# python versions to be tested
python:
#  - "2.7" # see https://github.com/WolfgangFahl/gremlin-python-tutorial/issues/7
  - "3.6"
  - "3.7"
  - "3.8"
# allow gui output
services:
  - xvfb
before_install:
  # install some renderers
  # check version
  - lsb_release -a
install:
  - echo $USER
# command to run tests
script:
# command to install dependencies
  - ./install
# command to get sample data
  - ./getsamples
# command to run tests
  - ./test

So the issue might be operating system / environment specific.

I think this is probably an issue with your local environment. I'm also on macOS and can install/use this library just fine.
Can you give me specific steps to reproduce after cloning your repo?

@di thx for staying tuned. Since I suspect the environment issue i did the following on another comparable server:
sudo port self update
sudo port self upgrade outdated
sudo port select --set python python38
sudo port select --set python3 python38
sudo port install py38-pip
sudo port select --set pip pip38
sudo port select --set pip3 pip38
python --version
Python 3.8.3
python3 --version
Python 3.8.3
pip --version
pip 20.1.1 from /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)
pip3 --version
pip 20.1.1 from /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)

Then the test and installation procedure is pretty straight forward see http://wiki.bitplan.com/index.php/ProceedingsTitleParser#Installation.
Getting the samples might take a few minutes  and will need 60 MBytes of disk space. The git rep itself is not too big. I'll share my results in a few minutes.

It's grand i get
./test 2>&1 | grep "No module"
ModuleNotFoundError: No module named 'yaml'
ModuleNotFoundError: No module named 'yaml'
ModuleNotFoundError: No module named 'yaml'
ModuleNotFoundError: No module named 'wikibot'
ModuleNotFoundError: No module named 'matplotlib'
ModuleNotFoundError: No module named 'pyparsing'
ModuleNotFoundError: No module named 'yaml'
ModuleNotFoundError: No module named 'flask'

So it's definitely not the library but the python/pip setup ... Still it'd appreciate to get this puzzle solved ...

sudo -H pip3 seems to be the culprit. I had this recommended somewhere and was using it for a few month and now it seems to fail badly.

Eclipse / Liclipse still does not like this solution. For the time being i am sticking to
if request.accept_mimetypes['application/json']:
and
     response = Response(status=200,mimetype='application/json')

I have now followed the Macports Upgrade procedure to 3.8 on my machine, rebooted it and restarted Eclipse. I was asked whether i'd like to update my environment to 3.8 and now things seem to work. Thx.


Add option to apply house satisfaction score in every round

Right now, the house benefit or discount based on the house rating is only applied when buying a new house. This option allows for the benefit or discount to be applied every round.

A boolean field called satisfaction_house_rating_per_round has been added to the ScenarioParameters table. The default value is 0.

Database change:
ALTER TABLE `housinggame`.`scenarioparameters`
ADD COLUMN `satisfaction_house_rating_per_round` TINYINT UNSIGNED NOT NULL DEFAULT 0 AFTER `satisfaction_house_rating_too_low_per_delta`;

Changes have been applied to admin (https://github.com/averbraeck/housinggame-admin/issues/40), to facilitator (https://github.com/averbraeck/housinggame-facilitator/issues/30), and to player (https://github.com/averbraeck/housinggame-player/issues/43).


obfuscate file directly into to it

How can I obfuscate directly a file? I don't want to export obfuscated file with different name. I want to put obfuscated code to it file directly.

there is --ouput flag


fixed channel rescript still needs to be faster

probably should try for changes

Is speed still an Issue?


Vulnerability roundup 75: python-2.7.16: 1 advisory

search, files

[ ] CVE-2019-16056 (nixos-unstable, nixos-19.03)

Scanned versions: nixos-unstable: e19054ab3cd; nixos-19.03: cf018a7c558. May contain false positives.

Addressed in https://github.com/NixOS/nixpkgs/commit/5b55013aa274c14df01982e4ed3e8c3c3581c744, currently on staging.


Add possibility to have local settings in a .lintstagedrc.local or use a .dist mecanisme

Hello this is a feature request please,
We are bringing lint-staged to our developper localy on ours projects so they can do clean code : )
.lintstagedrc file is in GIT repository so they just can use it without any custom config.
But, actually if they want to disable, add or change some rules just localy some settings, they can only edit this .lintstagedrc file, which will modify it and GIT will detect it (what we don't want as this is only for local needs).
Purpose of this issue it so allow, either:

if a .lintstagedrc.local exists lint staged will use this one instead .lintstagedrc
or adopt the .dist mecanisme which is used by many projects (.dist is in git repo, and devs can create non .dist file which will be used if exists)

I know lint-staged rely on cosmiconfig (https://github.com/davidtheclark/cosmiconfig).
I already opened an issue, but as it was for lint staged it is not being to be implemented on its side : https://github.com/davidtheclark/cosmiconfig/issues/233#event-3512921838
I really hope this improvement make sense.
Thanks for reading me,
Best regards.

Will be really useful.

This way I will be able to apply my settings locally only.

lint-staged now supports a javascript configuration format. You could use that and add a method that checks for the existance of the local config from a well-known path, and then merge it into the exported config.
What do you think about this?
IMO if cosmiconfig doesn't want to support it, I wouldn't add it to lint-staged for the sake of keeping things simple.

Sounds good...
How do I make the default config do... nothing?
For now, I'm using a non-existing glob pattern (*.donothing)

Unfortunately, currently an empty config is not supported, so your glob seems like the only way:
https://github.com/okonet/lint-staged/blob/0ff29178c8771ab10e43a395e252c6a118306942/lib/validateConfig.js#L51-L53

@Yivan I will close this issue since I assume this solution will be sufficient, but feel free to re-open it if you disagree.

@iiroj Thanks, the JS solution will do it. If needed i will reopen it.


Cannot open PR

Cannot open PR
Type: bug report
Describe what happened (or what feature you want)
Running Octo pr list brings up a list in telescope but, when I select a PR, I get an error:
Error executing vim.schedule lua callback: ...nvim/site/pack/packer/start/octo.nvim/lua/octo/utils.lua:1164: attempt to perform arithmetic on local 'right_side_line' (a nil value)
stack traceback:
        ...nvim/site/pack/packer/start/octo.nvim/lua/octo/utils.lua:1164: in function 'generate_position2line_map'
        ...site/pack/packer/start/octo.nvim/lua/octo/ui/writers.lua:678: in function 'write_thread_snippet'
        ...site/pack/packer/start/octo.nvim/lua/octo/ui/writers.lua:1312: in function 'write_threads'
        ...ck/packer/start/octo.nvim/lua/octo/model/octo-buffer.lua:171: in function 'render_issue'
        .../nvim/site/pack/packer/start/octo.nvim/lua/octo/init.lua:253: in function 'create_buffer'
        .../nvim/site/pack/packer/start/octo.nvim/lua/octo/init.lua:82: in function 'cb'
        .../nvim/site/pack/packer/start/octo.nvim/lua/octo/init.lua:107: in function 'cb'
        ...im/site/pack/packer/start/octo.nvim/lua/octo/gh/init.lua:90: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Describe what you expected to happen
How to reproduce it (as minimally and precisely as possible)

:Octo pr list
Select pr from telescope list

Tell us your environment
Ubuntu 22.04
Neovim 0.8.0

Cant reproduce, does it happen with all PRs? Can you share a project/PR you have this issue with?

Sorry I've ignored this. I'll try again this week and report back...

Creative procrastination appears to have struck. I updated everything and it's all working fine now.


Create logo.html

New Logo

@ciscomeneses This is great!  If you submit another pull request that changes the layout, then we'll merge this and it will go out to the people!


fix(gnss_poser): added local coordinate system in UTM to gnss_poser

Signed-off-by: ataparlar<EMAIL_ADDRESS>Description
In the gnss_poser package, there was no option for working in a local coordinate system for UTM. Added a function to convert.hpp and added "UTMLocal" parameter to the gnss_poser.launch.xml .
Related links
Related with this issue: #1122
Tests performed

Notes for reviewers

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.
[ ] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@mitsudome-r did you hava any chance to review?


Simulating iPad renders strangely

Description
I ran react-native run-ios --simulator "iPad Air 2" and I expected the app to utilize the entire windows space but it ended up running within a frame and theirs an extra control on the bottom right that I can shrink the window down.

I have tried this with iPad Retina, iPad Air, iPad Pro (9.7) & (12.9) with the exact same results.
Reproduction
Simply run react-native run-ios --simulator "iPad Air 2" in a react-native project. Also try the other iPad models.
Solution
Could it be that I'm missing a setting in xCode?
Additional Information

React Native version: react-native-cli: 1.2.0, react-native: 0.37.0
Platform: iOS
Operating System: Mac OS Sierra 10.12.1

@cwahlfeldt Have you changed the Xcode project?
You should set the app to universal. The default is only iPhone

This totally worked thanks!


[RIP-70-3]Extract adaptive lock mechanism

Which Issue(s) This PR Fixes

Fixes #8442
Brief Description

How Did You Test This Change?

Codecov Report
Attention: Patch coverage is 65.88235% with 29 lines in your changes missing coverage. Please review.

Project coverage is 47.39%. Comparing base (5496807) to head (ff9f994).

Files with missing lines
Patch %
Lines

...g/apache/rocketmq/store/lock/AdaptiveLockImpl.java
71.42%
12 Missing and 4 partials :warning:

...ache/rocketmq/store/lock/CollisionRetreatLock.java
64.70%
6 Missing :warning:

...ache/rocketmq/store/config/MessageStoreConfig.java
37.50%
5 Missing :warning:

...a/org/apache/rocketmq/store/lock/AdaptiveLock.java
0.00%
2 Missing :warning:

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8663      +/-   ##
=============================================
- Coverage      47.42%   47.39%   -0.03%
- Complexity     11514    11515       +1
=============================================
  Files           1277     1280       +3
  Lines          89438    89521      +83
  Branches       11502    11513      +11
=============================================
+ Hits           42416    42431      +15
- Misses         41812    41871      +59
- Partials        5210     5219       +9

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Tests running very slow in VM

I was using MAMP and then I swicthed to Drupal VM. I am working on a Drupal 8 module with tests and using simpletest. I was exectuing the test in MAMP and it took around 3-4 minutes to complete. But in VM its like taking forever to complete.
I tried increasing vagrant_memory to 4096 and vagrant_cpus to 4, the page load time has reduced, but I dont see any changes with the tests. Any idea why tests are taking so long to execute.

Thanks for leaving a note—can you leave specific instructions/how-to outlining the tests you ran (e.g. a series of commands) so I can reproduce the issue and take a look at what might be happening?
My hunch is that either simpletest is creating and deleting a ton of files on the shared filesystem (which can be pretty slow), or Apache is spawning too many threads and causing memory to start swapping.

See related: #144

I was executing this test http://cgit.drupalcode.org/views_base_url/tree/src/Tests/ViewsBaseUrlFieldTest.php?h=8.x-1.x
Steps:

Download beta-14 version of Drupal 8
Enable views_base_url module
Enable simpletest module
Execute views_base_url test from simpletest UI

While the test is running there is only one process for Apache

@subhojit777 - Thanks so much for the details! Before I have time to reproduce the results... can you update to the latest release, and destroy and rebuild your box? #212 hopefully made things a bit faster, and that might cause the tests to run much faster!

Running it locally on my VirtualBox VM, I get:
The test run finished in 1 min 5 sec.

...and to give one more point of reference, running the tests from VMware Fusion 7.x, I get:
The test run finished in 57 sec.

Thanks for the fix. But it seems you are missing something in configuration. I ran vagrant up and got this error:
A customization command failed:

["modifyvm", :id, "--paravirtprovider", "kvm"]

The following error was experienced:

#<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "aa4723ed-7993-4956-9aa8-8df0efe77e58", "--paravirtprovider", "kvm"]

Stderr: Oracle VM VirtualBox Command Line Management Interface Version 4.3.30
(C) 2005-2015 Oracle Corporation
All rights reserved.

Can you upgrade to VirtualBox 5.0.2 and Vagrant 1.7.4?
-Jeff Geerling

On Aug 25, 2015, at 12:47 AM, Subhojit Paul<EMAIL_ADDRESS>wrote:
Thanks for the fix. But it seems you are missing something in configuration. I ran vagrant up and got this error:
A customization command failed:
["modifyvm", :id, "--paravirtprovider", "kvm"]
The following error was experienced:
#<Vagrant::Errors::VBoxManageError: There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "aa4723ed-7993-4956-9aa8-8df0efe77e58", "--paravirtprovider", "kvm"]
Stderr: Oracle VM VirtualBox Command Line Management Interface Version 4.3.30
(C) 2005-2015 Oracle Corporation
All rights reserved.

—
Reply to this email directly or view it on GitHub.

Thanks that did it. Now my tests are finishing in around 3 mins. Thanks :+1:


Is it possible to create a function 'setSelectableYears'?

I use function 'setSelectableDays' to make '2020/07/24' , '2016/05/06' selectable.
But when I use year picker, I can still choose 2019.
Howerver, if I choose 2019,
the date will force to change to 2020/07/24 instead of 2019/XX/XX.
In this situation, is it possible to set 2019, 2018, 2017 disable?
So that user will not choose the wrong year.
Thanks!

@wdullaer


drush pm-updatestatus

When the script runs on a Drupal site I get the error [error]   The drush command 'pm-updatestatus' could not be found. Run drush [error] cache-clear drush to clear the commandfile cache if you have installed new extensions.
See https://drushcommands.com/drush-9x/pm/pm:updatestatus/ :

The pm-updatestatus command was deprecated. Please see composer show and composer outdated. For security release notification, see drush pm:security.

I'm closing this issue so we can archive this repository. It is a reference implementation, not a product to be used. See this comment on the README


[StreamAlert] Update issue #24 to work with StreamAlert

What

Update to summary the summary function in binary_info.py
Update test parameters

Why

Necessary to work with Stream Alert
ref:  https://github.com/airbnb/binaryalert/issues/24

Tests
Passed Locally

@austinbyers

@austinbyers made changes.


consider moving exercise instructions from example documentation to lesson material

i.e. move the exercises from here:
https://github.com/coderefinery/word-count/blob/master/doc/exercises.rst
to here:
https://github.com/coderefinery/documentation/blob/gh-pages/_episodes/04-sphinx-rtd.md
it might be confusing to have the material spread over two webpages

I agree we also have to think about how to make the exercises repeatable for future workshops.


Running automated test cases with the same test method via Release

Hello,
I Hope I’m in the right repo…
Description

We use TFS 2018.1 on premise
When running automated test cases when each test case is associated with test method, the tests run as expected.
We need the ability to associate the same test-method to multiple test cases, in this case when selecting and invoking multiple test cases from the test hub, the release is started but fails with this error:
RunMessage : An exception occurred while invoking executor 'executor://mstestadapter/v1': An item with the same key has already been added

Steps to reproduce

It is very simple to reproduce just:
•	Create a unit test project and create single test method (i.e. TestMethod01)
•	Create a build definition to build the test project
•	Open multiple test cases in VS and associate the test cases to TestMethod01, click save
•	In web access, under test, set the test plan to use the appropriate release definition and build definition
•	From the test hub, select single (automated) test case and click run. In this case a release is being triggered and the test should run because the test run contains single test case
•	From the test hub select multiple test case with the ctrl key and click run, in this case the release will fail with the above message

Expected behavior

Visual Studio Test task should be able to run the same test method

10x!!
Roy

@RoyRosenberg We are able to repro this issue. We are working on the fix which is required both on VS side and task side.

Hi,
We're facing the same issue also, when will you apply a fix? This feature is important for us and we just upgraded our TFS to 2018.1 for that...
Thank you,
Victoria

Hi,
Sorry for the trouble. We identified the issue and fixed the bug. We will be sharing the hot-fix soon so that it can unblock your test runs.
To mitigate this issue, if you have duplicated test cases associated to same test method, please remove one of them as automated.


PHPExcel - File is not recognised as an OLE file

Trying to import XLS file to my mysql table. But returns error below.
excelimport/storage/framework/laravel-excel/laravel-excel-BBA94ICWI0E7wrAuLevn89J6OElWa1qR.xls is not recognised as an OLE file Here's my code. I know that, the file got wrong format, but when I save as an excel (without changing anything), It works well.
But problem is; my users will upload files like that. And I need to solve it without saying "please export your xls file as excel again".
$file = $request->file('file')->store('import');
Excel::import(new UserImportModel, $file);

Please fill in the required issue template as requested

Please fill in the required issue template as requested


Prefer ruby-install over ruby-build

Based on discussion at https://trello.com/c/0rlBCEms/411-ruby-install
Co-dependent on https://github.com/thoughtbot/dotfiles/pull/445
Problem:
The two main tools for installing ruby, ruby-build and ruby-install,
both have drawbacks.

ruby-build requires an update in order to install new versions of
ruby.
ruby-install requires command-line arguments in order to install
rubies in an rbenv-compatible way.

Solution:
Add a wrapper around ruby-install that takes care of the command line
arguments for us. This lets us install new ruby versions with the
command:
rinstall 2.2.2

where 2.2.2 is the version number.
The tool never needs to be updated, and installs into the directory that
rbenv expects. As a bonus, it will automatically install bundler for you
and attempt to bundle install for the current directory.

This is interesting. I've found that ruby-build gets updated frequently, so as long as I've installed it directly from master and not via Homebrew that I'm not waiting for new versions to be added.

If we leave ruby-build but add ruby-install, we can retain tab-completion for known Ruby versions. I'm not sure if this is a killer feature for others, but I like being able to do it for versions outside of the 2.x.y series.

handing this over to @geoffharcourt

I think I'm leaning towards just keeping ruby-build in Laptop for the time being. Especially with the script doing a brew update, people who run the script frequently and/or have things like https://github.com/thoughtbot/dotfiles/pull/467 are equally well set-up for Ruby installations as the ruby-install folks + https://github.com/thoughtbot/dotfiles/pull/445 script. Kind of a six half or one dozen thing but ruby-build is already optimized in the Laptop context, has gone through iterations like installing via Homebrew or not.


Beautify the code

I think it looks good~

I have some refactoring in progress on master impacting this class (and others).


Segfault when registering TS_VCONN_PRE_ACCEPT_HOOK without a mutex

This might be intended behaviour, but when I register a continuation on TS_VCONN_PRE_ACCEPT_HOOK without a mutex:
TSHttpHookAdd(
    TS_VCONN_PRE_ACCEPT_HOOK,
    TSContCreate(handler, NULL)
)

ATS segfaults on new connection:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff64bc700 (LWP 31355)]
0x0000000000516fd2 in Mutex_trylock(SourceLocation const&, char const*, ProxyMutex*, EThread*) ()
(gdb) bt
#0  0x0000000000516fd2 in Mutex_trylock(SourceLocation const&, char const*, ProxyMutex*, EThread*) ()
#1  0x000000000051734f in MutexTryLock::MutexTryLock(SourceLocation const&, char const*, Ptr<ProxyMutex>&, EThread*) ()
#2  0x0000000000789014 in (anonymous namespace)::ContWrapper::wrap(ProxyMutex*, Continuation*, int, void*) ()
#3  0x000000000078d0e3 in SSLNetVConnection::sslServerHandShakeEvent(int&) ()
#4  0x000000000078c949 in SSLNetVConnection::sslStartHandShake(int, int&) ()
#5  0x000000000078a7a4 in SSLNetVConnection::net_read_io(NetHandler*, EThread*)
    ()
#6  0x000000000079ecf4 in NetHandler::mainNetEvent(int, Event*) ()
#7  0x0000000000517454 in Continuation::handleEvent(int, void*) ()
#8  0x00000000007cb37e in EThread::process_event(Event*, int) ()
#9  0x00000000007cb9a1 in EThread::execute() ()
#10 0x00000000007ca998 in spawn_thread_internal(void*) ()
#11 0x00007ffff7b52aa1 in start_thread () from /lib64/libpthread.so.0
#12 0x0000003e4f8e8bbd in clone () from /lib64/libc.so.6

If this is not intended behaviour a simple NULL check before calling MUTEX_TRY_LOCK would probably already solve this. If this is intenden behaviour, thus a TS_VCONN_PRE_ACCEPT_HOOK must provide a mutex (can you please explain me why then?), I'd suggest adding an assertion on TSHttpHookAdd.

In ATS, not all the time the mutex is needed.
The TS_VCONN_PRE_ACCEPT_HOOK always need a TSCont that has a valid mutex.
source: SSLNetVConnection.cc
 101   /** Convenience static method.
 102
 103       This lets a client make one call and not have to (accurately)
 104       copy the invocation logic embedded here. We duplicate it near
 105       by textually so it is easier to keep in sync.
 106
 107       This takes the same arguments as the constructor but, if the
 108       lock can be obtained immediately, does not construct an
 109       instance but simply calls the @a target.
 110   */
 111   static void
 112   wrap(ProxyMutex *mutex,             ///< Mutex for this continuation (primary lock).
 113        Continuation *target,          ///< "Real" continuation we want to call.
 114        int eventId = EVENT_IMMEDIATE, ///< Event ID for invocation of @a target.
 115        void *edata = nullptr          ///< Data for invocation of @a target.
 116        )
 117   {
 118     EThread *eth = this_ethread();
 119     MUTEX_TRY_LOCK(lock, target->mutex, eth);
 120     if (lock.is_locked()) {
 121       target->handleEvent(eventId, edata);
 122     } else {
 123       eventProcessor.schedule_imm(new ContWrapper(mutex, target, eventId, edata), ET_NET);
 124     }
 125   }

target is the TSCont object.

If this is still an issue please reopen.


Portfolio: Header Section

My Portfolio Header Section

Added toolbar section
Added Hero section
Made header section responsive

Merge header section branch to main branch


TecTech Laser Dynamo does not output energy

LSC fails to inject EU into the hatch block

long power is 0 right before calling setEUVar()


pullapprove: Add a new approver

@jcvenegas has been contributing quite a lot to this repo and he
knows the code pretty well. That's why I would like him to be
an approver on this repo.
Fixes #155

👍

Can you also add him to the OWNERS file?

agree, let's amend the OWNERS as well, then all good.

@grahamwhaley @jodh-intel yes I forgot that file... I have just updated the PR.

weird CI F26 timeout go error - I'll give it a rebuild kick to see if it was sporadic...
13:32:17 touch "/home/jenkins/jenkins_slave/workspace/clear-containers-agent-fedora-26-PR/go/.gopathok"
13:32:17 if [ ! -x "/home/jenkins/jenkins_slave/workspace/clear-containers-agent-fedora-26-PR/go/bin/git-validation" ]; then \
13:32:17 	go get -u github.com/vbatts/git-validation; \
13:32:17 fi
13:32:33 package golang.org/x/crypto/ssh/terminal: unrecognized import path "golang.org/x/crypto/ssh/terminal" (https fetch: Get https://golang.org/x/crypto/ssh/terminal?go-get=1: dial tcp: lookup golang.org on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:33267-><IP_ADDRESS>:53: i/o timeout)
13:32:34 make: *** [Makefile:203: .install.gitvalidation] Error 1


Support HTML output

Is there any way to render output as html?
I want to render error report in jupyter, but if read stderr directly to it will look like this:

There is currently no support for HTML output. Always happy to accept PRs though!
If you want something a little more sensible, you can run it through an ANSI escape sequence stripped like this and then just write it out as text with a monospace font.

I thought of a mechanism like this to support different output formats:
trait SpanFormatter {
    fn write_lhs(&self, w: impl Write) -> std::fmt::Result;
    fn write_rhs(&self, w: impl Write) -> std::fmt::Result;
}

impl SpanFormatter for Color {
    fn write_lhs(&self, w: impl Write) -> std::fmt::Result {
        // Write the ANSI escape code for this color.
        write!("\x1b[38;2;{};{};{}m", self.r, self.g, self.b)
    }

    fn write_rhs(&self, w: impl Write) -> std::fmt::Result {
        // recover the default colour
        write!(w, "\x1b[0m")
    }
}

impl SpanFormatter for HTML {
    fn write_lhs(&self, w: impl Write) -> std::fmt::Result {
        // Write the HTML span tag for this color.
        write!(w, "", self.0)
    }

    fn write_rhs(&self, w: impl Write) -> std::fmt::Result {
        // recover the default colour
        write!(w, "")
    }
}

FWIW we've done this in PRQL with ansi_to_html: https://github.com/PRQL/prql/blob/ccb25f139bc7e5e990df49549a363c8f89623f59/web/book/src/lib.rs#L180


No default export found in imported module "vike/plugin"

Description
Using ESLint with eslint-import-resolver-typescript (under the hood eslint-import-resolver-node), the rule import/default of eslint-import-resolver-node fails with vike/plugin import.
Code

.eslintrc.yml

tsconfig.json
Note: compilerOptions.esModuleInterop is true

vite.config.ts
import vike from 'vike/plugin'

Output
1:8  error  No default export found in imported module "vike/plugin"  import/default

In VSCode, opening the reference of vike/plugin (/vike/dist/esm/node/plugin/index.d.ts), I got:
export default plugin;
export { plugin };
export { plugin as ssr };
export type { ConfigVikeUserProvided as UserConfig };
export { PROJECT_VERSION as version } from './utils.js';
import type { ConfigVikeUserProvided } from '../../shared/ConfigVike.js';
declare function plugin(vikeConfig?: ConfigVikeUserProvided): any;

Reproduction

git clone https://github.com/rtritto/template-vike-solid-daisyui.git
cd template-vike-solid-daisyui
yarn
yarn eslint .

Fixed with:
import { plugin } from 'vike/plugin'

Maybe it can be fixed moving the declare ... before the export default ...

I cannot reproduce:
~/tmp/template-vike-solid-daisyui (master|u+1) pe eslint .

🌼   daisyUI 4.12.10
├─ ✔ 1 theme added		https://daisyui.com/docs/themes
╰─ ❤ Support daisyUI project:	https://opencollective.com/daisyui

🌼   daisyUI 4.12.10
├─ ✔ 1 theme added		https://daisyui.com/docs/themes
╰─ ★ Star daisyUI on GitHub	https://github.com/saadeghi/daisyui

Note that I'm using pnpm instead of yarn: https://github.com/brillout/template-vike-solid-daisyui. Can you reproduce with pnpm instead of yarn?

Fixed changing import from default to named:
import { plugin as vike } from 'vike/plugin'

Same issue with vike-solid/config (esModuleInterop: false, missing default export) and vike-node/plugin
FYI @brillout

Sorry, on main branch, I changed the code with the naming import.
The issue will apper changing with the default import (you can try changing the code):
-import { plugin as vike } from 'vike/plugin'  // OK ESLint
+import vike from 'vike/plugin'  // KO ESLint

I could reproduce indeed and updated my fork.
Seems to be a ESLint quirk? Closing as I don't see this to be a Vike bug, but I'm open for a workaround.

Fix pre-released as 0.4.193-commit-c1d490a.