From 4e25f431a8ab450d252ed9f4f23bd64800d379d6 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 25 Apr 2024 03:42:23 -0400 Subject: [PATCH] Fix a mistake in the docstring of `sem` (#917) * Fix a mistake in the docstring of `sem` * Pass the Codecov token as an input (instead of an environment variable) * Codecov: set `fail_ci_if_error` to `false` iff the PR is from a fork * Whitespace --- .github/workflows/ci.yml | 18 +++++++++++++++--- src/scalarstats.jl | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74e4c14c..c3dd3057 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,9 +38,21 @@ jobs: - uses: codecov/codecov-action@v4 with: file: lcov.info - fail_ci_if_error: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # This is a public repo. + # We are using v4 of the codecov-action. + # If the PR is from a fork, then Codecov allows us to use + # tokenless Codecov uploads. + # If the PR is not from a fork, then Codecov does not allow + # us to use tokenless Codecov uploads, and thus we must use + # the token. + # Tokenless Codcov uploads are prone to random failures, + # due to Codecov's servers hitting GitHub rate limits. + # Therefore: + # 1. If this CI run is not a PR run, we set `fail_ci_if_error` to `true`. + # 2. If this CI run is a PR run and the PR is not from a fork, we set `fail_ci_if_error` to `true`. + # 3. If this CI run is a PR run and the PR is from a fork, we set `fail_ci_if_error` to `false`. + fail_ci_if_error: ${{ (github.event_name != 'pull_request') || (github.repository == github.event.pull_request.head.repo.full_name) }} + token: ${{ secrets.CODECOV_TOKEN }} docs: permissions: contents: write diff --git a/src/scalarstats.jl b/src/scalarstats.jl index 319d3129..1671bd01 100644 --- a/src/scalarstats.jl +++ b/src/scalarstats.jl @@ -431,7 +431,7 @@ Return the standard error of the mean for a collection `x`. A pre-computed `mean` may be provided. When not using weights, this is the (sample) standard deviation -divided by the sample size. If weights are used, the +divided by the square root of the sample size. If weights are used, the variance of the sample mean is calculated as follows: * `AnalyticWeights`: Not implemented.