Skip to content

Commit

Permalink
Update CI to using latest emscripten-forge platform and Python version (
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou authored Jun 6, 2024
1 parent a1619b8 commit 12a64fc
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
lint:
runs-on: ubuntu-latest
env:
TARGET_PLATFORM: emscripten-32
TARGET_PLATFORM: emscripten-wasm32
GITHUB_OWNER: "emscripten-forge"

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
test_empack:
runs-on: ubuntu-latest
env:
TARGET_PLATFORM: emscripten-32
TARGET_PLATFORM: emscripten-wasm32
GITHUB_OWNER: 'emscripten-forge'

strategy:
Expand Down
4 changes: 2 additions & 2 deletions empack/cli/repodata.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
@repodata_app.command()
def shrink(
arch: str = typer.Option( # noqa: B008
"https://beta.mamba.pm/get/emscripten-forge/emscripten-32/repodata.json.bz2--arch",
"https://beta.mamba.pm/get/emscripten-forge/emscripten-wasm32/repodata.json.bz2--arch",
"-a",
help="arch / emscripten-32 repodata",
help="arch / emscripten-wasm32 repodata",
),
no_arch: str = typer.Option( # noqa: B008
"https://beta.mamba.pm/get/conda-forge/noarch/repodata.json.bz2",
Expand Down
2 changes: 1 addition & 1 deletion empack/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def pack_pkg(
micromamba_exe=micromamba_exe,
channels=channels,
no_deps=True,
platform="emscripten-32",
platform="emscripten-wasm32",
)

# filter the env
Expand Down
4 changes: 2 additions & 2 deletions empack/repodata.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def download_and_shrink_repodata(repodata_urls, outdir=None):
# download
repodata_urls[
"arch"
] = "https://beta.mamba.pm/get/emscripten-forge/emscripten-32/repodata.json.bz2"
] = "https://beta.mamba.pm/get/emscripten-forge/emscripten-wasm32/repodata.json.bz2"

repodata_urls["noarch"] = "https://beta.mamba.pm/get/conda-forge/noarch/repodata.json.bz2"
repodata_response = {k: requests.get(url, timeout=10) for k, url in repodata_urls.items()}
Expand Down Expand Up @@ -99,7 +99,7 @@ def download_and_shrink_repodata(repodata_urls, outdir=None):

if __name__ == "__main__":
repodata_urls = {
"arch": "https://beta.mamba.pm/get/emscripten-forge/emscripten-32/repodata.json.bz2",
"arch": "https://beta.mamba.pm/get/emscripten-forge/emscripten-wasm32/repodata.json.bz2",
"noarch": "https://beta.mamba.pm/get/conda-forge/noarch/repodata.json.bz2",
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_pack_env(self, tmp_path, use_cache):
packages=["numpy"],
channels=CHANNELS,
relocate_prefix="/",
platform="emscripten-32",
platform="emscripten-wasm32",
)

use_cache_arg = "--use-cache" if use_cache else "--no-use-cache"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_integration(tmp_path, tmp_path_module, free_port, backend_type):
packages=packages,
channels=CHANNELS,
relocate_prefix="/",
platform="emscripten-32",
platform="emscripten-wasm32",
)

script_dir = tmp_path / "scripts"
Expand Down
10 changes: 5 additions & 5 deletions tests/test_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# we use the python 3.10 package twice since we want
# to test if the caching code path is working
@pytest.mark.parametrize("pkg_spec", ["python=3.10", "numpy", "python=3.10"])
@pytest.mark.parametrize("pkg_spec", ["python=3.11", "numpy"])
@pytest.mark.parametrize("use_cache", [False, True])
def test_pack_pkg(tmp_path, tmp_path_module, use_cache, pkg_spec):
pkg_name = pkg_spec.split("=")[0]
Expand Down Expand Up @@ -58,10 +58,10 @@ def test_append(tmp_path):
# create and pack env
create_environment(
prefix=prefix,
packages=["python=3.10", "numpy"],
packages=["python=3.11", "numpy"],
channels=CHANNELS,
relocate_prefix="/",
platform="emscripten-32",
platform="emscripten-wasm32",
)

pack_env(
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_append(tmp_path):
assert "packaged_dir.tar.gz" in env_meta_dict


@pytest.mark.parametrize("packages", [["python=3.10", "numpy"]])
@pytest.mark.parametrize("packages", [["python=3.11", "numpy"]])
@pytest.mark.parametrize("relocate_prefix", ["/", "/some/dir", "/home/some_dir/"])
def test_pack_env(tmp_path, packages, relocate_prefix):
# create the env at the temporary location
Expand All @@ -112,7 +112,7 @@ def test_pack_env(tmp_path, packages, relocate_prefix):
packages=packages,
channels=CHANNELS,
relocate_prefix=relocate_prefix,
platform="emscripten-32",
platform="emscripten-wasm32",
)

pack_env(
Expand Down

0 comments on commit 12a64fc

Please sign in to comment.