Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed May 10, 2024
2 parents 331f127 + cf7e02e commit 916033f
Show file tree
Hide file tree
Showing 94 changed files with 1,983 additions and 2,023 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/post_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ echo "Installing dev dependencies"
--file "$SRC_CONDA_BUILD/tests/requirements.txt" \
--file "$SRC_CONDA_BUILD/tests/requirements-Linux.txt" \
--file "$SRC_CONDA_BUILD/tests/requirements-ci.txt" \
"conda>=23.5.0"
"conda>=23.7.0"
8 changes: 5 additions & 3 deletions .github/workflows/builds-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
include:
- runner: ubuntu-latest
subdir: linux-64
- runner: macos-latest
- runner: macos-14
subdir: osx-arm64
- runner: macos-13
subdir: osx-64
- runner: windows-latest
subdir: win-64
Expand Down Expand Up @@ -46,14 +48,14 @@ jobs:
# Clean checkout of specific git ref needed for package metadata version
# which needs env vars GIT_DESCRIBE_TAG and GIT_BUILD_STR:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
ref: ${{ github.ref }}
clean: true
fetch-depth: 0

- name: Create and upload review build
uses: conda/actions/canary-release@f46142e89fa703cc69f0421ca1d313ab2d5bfff6
uses: conda/actions/canary-release@1e442e090ad28c9b0f85697105703a303320ffd1
with:
package-name: ${{ github.event.repository.name }}
subdir: ${{ matrix.subdir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check CLA
uses: conda/actions/check-cla@f46142e89fa703cc69f0421ca1d313ab2d5bfff6
uses: conda/actions/check-cla@1e442e090ad28c9b0f85697105703a303320ffd1
with:
# [required]
# A token with ability to comment, label, and modify the commit status
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
if: '!github.event.repository.fork'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0
- name: Setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
GLOBAL: https://raw.githubusercontent.com/conda/infra/main/.github/global.yml
LOCAL: .github/labels.yml
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- id: has_local
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
days-before-issue-stale: 90
days-before-issue-close: 21
steps:
- uses: conda/actions/read-yaml@f46142e89fa703cc69f0421ca1d313ab2d5bfff6
- uses: conda/actions/read-yaml@1e442e090ad28c9b0f85697105703a303320ffd1
id: read_yaml
with:
path: https://raw.githubusercontent.com/conda/infra/main/.github/messages.yml
Expand Down
52 changes: 28 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
code: ${{ steps.filter.outputs.code }}
steps:
- name: Checkout Source
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
# dorny/paths-filter needs git clone for non-PR events
# https://github.com/dorny/paths-filter#supported-workflows
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -83,10 +83,10 @@ jobs:
include:
# minimum Python/conda combo
- python-version: '3.8'
conda-version: 23.5.0
conda-version: 23.7.0
test-type: serial
- python-version: '3.8'
conda-version: 23.5.0
conda-version: 23.7.0
test-type: parallel
# maximum Python/conda combo
- python-version: '3.12'
Expand All @@ -102,7 +102,7 @@ jobs:

steps:
- name: Checkout Source
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0

Expand All @@ -116,7 +116,7 @@ jobs:
key: cache-${{ env.HASH }}

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca
with:
condarc-file: .github/condarc
run-post: false # skip post cleanup
Expand Down Expand Up @@ -150,13 +150,13 @@ jobs:
-m "${{ env.PYTEST_MARKER }}"
- name: Upload Coverage
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
with:
flags: ${{ runner.os }},${{ runner.arch }},${{ matrix.python-version }},${{ matrix.test-type }}

- name: Upload Test Results
if: '!cancelled()'
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: test-results-${{ env.HASH }}
path: |
Expand All @@ -182,7 +182,7 @@ jobs:

steps:
- name: Checkout Source
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0

Expand All @@ -196,7 +196,7 @@ jobs:
key: cache-${{ env.HASH }}

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca
with:
condarc-file: .github/condarc
run-post: false # skip post cleanup
Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
run: conda list --show-channel-urls

- name: Run Benchmarks
uses: CodSpeedHQ/action@1dbf41f0ae41cebfe61e084e535aebe533409b4d
uses: CodSpeedHQ/action@0b631f8998f2389eb5144632b6f9f8fabd33a86e
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: $CONDA/envs/test/bin/pytest --codspeed
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:

steps:
- name: Checkout Source
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0

Expand All @@ -277,7 +277,7 @@ jobs:
key: cache-${{ env.HASH }}

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca
with:
condarc-file: .github\condarc
run-post: false # skip post cleanup
Expand Down Expand Up @@ -317,13 +317,13 @@ jobs:
-m "${{ env.PYTEST_MARKER }}"
- name: Upload Coverage
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
with:
flags: ${{ runner.os }},${{ runner.arch }},${{ matrix.python-version }},${{ matrix.test-type }}

- name: Upload Test Results
if: '!cancelled()'
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: test-results-${{ env.HASH }}
path: |
Expand All @@ -337,6 +337,10 @@ jobs:
needs: changes
if: github.event_name == 'schedule' || needs.changes.outputs.code == 'true'

# Old macOS needed for old SDK (see xcode step below)
# This is needed for some MACOSX_DEPLOYMENT_TARGET tests
# We could also install SDKs from a external provider in the future
# if we want to update this runner to a non-deprecated version
runs-on: macos-11
defaults:
run:
Expand All @@ -362,7 +366,7 @@ jobs:

steps:
- name: Checkout Source
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0

Expand All @@ -376,7 +380,7 @@ jobs:
key: cache-${{ env.HASH }}

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca
with:
condarc-file: .github/condarc
run-post: false # skip post cleanup
Expand Down Expand Up @@ -413,13 +417,13 @@ jobs:
-m "${{ env.PYTEST_MARKER }}"
- name: Upload Coverage
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
with:
flags: ${{ runner.os }},${{ runner.arch }},${{ matrix.python-version }},${{ matrix.test-type }}

- name: Upload Test Results
if: '!cancelled()'
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: test-results-${{ env.HASH }}
path: |
Expand All @@ -441,11 +445,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e

- name: Upload Combined Test Results
# provides one downloadable archive of all matrix run test results for further analysis
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: test-results-${{ github.sha }}-all
path: test-results-*
Expand Down Expand Up @@ -489,9 +493,9 @@ jobs:
include:
- runner: ubuntu-latest
subdir: linux-64
- runner: macos-latest
- runner: macos-13
subdir: osx-64
- runner: macos-14
- runner: macos-14 # FUTURE: Use -latest
subdir: osx-arm64
- runner: windows-latest
subdir: win-64
Expand All @@ -500,7 +504,7 @@ jobs:
# Clean checkout of specific git ref needed for package metadata version
# which needs env vars GIT_DESCRIBE_TAG and GIT_BUILD_STR:
- name: Checkout Source
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
ref: ${{ github.ref }}
clean: true
Expand Down Expand Up @@ -534,7 +538,7 @@ jobs:
Path(environ["GITHUB_ENV"]).write_text(f"ANACONDA_ORG_LABEL={label}")
- name: Create & Upload
uses: conda/actions/canary-release@f46142e89fa703cc69f0421ca1d313ab2d5bfff6
uses: conda/actions/canary-release@1e442e090ad28c9b0f85697105703a303320ffd1
with:
package-name: ${{ github.event.repository.name }}
subdir: ${{ matrix.subdir }}
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ repos:
# auto format Python codes within docstrings
- id: blacken-docs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.7
rev: v0.4.2
hooks:
# lint & attempt to correct failures (e.g. pyupgrade)
- id: ruff
Expand Down Expand Up @@ -87,7 +87,7 @@ repos:
tests/
)
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.1
rev: 0.28.2
hooks:
# verify github syntaxes
- id: check-github-workflows
Expand Down
14 changes: 7 additions & 7 deletions conda_build/_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
SITE_PACKAGES = "Lib/site-packages"
else:
BIN_DIR = join(PREFIX, "bin")
SITE_PACKAGES = "lib/python%s/site-packages" % sys.version[:3]
SITE_PACKAGES = f"lib/python{sys.version[:3]}/site-packages"

# the list of these files is going to be store in info/_files
FILES = []
Expand Down Expand Up @@ -110,20 +110,20 @@ def create_script(fn):
dst = join(BIN_DIR, fn)
if sys.platform == "win32":
shutil.copy2(src, dst + "-script.py")
FILES.append("Scripts/%s-script.py" % fn)
FILES.append(f"Scripts/{fn}-script.py")
shutil.copy2(
join(THIS_DIR, "cli-%d.exe" % (8 * tuple.__itemsize__)), dst + ".exe"
)
FILES.append("Scripts/%s.exe" % fn)
FILES.append(f"Scripts/{fn}.exe")
else:
with open(src) as fi:
data = fi.read()
with open(dst, "w") as fo:
shebang = replace_long_shebang("#!%s\n" % normpath(sys.executable))
shebang = replace_long_shebang(f"#!{normpath(sys.executable)}\n")
fo.write(shebang)
fo.write(data)
os.chmod(dst, 0o775)
FILES.append("bin/%s" % fn)
FILES.append(f"bin/{fn}")


def create_scripts(files):
Expand All @@ -140,9 +140,9 @@ def main():
link_files("site-packages", SITE_PACKAGES, DATA["site-packages"])
link_files("Examples", "Examples", DATA["Examples"])

with open(join(PREFIX, "conda-meta", "%s.files" % DATA["dist"]), "w") as fo:
with open(join(PREFIX, "conda-meta", "{}.files".format(DATA["dist"])), "w") as fo:
for f in FILES:
fo.write("%s\n" % f)
fo.write(f"{f}\n")


if __name__ == "__main__":
Expand Down
Loading

0 comments on commit 916033f

Please sign in to comment.