Skip to content

Commit

Permalink
Update mentions of Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
fmhoeger committed Feb 15, 2024
1 parent af52dd3 commit 6061ed9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -4,7 +4,7 @@ repos:
rev: 24.2.0 # update with `pre-commit autoupdate`
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.8+
language_version: python3.12
files: ^(tests|dallinger|dallinger_scripts|demos)/

- repo: https://github.com/PyCQA/flake8
Expand Down
9 changes: 6 additions & 3 deletions dallinger/docker/tools.py
Expand Up @@ -67,13 +67,16 @@ def copy_docker_compose_files(self):
if editable_dallinger_path:
volumes.append(f"{editable_dallinger_path}/dallinger:/dallinger/dallinger")
volumes.append(
f"{editable_dallinger_path}/dallinger:/usr/local/lib/python3.10/dist-packages/dallinger/"
f"{editable_dallinger_path}/dallinger:/usr/local/lib/python3.12/dist-packages/dallinger/"
)
volumes.append(
f"{editable_dallinger_path}/dallinger:/usr/local/lib/python3.9/dist-packages/dallinger/"
f"{editable_dallinger_path}/dallinger:/usr/local/lib/python3.11/dist-packages/dallinger/"
)
volumes.append(
f"{editable_dallinger_path}/dallinger:/usr/local/lib/python3.10/dist-packages/dallinger/"
)
volumes.append(
f"{editable_dallinger_path}/dallinger:/usr/local/lib/python3.8/dist-packages/dallinger/"
f"{editable_dallinger_path}/dallinger:/usr/local/lib/python3.9/dist-packages/dallinger/"
)
tag = get_experiment_image_tag(self.tmp_dir)
with open(os.path.join(self.tmp_dir, "docker-compose.yml"), "w") as fh:
Expand Down
2 changes: 1 addition & 1 deletion dallinger/experiments/__init__.py
Expand Up @@ -16,7 +16,7 @@
try:
experiments_entry_points = entry_points(group="dallinger.experiments")
except TypeError:
# For Python 3.8 and 3.9 we fall back to using `iter_entry_points`
# For Python 3.9 we fall back to using `iter_entry_points`
from pkg_resources import iter_entry_points

experiments_entry_points = iter_entry_points(group="dallinger.experiments")
Expand Down
4 changes: 2 additions & 2 deletions docs/source/developing_dallinger_setup_guide.rst
Expand Up @@ -14,7 +14,7 @@ Install Python
~~~~~~~~~~~~~~

Dallinger is written in the language Python. For it to work, you will need
to have Python 3.8 or higher. You can check what version of Python you
to have Python 3.9 or higher. You can check what version of Python you
have by running:
::

Expand Down Expand Up @@ -354,7 +354,7 @@ Install Python
~~~~~~~~~~~~~~

Dallinger is written in the language Python. For it to work, you will need
to have Python 3.8 or higher. Python 3 is the preferred option.
to have Python 3.9 or higher. Python 3 is the preferred option.
You can check what version of Python you have by running:
::

Expand Down
4 changes: 2 additions & 2 deletions docs/source/installing_dallinger_for_users.rst
Expand Up @@ -48,7 +48,7 @@ Install Python
~~~~~~~~~~~~~~

Dallinger is written in the language Python. For it to work, you will need
to have Python 3.8 or higher. You can check what version of Python you have
to have Python 3.9 or higher. You can check what version of Python you have
by running:
::

Expand Down Expand Up @@ -307,7 +307,7 @@ Install Python
~~~~~~~~~~~~~~

Dallinger is written in the language Python. For it to work, you will need
to have Python 3.8 or higher. You can check what version of Python you have
to have Python 3.9 or higher. You can check what version of Python you have
by running:
::

Expand Down
2 changes: 1 addition & 1 deletion docs/source/running_the_tests.rst
Expand Up @@ -16,7 +16,7 @@ The tests include:
* Running `flake8 <https://flake8.readthedocs.io>`_ to make sure Python code
conforms to the `PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_ style guide.
* Running the tests for the Python code using `pytest <http://doc.pytest.org/>`_
and making sure they pass on Python 3.8, 3.9, and 3.10.
and making sure they pass on Python 3.9, 3.10, 3.11, and 3.12.
* Making sure that `code coverage <https://coverage.readthedocs.io/>`_
for the Python code is above the desired threshold.
* Making sure the docs build without error.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_deployment.py
Expand Up @@ -371,14 +371,14 @@ def test_setup_merges_frontend_files_from_core_and_experiment(
assert copy == orig

def test_setup_uses_specified_python_version(self, active_config, setup_experiment):
active_config.extend({"heroku_python_version": "3.8.7"})
active_config.extend({"heroku_python_version": "3.12.1"})

exp_id, dst = setup_experiment(log=mock.Mock())

with open(os.path.join(dst, "runtime.txt"), "r") as file:
version = file.read()

assert version == "python-3.8.7"
assert version == "python-3.12.1"

def test_setup_copies_docker_script(self, setup_experiment):
exp_id, dst = setup_experiment(log=mock.Mock())
Expand Down

0 comments on commit 6061ed9

Please sign in to comment.