Skip to content

Commit

Permalink
Merge pull request #418 from iiasa/issue/417
Browse files Browse the repository at this point in the history
Reactivate caching of R packages
  • Loading branch information
khaeru authored May 26, 2021
2 parents ef075f8 + a4df864 commit 9185cb0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
# build environment, currently out of scope for the ixmp project.
# - "3.10.0-alpha.1" # Development version

exclude:
# See https://github.com/iiasa/ixmp/issues/360
- os: windows-latest
python-version: "3.6"

fail-fast: false

runs-on: ${{ matrix.os }}
Expand All @@ -54,6 +49,13 @@ jobs:
- name: Fetch tags (for setuptools-scm)
run: git fetch --tags --depth=${{ env.depth }}

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: r-lib/actions/setup-r@master
id: setup-r

- name: Cache GAMS installer, Python packages, and R packages
uses: actions/cache@v2
with:
Expand All @@ -63,9 +65,9 @@ jobs:
~/Library/Caches/pip
~/appdata/local/pip/cache
${{ env.R_LIBS_USER }}
key: ${{ matrix.os }}-gams${{ env.GAMS_VERSION }}-py${{ matrix.python-version }}
key: ${{ matrix.os }}-py${{ matrix.python-version }}-R${{ steps.setup-r.outputs.installed-r-version }}
restore-keys: |
${{ matrix.os }}-gams${{ env.GAMS_VERSION }}-
${{ matrix.os }}-py${{ matrix.python-version }}-
${{ matrix.os }}-
- uses: iiasa/actions/setup-gams@main
Expand All @@ -74,12 +76,6 @@ jobs:

- uses: ts-graphviz/setup-graphviz@v1

- uses: r-lib/actions/setup-r@master

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Set RETICULATE_PYTHON
# Use the environment variable set by the setup-python action, above.
run: echo "RETICULATE_PYTHON=$pythonLocation" >> $GITHUB_ENV
Expand Down
12 changes: 10 additions & 2 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
Next release
============

Migration notes
---------------

``rixmp`` is deprecated, though not yet removed, as newer versions of the R `reticulate <https://rstudio.github.io/reticulate/>`_ package allow direct import and use of the Python modules with full functionality.
See the updated page for :doc:`api-r`.


All changes
-----------

- :pull:`416`:
- (:pull:`416`):

- Add ``ixmp config show`` CLI command.
- Add :mod:`genno` and :mod:`message_ix_models` to the output of :func:`show_versions` / ``ixmp show-versions``.
- Clean up test suite, improve performance, increase coverage ().
- Clean up test suite, improve performance, increase coverage.
- Adjust documentation for deprecation of ``rixmp`.
- Deprecate :func:`.utils.logger` (:pull:`399`).
- Add a `quiet` option to :meth:`.GAMSModel.solve` and use in testing (:pull:`399`).
Expand Down
7 changes: 4 additions & 3 deletions ixmp/tests/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ def test_resource_limit(resource_limit, test_mp):
"""Exercise :func:`memory_usage` and :func:`resource_limit`."""
# TODO expand to cover other missed lines in those functions

info0 = memory_usage("setup")
memory_usage("setup")

s = ixmp.TimeSeries(test_mp, **models["h2g2"], version="new")

info1 = memory_usage("1 TimeSeries")
memory_usage("1 TimeSeries")

del s

assert info0.python <= info1.python
# commented: this is nondeterministic, not always true
# assert info0.python <= info1.python

0 comments on commit 9185cb0

Please sign in to comment.