Skip to content

Commit

Permalink
Fix push command (#53)
Browse files Browse the repository at this point in the history
* Fix optimizer status in ask

* Fix bug when a discipline name is substring of another discipline name

* Fix help messages

* BUmp 2.5.5

* Drop tests on py3.8, add py3.11

* Update changelog
  • Loading branch information
relf authored Jan 11, 2024
1 parent bda5f22 commit bf02025
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- name: Checkout sources
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
* 2.5.5 (12/01/2023)
* Fix `wop push` command when a discipline name is substring of another

* 2.5.4 (25/10/2023)
* Fix error message handling
* Remove already told check

* 2.5.3 (27/06/2023)
* Fix `wop` publication from GitHub action

* 2.5.2 (27/06/2023)
* Update packaging and CI actions

* 2.5.1 (05/06/2023)
* `wop build`: Remove annoying `BetaConfiguration` warning
* `wop pull <source_id>`: Fix bug pull source not working
Expand Down
2 changes: 1 addition & 1 deletion whatsopt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.5.4"
__version__ = "2.5.5"
2 changes: 1 addition & 1 deletion whatsopt/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def ask(self, with_best=False):
"Time out: please check status and history and may be ask again."
)

self.status = self.PENDING
self._status = self.PENDING

return self._x_suggested, self._status, self._x_best, self._y_best

Expand Down
5 changes: 4 additions & 1 deletion whatsopt/push_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ def _populate_varattrs_from_outputs(self, mda_attrs, group_prefix=""):
scope = discattrs["name"]
if mda_prefix:
scope = mda_prefix + scope
if ".".join(mda).startswith(scope):
mda_name = ".".join(mda)
if mda_name == scope or (
mda_name.startswith(scope) and mda_name[len(scope)] == "."
):
vattr = {
"name": varattrs["name"],
"desc": self.vardescs.get(absname, ""),
Expand Down
4 changes: 2 additions & 2 deletions whatsopt/wop.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def status(ctx):
"-d",
"--depth",
default=DEFAULT_PUSH_DEPTH,
help="specify the max depth of the sub-analysis nesting (0 meaning no limit, default is 3)",
help="specify the max depth of the sub-analysis nesting (0 meaning no limit, default is 2)",
)
@click.option(
"--json",
Expand Down Expand Up @@ -407,7 +407,7 @@ def upload(
"-d",
"--depth",
default=DEFAULT_PUSH_DEPTH,
help="specify the max depth of the sub-analysis nesting (0 meaning no limit, default is 3)",
help="specify the max depth of the sub-analysis nesting (0 meaning no limit, default is 2)",
)
@click.pass_context
def show(ctx, analysis_id, pbfile, name, outfile, batch, depth):
Expand Down

0 comments on commit bf02025

Please sign in to comment.