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

Version/1.12.2 #492

Merged
merged 68 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
aeaef79
fix default worker bug with all steps
bgunnar5 May 4, 2023
ad75ed6
bugfix/worker-all-steps (#419)
bgunnar5 May 4, 2023
f7508dd
version bump and requirements fix
bgunnar5 May 4, 2023
c8c6a44
release/1.10.1 (#420)
bgunnar5 May 4, 2023
98e06f6
Bugfix/filename-special-vars (#425)
bgunnar5 May 25, 2023
b8dd2b2
Create dependabot-changelog-updater.yml
bgunnar5 May 26, 2023
4c40423
testing outputs of modifying changelog
bgunnar5 May 26, 2023
2d231fb
delete dependabot-changelog-updater
bgunnar5 May 26, 2023
6b142d9
feature/pdf-docs (#427)
bgunnar5 Jun 28, 2023
e3e1a30
bugfix/openfoam_singularity_issues (#426)
bgunnar5 Jun 28, 2023
12ff3d7
bugfix/output-path-substitution (#430)
bgunnar5 Jul 11, 2023
5c69c0b
bugfix/scheduler-permission-error (#436)
bgunnar5 Aug 4, 2023
c01f635
Release/1.10.2 (#437)
bgunnar5 Aug 4, 2023
7888493
resolve CHANGELOG conflict
bgunnar5 Aug 4, 2023
9c52ba2
resolve develop to main merge issues (#439)
bgunnar5 Aug 5, 2023
d63661c
resolve merge conflicts
bgunnar5 Aug 5, 2023
77d09c3
merge v1.10.2 into this branch
bgunnar5 Aug 14, 2023
b0f4d86
dependabot/certifi-requests-pygments (#441)
bgunnar5 Aug 17, 2023
c641c5c
bugfix/server-pip-redis-conf (#443)
bgunnar5 Aug 18, 2023
970a06f
bump to version 1.10.3 (#444)
bgunnar5 Aug 18, 2023
0384463
Merge branch 'main' into develop
bgunnar5 Aug 18, 2023
1977f1b
Merge remote-tracking branch 'origin/develop' into develop
bgunnar5 Aug 18, 2023
7155c6d
merge v1.10.3 to local main branch
bgunnar5 Aug 22, 2023
1b0fa95
trying to merge origin main
bgunnar5 Aug 22, 2023
d8bfbdb
bugfix/sphinx-5.3.0-requirement (#446)
bgunnar5 Aug 22, 2023
dabbd3f
Merge remote-tracking branch 'upstream-main/main'
bgunnar5 Aug 25, 2023
015e88b
Merge remote-tracking branch 'origin'
bgunnar5 Aug 25, 2023
ea715db
remove github text that was causing errors
bgunnar5 Aug 25, 2023
8241bfe
feature/vlauncher (#447)
bgunnar5 Sep 28, 2023
50d0fb6
release/1.11.0 (#448)
bgunnar5 Sep 28, 2023
066bea1
resolve merge conflicts
bgunnar5 Oct 5, 2023
99d5659
bugfix/skewed-sample-hierarchy (#450)
bgunnar5 Oct 9, 2023
593dbcd
bugfix/lsf-gpu-typo (#453)
bgunnar5 Oct 23, 2023
f994f96
release/1.11.1 (#454)
bgunnar5 Oct 23, 2023
89093dd
resolve merge conflict
bgunnar5 Oct 23, 2023
8d75482
pull changes from upstream main
bgunnar5 Oct 23, 2023
5dc8206
Add Pytest Fixtures to Test Suite (#456)
bgunnar5 Nov 2, 2023
38651f2
Bugfix for WEAVE CI (#457)
bgunnar5 Nov 15, 2023
b9afbdb
bugfix/monitor-shutdown (#452)
bgunnar5 Dec 12, 2023
642f925
Add the missing restart keyword to the specification docs. (#459)
koning Jan 19, 2024
40930c2
docs/conversion-to-mkdocs (#460)
bgunnar5 Jan 25, 2024
f36c58d
openfoam tutorial modifications (#463)
xorJane Feb 14, 2024
320d12f
feature/revamped status (#464)
bgunnar5 Feb 14, 2024
d111565
release/1.12.0 (#465)
bgunnar5 Feb 14, 2024
801d0bf
resolve merge conflicts with version bump
bgunnar5 Feb 14, 2024
acb1820
Merge remote-tracking branch 'upstream-main/main' into main
bgunnar5 Feb 15, 2024
9390448
feature/retry_priority (#468)
bgunnar5 Feb 22, 2024
de5367a
docs/server-cross-node (#470)
bgunnar5 Apr 10, 2024
cdad6e5
bugfix/initial-status-issues (#471)
bgunnar5 Apr 15, 2024
51d6787
release/1.12.1 (#472)
bgunnar5 Apr 15, 2024
4a07800
resolve merge conflicts with main
bgunnar5 Apr 16, 2024
bba68ab
fix a lint issue that somehow slipped through the cracks
bgunnar5 Apr 16, 2024
eace86f
Fix filenames for OpenFoam tutorial (#475)
xorJane Apr 30, 2024
f476a98
bugfix/deep-merge-existing-keys (#476)
bgunnar5 May 10, 2024
dd96092
Improved Info (#477)
lucpeterson May 16, 2024
12f2398
Target is in source's history (#478)
lucpeterson May 16, 2024
897312f
Fix link to merlin banner image (#479)
lucpeterson May 16, 2024
297d9d5
bugfix/status_nested_workspace (#480)
bgunnar5 May 22, 2024
4b4fdee
bugfix/celery-chord-error (#481)
bgunnar5 Jun 5, 2024
f29aabb
release/1.12.2b1 (#482)
bgunnar5 Jun 5, 2024
35c2039
resolve merge conflicts
bgunnar5 Jun 5, 2024
0f6bebf
bugfix/flux-nodes (#484)
bgunnar5 Jun 10, 2024
831bc40
bugfix/flux-nodes-prior-versions (#487)
bgunnar5 Jun 11, 2024
e919ee8
Change Task ID to directory path (#486)
lucpeterson Jun 12, 2024
773ef35
Adding Several New Unit Tests (#490)
bgunnar5 Oct 24, 2024
5bf7516
Merge remote-tracking branch 'upstream-main/main' into main
bgunnar5 Oct 28, 2024
dc0747f
release/1.12.2 (#491)
bgunnar5 Oct 28, 2024
9f6d2ef
resolve merge conflicts
bgunnar5 Oct 28, 2024
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ flux.out
slurm*.out
docs/build/

# Tox files
# Test files
.tox/*
.coverage

# Jupyter
jupyter/.ipynb_checkpoints
Expand Down
27 changes: 23 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to Merlin will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.12.2b1]
## [1.12.2]
### Added
- Conflict handler option to the `dict_deep_merge` function in `utils.py`
- Ability to add module-specific pytest fixtures
Expand All @@ -19,6 +19,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New step return code `$(MERLIN_RAISE_ERROR)` to force an error to be raised by a task (mainly for testing)
- Added description of this to docs
- New test to ensure a single failed task won't break a workflow
- Several new unit tests for the following subdirectories:
- `merlin/common/`
- `merlin/config/`
- `merlin/examples/`
- `merlin/server/`
- Context managers for the `conftest.py` file to ensure safe spin up and shutdown of fixtures
- `RedisServerManager`: context to help with starting/stopping a redis server for tests
- `CeleryWorkersManager`: context to help with starting/stopping workers for tests
- Ability to copy and print the `Config` object from `merlin/config/__init__.py`
- Equality method to the `ContainerFormatConfig` and `ContainerConfig` objects from `merlin/server/server_util.py`

### Changed
- `merlin info` is cleaner and gives python package info
Expand All @@ -28,6 +38,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added fixtures for `merlin status` tests that copy the workspace to a temporary directory so you can see exactly what's run in a test
- Batch block and workers now allow for variables to be used in node settings
- Task id is now the path to the directory
- Split the `start_server` and `config_server` functions of `merlin/server/server_commands.py` into multiple functions to make testing easier
- Split the `create_server_config` function of `merlin/server/server_config.py` into two functions to make testing easier
- Combined `set_snapshot_seconds` and `set_snapshot_changes` methods of `RedisConfig` into one method `set_snapshot`

### Fixed
- Bugfix for output of `merlin example openfoam_wf_singularity`
Expand Down Expand Up @@ -95,8 +108,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- this required adding a decent amount of test files to help with the tests; these can be found under the tests/unit/study/status_test_files directory
- Pytest fixtures in the `conftest.py` file of the integration test suite
- NOTE: an export command `export LC_ALL='C'` had to be added to fix a bug in the WEAVE CI. This can be removed when we resolve this issue for the `merlin server` command
- Tests for the `celeryadapter.py` module
- New CeleryTestWorkersManager context to help with starting/stopping workers for tests
- Coverage to the test suite. This includes adding tests for:
- `merlin/common/`
- `merlin/config/`
- `merlin/examples/`
- `celeryadapter.py`
- Context managers for the `conftest.py` file to ensure safe spin up and shutdown of fixtures
- `RedisServerManager`: context to help with starting/stopping a redis server for tests
- `CeleryWorkersManager`: context to help with starting/stopping workers for tests
- Ability to copy and print the `Config` object from `merlin/config/__init__.py`

### Changed
- Reformatted the entire `merlin status` command
Expand Down Expand Up @@ -132,7 +152,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The `merlin monitor` command will now keep an allocation up if the queues are empty and workers are still processing tasks
- Add the restart keyword to the specification docs
- Cyclical imports and config imports that could easily cause ci issues

## [1.11.1]
### Fixed
- Typo in `batch.py` that caused lsf launches to fail (`ALL_SGPUS` changed to `ALL_GPUS`)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
endif

VER?=1.0.0
VSTRING=[0-9]\+\.[0-9]\+\.[0-9]\+
VSTRING=[0-9]\+\.[0-9]\+\.[0-9]\+\(b[0-9]\+\)\?
YEAR=20[0-9][0-9]
NEW_YEAR?=2023
CHANGELOG_VSTRING="## \[$(VSTRING)\]"
Expand Down
4 changes: 2 additions & 2 deletions merlin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down Expand Up @@ -38,7 +38,7 @@
import sys


__version__ = "1.12.2b1"
__version__ = "1.12.2"
VERSION = __version__
PATH_TO_PROJ = os.path.join(os.path.dirname(__file__), "")

Expand Down
2 changes: 1 addition & 1 deletion merlin/ascii_art.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/abstracts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/abstracts/enums/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1
# This file is part of Merlin, Version: 1.12.2
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/openfilelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/opennpylib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
4 changes: 2 additions & 2 deletions merlin/common/sample_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down Expand Up @@ -225,8 +225,8 @@ def __setitem__(self, full_address, sub_tree):

# Replace if we already have something at this address.
if delete_me is not None:
self.children.__delitem__(full_address)
SampleIndex.check_valid_addresses_for_insertion(full_address, sub_tree)
self.children.__delitem__(full_address)
self.children[full_address] = sub_tree
return
raise KeyError
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/sample_index_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/security/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
11 changes: 5 additions & 6 deletions merlin/common/security/encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down Expand Up @@ -52,11 +52,10 @@ def _get_key_path():
except AttributeError:
key_filepath = "~/.merlin/encrypt_data_key"

try:
key_filepath = os.path.abspath(os.path.expanduser(key_filepath))
except KeyError as e:
raise ValueError("Error! No password provided for RabbitMQ") from e
return key_filepath
if key_filepath is None:
raise ValueError("Error! No password provided for RabbitMQ")

return os.path.abspath(os.path.expanduser(key_filepath))


def _gen_key(key_path):
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/security/encrypt_backend_traffic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/common/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
3 changes: 2 additions & 1 deletion merlin/common/util_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down Expand Up @@ -35,6 +35,7 @@
import numpy as np


# TODO should we move this to merlin-spellbook?
def scale_samples(samples_norm, limits, limits_norm=(0, 1), do_log=False):
"""Scale samples to new limits, either log10 or linearly.

Expand Down
33 changes: 31 additions & 2 deletions merlin/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand All @@ -31,7 +31,7 @@
"""
Used to store the application configuration.
"""

from copy import copy
from types import SimpleNamespace
from typing import Dict, List, Optional

Expand All @@ -56,6 +56,35 @@ def __init__(self, app_dict):
self.results_backend: Optional[SimpleNamespace]
self.load_app_into_namespaces(app_dict)

def __copy__(self):
"""
A magic method to allow this class to be copied with copy(instance_of_Config).
"""
cls = self.__class__
result = cls.__new__(cls)
copied_attrs = {
"celery": copy(self.__dict__["celery"]),
"broker": copy(self.__dict__["broker"]),
"results_backend": copy(self.__dict__["results_backend"]),
}
result.__dict__.update(copied_attrs)
return result

def __str__(self):
"""
A magic method so we can print the CONFIG class.
"""
formatted_str = "config:"
attrs = {"celery": self.celery, "broker": self.broker, "results_backend": self.results_backend}
for name, attr in attrs.items():
if attr is not None:
items = (f" {k}: {v!r}" for k, v in attr.__dict__.items())
joined_items = "\n".join(items)
formatted_str += f"\n {name}:\n{joined_items}"
else:
formatted_str += f"\n {name}:\n None"
return formatted_str

def load_app_into_namespaces(self, app_dict: Dict) -> None:
"""
Makes the application dictionary into a namespace, sets the attributes of the Config from the namespace values.
Expand Down
16 changes: 5 additions & 11 deletions merlin/config/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down Expand Up @@ -85,13 +85,13 @@ def get_rabbit_connection(include_password, conn="amqps"):
password_filepath = CONFIG.broker.password
LOG.debug(f"Broker: password filepath = {password_filepath}")
password_filepath = os.path.abspath(expanduser(password_filepath))
except KeyError as e: # pylint: disable=C0103
raise ValueError("Broker: No password provided for RabbitMQ") from e
except (AttributeError, KeyError) as exc:
raise ValueError("Broker: No password provided for RabbitMQ") from exc

try:
password = read_file(password_filepath)
except IOError as e: # pylint: disable=C0103
raise ValueError(f"Broker: RabbitMQ password file {password_filepath} does not exist") from e
except IOError as exc:
raise ValueError(f"Broker: RabbitMQ password file {password_filepath} does not exist") from exc

try:
port = CONFIG.broker.port
Expand Down Expand Up @@ -205,12 +205,6 @@ def get_connection_string(include_password=True):
except AttributeError:
broker = ""

try:
config_path = CONFIG.celery.certs
config_path = os.path.abspath(os.path.expanduser(config_path))
except AttributeError:
config_path = None

if broker not in BROKERS:
raise ValueError(f"Error: {broker} is not a supported broker.")
return _sort_valid_broker(broker, include_password)
Expand Down
2 changes: 1 addition & 1 deletion merlin/config/celeryconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion merlin/config/configfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# LLNL-CODE-797170
# All rights reserved.
# This file is part of Merlin, Version: 1.12.2b1.
# This file is part of Merlin, Version: 1.12.2.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
Loading
Loading