Shapely preprocessor: For discussion, not to merge

Hi @robbievanleeuwen,
I have begun the "overhaul" of the pre-processor to run on shapely. I think it is working quite beautifully! I have not run any of the tests but have just been playing with the sections and plotting them to review them. In the process, I have made some design changes that I wanted to discuss with you, and get your thoughts on, before I proceed further:

Geometry class has a new attribute, geom, which contains the shapely object (Polygon)
Instantiating a new Geometry object now only requires a shapely object and no other parameters
Most of the Geometry methods have been re-implemented, relying on shapely's own methods. Some methods are no longer required (e.g. Geometry.calculate_facet_length(...) because shapely can produce the length of the perimeter from Polygon.length).
.control_points and .holes are now automatically generated, with no input required from the user, using Polygon.representative_point() which returns a "cheaply computed point that is guaranteed to be within the shape". Holes in Polygon instances are stored as LinearRing instances within Polygon.interiors. Converting these LinearRing instances to Polygons allows me to use the .representative_point() method to also generate the "hole" control points.
The addition of a new method (with some helper functions outside of the Geometry class) called create_facets_and_control_points(...). This method converts the Geometry.geom shapely object from "shapely format" into "sectionproperties format". This method is run whenever either Geometry.create_mesh(...) or Geometry.plot_geometry(...) is called. This new method populates self.points, self.facets, self.control_points, self.holes, and self.perimeter. Once these attributes are populated, then .create_mesh(...) and .plot_geometry(...) work exactly as normal.
All section geometries are now instances of Geometry class instead of instances of one of the several custom classes that inherit from Geometry and are essential a Geometry object but with a custom constructor. The custom constructors are now standalone functions e.g. no longer a Rhs class but a rectangular_hollow_section(...) function which returns a new Geometry instance.

Based on my work so far, here are my thoughts on how I might proceed and how things might roll out. Please let me know your thoughts on these ideas, also:

Reduce the amount of custom classes in the preprocessor down to just Geometry, Material, and Section (currently CrossSection). Section is composed of one or more Geometry instances and one or more Material instances.
Geometry "constructor" functions simply return a new Geometry instance (with appropriate shape) instead of returning the instance and "shift"-ing them. Translation, rotation, and mirroring are methods that only exist within Geometry class.
Move Geometry.create_mesh(...) into Section.create_mesh(...). It seems that meshing occurs immediately before analysis and analysis only occurs on complete sections (i.e. geometry + material).
Remove the .add_point(...), .add_facet(...), .add_hole(...), etc. methods from Geometry. The idea being that the user either, a) creates sections entirely with the constructor functions; or b) the user manipulates the shapely object(s) (within Geometry.geom) directly until they are happy with it. It would be awkward to add points (etc.) on-the-fly to shapely objects when it is likely easier to create a list of vertices all at once and feed that list into shapely.

Things have been going really smoothly on this project for me. I am eager to continue working on it and getting this implemented and tested in the next few weeks.

See the below gist for a quick demo:
https://gist.github.com/connorferster/f009671157b3108a9f6494f89274c5ab

Thanks for taking the time for the great feedback. I look forward to working on this more after Christmas and trying out a strategy for the MergedSection and CrossSection.

New Gists:
https://gist.github.com/connorferster/43aa50e8c0c9eda971275e7adcf211fd
https://gist.github.com/connorferster/d393791e3af7ae885bc00c8553db73fc
Currently working on doc strings.
Are you open to switching your test suite from unittest to pytest? If so, I can take care of that.

Also: happy new year!

Also: happy new year!

A couple of new gists:
https://gist.github.com/connorferster/9c822b4716f028a1c595dd8809a91f86
https://gist.github.com/connorferster/0f592c376d21112238a9d7b2f4f41895
I feel good about where everything has gotten to. I am going to focus on completing documentation and creating tests.
Since sectionproperties does not have many tests currently, are you open to switching your testing suite to pytest? I am going to be writing lots of new tests for the new Geometry class and it could be a good opportunity to switch to a modern testing framework. Essentially, your tests become easier to write (pure functions with assert statements) and you can get more information following each test run. I believe most modern python projects use pytest these days. I highly recommend it.
Let me know your thoughts on this

A couple of new gists:
https://gist.github.com/connorferster/9c822b4716f028a1c595dd8809a91f86
https://gist.github.com/connorferster/0f592c376d21112238a9d7b2f4f41895
I feel good about where everything has gotten to. I am going to focus on completing documentation and creating tests.
Since sectionproperties does not have many tests currently, are you open to switching your testing suite to pytest? I am going to be writing lots of new tests for the new Geometry class and it could be a good opportunity to switch to a modern testing framework. Essentially, your tests become easier to write (pure functions with assert statements) and you can get more information following each test run. I believe most modern python projects use pytest these days. I highly recommend it.
Let me know your thoughts on this

I haven't been involved at all with this PR, but I've been considering adding more tests for section-properties as well (it needs MANY more, I think) and I would also highly recommend switching to pytest, for what it's worth.

I haven't been involved at all with this PR, but I've been considering adding more tests for section-properties as well (it needs MANY more, I think) and I would also highly recommend switching to pytest, for what it's worth.

Happy for the testing switch! Great work :fireworks:

Happy for the testing switch! Great work :fireworks:

