Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aspect-build/rules_py
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.0
Choose a base ref
...
head repository: aspect-build/rules_py
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.2.0
Choose a head ref
  • 16 commits
  • 73 files changed
  • 9 contributors

Commits on Jan 17, 2025

  1. Fix py_test with nested target name (#485)

    Fixes #483
    keith authored Jan 17, 2025
    Configuration menu
    Copy the full SHA
    a01323e View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2025

  1. fix: propagate target_compatible_with to _py_env when creating a … (

    #438)
    
    Hi! 
    This fixes #437.
    
    This is my first issue so I'm not sure if this is the right thing to do.
    Tell me if this is good or you want me to change anything :)
    RoyShulman authored Jan 20, 2025
    Configuration menu
    Copy the full SHA
    c4aca6e View commit details
    Browse the repository at this point in the history
  2. chore: test on Bazel 8.0.0 (#478)

    Picks up bazel-contrib/.github#25
    
    Also test Bazel 8 on BCR presubmit.
    
    ---
    
    ### Changes are visible to end-users: no
    alexeagle authored Jan 20, 2025
    Configuration menu
    Copy the full SHA
    d49da0f View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2025

  1. fix: make py_binary#resolutions and py_test#resolutions identical. (#487

    )
    
    Closes #466
    
     - Make resolutions consistent between `py_binary` and `py_test`
     - Allow a list to be passed to `from_requirements`
     - Add an example of `virtual_deps` feature
    
    ---
    
    ### Changes are visible to end-users: yes
    
    - Searched for relevant documentation and updated as needed: yes
    - Breaking change (forces users to change their own code or config): no
    - Suggested release notes appear below: 
    
    > - Fix: Make resolutions consistent between `py_binary` and `py_test`
    > - Feature: Allow a list to be passed to `from_requirements`
    > - Docs:  Add an example of `virtual_deps` feature
    
    ### Test plan
    
    - Manual testing; please provide instructions so we can reproduce: Added
    an example
    njlr authored Jan 22, 2025
    Configuration menu
    Copy the full SHA
    66bc9be View commit details
    Browse the repository at this point in the history
  2. refactor(ci): re-enable testing against prior release artifacts (#496)

    May be useful to assert that coverage support is working, since we have
    a hard time compiling rust tools under --collect_code_coverage
    
    
    ---
    
    ### Changes are visible to end-users: no
    alexeagle authored Jan 22, 2025
    Configuration menu
    Copy the full SHA
    3c1a6c3 View commit details
    Browse the repository at this point in the history
  3. Fix py_image_layers tar options (#494)

    upstream bazel-contrib/bazel-lib#989 in
    `bazel-lib` released with `v2.10.0` now contain `--options
    gzip:!timestamp` by default.
    
    This leads to warnings when a downstream projects uses a recent version
    of `bazel-lib`.
    
    ---
    
    ### Changes are visible to end-users: no
    
    
    ### Test plan
    
    - Covered by existing test cases
    betaboon authored Jan 22, 2025
    Configuration menu
    Copy the full SHA
    82f445b View commit details
    Browse the repository at this point in the history
  4. feat: add coverage output to py_pytest_main (#492)

    If the user runs with coverage enabled, Bazel sets an environment
    variable pointing to the files to be instrumented. When that's present,
    attempt to import the coverage.py package, and use it to instrument and
    gather coverage, writing lcov directly. Note the user must provide the
    coverage.py package and it must be version 6.3 or greater, so that lcov
    reporting is built-in.
    
    Fixes #353
    
    Tested:
    
    `bazel test --collect_code_coverage --combined_report=lcov -s
    examples/pytest:pytest_test`
    alexeagle authored Jan 22, 2025
    Configuration menu
    Copy the full SHA
    5e07460 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2025

  1. chore(deps): update dependency aspect_bazel_lib to v2.10.0 (#482)

    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    |
    [aspect_bazel_lib](https://redirect.github.com/bazel-contrib/bazel-lib)
    | http_archive | minor | `v2.9.4` -> `v2.10.0` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>bazel-contrib/bazel-lib (aspect_bazel_lib)</summary>
    
    ###
    [`v2.10.0`](https://redirect.github.com/bazel-contrib/bazel-lib/releases/tag/v2.10.0)
    
    [Compare
    Source](https://redirect.github.com/bazel-contrib/bazel-lib/compare/v2.9.4...v2.10.0)
    
    #### Using Bzlmod with Bazel 6:
    
    1.  Enable with `common --enable_bzlmod` in `.bazelrc`.
    2.  Add to your `MODULE.bazel` file:
    
    ```starlark
    bazel_dep(name = "aspect_bazel_lib", version = "2.10.0")
    ```
    
    > Read more about bzlmod: <https://blog.aspect.dev/bzlmod>
    
    #### Using WORKSPACE
    
    Paste this snippet into your `WORKSPACE` file:
    
    ```starlark
    load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
    
    http_archive(
        name = "aspect_bazel_lib",
        sha256 = "7b39d9f38b82260a8151b18dd4a6219d2d7fc4a0ac313d4f5a630ae6907d205d",
        strip_prefix = "bazel-lib-2.10.0",
        url = "https://github.com/bazel-contrib/bazel-lib/releases/download/v2.10.0/bazel-lib-v2.10.0.tar.gz",
    )
    
    load("@&#8203;aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains")
    
    ### Required bazel-lib dependencies
    
    aspect_bazel_lib_dependencies()
    
    ### Register bazel-lib toolchains
    
    aspect_bazel_lib_register_toolchains()
    
    ```
    
    #### What's Changed
    
    - fix(tar): handle directories with spaces in name by
    [@&#8203;alexeagle](https://redirect.github.com/alexeagle) in
    [https://github.com/bazel-contrib/bazel-lib/pull/984](https://redirect.github.com/bazel-contrib/bazel-lib/pull/984)
    - feat: bats_test: add junit report to test results by
    [@&#8203;pjjw](https://redirect.github.com/pjjw) in
    [https://github.com/bazel-contrib/bazel-lib/pull/982](https://redirect.github.com/bazel-contrib/bazel-lib/pull/982)
    - docs: Update jq docs to show correct escaping by
    [@&#8203;ChrisChinchilla](https://redirect.github.com/ChrisChinchilla)
    in
    [https://github.com/bazel-contrib/bazel-lib/pull/983](https://redirect.github.com/bazel-contrib/bazel-lib/pull/983)
    - refactor: Fix no-else-after-return by
    [@&#8203;hofbi](https://redirect.github.com/hofbi) in
    [https://github.com/bazel-contrib/bazel-lib/pull/988](https://redirect.github.com/bazel-contrib/bazel-lib/pull/988)
    - fix: honor umask in write_source_file by
    [@&#8203;sitaktif](https://redirect.github.com/sitaktif) in
    [https://github.com/bazel-contrib/bazel-lib/pull/986](https://redirect.github.com/bazel-contrib/bazel-lib/pull/986)
    - fix: Disable the non-deterministic time header when using gzip
    compression by [@&#8203;hofbi](https://redirect.github.com/hofbi) in
    [https://github.com/bazel-contrib/bazel-lib/pull/989](https://redirect.github.com/bazel-contrib/bazel-lib/pull/989)
    - fix(deps): update module golang.org/x/sys to v0.28.0 by
    [@&#8203;renovate](https://redirect.github.com/renovate) in
    [https://github.com/bazel-contrib/bazel-lib/pull/981](https://redirect.github.com/bazel-contrib/bazel-lib/pull/981)
    - chore(deps): update dependency bazel to v7.4.1 by
    [@&#8203;renovate](https://redirect.github.com/renovate) in
    [https://github.com/bazel-contrib/bazel-lib/pull/971](https://redirect.github.com/bazel-contrib/bazel-lib/pull/971)
    - fix(bats_test): use env var rather than symbolic link by
    [@&#8203;alexeagle](https://redirect.github.com/alexeagle) in
    [https://github.com/bazel-contrib/bazel-lib/pull/991](https://redirect.github.com/bazel-contrib/bazel-lib/pull/991)
    - chore(deps): Enable renovate for pre-commit by
    [@&#8203;hofbi](https://redirect.github.com/hofbi) in
    [https://github.com/bazel-contrib/bazel-lib/pull/994](https://redirect.github.com/bazel-contrib/bazel-lib/pull/994)
    - chore: start testing on Bazel 8 by
    [@&#8203;alexeagle](https://redirect.github.com/alexeagle) in
    [https://github.com/bazel-contrib/bazel-lib/pull/972](https://redirect.github.com/bazel-contrib/bazel-lib/pull/972)
    - chore(deps): update pre-commit hook keith/pre-commit-buildifier to v7
    by [@&#8203;renovate](https://redirect.github.com/renovate) in
    [https://github.com/bazel-contrib/bazel-lib/pull/1000](https://redirect.github.com/bazel-contrib/bazel-lib/pull/1000)
    - chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v5
    by [@&#8203;renovate](https://redirect.github.com/renovate) in
    [https://github.com/bazel-contrib/bazel-lib/pull/1001](https://redirect.github.com/bazel-contrib/bazel-lib/pull/1001)
    - chore(deps): update pre-commit hook commitizen-tools/commitizen to v4
    by [@&#8203;renovate](https://redirect.github.com/renovate) in
    [https://github.com/bazel-contrib/bazel-lib/pull/999](https://redirect.github.com/bazel-contrib/bazel-lib/pull/999)
    - chore(deps): update pre-commit hook crate-ci/typos to v1.28.2 by
    [@&#8203;renovate](https://redirect.github.com/renovate) in
    [https://github.com/bazel-contrib/bazel-lib/pull/997](https://redirect.github.com/bazel-contrib/bazel-lib/pull/997)
    - feat(bzlmod): mark toolchains extension as reproducible by
    [@&#8203;cerisier](https://redirect.github.com/cerisier) in
    [https://github.com/bazel-contrib/bazel-lib/pull/970](https://redirect.github.com/bazel-contrib/bazel-lib/pull/970)
    - feat: Forward RunEnvironmentInfo if present by
    [@&#8203;molar](https://redirect.github.com/molar) in
    [https://github.com/bazel-contrib/bazel-lib/pull/1008](https://redirect.github.com/bazel-contrib/bazel-lib/pull/1008)
    - ci(pre-commit): Add pre-commit CI job by
    [@&#8203;hofbi](https://redirect.github.com/hofbi) in
    [https://github.com/bazel-contrib/bazel-lib/pull/1002](https://redirect.github.com/bazel-contrib/bazel-lib/pull/1002)
    - chore(deps): update dependency bazel to v8 by
    [@&#8203;renovate](https://redirect.github.com/renovate) in
    [https://github.com/bazel-contrib/bazel-lib/pull/1004](https://redirect.github.com/bazel-contrib/bazel-lib/pull/1004)
    - fix(tar): handle strip_prefix of root directory in mtree_mutate by
    [@&#8203;j-eid](https://redirect.github.com/j-eid) in
    [https://github.com/bazel-contrib/bazel-lib/pull/995](https://redirect.github.com/bazel-contrib/bazel-lib/pull/995)
    
    #### New Contributors
    
    - [@&#8203;ChrisChinchilla](https://redirect.github.com/ChrisChinchilla)
    made their first contribution in
    [https://github.com/bazel-contrib/bazel-lib/pull/983](https://redirect.github.com/bazel-contrib/bazel-lib/pull/983)
    - [@&#8203;sitaktif](https://redirect.github.com/sitaktif) made their
    first contribution in
    [https://github.com/bazel-contrib/bazel-lib/pull/986](https://redirect.github.com/bazel-contrib/bazel-lib/pull/986)
    - [@&#8203;cerisier](https://redirect.github.com/cerisier) made their
    first contribution in
    [https://github.com/bazel-contrib/bazel-lib/pull/970](https://redirect.github.com/bazel-contrib/bazel-lib/pull/970)
    - [@&#8203;molar](https://redirect.github.com/molar) made their first
    contribution in
    [https://github.com/bazel-contrib/bazel-lib/pull/1008](https://redirect.github.com/bazel-contrib/bazel-lib/pull/1008)
    - [@&#8203;j-eid](https://redirect.github.com/j-eid) made their first
    contribution in
    [https://github.com/bazel-contrib/bazel-lib/pull/995](https://redirect.github.com/bazel-contrib/bazel-lib/pull/995)
    
    **Full Changelog**:
    bazel-contrib/bazel-lib@v2.9.4...v2.10.0
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At
    any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you
    are satisfied.
    
    ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update
    again.
    
    ---
    
    - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
    this box
    
    ---
    
    This PR was generated by [Mend Renovate](https://mend.io/renovate/).
    View the [repository job
    log](https://developer.mend.io/github/aspect-build/rules_py).
    
    <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS41OC4xIiwidXBkYXRlZEluVmVyIjoiMzkuNTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwcyJdfQ==-->
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    e618b75 View commit details
    Browse the repository at this point in the history
  2. chore: Autoformat with buildifier (#480)

    Follow up of #474 running buildifier on all files. A follow up PR will
    fix the remaining `buildifier-lint` warnings and add pre-commit to CI
    similar to bazel-contrib/rules-template#130.
    
    Co-authored-by: Alex Eagle <alex@aspect.dev>
    hofbi and alexeagle authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    1d6cd38 View commit details
    Browse the repository at this point in the history
  3. docs/example-pytest-fixtures (#452)

    Adds an example of test fixtures and `chdir`.
    
    This option was quite hard to discover, however test fixtures are
    common.
    
    Co-authored-by: Alex Eagle <alex@aspect.dev>
    njlr and alexeagle authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    e83fb49 View commit details
    Browse the repository at this point in the history
  4. ci: Add pre-commit GitHub action (#500)

    Follow up of #480 adding a pre-commit GH action, fixing last formatting,
    and remaining buildifier warnings (split in 3 commit)
    
    ---
    
    ### Changes are visible to end-users: no
    hofbi authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    0173cb5 View commit details
    Browse the repository at this point in the history
  5. chore: gitignore node_modules folder (#499)

    One of the tools, maybe `prettier` creates a `node_modules` folder
    locally which should be ignored.
    
    ---
    
    ### Changes are visible to end-users: no
    
    ### Test plan
    
    no testing required
    hofbi authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    082db55 View commit details
    Browse the repository at this point in the history
  6. docs: fix example of py_image_layer (#491)

    It's named `binary` rather than `py_binary`
    alexeagle authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    a17eb3d View commit details
    Browse the repository at this point in the history
  7. chore: report the coverage from the e2e/use_release test (#498)

    So we can see that it's working, based on comments that get posted to
    the PR.
    
    Notes:
    - I had to move the files to a `src` subfolder so I can use an
    `--instrumentation_filter` that doesn't include `//...` since that's
    causing external repos to get instrumented.
    - The GHA setup here is fighting me on referencing the combined_report
    in bazel-out so I just look for **/coverage.dat - actually it's not
    required to ask bazel to merge the coverage reports for this case.
    
    ---
    
    ### Changes are visible to end-users: no
    
    
    ### Test plan
    
    - New test cases added
    alexeagle authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    1b1fcd0 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2025

  1. chore: build on aspect workflows (#505)

    Set up an Aspect Workflows pipeline to build rules_py.
    
    ---
    
    ### Changes are visible to end-users: no
    
    ### Test plan
    
    - Manual testing; please provide instructions so we can reproduce:
    Yeet
    
    ---------
    
    Co-authored-by: Alex Eagle <alex@aspect.dev>
    kormide and alexeagle authored Jan 24, 2025
    Configuration menu
    Copy the full SHA
    0090277 View commit details
    Browse the repository at this point in the history
  2. chore: Add typos pre-commit hook (#503)

    Automated typo fixes
    
    ---
    
    ### Changes are visible to end-users: yes
    
    Typos were mainly fixed in the docs/docstrings
    
    ---------
    
    Co-authored-by: Alex Eagle <alex@aspect.build>
    hofbi and alexeagle authored Jan 24, 2025
    Configuration menu
    Copy the full SHA
    23f0f01 View commit details
    Browse the repository at this point in the history
Loading