diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 124d453307..daa71ab49a 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -15,14 +15,22 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Set up Python 3.7 uses: actions/setup-python@v1 with: python-version: 3.7 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Install dependencies run: | python -m pip install --upgrade pip pip install asv virtualenv==16.7.9 + - name: Runs benchmarks against latest run: | asv machine --yes diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6285374450..cb5cc89940 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -50,7 +50,7 @@ jobs: - name: Set up IPFS if: startsWith(runner.os, 'Linux') && (matrix.py == '3.9') - uses: luizirber/setup-ipfs@fix_add_path + uses: ibnesayeed/setup-ipfs@master with: ipfs_version: 0.6 run_daemon: true diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 08f846d4bc..d6774535f5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -201,7 +201,7 @@ jobs: - name: Install wasmtime run: "curl https://wasmtime.dev/install.sh -sSf | bash" - name: Add wasmtime to PATH - run: echo "::add-path::$HOME/.wasmtime/bin" + run: echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH - name: Install cargo-wasi command uses: actions-rs/cargo@v1 with: diff --git a/asv.conf.json b/asv.conf.json index 065ba54afb..635dd9c412 100644 --- a/asv.conf.json +++ b/asv.conf.json @@ -3,12 +3,17 @@ "project": "sourmash", "project_url": "https://github.com/dib-lab/sourmash", "repo": ".", - "branches": ["latest"], // for git + "branches": ["latest"], "dvcs": "git", "environment_type": "virtualenv", "pythons": ["3.7"], "env_dir": ".asv/env", "results_dir": ".asv/results", "html_dir": ".asv/html", - "build_cache_size": 8 + "build_cache_size": 8, + "build_command": [ + "python -m pip install 'setuptools_scm[toml]<5' milksnake", + "python setup.py build", + "PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}" + ] } diff --git a/benchmarks/benchmarks.py b/benchmarks/benchmarks.py index fa10346e15..481cb76b43 100644 --- a/benchmarks/benchmarks.py +++ b/benchmarks/benchmarks.py @@ -48,11 +48,11 @@ def time_add_many(self): mh = self.mh mh.add_many(list(range(1000))) - def time_compare(self): + def time_similarity(self): mh = self.mh other_mh = self.populated_mh for i in range(500): - mh.compare(other_mh) + mh.similarity(other_mh) def time_count_common(self): mh = self.mh diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..f30ae840cc --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +[build-system] +requires = [ + "setuptools >= 48", + "setuptools_scm[toml] >= 4, <5", + "setuptools_scm_git_archive", + "milksnake", + "wheel >= 0.29.0", +] +build-backend = 'setuptools.build_meta' diff --git a/setup.py b/setup.py index eda4c80037..310abf82ae 100644 --- a/setup.py +++ b/setup.py @@ -64,10 +64,11 @@ def build_native(spec): 'matplotlib', 'scipy', 'deprecation>=2.0.6', 'cachetools >=4,<5'], "setup_requires": [ - "setuptools>=38.6.0", + "setuptools>=48", "milksnake", - "setuptools_scm>=3.2.0", + "setuptools_scm[toml] >= 4, <5", "setuptools_scm_git_archive", + "wheel >= 0.29.0", ], "use_scm_version": { "write_to": "sourmash/version.py", diff --git a/src/core/Cargo.toml b/src/core/Cargo.toml index cb41e221b9..cb2d0258db 100644 --- a/src/core/Cargo.toml +++ b/src/core/Cargo.toml @@ -33,7 +33,7 @@ getset = "0.1.1" log = "0.4.8" md5 = "0.7.0" murmurhash3 = "0.0.5" -niffler = { version = "2.2.0", default-features = false, features = [ "gz" ] } +niffler = { version = "2.3.1", default-features = false, features = [ "gz" ] } nohash-hasher = "0.2.0" num-iter = "0.1.41" once_cell = "1.3.1" diff --git a/tests/conftest.py b/tests/conftest.py index 06bd835ff5..26ea6846fe 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,6 +3,9 @@ from hypothesis import settings, Verbosity import pytest +import matplotlib.pyplot as plt +plt.rcParams.update({'figure.max_open_warning': 0}) + @pytest.fixture(params=[True, False]) def track_abundance(request):