Skip to content

Commit

Permalink
ampltools: Prepare bugfix release v0.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fdabrandao committed Nov 15, 2023
1 parent 285f52b commit d6c8a79
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions amplpy/vendor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## 0.6.3 - 2023-11-15
- Ignore default license outside Google Colab.

## 0.6.2 - 2023-09-21
- Only try to activate default license if uuid is "default" or contains "license-uuid".

Expand Down
2 changes: 1 addition & 1 deletion amplpy/vendor/ampltools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__version__ = "0.6.2"
__version__ = "0.6.3"
from .notebooks import (
ampl_notebook,
)
Expand Down
2 changes: 1 addition & 1 deletion amplpy/vendor/ampltools/modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__version__ = "0.6.2"
__version__ = "0.6.3"

from .amplpypi import (
path,
Expand Down
5 changes: 4 additions & 1 deletion amplpy/vendor/ampltools/modules/amplpypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,10 @@ def activate_license(uuid, verbose=False):
"Please provide a valid license UUID. "
"You can use free https://ampl.com/ce or https://ampl.com/courses licenses."
)
raise Exception("Invalid license UUID.")
raise Exception(
"Invalid license UUID. "
"You can use free https://ampl.com/ce or https://ampl.com/courses licenses."
)
exit_code = run_command(
["amplkey", "activate", "--uuid", uuid],
verbose=verbose,
Expand Down
6 changes: 6 additions & 0 deletions amplpy/vendor/ampltools/notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ def instantiate_ampl(print_license=True):
using_default_license = license_uuid is not None and (
license_uuid == "default" or "license-uuid" in license_uuid
)

# Ignore default license outside colab
if using_default_license and cloud_platform_name() != "colab":
using_default_license = False
license_uuid = None

if using_default_license:
using_default_license = activate_license("default")
if using_default_license:
Expand Down
2 changes: 1 addition & 1 deletion amplpy/vendor/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def ls_dir(base_dir):

setup(
name="ampltools",
version="0.6.2",
version="0.6.3",
description="AMPL Python Tools",
long_description=__doc__,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit d6c8a79

Please sign in to comment.