Looking great @connorferster, loving the gists!
Re: reinforced concrete - I had thought about this a little bit in the past and wasn't sure how best to proceed. Problem - meshing circles (reinforcement) with straight lines underestimates the area of the circle. You can get close to the correct area by using a lot of subdivisions but this seems unecessarily expensive. One option would be to implement finite elements with curved edges but this is beyond my knowledge. Another option would be to use a fixed number of subdivisions e.g. 16 or 32 and set the diameter slightly bigger than the reinforcement bar but gave you the exact area (I'm sure there's an analytical relationship between the 'increased' diameter required and the number of subdivisons). Not sure if you have any thoughts on this?
Another thought - one of my plans was to switch from meshpy to triangle (#24). Triangle appears to have the same functionality as meshpy but is well maintained and isn't such a pain to install (particularly for windows users). I don't think it would be much work to do the switch as the architecture is largely the same. Not sure if you have time or are interested in incorporating this into your massive overhaul :smile: ? If not, it's something I can tackle in the not too distant future.
Thanks again!
Robbie

Looking great @connorferster, loving the gists!
Re: reinforced concrete - I had thought about this a little bit in the past and wasn't sure how best to proceed. Problem - meshing circles (reinforcement) with straight lines underestimates the area of the circle. You can get close to the correct area by using a lot of subdivisions but this seems unecessarily expensive. One option would be to implement finite elements with curved edges but this is beyond my knowledge. Another option would be to use a fixed number of subdivisions e.g. 16 or 32 and set the diameter slightly bigger than the reinforcement bar but gave you the exact area (I'm sure there's an analytical relationship between the 'increased' diameter required and the number of subdivisons). Not sure if you have any thoughts on this?
Another thought - one of my plans was to switch from meshpy to triangle (#24). Triangle appears to have the same functionality as meshpy but is well maintained and isn't such a pain to install (particularly for windows users). I don't think it would be much work to do the switch as the architecture is largely the same. Not sure if you have time or are interested in incorporating this into your massive overhaul :smile: ? If not, it's something I can tackle in the not too distant future.
Thanks again!
Robbie

Sounds good, @robbievanleeuwen!

I started playing around with triangle but decided to revert my changes to "stay on track" and just focus on the preprocessing. I think moving to triangle would be good. This crashing situation with meshpy is not reliable and I do not know why it is happening because no exceptions or error codes are raised from the OS, just a silent exit. In Jupyter, I re-run once, twice, thrice and by then it usually works. However, for testing it is an untenable situation because it causes the test suite to exit early. I am currently unable to complete a test suite run (on either my local or on the Travis CI) because of this crashing issue. Have you experienced this crash (i.e. segmentation fault) issue on Travis CI before?

2a. Re: concrete - If that is the case, then it seems that the analysis will tend to be conservative, which is good. Given that FEA is almost always going to be an approximation of a physical system, I think that this discrepancy between meshed area vs actual area is within the realm of expectation of a "sophisticated" user (i.e. a user at least familiar with FE theory and its limitations).
2b. You mention on your main docs page that there are plans for a "concrete module". What did you have in mind for that? I am wondering if, after the preprocessing overhaul is complete, the next steps would be for the post-processing to consider both a compressive yield stress and separate tensile yield stress. I am new to the world of concrete analysis but I am under the impression that cracked section analysis requires an iterative procedure to account for the stress redistribution during the cracking process.

One thing that is tripping me up right now are the NASTRAN sections. Currently, I have left them as distinct classes instead of replacing them with functions that generate the required geometries. The reason for this is because of the method that is unique to the NASTRAN sections: .getStressPoints()

In my recent reading about NASTRAN, it seems that reporting stress values at these corner points on the section is characteristic of NASTRAN and should not be omitted. I had hoped to be able to dynamically calculate the locations of these stress points for an arbitrary section (allowing for stress point reporting on any shaped section) but it seems that, even for the NASTRAN sections, they are not consistently in the same place (e.g. in HAT section, two points lie in the mid-depth of the bottom flange instead of the bottom corners).
I like the cleanliness of having just two geometry classes that can be used to represent any geometry but I am unsure about the best way to handle these NASTRAN sections with their additional method. Currently, I am thinking of defining the stress points as an @property for all Geometry instances but the values would only be set by the .setter when the geometry was created with a create_nastran_section...() function. What are your thoughts on this? Once created, the recovery points could be dynamic with the section, e.g. if the shapely geometry is rotated, the recovery points would also be rotated and reported from that new rotated location.

Sounds good, @robbievanleeuwen!

I started playing around with triangle but decided to revert my changes to "stay on track" and just focus on the preprocessing. I think moving to triangle would be good. This crashing situation with meshpy is not reliable and I do not know why it is happening because no exceptions or error codes are raised from the OS, just a silent exit. In Jupyter, I re-run once, twice, thrice and by then it usually works. However, for testing it is an untenable situation because it causes the test suite to exit early. I am currently unable to complete a test suite run (on either my local or on the Travis CI) because of this crashing issue. Have you experienced this crash (i.e. segmentation fault) issue on Travis CI before?

2a. Re: concrete - If that is the case, then it seems that the analysis will tend to be conservative, which is good. Given that FEA is almost always going to be an approximation of a physical system, I think that this discrepancy between meshed area vs actual area is within the realm of expectation of a "sophisticated" user (i.e. a user at least familiar with FE theory and its limitations).
2b. You mention on your main docs page that there are plans for a "concrete module". What did you have in mind for that? I am wondering if, after the preprocessing overhaul is complete, the next steps would be for the post-processing to consider both a compressive yield stress and separate tensile yield stress. I am new to the world of concrete analysis but I am under the impression that cracked section analysis requires an iterative procedure to account for the stress redistribution during the cracking process.

One thing that is tripping me up right now are the NASTRAN sections. Currently, I have left them as distinct classes instead of replacing them with functions that generate the required geometries. The reason for this is because of the method that is unique to the NASTRAN sections: .getStressPoints()

In my recent reading about NASTRAN, it seems that reporting stress values at these corner points on the section is characteristic of NASTRAN and should not be omitted. I had hoped to be able to dynamically calculate the locations of these stress points for an arbitrary section (allowing for stress point reporting on any shaped section) but it seems that, even for the NASTRAN sections, they are not consistently in the same place (e.g. in HAT section, two points lie in the mid-depth of the bottom flange instead of the bottom corners).
I like the cleanliness of having just two geometry classes that can be used to represent any geometry but I am unsure about the best way to handle these NASTRAN sections with their additional method. Currently, I am thinking of defining the stress points as an @property for all Geometry instances but the values would only be set by the .setter when the geometry was created with a create_nastran_section...() function. What are your thoughts on this? Once created, the recovery points could be dynamic with the section, e.g. if the shapely geometry is rotated, the recovery points would also be rotated and reported from that new rotated location.

I just wanted to throw my two cents in here. I've been using your gists to learn shapely and follow along, and I'm really loving the re-write! Building up sections is pretty straight-forward, but I think it will deserve it's own section in the docs working through the operations with examples. For now, the gists are easy enough to follow. I'd be happy to help flesh out those docs from the examples you've already written up, once we're ready.

When I've worked with composite structures in the past, I'd have compressive and tensile properties, and change the one used based on the applied loads. And then the same for the allowables, using the correct one for the final local stress state. My experience, however, is with carbon-fiber composites, where the fiber-volume ratios are much higher than reinforced concrete. I agree with Connor on 2a, some slight conservatism is good.

I think a common stressPoints property is a good move. It may be beneficial to allow users to define their own stress recovery points, if they don't need the defaults or have a unique case. As an example, maybe I know a certain location is prone to damage, and I want to make sure I have higher margins at this spot, even if it isn't the most critical or at one of the default corners/intersections. I could run the analysis twice with a reduced area there and guess what my section could look like after damage, or I could run it once and pull results from this spot specifically to verify I have sufficient capability.

Either way, it would really benefit us Nastran users to be able to have loads on a bar element, plug them into a more refined cross-section here, and then directly compare stresses as a sanity check.

I just wanted to throw my two cents in here. I've been using your gists to learn shapely and follow along, and I'm really loving the re-write! Building up sections is pretty straight-forward, but I think it will deserve it's own section in the docs working through the operations with examples. For now, the gists are easy enough to follow. I'd be happy to help flesh out those docs from the examples you've already written up, once we're ready.

When I've worked with composite structures in the past, I'd have compressive and tensile properties, and change the one used based on the applied loads. And then the same for the allowables, using the correct one for the final local stress state. My experience, however, is with carbon-fiber composites, where the fiber-volume ratios are much higher than reinforced concrete. I agree with Connor on 2a, some slight conservatism is good.

I think a common stressPoints property is a good move. It may be beneficial to allow users to define their own stress recovery points, if they don't need the defaults or have a unique case. As an example, maybe I know a certain location is prone to damage, and I want to make sure I have higher margins at this spot, even if it isn't the most critical or at one of the default corners/intersections. I could run the analysis twice with a reduced area there and guess what my section could look like after damage, or I could run it once and pull results from this spot specifically to verify I have sufficient capability.

Either way, it would really benefit us Nastran users to be able to have loads on a bar element, plug them into a more refined cross-section here, and then directly compare stresses as a sanity check.

I think all cross sections should have definable stress recovery points.  By default, for not-Nastran sections I'd recommend that we use the convex tell of the vertices.  This may be more that 4 points.  But the user should also be able to add extra ones and disable the default ones.  Sometimes you want the stresses at the center of a flange, such as with shear dominated loading.

I think all cross sections should have definable stress recovery points.  By default, for not-Nastran sections I'd recommend that we use the convex tell of the vertices.  This may be more that 4 points.  But the user should also be able to add extra ones and disable the default ones.  Sometimes you want the stresses at the center of a flange, such as with shear dominated loading.

@connorferster
Re. your comment before...

I started playing around with triangle but decided to revert my changes to "stay on track" and just focus on the preprocessing. I think moving to triangle would be good. This crashing situation with meshpy is not reliable and I do not know why it is happening because no exceptions or error codes are raised from the OS, just a silent exit. In Jupyter, I re-run once, twice, thrice and by then it usually works. However, for testing it is an untenable situation because it causes the test suite to exit early. I am currently unable to complete a test suite run (on either my local or on the Travis CI) because of this crashing issue. Have you experienced this crash (i.e. segmentation fault) issue on Travis CI before?

This sounds like the problem I was having in my (attempt) [https://github.com/robbievanleeuwen/section-properties/pull/40]
Never got to bottom of it. A couple of valid runs then exiting with no trace or anything. Tried everything to chase it down.

@connorferster
Re. your comment before...

I started playing around with triangle but decided to revert my changes to "stay on track" and just focus on the preprocessing. I think moving to triangle would be good. This crashing situation with meshpy is not reliable and I do not know why it is happening because no exceptions or error codes are raised from the OS, just a silent exit. In Jupyter, I re-run once, twice, thrice and by then it usually works. However, for testing it is an untenable situation because it causes the test suite to exit early. I am currently unable to complete a test suite run (on either my local or on the Travis CI) because of this crashing issue. Have you experienced this crash (i.e. segmentation fault) issue on Travis CI before?

This sounds like the problem I was having in my (attempt) [https://github.com/robbievanleeuwen/section-properties/pull/40]
Never got to bottom of it. A couple of valid runs then exiting with no trace or anything. Tried everything to chase it down.

Hi all,
Keeping the number system we've got going:

I have run into the segmentation fault issue before and agree it is particularly frustrating. I seem to remember narrowing it down to, or at least attributing it to problems with the input geometry resulting in the mesh algorithm not being able to generate a mesh. From memory this was caused by duplicate or 'relatively' close nodes or facets that didn't make sense e.g. intersected other facets. Maybe have a careful look at the input geometry you are trying to mesh? Otherwise I can have a look at the suspect geometry and see if I can figure it out? The seeming randomness of the errors is puzzling though...

Agree with the approach to modelling circles and the conservatism with smaller areas. I guess the inner perfectionist in me wanted to get something more exact. Regarding a concrete module, was thinking of the following:

Some pre-processor functions to easily define common reinforced cross-sections.
Compute some code related properties, e.g. ultimate flexural strength/shear strength etc/stiffness etc.
Some more advanced analysis methods e.g. M-N interaction diagram, parabolic stress profiles, moment-curvature stiffness diagrams etc.

Can't really comment a whole lot on the NASTRAN business as I have never used it and don't really understand the relevance of the stress points (this feature was added by another user). Happy to defer to others on this one, but your approach seems sound.

Hi all,
Keeping the number system we've got going:

I have run into the segmentation fault issue before and agree it is particularly frustrating. I seem to remember narrowing it down to, or at least attributing it to problems with the input geometry resulting in the mesh algorithm not being able to generate a mesh. From memory this was caused by duplicate or 'relatively' close nodes or facets that didn't make sense e.g. intersected other facets. Maybe have a careful look at the input geometry you are trying to mesh? Otherwise I can have a look at the suspect geometry and see if I can figure it out? The seeming randomness of the errors is puzzling though...

Agree with the approach to modelling circles and the conservatism with smaller areas. I guess the inner perfectionist in me wanted to get something more exact. Regarding a concrete module, was thinking of the following:

Some pre-processor functions to easily define common reinforced cross-sections.
Compute some code related properties, e.g. ultimate flexural strength/shear strength etc/stiffness etc.
Some more advanced analysis methods e.g. M-N interaction diagram, parabolic stress profiles, moment-curvature stiffness diagrams etc.

Can't really comment a whole lot on the NASTRAN business as I have never used it and don't really understand the relevance of the stress points (this feature was added by another user). Happy to defer to others on this one, but your approach seems sound.

@robbievanleeuwen
Thanks for that. Have taken a break from working on it this week. I feel like I am pretty darn close and want to get this complete so it can be reviewed and merged!
Road map for me:

Finish writing the nastran_...() functions for geometry generation.
Update the docstrings
Figure out what's happening with meshpy on your original tests and get them running reliably
Write some basic unit tests for Geometry and CompoundGeometry

Once this is complete, I am interested in writing a biaxial interaction diagram module. But that's for a little bit later. First things are first.

@robbievanleeuwen
Thanks for that. Have taken a break from working on it this week. I feel like I am pretty darn close and want to get this complete so it can be reviewed and merged!
Road map for me:

Finish writing the nastran_...() functions for geometry generation.
Update the docstrings
Figure out what's happening with meshpy on your original tests and get them running reliably
Write some basic unit tests for Geometry and CompoundGeometry

Once this is complete, I am interested in writing a biaxial interaction diagram module. But that's for a little bit later. First things are first.

I am going to cancel this pull request. Getting close to finishing. Will keep working on the branch and re-submit the pull request when it is ready.

I am going to cancel this pull request. Getting close to finishing. Will keep working on the branch and re-submit the pull request when it is ready.

For the rectangle, do you have a minimum working example for it that consistently fails?  I'll try the same one to see if it fails for me or not too.

For the rectangle, do you have a minimum working example for it that consistently fails?  I'll try the same one to see if it fails for me or not too.

You can also set a PR to be "in work" in which case it can't be merged

You can also set a PR to be "in work" in which case it can't be merged

It's okay actually! I adjusted the way I generate Geometry.points and Geometry.facets so it does not include the first point again at the end (to close the loop). This seems to have fixed some of the problems I was having. I am able to get pytest to run consistently on test_rectangle.py but I am getting funny results on some properties, most notably qx and qy.

It's okay actually! I adjusted the way I generate Geometry.points and Geometry.facets so it does not include the first point again at the end (to close the loop). This seems to have fixed some of the problems I was having. I am able to get pytest to run consistently on test_rectangle.py but I am getting funny results on some properties, most notably qx and qy.

And on my circular geometry, I am getting funny values for ixx_c and iyy_c, for example. Not sure why yet. Going to compare point orders but I don't know if that should create any difference since we have the facets lists to order the control the point connectivity.

And on my circular geometry, I am getting funny values for ixx_c and iyy_c, for example. Not sure why yet. Going to compare point orders but I don't know if that should create any difference since we have the facets lists to order the control the point connectivity.


[BUG] (monorepo) upgrade-deps using outdated syncpack (error)

Describe the bug
Your syncpack config file contains values deprecated in https://github.com/JamieMason/syncpack/releases/tag/9.0.0
  Dependency Types: dev,overrides,peer,pnpmOverrides,prod,resolutions
  Docs: https://jamiemason.github.io/syncpack/config/dependency-types

Expected Behavior
To upgrade the monorepo's dependencies.
Current Behavior
Throws error in description.
Reproduction Steps
This should be happening in all new PDK monorepos, it would seem, but here is the syncpack file:
{
  "dependencyTypes": [],
  "dev": true,
  "filter": ".",
  "indent": "  ",
  "overrides": true,
  "peer": true,
  "pnpmOverrides": true,
  "prod": true,
  "resolutions": true,
  "workspace": true,
  "semverGroups": [],
  "semverRange": "",
  "sortAz": [
    "contributors",
    "dependencies",
    "devDependencies",
    "keywords",
    "peerDependencies",
    "resolutions",
    "scripts"
  ],
  "sortFirst": [
    "name",
    "description",
    "version",
    "author"
  ],
  "source": [],
  "versionGroups": [],
  "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"pnpm exec projen\"."
}

"syncpack": "^12.3.0",
Possible Solution
Workaround: Downgrade syncpack 4 major versions to ^8.  You must use addDevDeps or the PDK overwrites your version.
Additional Information/Context
No response
PDK version used
0.22.48
What languages are you seeing this issue on?
Typescript
Environment details (OS name and version, etc.)
Ubuntu 22.04

Hi @dkershner6.
Incase it's useful, this is the equivalent config with the breaking changes applied for v9+
{
-  "dependencyTypes": [],
+  "dependencyTypes": ["dev", "overrides", "peer", "pnpmOverrides", "prod", "resolutions", "local"],
-  "dev": true,
  "filter": ".",
  "indent": "  ",
-  "overrides": true,
-  "peer": true,
-  "pnpmOverrides": true,
-  "prod": true,
-  "resolutions": true,
-  "workspace": true,
-  "semverGroups": [],
-  "semverRange": "",
+  "semverGroups": [{
+    "dependencies": ["**"],
+    "dependencyTypes": ["**"],
+    "packages": ["**"],
+    "range": ""
+  }],
  "sortAz": [
    "contributors",
    "dependencies",
    "devDependencies",
    "keywords",
    "peerDependencies",
    "resolutions",
    "scripts"
  ],
  "sortFirst": [
    "name",
    "description",
    "version",
    "author"
  ],
  "source": [],
  "versionGroups": [],
  "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"pnpm exec projen\"."
}


Resolve missing back matter

Description
As an eLife reader I would like all back matter to be published so I can have the relevant information attached to each article
What is the benefit of solving the problem?
Our new PRC process will mirror publishing industry standards
How will we know when the problem has been solved?
Each back matter item will be published as standard
Acceptance Criteria

[ ] Supplementary figures#454
[ ] Acknowledgements#455
[ ] Author Information#456
[ ] Funding#457
[ ] Competing Interests#458
[ ] Data availability#459

Examples of back matter not working

[ ] https://docs.google.com/document/d/1HG9zjG_VIIZZpeetcka-9uoPOzO9G9ehTiKbxPRK-mY/edit# Feedback form with more info
[ ] [Mockup About page](https://staging--epp.elifesciences.org/reviewed-preprints/80993)
[ ] https://staging--epp.elifesciences.org/reviewed-preprints/80729
[ ] https://staging--epp.elifesciences.org/reviewed-preprints/81727)
[ ] https://staging--epp.elifesciences.org/reviewed-preprints/80494
[ ] https://staging--epp.elifesciences.org/reviewed-preprints/81926

Tasks

[ ]

Definition of Done

[ ] Solution deployed to a staging environment.
[ ] Solution reviewed and approved by @chris-huggins
[ ] Solution reviewed and approved by @QueenKraken
[ ] Solution reviewed and approved by @nlisgo
[ ] Solution deployed to production.

This work is dependant on the outcome of @BlueReZZ conversation with Encoda.


[Android] TouchableOpacity activates when releasing after long press to open ContextMenu

As the title says, upon releasing my finger after long-pressing an item to open the context menu the TouchableOpacity activates and the onPress action ()handleOpenFile) is executed.
Example code:
    <ContextMenu.Root>
      <ContextMenu.Trigger>
        <TouchableOpacity
          onPress={handleOpenFile}
        >
          <Text>Text</Text>
        </TouchableOpacity>
      </ContextMenu.Trigger>
      <ContextMenu.Content
        loop={false}
        alignOffset={0}
        avoidCollisions={true}
        collisionPadding={0}
      >
          <ContextMenu.Item
            key={"1"}
            onSelect={() => {}}
          >
            <ContextMenu.ItemTitle style={{ color: "red" }}>
              1
            </ContextMenu.ItemTitle>
          </ContextMenu.Item>
      </ContextMenu.Content>
    </ContextMenu.Root>

The expected behavior should be that he underlying TouchableOpacity does not activate.
This is only an issue on Android it seems.

What is the "other lib"?

React Native Menu, https://zeego.dev wraps each one for you

If you’re having an issue on Android with Zeego, you should open an issue at @react-native-menu

The expected behavior should be that he underlying TouchableOpacity does not activate.

Why? I don’t exactly agree. Why have a Pressable that shouldn’t activate?

@fredrikburmester i think we can move this issue to the zeego repo and possibly tag the react-native-menu issue as well since it’s Android


Need Way to Have Different Versions of Instances Still Be Accessible

onepineapple:
Need way to have different versions of instances still be accessible

This has been addressed in the latest versions. A minimum version setting is included that allows AMP to talk to older version instances.


Help needed for gfoclt_c call

Hi Greg!
As you know, I validate ANISE against SPICE using your library. For https://github.com/nyx-space/anise/issues/297, I've added the occultation computation using the algorithm I derived for Nyx several years ago. I have strong reasons to believe that the algorithm is correct, as seen in this recent GEO eclipsing analysis. After the (many) verification tests, now is time for validation, and what better tool than SPICE?
Anyway, I'm trying to understand how I can call gfoclt. The rust doc expects *mut i8 even for inputs that the SPICE docs say should be strings (like the frame type).
Where can I see an example on how I should be interfacing with this function?
Thanks

Hi @ChristopherRabotin! You did stunning progress on ANISE since last time we talked, huge congrats! For occultations and eclipses, I'm very familiar and use very often the occult function instead of gfoclt. So I can help on the tests if you need!
With current C bindings for rust-spice, functions taking ConstSpiceChar * as input, expects *mut i8. We have a macro to help with that here.
The interface with gfoclt is still raw FFI but the occult has a nice interface already, see here.
I will add the idiomatic rust interface to gfoclt for the future need.
Let me know if this helped you :)

Great, thanks! I'll look into it. I didn't even know of occult, but this looks exactly like what I'm trying to implement.

I've implemented the computation in https://github.com/nyx-space/anise/pull/307 . That said, it doesn't account for the DSK yet because ANISE does not support those (yet!).

Hi Greg,
Have you used the POINT method of the occult function in SPICE? I'm trying to validate the line of sight computation in ANISE after seeing some discrepancy compared to other software for the LOS algorithm only (the shadowing algorithm matches the SPICE results exactly).
I tried defining a "pinpoint" location in a text file as follows:
\begintext

   SITES             = ('MADRIDVAL')
   MADRIDVAL_FRAME      = 'IAU_EARTH'
   MADRIDVAL_IDCODE     = 3990001
   MADRIDVAL_CENTER     = 399
   MADRIDVAL_LATLON     = (  40.427222, 4.250556,  0.834939 )

   MADRIDVAL_TOPO_FRAME = 'MADRIDVAL_TOPO'
   MADRIDVAL_TOPO_ID    = 3990001
   MADRIDVAL_UP         = 'Z'
   MADRIDVAL_NORTH      = 'X'

\begintext

For the occultation and line of sight validation only

Here is how it's defined in the validate_gh_283_multi_barycenter_and_los test.

MADRIDVAL_TOPO_FRAME = 'MADRID_TOPO'
   MADRIDVAL_TOPO_ID    = 3990001
   MADRIDVAL_UP         = 'Z'
   MADRIDVAL_NORTH      = 'X'

let latitude_deg = 40.427_222;
let longitude_deg = 4.250_556;
let height_km = 0.834_939;
let iau_earth = almanac.frame_from_uid(IAU_EARTH_FRAME).unwrap();

PINPOINT Inputs
=======================================================

\begindata

   SITES                   += 'NDOSL_AC2J'
   NDOSL_AC2J_CENTER     = 399
   NDOSL_AC2J_FRAME      = 'ITRF93'
   NDOSL_AC2J_IDCODE     = 399100208
   NDOSL_AC2J_LATLON     = (  -7.9179155833,<PHONE_NUMBER>833,  0.071470 )
   NDOSL_AC2J_TOPO_FRAME = 'NDOSL_AC2J_TOPO'
   NDOSL_AC2J_TOPO_ID    = 399100208
   NDOSL_AC2J_UP         = 'Z'
   NDOSL_AC2J_NORTH      = 'X'

And then calling the occult function as follows:
sp.occult("-85", "POINT", " ", "Moon" , "ELLIPSOID", "IAU_MOON", abcorr, "NDOSL_AC2J", epoch.to_et_seconds())

Where the ET is 755956869.183453 and abcorr is set to NONE.
I get this error:
Toolkit version: CSPICE_N0067

SPICE(IDCODENOTFOUND) --

The observer, 'NDOSL_AC2J', is not a recognized name for an ephemeris object. The cause of this problem may be that you need an updated version of the SPICE toolkit.

occult_c --> OCCULT --> ZZGFOCIN

This approach should be identical to what's in example #1 of https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/occult_c.html. So I'm not sure what is going on here.
Any idea?
Thanks
P.S.: Here is a copy of the LRO BSP file: http://public-data.nyxspace.com/nyx/examples/lrorg_2023349_2024075_v01_LE.bsp .

Hey Chris! Yes first I already used the POINT method of occult spice function (Didymos/Dimorphos wrt Sun/spacecraft, same with Mars/Phobos/Deimos) for quick tests, but always found better results with ELLIPSOID or DSK/UNPRIORITIZED if available.
I'll look at the example and try to reproduce it to understand the difference. For the moment it simply looks like not enough info loaded in your kernel pool for your observer NDOSL_AC2J.
I don't understand what you try to achieve. In my case it was occultation/eclipse calculation. What is a pinpoint? English barrier here haha. Do you want to see if you longitude/latitude surface point on the Moon is shadowed?

It isn't urgent, I validated the computation through the results of another tool for now. I was trying to use SPICE to see whether a the Moon would prevent a ground station on the Earth from seeing a lunar orbiter. When computing the azimuth, elevation, and range data, the elevation tells us whether the other object is above or below the horizon, but that is only part of the problem.


Bumping latest release version in the changelog

Description
This is to reflect the latest version published on npm.
Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] I have signed the Adobe Open Source CLA.
[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Coverage: 92.502%. Remained the same when pulling d2ff5c810592381d1696d6e169cf3a01c5ee3c88 on ericfichtel:release_2.4.2_bump_changelog into ac96ef973da95bf07c65690a9b163e9dae3303b3 on adobe:main.


AVX512 DGEMM kernel

Originally designed for icopy_8 and ocopy_8, add transformation function to support icopy_4 (with ~5% performance loss), currently 80-85% MKL performance.

Great, thanks. I have been trying off and on to make fenrus75's dgemm code work but was not really getting anywhere with it.

Seems the OSX libc lacks aligned_malloc, and a gcc version later than 7 is required for the
"_mm256_cvtsd_f64" intrinsic.

And I am happy to confirm that this passes all tests in BLAS-Tester, the DGELSD test from #2187 and also isuruf's DTRMM reproducer from #1955 (showing that trmm was indeed "only" affected indirectly by the change of incopy, no other side effect). The lapack tests show two errors in DHS although the detailed testing_results.txt claims all tests passed.

I'm surprised that appveyor passes even though there's no posix_memalign on windows.

I suspect the one Appveyor job that uses DYNAMIC_ARCH=1 does not use an AVX512-aware clang.
(And I have restarted the xcode job that appeared to have timed out)

If https://stackoverflow.com/questions/196329/osx-lacks-memalign is to be trusted, posix_memalign is not available on older versions of OSX either (but aligned_malloc is available on Windows, so probably make that one #ifndef OS_DARWIN - not sure what to use on that platform though).

A 4x8 kernel is added for direct interface to icopy_4, which gives improved 1-thread performance (85 GFLOPS) on Intel Xeon Platinum 8269CY (theoretical 105 GFLOPS, MKL 95 GFLOPS).

Great, thanks. Just let me know when you think it is ready for merging. I started to write a simple 8x8 trmm kernel earlier but could not get that to work, not sure if I made a silly mistake or if the existing generic kernels I used as guidance are broken. (This project has accumulated a few kernels of questionable status that are not in use by any target.)

I've finished updating the 2 kernel files. They will soon be ready for merging after I finish reliability tests on them.

For the 2 kernels, tests with all combinations of 1<=m<=1173 && 1<=n<=85 && 1<=k<=267 passed. OK to merge.

Testing program is attached here:
dgemmtest.zip


Integrate with H2 origin changes on master branch

Nothing to do for this at the moment since we don't really have client implementation.


Need the navbar to be responsive

The navigation bar  isn't responsive. It fails to work properly on mobile devices. Please add something like the navbar folds up into a button. (like in bootstrap and many others)
And yeah, the framework is cool.
P.S: I'm developing a website for a school project on Blaze instead of Bootstrap.

Could you make use of a combination of Drawer component and Navbar?
Rather than make the navbar any more complicated?


ColorTable error

root@loli:~/giftolottie# python3 read.py tenor.gif test.tgs
gifsicle:tenor.gif: warning: GIF too complex to unoptimize
(The reason was local color tables or complex transparency.
Try running the GIF through ‘gifsicle --colors=255’ first.)
gifsicle: warning: too many colors, using local colormaps
(You may want to try ‘--colors 256’.)
Traceback (most recent call last):
File "read.py", line 22, in
frames, exts, image_specs = vendor.gif2numpy.convert(tmpfile.name, BGR2RGB=False)
File "/root/giftolottie/vendor/gif2numpy.py", line 629, in convert
np_image = np.array([local_color_table[byt] if byt != exts[-1]['transparent_idx'] else (254, 0, 254) for byt in uncompressed])
File "/root/giftolottie/vendor/gif2numpy.py", line 629, in
np_image = np.array([local_color_table[byt] if byt != exts[-1]['transparent_idx'] else (254, 0, 254) for byt in uncompressed])
TypeError: 'ColorTable' object does not support indexing
root@loli:~/giftolottie# apt install colortable
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package colortable
root@loli:~/giftolottie#

did you install the dependencies?
pip3 install -r requirements.txt

yes

LOL, this is the first issue and it's still relevant.
╭─pedrohlc at pc in /tmp/giftolottie (master ✔)
╰─λ pip install --user -r requirements.txt
Requirement already satisfied: kaitaistruct in /home/pedrohlc/.local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (0.9)
Requirement already satisfied: svgwrite in /home/pedrohlc/.local/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (1.4)
Requirement already satisfied: numpy in /home/pedrohlc/.local/lib/python3.8/site-packages (from -r requirements.txt (line 3)) (1.19.4)

╭─pedrohlc at pc in /tmp/giftolottie (master ✔)
╰─λ python read.py /tmp/tenor.gif uselessgoddess.tgs
gifsicle:/tmp/tenor.gif: warning: GIF too complex to unoptimize
  (The reason was local color tables or complex transparency.
  Try running the GIF through ‘gifsicle --colors=255’ first.)
gifsicle: warning: too many colors, using local colormaps
  (You may want to try ‘--colors 256’.)
Traceback (most recent call last):
  File "read.py", line 22, in <module>
    frames, exts, image_specs = vendor.gif2numpy.convert(tmpfile.name, BGR2RGB=False)
  File "/tmp/giftolottie/vendor/gif2numpy.py", line 629, in convert
    np_image = np.array([local_color_table[byt] if byt != exts[-1]['transparent_idx'] else (254, 0, 254) for byt in uncompressed])
  File "/tmp/giftolottie/vendor/gif2numpy.py", line 629, in <listcomp>
    np_image = np.array([local_color_table[byt] if byt != exts[-1]['transparent_idx'] else (254, 0, 254) for byt in uncompressed])
TypeError: 'ColorTable' object is not subscriptable

╭─pedrohlc at pc in /tmp/giftolottie (master ✔)
╰─λ python --version
Python 3.8.6

It seems to be specific for the first GIF I tried, others are working!

Compress your GIF using gifsicle
$ gifsicle --colors=255 /path/to/source.gif /path/to/output.gif

It works for me.

Wow, I didn't even realize for years that there is some activity in the issue tracker, as GitHub did not send e-mail notifications about new issues. Pretty sorry about it. Glad to see that the community mostly managed to organize without my attention.
@PedroHLC the GIF you tried is pretty large, the project provides sane results only for tiny ones, which is described in README. And as Telegram now supports WebM stickers natively, I suppose it's outdated now, unless someone needs Lottie animations for some other software.


Some detailed questions regarding SPIN

Hi, thanks for open sourcing your work. That's awesome. I have several questions about the details of the implementation.

Why do you use the RMSProp optimizer and the linear schedule instead of the commonly used AdamW optimizer and the cosine schedule?
How to prepare data for the iter 0 of SPIN? It seems that in generate.sh, it starts with the data preparation work for iter 1.
Regarding the prompt template, it seems that you used a different template for synthetic data generation from the one which is used for zephyr. May I know the reason behind that? What if the same prompt is used for synthetic data generation and the SFT training?
For synthetic data generation, the max output length is limited to 256, but during training the max length and the max prompt length are 1024 and 512 respectively. So, the synthetic data is ending with more paddings than the actual data during training. Is that right? Have you tried to extend the max output length for data generation?

I've also skimmed the code. Here are some potential improvements.

https://github.com/uclaml/SPIN/blob/main/spin/generate_vllm.py#L46 For greedy generation, the temperature should be set to zero according to vllm.
https://github.com/uclaml/SPIN/blob/main/spin/alignment/trainer.py#L552-L559 Swap the order of cpu() and mean() for faster metrics collection on slower CPUs

Hello, thank you for your interest and detailed comments.

Our initial configuration (scheduler, optimizer, and beta) follows the DPO training setup for Zephyr as outlined in the Alignment Handbook (https://github.com/huggingface/alignment-handbook/blob/61a11a5c7d66179ed0a930b0dd12e532fce701dd/recipes/zephyr-7b-beta/dpo/config_full.yaml). While their latest update suggests using Adam and a cosine scheduler, the previous set of configurations are sufficiently effective for our experiments. Nonetheless, we do recommend exploring these settings further for your specific use cases. For our experiences, the two sets of configs work similar in the final performances.
For iterations, it only depends on which model you are using for data generation. In our experiment setting, it's using alignment-handbook/zephyr-7b-sft-full to generation data at iteration 0. For replicating our 50k data generation, simply use UCLA-AGI/SPIN_iter0. The generation program primarily utilizes the provided questions/prompts for model generation. For other data, just convert the data into the same format.
We adopted a prompt template similar to Alpaca's due to its wide usage. Investigating how different prompts affect SPIN's performance is indeed a very interesting direction.
The maximum output length is adjustable. We set it to 256 for quicker generation demonstrations, but 512 and 1024 are also viable options. Similarly, the temperature parameter can indeed be modified for efficiency.

Thank you very much for the suggestions! We will make changes accordingly.

@yihedeng9 Thanks for your prompt answer.

2. For iterations, it only depends on which model you are using for data generation. In our experiment setting, it's using alignment-handbook/zephyr-7b-sft-full to generation data at iteration 0. For replicating our 50k data generation, simply use UCLA-AGI/SPIN_iter0. The generation program primarily utilizes the provided questions/prompts for model generation. For other data, just convert the data into the same format.

So, you are using the Alpaca's prompt template for data generation with the model alignment-handbook/zephyr-7b-sft-full to produce UCLA-AGI/SPIN_iter0, right? I guess it possibly leads to worse initial data compared with that generated using the Zephyr's prompt template. I just want to confirm whether this is a trick or it is okay to use the prompt template of the original model.

The maximum output length is adjustable. We set it to 256 for quicker generation demonstrations, but 512 and 1024 are also viable options. Similarly, the temperature parameter can indeed be modified for efficiency.

Yes, but does this affect the performance of the models?

Our initial configuration (scheduler, optimizer, and beta) follows the DPO training setup for Zephyr as outlined in the Alignment Handbook (https://github.com/huggingface/alignment-handbook/blob/61a11a5c7d66179ed0a930b0dd12e532fce701dd/recipes/zephyr-7b-beta/dpo/config_full.yaml). While their latest update suggests using Adam and a cosine scheduler, the previous set of configurations are sufficiently effective for our experiments. Nonetheless, we do recommend exploring these settings further for your specific use cases. For our experiences, the two sets of configs work similar in the final performances.

Yes, the results on alignment-handbook/zephyr-7b-sft-full is similar to the scores in the paper for cosine and AdamW. But it is not working that well using another model and datasets. Could you please give me some advice? (e.g. dataset selection, etc.)

The prompt template is not a trick but a default template we used. To reproduce our results, the template we provided should be used. But you can definitely try other templates for exploration.
Not necessarily, we did use 256/512 for generation and both are fine.
By our experiences, I mean the final performances of SPIN using two different configs are similar on some models we tried. I'm not sure on the specific application to the model and dataset of your interest, but you can always start with our given settings and explore the other parameters if needed.

Thanks. I suppose data is the big problem. I will need to find some high quality datasets like ultrachat-200k in my language.


Can't use OpenAI Chat Completion API call with simplest tasks

I tried to run lm_eval --model openai-chatcompletions --model_args model=gpt-4o-mini --tasks gsm8k with the latest version of lm-eval-harness after setting the OPENAI_API_KEY, but it's throwing 400 errors. Would really appreciate any feedback on this. The full log is shown below:
Traceback (most recent call last):
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/bin/lm_eval", line 8, in <module>
    sys.exit(cli_evaluate())
  File "/weka/scratch/djiang21/lm-eval-original/lm-evaluation-harness/lm_eval/__main__.py", line 382, in cli_evaluate
    results = evaluator.simple_evaluate(
  File "/weka/scratch/djiang21/lm-eval-original/lm-evaluation-harness/lm_eval/utils.py", line 397, in _wrapper
    return fn(*args, **kwargs)
  File "/weka/scratch/djiang21/lm-eval-original/lm-evaluation-harness/lm_eval/evaluator.py", line 296, in simple_evaluate
    results = evaluate(
  File "/weka/scratch/djiang21/lm-eval-original/lm-evaluation-harness/lm_eval/utils.py", line 397, in _wrapper
    return fn(*args, **kwargs)
  File "/weka/scratch/djiang21/lm-eval-original/lm-evaluation-harness/lm_eval/evaluator.py", line 468, in evaluate
    resps = getattr(lm, reqtype)(cloned_reqs)
  File "/weka/scratch/djiang21/lm-eval-original/lm-evaluation-harness/lm_eval/models/api_models.py", line 548, in generate_until
    outputs = retry(
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/site-packages/tenacity/__init__.py", line 336, in wrapped_f
    return copy(f, *args, **kw)
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/site-packages/tenacity/__init__.py", line 475, in __call__
    do = self.iter(retry_state=retry_state)
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/site-packages/tenacity/__init__.py", line 376, in iter
    result = action(retry_state)
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/site-packages/tenacity/__init__.py", line 418, in exc_check
    raise retry_exc.reraise()
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/site-packages/tenacity/__init__.py", line 185, in reraise
    raise self.last_attempt.result()
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/site-packages/tenacity/__init__.py", line 478, in __call__
    result = fn(*args, **kwargs)
  File "/weka/scratch/djiang21/lm-eval-original/lm-evaluation-harness/lm_eval/models/api_models.py", line 331, in model_call
    response.raise_for_status()
  File "/weka/scratch/djiang21/miniconda/envs/lm_eval/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.openai.com/v1/chat/completions
Requesting API:   0%|                                                                      | 0/1319 [00:03<?, ?it/s]

Hi. You need to add --apply_chat_template. Bit unintuitive, I'll see about adding a warning.

Thanks for your reply! It's working now. However, it seems like those OpenAI calls are not parallelized, which takes too much time to run (e.g. 1 hour+ on GSM8K). Is there a way to parallelize the calling to OpenAI APIs?

Could someone help with this question?

Have you tried using the batch_size or num_concurrent model kwargs (passable via adding to  --model_args) at all?

Hi. You need to add --apply_chat_template. Bit unintuitive, I'll see about adding a warning.

Hi, I have added the --apply_chat_template. But the TypeError occurs when "self.tokenizer.encode".
Have you met any errors like this? Thank you for any feedback!
This is the log:
Traceback (most recent call last):
  File "/data/home/jack/projects/lm-evaluation-harness/lm_eval/models/api_models.py", line 314, in tok_encode
    encoding = self.tokenizer.encode(string)
  File "/data/home/jack/miniconda3/envs/LLM/lib/python3.10/site-packages/tiktoken/core.py", line 116, in encode
    if match := _special_token_regex(disallowed_special).search(text):
TypeError: expected string or buffer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/home/jack/miniconda3/envs/LLM/bin/lm_eval", line 8, in <module>
    sys.exit(cli_evaluate())
  File "/data/home/jack/projects/lm-evaluation-harness/lm_eval/__main__.py", line 382, in cli_evaluate
    results = evaluator.simple_evaluate(
  File "/data/home/jack/projects/lm-evaluation-harness/lm_eval/utils.py", line 397, in _wrapper
    return fn(*args, **kwargs)
  File "/data/home/jack/projects/lm-evaluation-harness/lm_eval/evaluator.py", line 301, in simple_evaluate
    results = evaluate(
  File "/data/home/jack/projects/lm-evaluation-harness/lm_eval/utils.py", line 397, in _wrapper
    return fn(*args, **kwargs)
  File "/data/home/jack/projects/lm-evaluation-harness/lm_eval/evaluator.py", line 500, in evaluate
    resps = getattr(lm, reqtype)(cloned_reqs)
  File "/data/home/jack/projects/lm-evaluation-harness/lm_eval/models/api_models.py", line 549, in generate_until
    encodings_list = self.tok_encode(
  File "/data/home/jack/projects/lm-evaluation-harness/lm_eval/models/api_models.py", line 316, in tok_encode
    encoding = self.tokenizer.encode_batch(string)
  File "/data/home/jack/miniconda3/envs/LLM/lib/python3.10/site-packages/tiktoken/core.py", line 177, in encode_batch
    return list(e.map(encoder, text))
  File "/data/home/jack/miniconda3/envs/LLM/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
    yield _result_or_cancel(fs.pop())
  File "/data/home/jack/miniconda3/envs/LLM/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
    return fut.result(timeout)
  File "/data/home/jack/miniconda3/envs/LLM/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/data/home/jack/miniconda3/envs/LLM/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/data/home/jack/miniconda3/envs/LLM/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/data/home/jack/miniconda3/envs/LLM/lib/python3.10/site-packages/tiktoken/core.py", line 116, in encode
    if match := _special_token_regex(disallowed_special).search(text):
TypeError: expected string or buffer


[Feat-489] Show description on show more

Please check for all newsflash types before merging

Please check for all newsflash types before merging

I added the functionality to display the description only if it doesn't match the title and verified on Ynet, Mada and Walla.
I did noticed some issues that might be better handled on the server side (although can be handled on the client side as well) -

Ynet descriptions add a :
Walla descriptions add a ]]>

Let me know how you want to proceed.

I added the functionality to display the description only if it doesn't match the title and verified on Ynet, Mada and Walla.
I did noticed some issues that might be better handled on the server side (although can be handled on the client side as well) -

Ynet descriptions add a :
Walla descriptions add a ]]>

Let me know how you want to proceed.

Currently, we'll show only description

Currently, we'll show only description


Convert the repository into a python module

Converting the script into a module allows easier installation, along with reusability and modularization of the script.

One of the suggestions can be to use, poetry to create a base module and then adapting the script.

@devkakeri06 would you like to take up this issue? If yes then please reply with a brief description of the changes that you will make.

Identify and fix bugs that occur during module import to ensure smooth integration.
Enhance code modularity and provide additional functionality for improved flexibility.
Improve overall documentation by providing comprehensive instructions and examples for better understanding and utilization.

@devkakeri06 I am assigning this issue to you. This idea would probably restructure the whole code base so please take your time to plan your changes. Also, I'd like to remind you to document your changes in the README so that new contributors can understand the changes. Try to solve this issue in a way that we can still call the scripts in the command line.


[TypeScript] Fix signature of withMobileDialog

Options argument for withMobileDialog should be optional. HOC should include the injected fullScreen prop.

Thanks!


Fix audio system by using updated Oto API

Remove deprecated oto.NewPlayer() for the oto.NewContext() => context.NewPlayer()api
Update doc for NotResizeable to be more accurate since it's false by default
Update go.mod for June 2, 2020

Fixes #719


Update dependency laravel/framework to v9

This PR contains the following updates:

Package
Type
Update
Change

laravel/framework (source)
require
major
^8.65 -> ^9.0

Release Notes

laravel/framework
v9.37.0
Compare Source
Added

Added optional verbose output when view caching (#44673)
Allow passing closure to rescue $report parameter (#44710)
Support preloading assets with Vite (#44096)
Added Illuminate/Mail/Mailables/Content::htmlString() (#44703)

Fixed

Fixed model:show registering getAttribute() as a null accessor (#44683)
Fix expectations for output assertions in PendingCommand (#44723)

v9.36.4
Compare Source
Added

Added rawValue to Database Query Builder (and Eloquent as wrapper) (#44631)
Added TransactionCommitting (#44608)
Added dontIncludeSource to CliDumper and HtmlDumper (#44623)
Added Illuminate/Filesystem/FilesystemAdapter::checksum() (#44660)
Added handlers for silently discarded and missing attribute violations (#44664)

Reverted

Reverted "Let MustVerifyEmail to be used on models without id as primary key" (#44672)

Changed

Create new Json ParameterBag Instance when cloning Request (#44671)
Prevents booting providers when running env:decrypt (#44654)

v9.36.3
Compare Source
Reverted

Reverts micro-optimization on view events (#44653)

Fixed

Fixes blade not forgetting compiled views on view:clear (#44643)
Fixed Illuminate/Database/Eloquent/Model::offsetExists() (#44642)
Forget component's cache and factory between tests (#44648)

Changed

Bump Testbench dependencies (#44651)

v9.36.2
Compare Source
Fixed

Ensures view creators and composers are called when * is present (#44636)

v9.36.1
Compare Source
Fixed

Fixes livewire components that were using createBladeViewFromString (#pull)

v9.36.0
Compare Source
Added

Added mailable assertions (#44563)
Added Illuminate/Testing/TestResponse::assertContent() (#44580)
Added to Illuminate/Console/Concerns/InteractsWithIO::alert() $verbosity param (#44614)

Optimization

Makes blade components blazing fast (#44487)

Fixed

Fixed Illuminate/Filesystem/Filesystem::relativeLink() (#44519)
Fixed for model:show failing with models that have null timestamp columns (#44576)
Allow Model::shouldBeStrict(false) to disable "strict mode" (#44627)

Changed

Dont require a host for sqlite connections in php artisan db (#44585)
Let MustVerifyEmail to be used on models without id as primary key (#44613)
Changed Illuminate/Routing/Route::controllerMiddleware() (#44590)

v9.35.1
Compare Source
Fixed

Remove check for $viewFactory->exists($component) in Illuminate/View/Compilers/ComponentTagCompiler::componentClass (7c6db00)

v9.35.0
Compare Source
Added

Allow loading trashed models for resource routes (#44405)
Added Illuminate/Database/Eloquent/Model::shouldBeStrict() and other (#44283)
Controller middleware without resolving controller (#44516)
Alternative Mailable Syntax (#44462)

Fixed

Fix issue with aggregates (withSum, etc.) for pivot columns on self-referencing many-to-many relations (#44286)
Fixes issue using static class properties as blade attributes (#44473)
Traversable should have priority over JsonSerializable in EnumerateValues (#44456)
Fixed make:cast --inbound so it's a boolean option, not value (#44505)

Changed

Testing methods. Making error messages with json_encode more readable (#44397)
Have 'Model::withoutTimestamps()' return the callback's return value (#44457)
only load trashed models on relevant routes (#44478)
Adding additional PHP extensions to shouldBlockPhpUpload Function (#44512)
Register cutInternals casters for particularly noisy objects (#44514)
Use get methods to access application locale (#44521)
return only on non empty response from channels (09d53ee, 3944a3e)
Correct channel matching (#44531)
Migrate mail components (#44527)

v9.34.0
Compare Source
Added

Short attribute syntax for Self Closing Blade Components (#44413)
Adds support for PHP's BackedEnum to be "rendered" on blade views (#44445)

Fixed

Fixed Precognition headers for Symfony responses (#44424)
Allow to create databases with dots (#44436)
Fixes dd source on windows (#44451)

Changed

Adds error output to db command when missing host (#44394)
Changed Illuminate/Database/Schema/ForeignIdColumnDefinition::constrained() (#44425)
Allow maintenance mode events to be listened to in closure based listeners (#44417)
Allow factories to recycle multiple models of a given typ (#44328)
Improves dd clickable link on multiple editors and docker environments (#44406)

v9.33.0
Compare Source
Added

Added Illuminate/Support/Testing/Fakes/MailFake::cc() (#44319)
Added Ignore Case of Str::contains and Str::containsAll to Stringable contains and containsAll (#44369)
Added missing morphs methods for the ULID support (#44364)
Introduce Laravel Precognition (#44339)
Added Illuminate/Routing/Route::flushController() (#44386)

Fixed

Fixes memory leak on PHPUnit's Annotations registry (#44324, #44336)
Fixed Illuminate/Filesystem/FilesystemAdapter::url() with config prefix (#44330)
Fixed the "Implicit conversion from float to int loses precision" error in Timebox Class (#44357)

Changed

Improves dd source on compiled views (#44347)
Only prints source on dd calls from dump.php (#44367)
Ensures a Carbon version that supports PHP 8.2 (#44374)

v9.32.0
Compare Source
Added

New env:encrypt and env:decrypt commands (#44034)
Share WithoutOverlapping key across jobs (#44227)
Add missing citext type mapping to Illuminate/Database/Console/DatabaseInspectionCommand::$typeMappings (#44237)
Short attribute syntax for Blade Components (#44217)
Adds source file to dd function output (#44211)
Add methods to get request data as integer or float (#44239)
Adds Eloquent User Provider query handler (#44226)
Added Illuminate/Support/Testing/Fakes/BusFake::dispatchFakeBatch() (#44176)
Added methods to cast Stringables (#44238)
Added Illuminate/Routing/UrlGenerator::withKeyResolver() (#44254)
Add a hook to the serialisation of collections (#44272)
Allow enum route bindings to have default values (#44255)
Added benchmark utility class (b4293d7, #44297)
Added Illuminate/Console/Scheduling/ManagesFrequencies::everyOddHour() (#44288)

Fixed

Fix incrementing string keys (#44247)
Fix bug in Fluent Class with named arguments in migrations (#44251)
Fix "about" command caching report (#44305)
Fixes memory leaks (#44306, #44307)

Changed

Patch for timeless timing attack vulnerability in user login (#44069)
Refactor: register commands in artisan service (#44257)
Allow factories to recycle models with for method (#44265)
Use dedicated method for placeholder replacement in validator (#44296)

v9.31.0
Compare Source
Added

Added unique deferrable initially deferred constants for PostgreSQL (#44127)
Request lifecycle duration handler (#44122)
Added Model::withoutTimestamps(...) (#44138)
Added manifestHash function to Illuminate\Foundation\Vite (#44136)
Added support for operator <=> in /Illuminate/Collections/Traits/EnumeratesValues::operatorForWhere() (#44154)
Added that Illuminate/Database/Connection::registerDoctrineType() can accept object as well as classname for new doctrine type (#44149)
Added Fake Batches (#44104, #44173)
Added Model::getAppends() (#44180)
Added missing Str::wrap() static method (#44207)
Added require symfony/uid (#44202)
Make Vite macroable (#44198)

Fixed

Async fix in Illuminate/Http/Client/PendingRequest (#44179)
Fixes artisan serve command with PHP_CLI_SERVER_WORKERS environment variable (#44204)
Fixed InteractsWithDatabase::castAsJson($value) incorrectly handles SQLite Database (#44196)

Changed

Improve Blade compilation exception messages (#44134)
Improve test failure output (#43943)
Prompt to create MySQL db when migrating (#44153)
Improve UUID and ULID support for Eloquent (#44146)

v9.30.1
Compare Source
Added

Allow using a model instance in place of nested model factories (#44107)
Added UUID and ULID support for Eloquent (#44074)
Implement except method for fake classes to define what should not be faked (#44117)
Added interacts with queue middleware to send queued mailable (#44124)
Added new exception string to Illuminate/Database/DetectsLostConnections (#44121)

Fixed

Fixed BC from Passing event into viaQueue and viaConnection of Queued Listener (#44137)

Changed

Enhance column modifying (#44101)
Allow to define which jobs should be actually dispatched when using Bus::fake (#44106)

v9.30.0
Compare Source
Added

Added stop_buffering config option to logger (#44071)
Added read-only filesystem adapter decoration as a config option (#44079)
Added scoped filesystem driver (#44105)
Add force option to all make commands (#44100)

Fixed

Fixed QueryBuilder whereNot with array conditions (#44083)

Changed

Passing event into viaQueue and viaConnection of Queued Listener (#44080)
Improve testability of batched jobs (#44075)
Allow any kind of whitespace in cron expression (#44110)

v9.29.0
Compare Source
Added

Added RequiredIfAccepted validation rule (#44035)
Added Illuminate/Foundation/Vite::assetPath() (#44037)
Added ability to discard Eloquent Model changes (#43772)
Added ability to determine if attachments exist to Illuminate/Mail/Mailable (#43967)
Added Illuminate/Support/Testing/Fakes/BusFake::assertNothingBatched() (#44056)

Reverted

Reverted Fixed RoueGroup::merge to format merged prefixes correctly. (#44072)

Fixed

Avoid Passing null to parameter exception on PHP 8.1 (#43951)
Align Remember Me Cookie Duration with CookieJar expiration (#44026)
Fix Stringable typehints with Enumerable (#44030)
Fixed middleware "SetCacheHeaders" with file responses (#44063)

Changed

Don't use locks for queue job popping for PlanetScale's MySQL-compatible Vitess engine (#44027)
Avoid matching 'use' in custom Stub templates in Illuminate/Console/GeneratorCommand.php (#44049)

v9.28.0
Compare Source
Added

Added view data assertions to TestView (#43923)
Added Illuminate/Routing/Redirector::getIntendedUrl() (#43938)
Added Eloquent mode to prevent prevently silently discarding fills for attributes not in $fillable (#43893)
Added Illuminate/Testing/PendingCommand::assertOk() (#43968)
Make Application macroable (#43966)
Introducing Signal Traps (#43933)
Allow registering instances of commands (#43986)
Support Enumerable in Stringable (#44012)

Fixed

Fixed RoueGroup::merge to format merged prefixes correctly. (#44011)
Fixes providesTemporaryUrls on AwsS3V3Adapter (#44009)
Fix ordering of stylesheets when using @vite (#43962)

Changed

Allow invokable rules to specify custom messsages (#43925)
Support objects like GMP for custom Model casts (#43959)
Default 404 message on denyAsNotFound (#43901)
Changed Illuminate/Container/Container::resolvePrimitive() for isVariadic() (#43985)
Allow validator messages to use nested arrays (#43981)
Ensure freezeUuids always resets UUID creation after exception in callback (#44018)

v9.27.0
Compare Source
Added

Add getter and setter for connection in the DatabaseBatchRepository class (#43869)

Fixed

Fix for potential bug with non-backed enums (#43842)
Patch nested array validation rule regression bug (#43897)
Fix registering event listeners with array callback (#43890)

Changed

Explicitly add column name to SQLite query in Illuminate/Database/Console/DatabaseInspectionCommand::getSqliteTableSize() (#43832)
Allow broadcast on demand notifications (d2b1446)
Make Vite::hotFile() public (#43875)
Prompt to create sqlite db when migrating (#43867)
Call prepare() on HttpException responses (#43895)
Make the model:prune command easier to extend (#43919)

v9.26.1
Compare Source
Revert

Revert "[9.x] Add statusText for an assertion message" (#43831)

Fixed

Fixed withoutVite (#43826)

v9.26.0
Compare Source
Added

Adding support for non-backed enums in Models (#43728)
Added vite asset url helpers (#43702)
Added Authentication keyword for SqlServerConnector.php (#43757)
Added support for additional where* methods to route groups (#43731)
Added min_digits and max_digits validation (#43797)
Added closure support to dispatch conditionals in bus (#43784)
Added configurable paths to Vite (#43620)

Fixed

Fix unique lock release for broadcast events (#43738)
Fix empty collection class serialization (#43758)
Fixes creation of deprecations channel (#43812)

Changed

Improve display of failures for assertDatabaseHas (#43736)
Always use the write PDO connection to read the just stored pending batch in bus (#43737)
Move unique lock release to method (#43740)
Remove timeoutAt fallback from Job base class (#43749)
Convert closures to arrow functions (#43778)
Use except also in Illuminate/Routing/Middleware/ValidateSignature::handle() (e554d47)
Adjust forever time for cookies (#43806)
Make string padding UTF-8 safe (f1762ed)

v9.25.1
Compare Source
Fixes

Fixed typos

v9.25.0
Compare Source
Added

Added whenNotExactly to Stringable (#43700)
Added ability to Model::query()->touch() to mass update timestamps (#43665)

Fixed

Prevent error in db/model commands when using unsupported columns (#43635)
Fixes ensureDependenciesExist runtime error (#43626)
Null value for auto-cast field caused deprication warning in php 8.1 (#43706)
db:table command properly handle table who doesn't exist (#43669)

Changed

Handle assoc mode within db commands (#43636)
Allow chunkById on Arrays, as well as Models (#43666)
Allow for int value parameters to whereMonth() and whereDay() (#43668)
Cleaning up old if-else statement (#43712)
Ensure correct 'integrity' value is used for css assets (#43714)

v9.24.0
Compare Source
Added

New db:show, db:table and db:monitor commands (#43367)
Added validation doesnt_end_with rule (#43518)
Added Illuminate/Database/Eloquent/SoftDeletes::restoreQuietly() (#43550)
Added mergeUnless to resource ConditionallyLoadsAttributes trait (#43567)
Added Illuminate/Support/Testing/Fakes/NotificationFake::sentNotifications() (#43558)
Added implode to Passthru in Illuminate/Database/Eloquent/Builder.php (#43574)
Make Config repository macroable (#43598)
Add whenNull to ConditionallyLoadsAtrribute trait (#43600)
Extract child route model relationship name into a method (#43597)

Revert

Reverted Added whereIn to  Illuminate/Routing/RouteRegistrar::allowedAttributes (#43523)

Fixed

Fix unique locking on broadcast events (#43516)
Fixes the issue of running docs command on windows (#43566, #43585)
Fixes output when running db:seed or using --seed in migrate commands (#43593)

Changed

Gracefully fail when unable to locate expected binary on the system for artisan docs command (#43521)
Improve output for some Artisan commands (#43547)
Alternative database name in Postgres DSN, allow pgbouncer aliased databases to continue working on 9.x (#43542)
Allow @class() for component tags (#43140)
Attribute Cast Performance Improvements (#43554)
Queue worker daemon should also listen for SIGQUIT (#43607)
Keep original keys when using Collection->sortBy() with an array of sort operations (#43609)

v9.23.0
Compare Source
Added

Added whereNot method to Fluent JSON testing matchers (#43383)
Added deleteQuietly method to Model and use arrow func for related methods (#43447)
Added conditionable trait to Filesystem adapters (#43450)
Introduce artisan docs command (#43357)
Added Support CSP nonce, SRI, and arbitrary attributes with Vite (#43442)
Support conditionables that get condition from target object (#43449)
Added whereIn to  Illuminate/Routing/RouteRegistrar::allowedAttributes (#43509)

Fixed

Prevent redis crash when large number of jobs are scheduled for a specific time (#43310)

Changed

Make Command components Factory extensible (#43439)
Solve Blade component showing quote formatted for the console (#43446)
Improves output capture from serve command (#43461)
Allow terser singleton bindings (#43469)

v9.22.1
Compare Source
Added

Added unique locking to broadcast events (#43416)

Fixed

Fixes Artisan serve command on Windows (#43437)

v9.22.0
Compare Source
Added

Added ability to attach an array of files in MailMessage (#43080)
Added conditional lines to MailMessage (#43387)
Add support for multiple hash algorithms to Illuminate/Filesystem/Filesystem::hash() (#43407)

Fixed

Fixes for model:show when attribute default is an enum (#43370)
Fixed DynamoDB locks with 0 seconds duration (#43365)
Fixed overriding global locale (#43426)

Changed

Round milliseconds in console output runtime (#43400)
Improves serve Artisan command (#43375)

v9.21.6
Compare Source
Revert

Revert "Protect against ambiguous columns" (#43362)

Fixed

Fixes default attribute value when using enums on model:show (#43360)

v9.21.5
Compare Source
Added

Adds fluent File validation rule (#43271)

Revert

Revert "Prevent double throwing chained exception on sync queue" (#43354)

Changed

Allow section payload to be lazy in the "about" command (#43329)

v9.21.4
Compare Source
Added

Added Illuminate/Filesystem/FilesystemAdapter::supportsTemporaryUrl() (#43317)

Fixed

Fixes confirm component default value (#43334)

Changed

Improves console output when command not found (#43323)

v9.21.3
Compare Source
Fixed

Fixes usage of Migrator without output (#43326)

v9.21.2
Compare Source
Fixed

Fixes queue:monitor command dispatching QueueBusy (#43320)
Ensure relation names are properly "snaked" in JsonResource::whenCounted() method (#43322)
Fixed Bootstrap 5 pagination (#43319)

v9.21.1
Compare Source
Added

Added "Logs" driver to the about command (#43307)
Allows to install doctrine/dbal from model:show command (#43288)
Added to stub publish command flag that restricts to only existing files (#43314)

Fixed

Fixes for model:show command (#43301)

Changed

Handle varying composer -V output (#43286)
Replace resolve() with app() for Lumen compatible (#43312)
Allow using backed enums as route parameters (#43294)

v9.21.0
Compare Source
Added

Added inspiring quote (#43180, #43189)
Introducing a fresh new look for Artisan (#43065)
Added whenCounted to JsonResource (#43101)
Artisan model:show command (#43156)
Artisan about Command (#43147, 51b5eda, #43225, #43276)
Adds enum casting to Request (#43239)

Revert

Revert "Fix default parameter bug in routes" (#43208)
Revert route change PR (#43255)

Fixed

Fix transaction attempts counter for sqlsrv (#43176)

Changed

Make assertDatabaseHas failureDescription more multibyte character friendly (#43181)
ValidationException summarize only when use strings (#43177)
Improve mode function in collection (#43240)
clear Facade resolvedInstances in queue worker resetScope callback (#43215)
Improves queue:work command (#43252)
Remove null default attributes names when UPDATED_AT or CREATED_AT is null at Model::replicate (#43279)
Protect against ambiguous columns (#43278)
Use readpast query hint instead of holdlock for sqlsrv database queue (#43259)
Vendor publish flag that restricts to only existing files (#43212)

v9.20.0
Compare Source
Added

Added quote from Mustafa Kemal Atatürk (#43022)
Allow Collection random() to accept a callable (#43028)
Added Str::inlineMarkdown() (#43126)
Allow authorization responses to specify HTTP status codes (#43097)
Added required directive (#43103)
Added replicateQuietly to Model (#43141)
Added ignore param to ValidateSignature middleware (#43160)

Fixed

Fixed forceCreate on MorphMany not returning newly created object (#42996)
Fixed missing return in Illuminate/Mail/Attachment::fromStorageDisk() (#43023)
Fixed inconsistent content type when using ResponseSequence (#43051)
Prevent double throwing chained exception on sync queue (#42950)
Avoid matching multi-line imports in GenerateCommand stub templates (#43093)

Changed

Disable Column Statistics for php artisan schema:dump on MariaDB (#43027)
Bind a Vite Null Object to the Container instead of a Closure in Illuminate/Foundation/Testing/Concerns/InteractsWithContainer::withoutVite() (#43040)
Early return when message format is the default in Illuminate/Support/MessageBag::transform() (#43149)

v9.19.0
Compare Source
Added

Add new allowMaxRedirects method to PendingRequest (#42902)
Add support to detect dirty encrypted model attributes (#42888)
Added Vite (#42785)

Fixed

Fixed bug on forceCreate on a MorphMay relationship not including morph type (#42929)
Fix default parameter bug in routes (#42942)
Handle cursor paginator when no items are found (#42963)
Fix undefined constant error when use slot name as key of object (#42943)
Fix BC break for Log feature tests (#42987)

Changed

Allow instance of Enum pass Enum Rule (#42906)

v9.18.0
Compare Source
Added

Improve file attachment for mail and notifications (#42563)
Introduce Invokable validation classes (#42689)
Predis v2.0 (#42577)
Added Illuminate/View/Compilers/Concerns/CompilesConditionals::compileReadonly() (#42717)
Apply where's from union query builder in cursor pagination (#42651)
Added ability to define "with" relations as a nested array (#42690)
Added ability to set backoff in broadcast events (#42737)
Added host(), httpHost(), schemeAndHttpHost() to Request (#42797)
Allow invokable rules to push messages to nested (or other) attributes (#42801)
Adds compilePushIf and compileEndpushIf functions to View compiler (#42762)
Added: Allow removing token during tests (#42841)
Added predefined_constants to reservedNames array in Illuminate/Console/GeneratorCommand (#42832)
Handle collection creation around a single enum (#42839)
Allow for nullable morphs in whereNotMorphedT (#42878)
Introduce a fake() helper to resolve faker singletons, per locale (#42844)
Allow handling cumulative query duration limit per DB connection (#42744)
Add invokable option to make rule command (#42742)

Fixed

Fix deprecation error in the route:list command (#42704)
Fixed Request offsetExists without routeResolver (#42754)
Fixed: Loose comparison causes the value not to be saved (#42793)
Fixed: Fix database session driver keeps resetting CSRF token (#42782)
Fixed: Arr::map - Fix map-by-reference w/ built-ins (#42815)
Fixed league/flysystem suggest (#42872)

Changed

Start session in TestResponse to allow marshalling of error bag from JSON (#42710)
Rename methods in Illuminate/Broadcasting/BroadcastManager (753e9fd)
Avoid throwing on invalid mime-type in Illuminate/Filesystem/FilesystemAdapter::mimeType() (#42761)
Do not resolve already set headers in Illuminate/Filesystem/FilesystemAdapter (#42760)
Standardise invokable rule translation functionality (#42873)
Clear cast cache when setting attributes using arrow (#42852)

v9.17.0
Compare Source
Added

Added Illuminate/Database/Eloquent/Builder::withoutEagerLoad() (#42641)
Allow random string generation to be controlled (#42669)
Adds doesnt_start_with validation (#42683, de35bf2)
Added quarterlyOn cron schedule frequency command (#42692)

Fixed

Free reserved memory before handling fatal errors (#42630, #42646)
Prevent $mailer being reset when testing mailables that implement ShouldQueue (#42695)
Added checks for Pusher 7.1 preps (#42632)
Fixed grouping for user authorization (#42664)

Changed

Allow assertions against pushed string based pushed jobs (#42676)

v9.16.0
Compare Source
Added

Added Eloquent withWhereHas method (#42597)
User authentication for Pusher (#42531)
Added additional uuid testing helpers (#42619)

Fixed

Fix queueable notification's ID overwritten (#42581)
Handle undefined array key error in route (#42606)

Deprecated

Illuminate/Routing/Redirector::home() (#42600)

v9.15.0
Compare Source
Added

Added --only-vendor option to route:list command (#42549)
Added Illuminate/Http/Client/PendingRequest::throwUnless() (#42556)
Added Illuminate/Support/Str::isJson() (#42545)
Added Illuminate/Filesystem/Filesystem::isEmptyDirectory() (#42559)
Added Add counts to route:list command (#42551)
Support kebab case for slot name shortcut (#42574)

Revered

Revert digits changes in validation (c113768, #42562)

Fixed

Fix getting '0' from route parameter in Authorize middleware (#42582)

Changed

Retain the original attribute value during validation of an array key with a dot for correct failure message (#42395)
Allow bootable test traits to teardown (#42521)
Pass thrown exception to $sleepMilliseconds closure in retry helper (#42532)
Make HasTimestamps::updateTimestamps chainable (#42533)
Remove meaningless parameter in Illuminate/View/Concerns/ManagesEvents (#42546)
Map integer parameter to parameter name when resolving binding field (#42571)
Conditionable should return HigherOrderWhenProxy only when the args number is exactly 1 (#42555)

v9.14.1
Compare Source
Added

Model::whereRelation add callback function (#42491)
Add Conditionable Trait to Illuminate\Support\Carbon (#42500)

Fixed

Fix afterCommit and DatabaseTransactions (#42502)
Fixed regression when only some route parameters are scoped (#42517)

v9.14.0
Compare Source
Added

Added ability to add table comments for MySQL and Postgres (#42401)
Added dynamic trashed factory state (#42414)
Added Illuminate/Collections/Arr::prependKeysWith() (#42448)
Added bootable traits to TestCase (#42394)

Fixed

Fix clone issue on updateOrCreate and firstOrCreate (#42434)
Prevent

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

⚠ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:
File name: composer.lock
Command failed: docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/renovate/repos/github/renovate-reproductions/laravel-realworld-example-app":"/tmp/renovate/repos/github/renovate-reproductions/laravel-realworld-example-app" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -v "/tmp/containerbase":"/tmp/containerbase" -e COMPOSER_CACHE_DIR -e COMPOSER_AUTH -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/renovate/repos/github/renovate-reproductions/laravel-realworld-example-app" docker.io/renovate/sidecar bash -l -c "install-tool php 8.1.12 && install-tool composer 2.4.4 && composer update laravel/framework --with-dependencies --ignore-platform-reqs --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins"
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework 9.x-dev requires symfony/http-foundation ^6.0 -> found symfony/http-foundation[v6.0.0-BETA1, ..., 6.2.x-dev] but these were not loaded, likely because it conflicts with another require.
    - laravel/framework[v9.0.0-beta.1, ..., v9.22.1] require symfony/console ^6.0 -> found symfony/console[v6.0.0-BETA1, ..., 6.2.x-dev] but these were not loaded, likely because it conflicts with another require.
    - laravel/framework[v9.23.0, ..., v9.33.0] require symfony/console ^6.0.3 -> found symfony/console[v6.0.3, ..., 6.2.x-dev] but these were not loaded, likely because it conflicts with another require.
    - laravel/framework[v9.34.0, ..., v9.37.0] require symfony/console ^6.0.9 -> found symfony/console[v6.0.9, ..., 6.2.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires laravel/framework ^9.0 -> satisfiable by laravel/framework[v9.0.0-beta.1, ..., 9.x-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.


Solve factory_girl changes

Summary
Factory_girl gem changes it name to Factory_bot, I've fix all problem caused by this issue
Other Information
All tests that will use factory must use FactoryBot

Coverage remained the same at 0.0% when pulling 674d6b890fe9beccd65c8c3d29de183dac49e3e2 on marceloperini:master into 4dc6f69a9df9cbbf62ee3b24fa1a7812be45f54c on gorails:master.

Coverage remained the same at 0.0% when pulling 0635d224b5571c1da5d1d1ed5e89dc491e06df61 on marceloperini:master into 25efa3142063886eefe83806e097d2b83828ed73 on gorails:master.

Coverage remained the same at 0.0% when pulling 8a1cd6dd488f54e99463dc8e144fdeef37cdd2c1 on marceloperini:master into 25efa3142063886eefe83806e097d2b83828ed73 on gorails:master.

Coverage remained the same at 0.0% when pulling d77dab5fa04fe764f4f86e94033772aa70b981b7 on marceloperini:master into f4d7e667f8e0335fd7bf02bd97dc27c3f13cb4c7 on gorails:master.


form validation trigger [v5.2.3]

Is there any way to trigger form validation manually? For example when I click some button inside a form.

Unfortunately there is no API to do this. However, it is possible to achieve this with a hack. When the form is submitted, the validation is run. You change manually call handleSubmit with a noop callback to trigger the validation.
// Create a validation handler
const handleValidation = () => handleSubmit(() => {})

// Once clicked, this button will trigger the validation
<Button onClick={handleValidation}>Validate</Button>

I tried touchAll and for some reason it doesn't help.

Sync validation happens automatically with every value change, so you can't "trigger it".
You will need to share more of your code, or make a small example, for us to help better.

It's ok, thank you.

Hi @ooflorent, found your hack.  Was this intended to somehow not also run the form submission if validation passes? Using what you have worked great for running the validation when i wanted, but ends up submitting the form preemptively.  Is there a way to interrupt this?


Fix word order error in docs/pro/index.rst

The words "SSL" and "problems" were in the wrong order, in the paragraph about SSL issues (#145).

Thanks


[SPARK-37444][SQL] ALTER NAMESPACE ... SET LOCATION should handle empty location consistently across v1 and v2 command

What changes were proposed in this pull request?

Currently, there is an inconsistency when handling an empty location for ALTER NAMESPACE .. SET LOCATION between v1 and v2 command. In v1 command, an empty string location will result in the IllegalArgumentException exception thrown whereas v2 uses the empty string as it is.
This PR proposes to make the behavior consistent by following the v1 command behavior.
Why are the changes needed?

To make the behavior consistent and the reason for following v1 behavior is that "Spark should be responsible to qualify the user-specified path using its spark/hadoop configs, before passing the path to v2 sources": https://github.com/apache/spark/pull/34610#discussion_r754028045
Does this PR introduce any user-facing change?

Yes, now the empty string location will result in the IllegalArgumentException exception thrown even for v2 catalogs.
How was this patch tested?

Added a new test

Test build #145525 has started for PR 34686 at commit 28ce116.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49997/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49997/

cc: @cloud-fan (GA test failure is from org.apache.spark.sql.jdbc.DB2KrbIntegrationSuite)

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49997/

Test build #145525 has finished for PR 34686 at commit 28ce116.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class AlterDatabaseSetLocationCommand(databaseName: String, location: URI)

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145525/

Test build #145565 has started for PR 34686 at commit 8c0a8c9.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50037/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50037/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50037/

Test build #145570 has started for PR 34686 at commit 068473f.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50042/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50042/

Test build #145565 has finished for PR 34686 at commit 8c0a8c9.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class AlterDatabaseSetLocationCommand(databaseName: String, location: String)
class DataSourceV2Strategy(session: SparkSession) extends Strategy

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50042/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145565/

Test build #145570 has finished for PR 34686 at commit 068473f.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
class DataSourceV2Strategy(session: SparkSession) extends Strategy with PredicateHelper

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145570/

thanks, merging to master!


[#271] Properly handle multiple client IP addresses

This PR makes the following changes:

it adds a call to split(',') from the string returned by AWS "checkip".

I tested this PR by adding a unit test for the function responsible for making the HTTP request to "checkip". The acceptance tests were not executed.
Fixes #271

Thanks, @nchammas. I've also learned from your code in the past. Flintrock was the first project I saw using type annotations for Python, I didn't know they even existed.
I agree with your precautions, specially about the order of the IPs.
In addition, I'd like to thank you for this great project. It has been very useful for my team.

@nchammas, I'm closing this PR in favor of #277, which just replaces the protocol.


🐛 Fix parameterless Depends() with generics

Previously, using parameterless Depends() in a generic context would bind the dependency to the first encountered concrete type.
Fixes #9450.

Looking forward to this fix. I want to use code from #9450 as example to implement injection of contollers in my project

Hi @nzig, I've been watching this pr all month. And I'm already beginning to think that if it will be put in, it will not happen very soon. But it's a very cool fix, which will allow to write less monotonous code for your classes. Maybe it's possible to do something to get this pr accepted faster?

@9en9i That's up to @tiangolo. He's the only one that can merge PRs.

@tiangolo hi, is it possible that this bug fix request will ever be accepted?

@Kludex @JarroVGIT @jgould22 @ycd Perhaps one of you can somehow contribute to the promotion of this pull request? This request fixes a feature that was added a little less than a year ago, and it would be nice to get full functionality.

@tiangolo hi! This is a very cool feature that makes the code more readable and clean. Should we hope for its will be accepted?

Thanks @nzig! :rocket:
And thanks everyone for the discussion. :coffee:
This will be available in the next hours in FastAPI 0.110.1 :tada:


feat(esl-toggleable): ESLToggleableDispatcher migrated to use ESLEventListener

BREAKING-CHANGE: all inherited components of ESLToggleableDispatcher should use @listen to properly override superclass methods

:tada: This PR is included in version 4.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket: