Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update-docs final version guard #26719

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

hugokerstens
Copy link
Contributor

@hugokerstens hugokerstens commented Jun 18, 2024

References to other Issues or PRs

In #26688 it was noted that the guard that should not push non-final version to the public docs was not working. This fixes that.

Brief description of what is fixed or changed

The guard that prevents non-final versions to be pushed to the public docs is not working. This is due to accidentally using github.env.xxx instead of env.xxx. This PR updates the guard.

Other comments

Release Notes

NO ENTRY

@sympy-bot
Copy link

sympy-bot commented Jun 18, 2024

Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

  • No release notes entry will be added for this pull request.
Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
In #26688 it was noted that the guard that should not push non-final version to the public docs was not working. This fixes that.

<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->


#### Brief description of what is fixed or changed
The guard that prevents non-final versions to be pushed to the public docs is not working. This is due to accidentally using [`github.env.xxx`](https://docs.github.com/en/actions/learn-github-actions/contexts#:~:text=github.env) instead of `env.xxx`. This PR updates the guard.

#### Other comments


#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers. Formerly, `log(-x)` incorrectly gave `-log(x)`.

* physics.units
  * Corrected a semantical error in the conversion between volt and statvolt which
    reported the volt as being larger than the statvolt.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
NO ENTRY
<!-- END RELEASE NOTES -->

@hugokerstens
Copy link
Contributor Author

Apparently the env context is not available for jobs.<job_id>.if: https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability

A dirty fix would be to set the guard on the if of the final step, as env is available for jobs.<job_id>.steps.if.

@oscarbenjamin
Copy link
Collaborator

Apparently the env context is not available for jobs.<job_id>.if:

According to the docs it has the github, needs, vars, inputs contexts and we are using the github context so should that not work?

The change here is to use env instead of github which seems like it definitely wouldn't work according to the docs.

@hugokerstens
Copy link
Contributor Author

we are using the github context so should that not work?

The github.env variable has an entirely different meaning: it's a string containing the path to a file on the runner containing environment variables (source):

github.env. string. Path on the runner to the file that sets environment variables from workflow commands. This file is unique to the current step and is a different file for each step in a job.

There's not really a nice fix available. This issue comment suggests to use a dummy job that stores an output as a workaround, which I have now implemented.

Copy link

github-actions bot commented Jun 18, 2024

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

| Change   | Before [a36a8b23] <sympy-1.12.1^0>   | After [015e6a5b] <sympy-1.13.0rc2^0>   |   Ratio | Benchmark (Parameter)                                                |
|----------|--------------------------------------|----------------------------------------|---------|----------------------------------------------------------------------|
| -        | 68.5±0.6ms                           | 44.8±0.4ms                             |    0.65 | integrate.TimeIntegrationRisch02.time_doit(10)                       |
| -        | 68.0±0.9ms                           | 43.9±0.5ms                             |    0.65 | integrate.TimeIntegrationRisch02.time_doit_risch(10)                 |
| +        | 18.8±0.3μs                           | 30.5±0.4μs                             |    1.63 | integrate.TimeIntegrationRisch03.time_doit(1)                        |
| -        | 5.25±0.01ms                          | 2.84±0.01ms                            |    0.54 | logic.LogicSuite.time_load_file                                      |
| -        | 72.5±0.3ms                           | 28.3±0.07ms                            |    0.39 | polys.TimeGCD_GaussInt.time_op(1, 'dense')                           |
| -        | 25.7±0.09ms                          | 17.0±0.1ms                             |    0.66 | polys.TimeGCD_GaussInt.time_op(1, 'expr')                            |
| -        | 72.0±0.3ms                           | 28.6±0.1ms                             |    0.4  | polys.TimeGCD_GaussInt.time_op(1, 'sparse')                          |
| -        | 256±1ms                              | 125±1ms                                |    0.49 | polys.TimeGCD_GaussInt.time_op(2, 'dense')                           |
| -        | 254±0.6ms                            | 124±0.4ms                              |    0.49 | polys.TimeGCD_GaussInt.time_op(2, 'sparse')                          |
| -        | 647±2ms                              | 372±1ms                                |    0.57 | polys.TimeGCD_GaussInt.time_op(3, 'dense')                           |
| -        | 651±4ms                              | 372±1ms                                |    0.57 | polys.TimeGCD_GaussInt.time_op(3, 'sparse')                          |
| -        | 497±6μs                              | 288±2μs                                |    0.58 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(1, 'dense')            |
| -        | 1.79±0.01ms                          | 1.06±0.01ms                            |    0.6  | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(2, 'dense')            |
| -        | 5.78±0.05ms                          | 3.09±0.03ms                            |    0.54 | polys.TimeGCD_LinearDenseQuadraticGCD.time_op(3, 'dense')            |
| -        | 449±7μs                              | 231±2μs                                |    0.52 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(1, 'dense')               |
| -        | 1.45±0.01ms                          | 685±3μs                                |    0.47 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(2, 'dense')               |
| -        | 4.87±0.03ms                          | 1.66±0.01ms                            |    0.34 | polys.TimeGCD_QuadraticNonMonicGCD.time_op(3, 'dense')               |
| -        | 374±0.9μs                            | 209±0.9μs                              |    0.56 | polys.TimeGCD_SparseGCDHighDegree.time_op(1, 'dense')                |
| -        | 2.41±0.03ms                          | 1.24±0ms                               |    0.51 | polys.TimeGCD_SparseGCDHighDegree.time_op(3, 'dense')                |
| -        | 9.91±0.07ms                          | 4.33±0.04ms                            |    0.44 | polys.TimeGCD_SparseGCDHighDegree.time_op(5, 'dense')                |
| -        | 358±2μs                              | 171±0.8μs                              |    0.48 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(1, 'dense')            |
| -        | 2.45±0.02ms                          | 911±20μs                               |    0.37 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(3, 'dense')            |
| -        | 9.61±0.02ms                          | 2.65±0.04ms                            |    0.28 | polys.TimeGCD_SparseNonMonicQuadratic.time_op(5, 'dense')            |
| -        | 1.02±0.01ms                          | 431±5μs                                |    0.42 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(3, 'dense')           |
| -        | 1.73±0.01ms                          | 516±2μs                                |    0.3  | polys.TimePREM_LinearDenseQuadraticGCD.time_op(3, 'sparse')          |
| -        | 5.93±0.09ms                          | 1.82±0.02ms                            |    0.31 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(5, 'dense')           |
| -        | 8.44±0.1ms                           | 1.52±0.01ms                            |    0.18 | polys.TimePREM_LinearDenseQuadraticGCD.time_op(5, 'sparse')          |
| -        | 287±1μs                              | 67.0±0.5μs                             |    0.23 | polys.TimePREM_QuadraticNonMonicGCD.time_op(1, 'sparse')             |
| -        | 3.43±0.02ms                          | 397±5μs                                |    0.12 | polys.TimePREM_QuadraticNonMonicGCD.time_op(3, 'dense')              |
| -        | 3.93±0.02ms                          | 282±0.7μs                              |    0.07 | polys.TimePREM_QuadraticNonMonicGCD.time_op(3, 'sparse')             |
| -        | 6.93±0.05ms                          | 1.29±0ms                               |    0.19 | polys.TimePREM_QuadraticNonMonicGCD.time_op(5, 'dense')              |
| -        | 8.61±0.09ms                          | 854±4μs                                |    0.1  | polys.TimePREM_QuadraticNonMonicGCD.time_op(5, 'sparse')             |
| -        | 5.02±0.04ms                          | 3.02±0.01ms                            |    0.6  | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(2, 'sparse') |
| -        | 12.1±0.1ms                           | 6.60±0.03ms                            |    0.55 | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(3, 'dense')  |
| -        | 22.5±0.2ms                           | 9.09±0.03ms                            |    0.4  | polys.TimeSUBRESULTANTS_LinearDenseQuadraticGCD.time_op(3, 'sparse') |
| -        | 5.23±0.02ms                          | 877±3μs                                |    0.17 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(1, 'sparse')    |
| -        | 12.7±0.07ms                          | 7.08±0.06ms                            |    0.56 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(2, 'sparse')    |
| -        | 100±0.9ms                            | 26.0±0.2ms                             |    0.26 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(3, 'dense')     |
| -        | 165±2ms                              | 54.1±0.1ms                             |    0.33 | polys.TimeSUBRESULTANTS_QuadraticNonMonicGCD.time_op(3, 'sparse')    |
| -        | 172±0.6μs                            | 112±1μs                                |    0.65 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(1, 'dense')      |
| -        | 356±1μs                              | 221±3μs                                |    0.62 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(1, 'sparse')     |
| -        | 4.30±0.03ms                          | 851±7μs                                |    0.2  | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(3, 'dense')      |
| -        | 5.21±0.08ms                          | 393±4μs                                |    0.08 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(3, 'sparse')     |
| -        | 19.8±0.06ms                          | 2.86±0.01ms                            |    0.14 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(5, 'dense')      |
| -        | 22.7±0.04ms                          | 648±10μs                               |    0.03 | polys.TimeSUBRESULTANTS_SparseGCDHighDegree.time_op(5, 'sparse')     |
| -        | 477±1μs                              | 139±0.4μs                              |    0.29 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(1, 'sparse') |
| -        | 4.58±0.06ms                          | 617±2μs                                |    0.13 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(3, 'dense')  |
| -        | 5.25±0.03ms                          | 141±1μs                                |    0.03 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(3, 'sparse') |
| -        | 13.3±0.2ms                           | 1.32±0.02ms                            |    0.1  | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(5, 'dense')  |
| -        | 13.7±0.05ms                          | 145±2μs                                |    0.01 | polys.TimeSUBRESULTANTS_SparseNonMonicQuadratic.time_op(5, 'sparse') |
| -        | 132±0.5μs                            | 75.4±0.1μs                             |    0.57 | solve.TimeMatrixOperations.time_rref(3, 0)                           |
| -        | 249±2μs                              | 90.2±0.9μs                             |    0.36 | solve.TimeMatrixOperations.time_rref(4, 0)                           |
| -        | 24.2±0.09ms                          | 10.2±0.01ms                            |    0.42 | solve.TimeSolveLinSys189x49.time_solve_lin_sys                       |
| -        | 28.2±0.2ms                           | 15.2±0.06ms                            |    0.54 | solve.TimeSparseSystem.time_linsolve_Aaug(20)                        |
| -        | 54.1±0.3ms                           | 25.3±0.3ms                             |    0.47 | solve.TimeSparseSystem.time_linsolve_Aaug(30)                        |
| -        | 27.8±0.2ms                           | 15.2±0.1ms                             |    0.55 | solve.TimeSparseSystem.time_linsolve_Ab(20)                          |
| -        | 53.7±0.1ms                           | 24.4±0.1ms                             |    0.45 | solve.TimeSparseSystem.time_linsolve_Ab(30)                          |

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

@oscarbenjamin
Copy link
Collaborator

On the release branch if you add yourself to .mailmap then you also need to update AUTHORS:

bin/mailmap_check.py --update-authors

@oscarbenjamin oscarbenjamin added CI Releasing Issues relating to the automated release scripts. Use milestones to block issues on a release. labels Jun 18, 2024
@oscarbenjamin
Copy link
Collaborator

Looks good. Thanks!

@oscarbenjamin oscarbenjamin merged commit 2810395 into sympy:1.13 Jun 18, 2024
60 checks passed
@oscarbenjamin
Copy link
Collaborator

Looks like this works:
https://github.com/sympy/sympy/actions/runs/9681838591

@hugokerstens hugokerstens deleted the update-docs-guard branch June 28, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Releasing Issues relating to the automated release scripts. Use milestones to block issues on a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants