Skip to content

Commit

Permalink
Fix SLiM time units warning, bump minimum version to 4.0 (popsim-cons…
Browse files Browse the repository at this point in the history
…ortium#1567)

* Fix TimeUnitsMismatchWarning

* Bump slim version assert to 4.0

* Bump pyslim version to 1.0.4

* Bump numpy version in CI

* Bump macos runner version to 13

* Debugging CI

* Debugging CI

* Debugging CI

* Downgrade to macos-12 as later versions drop miniconda
  • Loading branch information
nspope authored Jul 5, 2024
1 parent b46b3d1 commit e52b33e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-latest]
os: [ubuntu-20.04, macos-12, windows-latest]
python: ["3.8", "3.10"]
env:
CONDA_ENV_NAME: stdpopsim
Expand All @@ -41,7 +41,8 @@ jobs:
if: runner.os == 'macOS'
run: |
# Fix incorrect conda permissions on mac that prevent cache restore.
sudo chown -R $USER:staff $CONDA
echo "$USER:staff ${{ steps.find-conda.outputs.CONDA }}"
sudo chown -R $USER:staff ${{ steps.find-conda.outputs.CONDA }}
- name: cache conda
id: cache
Expand Down
4 changes: 2 additions & 2 deletions requirements/CI/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ msprime==1.2.0
attrs==21.4.0
appdirs==1.4.4
humanize==4.6.0
pyslim==1.0.1
numpy==1.22.3
pyslim==1.0.4
numpy==1.23.5
scipy==1.10.1
scikit-allel==1.3.6
biopython==1.80
Expand Down
2 changes: 1 addition & 1 deletion requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ attrs
appdirs
humanize
pre-commit
pyslim>=1.0.1
pyslim>=1.0.4
numpy
scikit-allel
biopython
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ install_requires =
attrs >= 19.1.0
appdirs
humanize
pyslim >= 1.0.1
pyslim >= 1.0.4
numpy
setup_requires =
setuptools
Expand Down
4 changes: 2 additions & 2 deletions stdpopsim/slim_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
_slim_lower = """
defineConstant("N", asInteger(_N/Q));
initializeTreeSeq();
initializeTreeSeq(timeUnit="generations");
initializeRecombinationRate(recombination_rates, recombination_ends);
}
Expand Down Expand Up @@ -1714,7 +1714,7 @@ def _run_slim(
slim_path = self.slim_path()

# SLiM v3.6 sends `stop()` output to stderr, which we rely upon.
self._assert_min_version("3.6", slim_path)
self._assert_min_version("4.0", slim_path)

slim_cmd = [slim_path]
if seed is not None:
Expand Down

0 comments on commit e52b33e

Please sign in to comment.