Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify & improve configuration #435

Merged
merged 18 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
# This should match the "Latest version testable on GitHub Actions"
# in pytest.yml
python-version: "3.8"
# This should match the "Latest version testable on GitHub Actions"
# in pytest.yaml
# with:
# python-version: "3.10"

- name: Cache Python packages
uses: actions/cache@v2
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
# This should match the "Latest version testable on GitHub Actions"
# in pytest.yaml
python-version: "3.8"
# This should match the "Latest version testable on GitHub Actions"
# in pytest.yaml
# with:
# python-version: "3.10"

- name: Cache Python packages
uses: actions/cache@v2
Expand All @@ -40,15 +40,15 @@ jobs:
twine check dist/*

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
uses: pypa/gh-action-pypi-publish@v1.5.0
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
uses: pypa/gh-action-pypi-publish@v1.5.0
if: github.event_name == 'release'
with:
user: __token__
Expand Down
36 changes: 17 additions & 19 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,22 @@ jobs:
- ubuntu-latest
- windows-latest
python-version:
- "3.6" # Earliest version supported by ixmp
- "3.7" # Earliest version supported by ixmp
- "3.8"
- "3.9" # Latest release / latest supported by ixmp
- "3.9"
- "3.10" # Latest release / latest supported by ixmp

# For development versions of Python, compiled binary wheels are not
# available for some dependencies, e.g. llvmlite, numba, numpy, and/or
# pandas. Compiling these on the job runner requires a more elaborate
# build environment, currently out of scope for the ixmp project.
# - "3.10.0-alpha.1" # Development version
# For fresh releases and development versions of Python, compiled
# binary wheels are not available for some dependencies, e.g. llvmlite,
# numba, numpy, and/or pandas. Compiling these on the job runner
# requires a more elaborate build environment, currently out of scope
# for the ixmp project.
# - "3.11.0-alpha.1" # Development version

exclude:
# JPype1 binary wheels are not available for this combination
- os: windows-latest
python-version: "3.10"

fail-fast: false

Expand All @@ -38,7 +45,7 @@ jobs:

steps:
- name: Cancel previous runs that have not completed
uses: styfle/cancel-workflow-action@0.7.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}

Expand All @@ -53,7 +60,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

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

- name: Cache GAMS installer, Python packages, and R packages
Expand Down Expand Up @@ -81,14 +88,6 @@ jobs:
run: echo "RETICULATE_PYTHON=$pythonLocation" >> $GITHUB_ENV
shell: bash

- name: Use OpenJDK 14 (macOS only)
# Using the default OpenJDK 1.8 on the macos-latest runner produces
# "Abort trap: 6" when JPype1 starts the JVM
if: ${{ startsWith(matrix.os, 'macos') }}
uses: actions/setup-java@v1
with:
java-version: '14'

- name: Upgrade pip, wheel, setuptools-scm
run: python -m pip install --upgrade pip wheel setuptools-scm

Expand All @@ -115,8 +114,7 @@ jobs:
run: pytest ixmp -m "not performance" --verbose -rA --cov-report=xml --color=yes

- name: Test documentation build using Sphinx
if: matrix.python-version != '3.6'
run: make --directory=doc html

- name: Upload test coverage to Codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
18 changes: 14 additions & 4 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
.. Next release
.. ============
Next release
============

.. All changes
.. -----------
All changes
-----------

- Minimum requirements are increased for dependencies (:pull:`435`):

- Python 3.7 or greater. Python 3.6 reached end-of-life on 2021-12-31.
- Pandas 1.2 (2020-12-26) or greater, the oldest version with a minimum Python version of 3.7.

- Improvements to configuration (:pull:`435`):

- The `jvmargs` argument to :class:`.JDBCBackend` can be set via the command line (:program:`ixmp platform add …`) or :meth:`.Config.add_platform`; see :ref:`configuration` (:issue:`408`).
- Bug fix: user config file values from downstream packages (e.g. :mod:`message_ix`) are respected (:issue:`415`).

.. _v3.4.0:

Expand Down
7 changes: 5 additions & 2 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ When imported, :mod:`ixmp` reads configuration from the first file named
.. tip::
For most users, #2 or #3 is a sensible default; platform information for many local and remote databases can be stored in ``config.json`` and retrieved by name.

Advanced users wishing to use a project-specific ``config.json`` can set ``IXMP_DATA`` to the directory containing this file.
Advanced users wishing to use a project-specific ``config.json`` can set ``IXMP_DATA`` to the path for any directory containing a file with this name.

To manipulate the configuration file, use the ``platform`` command in the ixmp command-line interface::

Expand All @@ -175,10 +175,13 @@ To manipulate the configuration file, use the ``platform`` command in the ixmp c
$ ixmp platform add p2 jdbc oracle \
database.server.example.com:PORT:SCHEMA username password

# Add a platform named 'p3' with specific JVM arguments
$ ixmp platform add p3 jdbc hsqldb /path/to/database/files -Xmx12G

# Make 'p2' the default Platform
$ ixmp platform add default p2

…or, use the methods of :obj:`ixmp.config`.
…or, use the methods of :data:`.ixmp.config`.

.. currentmodule:: ixmp

Expand Down
Loading