Skip to content

Commit

Permalink
Version/1.12.2b1 (#483)
Browse files Browse the repository at this point in the history
* fix default worker bug with all steps

* version bump and requirements fix

* Bugfix/filename-special-vars (#425)

* fix file naming bug

* fix filename bug with variable as study name

* add tests for the file name special vars changes

* modify changelog

* implement Luc's suggestions

* remove replace line

* Create dependabot-changelog-updater.yml

* testing outputs of modifying changelog

* delete dependabot-changelog-updater

* feature/pdf-docs (#427)

* first attempt at adding pdf

* fixing build error

* modify changelog to show docs changes

* fix errors Luc found in the build logs

* trying out removal of latex

* reverting latex changes back

* uncommenting the latex_elements settings

* adding epub to see if latex will build

* adding a latex engine variable to conf

* fix naming error with latex_engine

* attempting to add a logo to the pdf build

* testing an override to the searchtools file

* revert back to not using searchtools override

* update changelog

* bugfix/openfoam_singularity_issues (#426)

* fix openfoam_singularity issues

* update requirements and descriptions for openfoam examples

* bugfix/output-path-substitution (#430)

* fix bug with output_path and variable substitution

* add tests for cli substitutions

* bugfix/scheduler-permission-error (#436)

* Release/1.10.2 (#437)

* bump version to 1.10.2

* bump version in CHANGELOG

* resolve develop to main merge issues (#439)

* fix default worker bug with all steps

* version bump and requirements fix

* dependabot/certifi-requests-pygments (#441)

* Bump certifi from 2022.12.7 to 2023.7.22 in /docs

Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](certifi/python-certifi@2022.12.07...2023.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* add all dependabot changes and update CHANGELOG

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bugfix/server-pip-redis-conf (#443)

* add *.conf to the MANIFEST file so pip will grab the redis.conf file

* add note explaining how to fix a hanging merlin server start

* modify CHANGELOG

* add second export option to docs and fix typo

* bump to version 1.10.3 (#444)

* bugfix/sphinx-5.3.0-requirement (#446)

* Version/1.10.3 (#445)

* fix default worker bug with all steps

* version bump and requirements fix

* Bugfix/filename-special-vars (#425)

* fix file naming bug

* fix filename bug with variable as study name

* add tests for the file name special vars changes

* modify changelog

* implement Luc's suggestions

* remove replace line

* Create dependabot-changelog-updater.yml

* testing outputs of modifying changelog

* delete dependabot-changelog-updater

* feature/pdf-docs (#427)

* first attempt at adding pdf

* fixing build error

* modify changelog to show docs changes

* fix errors Luc found in the build logs

* trying out removal of latex

* reverting latex changes back

* uncommenting the latex_elements settings

* adding epub to see if latex will build

* adding a latex engine variable to conf

* fix naming error with latex_engine

* attempting to add a logo to the pdf build

* testing an override to the searchtools file

* revert back to not using searchtools override

* update changelog

* bugfix/openfoam_singularity_issues (#426)

* fix openfoam_singularity issues

* update requirements and descriptions for openfoam examples

* bugfix/output-path-substitution (#430)

* fix bug with output_path and variable substitution

* add tests for cli substitutions

* bugfix/scheduler-permission-error (#436)

* Release/1.10.2 (#437)

* bump version to 1.10.2

* bump version in CHANGELOG

* resolve develop to main merge issues (#439)

* fix default worker bug with all steps

* version bump and requirements fix

* dependabot/certifi-requests-pygments (#441)

* Bump certifi from 2022.12.7 to 2023.7.22 in /docs

Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](certifi/python-certifi@2022.12.07...2023.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* add all dependabot changes and update CHANGELOG

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bugfix/server-pip-redis-conf (#443)

* add *.conf to the MANIFEST file so pip will grab the redis.conf file

* add note explaining how to fix a hanging merlin server start

* modify CHANGELOG

* add second export option to docs and fix typo

* bump to version 1.10.3 (#444)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* change hardcoded sphinx requirement

* update CHANGELOG

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feature/vlauncher (#447)

* fix file naming error for iterative workflows

* fixed small bug with new filepath naming

* add VLAUNCHER functionality

* add docs for VLAUNCHER and modify changelog

* re-word docs and fix table format

* add a test for vlauncher

* run fix-style and add a test for vlauncher

* Add the find_vlaunch_var and setup_vlaunch functions.
The numeric value of the shell variables may not be defined until run
time, so replace with variable strings instead of values.
Consolidate the commands into one function.

* Add variable set for (t)csh.

* Run fix-style

* make step settings the defaults and ignore commented lines

* add some additional tests

* remove regex library import

---------

Co-authored-by: Joseph M. Koning <koning1@llnl.gov>

* release/1.11.0 (#448)

* bugfix/skewed-sample-hierarchy (#450)

* add patch for skewed sample hierarchy/additional samples

* update changelog

* catch narrower range of exceptions

* bugfix/lsf-gpu-typo (#453)

* fix typo in batch.py that causes a bug

* change print statements to log statements

* release/1.11.1 (#454)

* Add Pytest Fixtures to Test Suite (#456)

* begin work on integration refactor; create fixtures and initial tests

* update CHANGELOG and run fix-style

* add pytest fixtures and README explaining them

* add tests to demonstrate how to use the fixtures

* move/rename some files and modify integration's README

* add password change to redis.pass file

* fix lint issues

* modify redis pwd for test server to be constant for each test

* fix lint issue only caught on github ci

* Bugfix for WEAVE CI (#457)

* begin work on integration refactor; create fixtures and initial tests

* update CHANGELOG and run fix-style

* add pytest fixtures and README explaining them

* add tests to demonstrate how to use the fixtures

* move/rename some files and modify integration's README

* add password change to redis.pass file

* fix lint issues

* modify redis pwd for test server to be constant for each test

* fix lint issue only caught on github ci

* add fix for merlin server startup

* update CHANGELOG

* bugfix/monitor-shutdown (#452)

* add celery query to see if workers still processing tasks

* fix merlin status when using redis as broker

* fix consumer count bug and run fix-style

* fix linter issues

* update changelog

* update docs for monitor

* remove unused exception I previously added

* first attempt at using pytest fixtures for monitor tests

* (partially) fix launch_workers fixture so it can be used in multiple classes

* fix linter issues and typo on pytest decorator

* update black's python version and fix style issue

* remove print statements from celeryadapter.py

* workers manager is now allowed to be used as a context manager

* add one thing to changelog and remove print statement

* Add the missing restart keyword to the specification docs. (#459)

* docs/conversion-to-mkdocs (#460)

* remove a merge conflict statement that was missed

* add base requirements for mkdocs

* set up configuration for API docs

* start work on porting user guide to mkdocs

* add custom styling and contact page

* begin work on porting tutorial to mkdocs

* add new examples page

* move old sphinx docs to their own folder (*delete later*)

* modify some admonitions to be success

* modify hello examples page and port step 3 of tutorial to mkdocs

* fix typo in hello example

* finish porting step 4 of tutorial to mkdocs

* port part 5 of the tutorial to mkdocs

* copy faq and contributing from old docs

* port step 6 of tutorial to mkdocs

* remove unused prereq

* port step 7 of tutorial to mkdocs

* add more detailed instructions on contributing

* move venv page into installation and add spack instructions too

* add configuration docs

* add content to user guide landing page

* port celery page to mkdocs

* rearrange configuration pages to add in merlin server configuration instructions

* port command line page to mkdocs

* finish new landing page

* change size of merlin logo

* port variables page to mkdocs

* fix broken links to configuration page

* port FAQ to mkdocs

* fix incorrect requirement name

* update CHANGELOG

* attempt to get docs to build through readthedocs

* port docker page to mkdocs

* port contributing guide to mkdocs

* add new 'running studies' page

* add path changes to images

* add a page on how to interpret study output

* add page on the spec file

* remove old sphinx docs that are no longer needed

* added README to docs and updated CHANGELOG

* fix copyright and hello_samples tree

* rearrange images/stylesheets and statements that use them

* add suggestions from Luc and Joe

* add tcsh instructions for venv activation

* add Charle's suggestions for the landing page

* change tcsh mentions to csh

* openfoam tutorial modifications (#463)

* feature/revamped status (#464)

* feature/new-status (#442)

* add backend functionality for merlin status

* add frontend functionality for merlin status

* add tests for merlin status

* run fix-style and remove import of deprecated function

* update CHANGELOG

* add more logging statements, make better use of glob

* run fix-style

* clean up test files a bit

* fix test suite after step_name_map mod

* add avg/std dev run time calculations to status

* modify status tests to accommodate new avg/std dev calculations

* fix linter issues

* fix lint issue and add test for avg/std dev calc

* feature/detailed-status (#451)

* Version/1.11.0 (#449)

* fix default worker bug with all steps

* version bump and requirements fix

* Bugfix/filename-special-vars (#425)

* fix file naming bug

* fix filename bug with variable as study name

* add tests for the file name special vars changes

* modify changelog

* implement Luc's suggestions

* remove replace line

* Create dependabot-changelog-updater.yml

* testing outputs of modifying changelog

* delete dependabot-changelog-updater

* feature/pdf-docs (#427)

* first attempt at adding pdf

* fixing build error

* modify changelog to show docs changes

* fix errors Luc found in the build logs

* trying out removal of latex

* reverting latex changes back

* uncommenting the latex_elements settings

* adding epub to see if latex will build

* adding a latex engine variable to conf

* fix naming error with latex_engine

* attempting to add a logo to the pdf build

* testing an override to the searchtools file

* revert back to not using searchtools override

* update changelog

* bugfix/openfoam_singularity_issues (#426)

* fix openfoam_singularity issues

* update requirements and descriptions for openfoam examples

* bugfix/output-path-substitution (#430)

* fix bug with output_path and variable substitution

* add tests for cli substitutions

* bugfix/scheduler-permission-error (#436)

* Release/1.10.2 (#437)

* bump version to 1.10.2

* bump version in CHANGELOG

* resolve develop to main merge issues (#439)

* fix default worker bug with all steps

* version bump and requirements fix

* dependabot/certifi-requests-pygments (#441)

* Bump certifi from 2022.12.7 to 2023.7.22 in /docs

Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](certifi/python-certifi@2022.12.07...2023.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* add all dependabot changes and update CHANGELOG

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bugfix/server-pip-redis-conf (#443)

* add *.conf to the MANIFEST file so pip will grab the redis.conf file

* add note explaining how to fix a hanging merlin server start

* modify CHANGELOG

* add second export option to docs and fix typo

* bump to version 1.10.3 (#444)

* bugfix/sphinx-5.3.0-requirement (#446)

* Version/1.10.3 (#445)

* fix default worker bug with all steps

* version bump and requirements fix

* Bugfix/filename-special-vars (#425)

* fix file naming bug

* fix filename bug with variable as study name

* add tests for the file name special vars changes

* modify changelog

* implement Luc's suggestions

* remove replace line

* Create dependabot-changelog-updater.yml

* testing outputs of modifying changelog

* delete dependabot-changelog-updater

* feature/pdf-docs (#427)

* first attempt at adding pdf

* fixing build error

* modify changelog to show docs changes

* fix errors Luc found in the build logs

* trying out removal of latex

* reverting latex changes back

* uncommenting the latex_elements settings

* adding epub to see if latex will build

* adding a latex engine variable to conf

* fix naming error with latex_engine

* attempting to add a logo to the pdf build

* testing an override to the searchtools file

* revert back to not using searchtools override

* update changelog

* bugfix/openfoam_singularity_issues (#426)

* fix openfoam_singularity issues

* update requirements and descriptions for openfoam examples

* bugfix/output-path-substitution (#430)

* fix bug with output_path and variable substitution

* add tests for cli substitutions

* bugfix/scheduler-permission-error (#436)

* Release/1.10.2 (#437)

* bump version to 1.10.2

* bump version in CHANGELOG

* resolve develop to main merge issues (#439)

* fix default worker bug with all steps

* version bump and requirements fix

* dependabot/certifi-requests-pygments (#441)

* Bump certifi from 2022.12.7 to 2023.7.22 in /docs

Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](certifi/python-certifi@2022.12.07...2023.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* add all dependabot changes and update CHANGELOG

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bugfix/server-pip-redis-conf (#443)

* add *.conf to the MANIFEST file so pip will grab the redis.conf file

* add note explaining how to fix a hanging merlin server start

* modify CHANGELOG

* add second export option to docs and fix typo

* bump to version 1.10.3 (#444)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* change hardcoded sphinx requirement

* update CHANGELOG

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feature/vlauncher (#447)

* fix file naming error for iterative workflows

* fixed small bug with new filepath naming

* add VLAUNCHER functionality

* add docs for VLAUNCHER and modify changelog

* re-word docs and fix table format

* add a test for vlauncher

* run fix-style and add a test for vlauncher

* Add the find_vlaunch_var and setup_vlaunch functions.
The numeric value of the shell variables may not be defined until run
time, so replace with variable strings instead of values.
Consolidate the commands into one function.

* Add variable set for (t)csh.

* Run fix-style

* make step settings the defaults and ignore commented lines

* add some additional tests

* remove regex library import

---------

Co-authored-by: Joseph M. Koning <koning1@llnl.gov>

* release/1.11.0 (#448)

* bugfix/skewed-sample-hierarchy (#450)

* add patch for skewed sample hierarchy/additional samples

* update changelog

* catch narrower range of exceptions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joseph M. Koning <koning1@llnl.gov>

* add functionality for the detailed-status command

* add tests for detailed-status

* fix linter issues

* update changelog

* general cleanup and add log statements

* slightly modify two tests

* default status renderer now uses json status format

* remove inaccurate comment

* bugfix/lsf-gpu-typo (#453)

* fix typo in batch.py that causes a bug

* change print statements to log statements

* release/1.11.1 (#454)

* Add Pytest Fixtures to Test Suite (#456)

* begin work on integration refactor; create fixtures and initial tests

* update CHANGELOG and run fix-style

* add pytest fixtures and README explaining them

* add tests to demonstrate how to use the fixtures

* move/rename some files and modify integration's README

* add password change to redis.pass file

* fix lint issues

* modify redis pwd for test server to be constant for each test

* fix lint issue only caught on github ci

* Bugfix for WEAVE CI (#457)

* begin work on integration refactor; create fixtures and initial tests

* update CHANGELOG and run fix-style

* add pytest fixtures and README explaining them

* add tests to demonstrate how to use the fixtures

* move/rename some files and modify integration's README

* add password change to redis.pass file

* fix lint issues

* modify redis pwd for test server to be constant for each test

* fix lint issue only caught on github ci

* add fix for merlin server startup

* update CHANGELOG

* bugfix/monitor-shutdown (#452)

* add celery query to see if workers still processing tasks

* fix merlin status when using redis as broker

* fix consumer count bug and run fix-style

* fix linter issues

* update changelog

* update docs for monitor

* remove unused exception I previously added

* first attempt at using pytest fixtures for monitor tests

* (partially) fix launch_workers fixture so it can be used in multiple classes

* fix linter issues and typo on pytest decorator

* update black's python version and fix style issue

* remove print statements from celeryadapter.py

* workers manager is now allowed to be used as a context manager

* add one thing to changelog and remove print statement

* Add the missing restart keyword to the specification docs. (#459)

* add Jeremy's suggestion to change vars option to output-path

* remove unnecessary lines from CHANGELOG

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joseph M. Koning <koning1@llnl.gov>
Co-authored-by: Joe Koning <koning@users.noreply.github.com>

* feature/queue info (#461)

* remove a merge conflict statement that was missed

* add queue-info functionality

* add tests for queue-info

* update CHANGELOG

* add try/except for forceful termination of test workers

* change github workflow to use py38 with black instead of py36

* run fix-style with py 3.12 and fix a typo in a test

* add filetype check for dump option

* add banner print statement

* docs/revamped status (#462)

* fix broken image link in README

* add new commands to the command line page

* add monitoring docs layout and complete status cmds page

* fix bug with dumping queue-info to files

* add docs for queue-info

* add documentation for 'query-workers'

* add reference to new query-workers docs and split a paragraph

* fix small bug with --steps option of monitor

* add documentation for monitor command

* update CHANGELOG

* fix dump-csv image for queue-info

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joseph M. Koning <koning1@llnl.gov>
Co-authored-by: Joe Koning <koning@users.noreply.github.com>

* release/1.12.0 (#465)

* remove a merge conflict statement that was missed

* bump version to 1.12.0

* feature/retry_priority (#468)

* remove a merge conflict statement that was missed

* add a 'pip freeze' call in github workflow to view reqs versions

* add new retry priority as highest task priority

* update CHANGELOG

* add in MID priority

* change default priority to use priority map MID value

* docs/server-cross-node (#470)

* remove a merge conflict statement that was missed

* add a 'pip freeze' call in github workflow to view reqs versions

* rename the merlin server config page

* add instructions for running a cross-node workflow w/ containerized server

* update CHANGELOG

* bugfix/initial-status-issues (#471)

* remove a merge conflict statement that was missed

* add a 'pip freeze' call in github workflow to view reqs versions

* fix bug with dry run status

* set MANPAGER for detailed-status

* fix bug with 1 sample removing the status file

* add support for multiple workers on one step in status files

* update test suite to accommodate changes to workers in status files

* add catch and potential fix for JSONDecodeError

* fix docstring of a test

* update CHANGELOG.md

* run fix style and add Luc's suggestions

* run fix-style with python 3.12

* added additional check for status file while condensing

* add try/except to catch an error for dumping statuses

* release/1.12.1 (#472)

* remove a merge conflict statement that was missed

* add a 'pip freeze' call in github workflow to view reqs versions

* bump version to 1.12.1

* fix a lint issue that somehow slipped through the cracks

* Fix filenames for OpenFoam tutorial (#475)

* bugfix/deep-merge-existing-keys (#476)

* remove a merge conflict statement that was missed

* add a 'pip freeze' call in github workflow to view reqs versions

* remove DeepMergeException and add conflict_handler to dict_deep_merge

* add conflict handler to dict_deep_merge

* fix broken tests for detailed-status

* use caplog fixture rather than IO stream

* add ability to define module-specific fixtures

* add tests for read/write status files and conlict handling

* add caplog explanation to docstrings

* update CHANGELOG

* run fix-style

* add pytest-mock as dependency for test suite

* clean up input check in dict_deep_merge

* Improved Info (#477)

* Add merlin version to banner

* Add python package info to and clean up 'merlin info'

* Add some unit tests

* Force GitHub runner checkout to grab the whole history, fixing CHANGELOG test bug

* Update CHANGELOG to show bugfix to CHANGELOG test

* Target is in source's history (#478)

* New github action test to make sure target has been merged into source

* Fix link to merlin banner image (#479)

* bugfix/status_nested_workspace (#480)

* remove a merge conflict statement that was missed

* have status ignore nested workspaces and modify merge rules

* update CHANGELOG

* fixed issue with escape sequences in ascii art

* apply Luc's suggestion

* add setuptools as a requirement since python 3.12 doesn't have it natively

* modify unit tests for status to use pytest rather than unittest

* update CHANGELOG

* add fixtures for status testing and add nested workflow test

* update CHANGELOG

* bugfix/celery-chord-error (#481)

* remove a merge conflict statement that was missed

* add celery results backend patch to stop ChordErrors

* add MERLIN_RAISE_ERROR return code

* add tests to ensure chord error isn't raised

* add RAISE_ERROR to docs

* update CHANGELOG

* fix lint issues

* up the sleep time on the chord error test

* add new steps to the chord err test spec

* add tree statement to the new test for debugging

* upping sleep time to see if that fixes github action for python 3.7

* change sleep time for new test based on python version

* run fix style

* remove specific sleep time for diff python versions

* release/1.12.2b1 (#482)

* remove a merge conflict statement that was missed

* bump version to 1.12.2b1

* bugfix/flux-nodes (#484)

* remove a merge conflict statement that was missed

* fix flux node allocation issue

* allow for vars to be used with nodes settings of workers/batch

* add tests for var usage with nodes

* update CHANGELOG

* run fix-style

* bugfix/flux-nodes-prior-versions (#487)

* add a version check for flux when getting node count

* update CHANGELOG

* add major version check for flux

* Change Task ID to directory path (#486)

* Modifying task id to include directory

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joseph M. Koning <koning1@llnl.gov>
Co-authored-by: Joe Koning <koning@users.noreply.github.com>
Co-authored-by: Jane Herriman <xorJane@users.noreply.github.com>
Co-authored-by: Luc Peterson <peterson76@llnl.gov>
  • Loading branch information
6 people authored Jun 12, 2024
1 parent b4321d0 commit 9e27798
Show file tree
Hide file tree
Showing 84 changed files with 1,646 additions and 265 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/push-pr_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,29 @@ jobs:
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v1
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Checkout the whole history, in case the target is way far behind

- name: Check if target branch has been merged
run: |
if git merge-base --is-ancestor ${{ github.event.pull_request.base.sha }} ${{ github.sha }}; then
echo "Target branch has been merged into the source branch."
else
echo "Target branch has not been merged into the source branch. Please merge in target first."
exit 1
fi
- name: Check that CHANGELOG has been updated
run: |
# If this step fails, this means you haven't updated the CHANGELOG.md file with notes on your contribution.
git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '^CHANGELOG.md$' && echo "Thanks for helping keep our CHANGELOG up-to-date!"
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q '^CHANGELOG.md$'; then
echo "Thanks for helping keep our CHANGELOG up-to-date!"
else
echo "Please update the CHANGELOG.md file with notes on your contribution."
exit 1
fi
Lint:
runs-on: ubuntu-latest
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,40 @@ 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]
### Added
- Conflict handler option to the `dict_deep_merge` function in `utils.py`
- Ability to add module-specific pytest fixtures
- Added fixtures specifically for testing status functionality
- Added tests for reading and writing status files, and status conflict handling
- Added tests for the `dict_deep_merge` function
- Pytest-mock as a dependency for the test suite (necessary for using mocks and fixtures in the same test)
- New github action test to make sure target branch has been merged into the source first, so we know histories are ok
- Check in the status commands to make sure we're not pulling statuses from nested workspaces
- Added `setuptools` as a requirement for python 3.12 to recognize the `pkg_resources` library
- Patch to celery results backend to stop ChordErrors being raised and breaking workflows when a single task fails
- 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

### Changed
- `merlin info` is cleaner and gives python package info
- merlin version now prints with every banner message
- Applying filters for `merlin detailed-status` will now log debug statements instead of warnings
- Modified the unit tests for the `merlin status` command to use pytest rather than unittest
- 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

### Fixed
- Bugfix for output of `merlin example openfoam_wf_singularity`
- A bug with the CHANGELOG detection test when the target branch isn't in the ci runner history
- Link to Merlin banner in readme
- Issue with escape sequences in ascii art (caught by python 3.12)
- Bug where Flux wasn't identifying total number of nodes on an allocation
- Not supporting Flux versions below 0.17.0


## [1.12.1]
### Added
- New Priority.RETRY value for the Celery task priorities. This will be the new highest priority.
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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Pull requests](https://img.shields.io/github/issues-pr/LLNL/merlin)](https://github.com/LLNL/merlin/pulls)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/LLNL/merlin.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/LLNL/merlin/context:python)

![Merlin](https://raw.githubusercontent.com/LLNL/merlin/main/docs/images/merlin.png)
![Merlin](https://raw.githubusercontent.com/LLNL/merlin/main/docs/assets/images/merlin_banner_white.png)

## A brief introduction to Merlin
Merlin is a tool for running machine learning based workflows. The goal of
Expand Down
26 changes: 13 additions & 13 deletions docs/tutorial/4_run_simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ In the `openfoam_wf_singularity` directory you should see the following:
<figcaption>Fig 3. openfoam_wf Directory Structure</figcaption>
</figure>

- `openfoam_wf.yaml` -- this spec file is partially blank. You will fill in the gaps as you follow this module's steps.
- `openfoam_wf_template.yaml` -- this is a complete spec file. You can always reference it as an example.
- `openfoam_wf_singularity.yaml` -- this spec file is partially blank. You will fill in the gaps as you follow this module's steps.
- `openfoam_wf_singularity_template.yaml` -- this is a complete spec file. You can always reference it as an example.
- `scripts` -- This directory contains all the necessary scripts for this module.
- We'll be exploring these scripts as we go with the tutorial.
- `requirements.txt` -- this is a text file listing this workflow's python dependencies.
Expand All @@ -87,22 +87,22 @@ We are going to build a spec file that produces this DAG:
<figcaption>Fig 4. OpenFOAM DAG</figcaption>
</figure>

**To start, open** `openfoam_wf.yaml` **using your favorite text editor.**
**To start, open** `openfoam_wf_singularity.yaml` **using your favorite text editor.**

It should look something like this:

???+ abstract "Initial Contents of the Spec"

<!--codeinclude-->
[openfoam_wf.yaml](../../merlin/examples/workflows/openfoam_wf_singularity/openfoam_wf.yaml)
[openfoam_wf_singularity.yaml](../../merlin/examples/workflows/openfoam_wf_singularity/openfoam_wf_singularity.yaml)
<!--/codeinclude-->

### Variables

First we specify some variables to make our life easier. Locate the `env` block in our yaml spec:

<!--codeinclude-->
[](../../merlin/examples/workflows/openfoam_wf_singularity/openfoam_wf.yaml) lines:9-15
[](../../merlin/examples/workflows/openfoam_wf_singularity/openfoam_wf_singularity.yaml) lines:9-15
<!--/codeinclude-->

The `OUTPUT_PATH` variable is set to tell Merlin where you want your output directory to be written. The default is the current working directory.
Expand Down Expand Up @@ -254,7 +254,7 @@ nonsimworkers:

### Putting It All Together

By the end, your `openfoam_wf.yaml` should look like the template version in the same directory:
By the end, your `openfoam_wf_singularity.yaml` should look like the template version in the same directory:

???+ abstract "Complete Spec File"

Expand All @@ -273,21 +273,21 @@ Now that you are done with the Specification file, use the following commands fr
Create the DAG and send tasks to the server with:

```bash
merlin run openfoam_wf.yaml
merlin run openfoam_wf_singularity.yaml
```

Open a new terminal window, then start the workers that will consume the tasks we just queued by using:

```bash
merlin run-workers openfoam_wf.yaml
merlin run-workers openfoam_wf_singularity.yaml
```

But wait! We realize that 10 samples is not enough to train a good model. We would like to restart with 100 samples instead of 10 (should take about 6 minutes):

After sending the workers to start on their queues, we need to first stop the workers:

```bash
merlin stop-workers --spec openfoam_wf.yaml
merlin stop-workers --spec openfoam_wf_singularity.yaml
```

!!! tip
Expand All @@ -297,25 +297,25 @@ merlin stop-workers --spec openfoam_wf.yaml
We stopped these tasks from running but if we were to run the workflow again (with 100 samples instead of 10), we would continue running the 10 samples first! This is because the queues are still filled with the previous attempt's tasks. This can be seen with:

```bash
merlin status openfoam_wf.yaml
merlin status openfoam_wf_singularity.yaml
```

We need to purge these queues first in order to repopulate them with the appropriate tasks. This is where we use the `merlin purge` command:

```bash
merlin purge openfoam_wf.yaml
merlin purge openfoam_wf_singularity.yaml
```

Now we are free to repopulate the queues with the 100 samples. In our terminal window that's not designated for our workers, we'll queue up tasks again, this time with 100 samples:

```bash
merlin run openfoam_wf.yaml --vars N_SAMPLES=100
merlin run openfoam_wf_singularity.yaml --vars N_SAMPLES=100
```

Then in our window for workers, we'll execute:

```bash
merlin run-workers openfoam_wf.yaml
merlin run-workers openfoam_wf_singularity.yaml
```

To see your results, look inside the `learn` output directory. You should see a png that looks like this:
Expand Down
1 change: 1 addition & 0 deletions docs/user_guide/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,4 @@ If necessary, users can raise their own return codes within steps. The table bel
| <pre>`$(MERLIN_SOFT_FAIL)`</pre> | Mark this step as a failure, note in the warning log but keep executing the workflow. Unknown return codes get translated to soft fails, so that they can be logged. | <pre><code><span>echo "Uh-oh, this sample didn't work"</span></br><span>exit $(MERLIN_SOFT_FAIL)</span></code></pre> |
| <pre>`$(MERLIN_HARD_FAIL)`</pre> | Something went terribly wrong and we need to stop the whole workflow. Raises a `HardFailException` and stops all workers connected to that step. Workers will stop after a 60 second delay to allow the step to be acknowledged by the server. <div class="admonition note"><p class="admonition-title">Note</p><p>Workers in isolated parts of the workflow not consuming from the bad step will continue. you can stop all workers with `$(MERLIN_STOP_WORKERS)`</p></div> | <pre><code><span>echo "Oh no, we've created skynet! Abort!"</span></br><span>exit $(MERLIN_HARD_FAIL)</span></code></pre> |
| <pre>`$(MERLIN_STOP_WORKERS)`</pre> | Launch a task to stop all active workers. To allow the current task to finish and acknowledge the results to the server, will happen in 60 seconds. | <pre><code><span># send a signal to all workers to stop</span></br><span>exit $(MERLIN_STOP_WORKERS)</span></code></pre> |
| <pre>`$(MERLIN_RAISE_ERROR)`</pre> | Purposefully raise a general exception. *This is intended to be used for testing, you'll likely want to use `$(MERLIN_SOFT_FAIL)` instead.* | <pre><code><span># send a signal to raise an exception</span></br><span>exit $(MERLIN_RAISE_ERROR)</span></code></pre> |
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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down Expand Up @@ -38,7 +38,7 @@
import sys


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

Expand Down
14 changes: 9 additions & 5 deletions 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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand All @@ -30,6 +30,9 @@

# pylint: skip-file

from merlin import VERSION


"""
Holds ascii art strings.
"""
Expand Down Expand Up @@ -93,11 +96,11 @@
__ __ _ _
| \/ | | (_)
| \ / | ___ _ __| |_ _ __
| |\/| |/ _ \ '__| | | '_ \
| \\/ | | (_)
| \\ / | ___ _ __| |_ _ __
| |\\/| |/ _ \\ '__| | | '_ \\
| | | | __/ | | | | | | |
|_| |_|\___|_| |_|_|_| |_|
|_| |_|\\___|_| |_|_|_| |_|
Machine Learning for HPC Workflows
Expand Down Expand Up @@ -127,6 +130,7 @@ def _make_banner():
for hat_line, name_line in zip(hat_lines, name_lines):
banner = banner + hat_line + name_line + "\n"

banner = banner + f" v. {VERSION}\n"
return banner


Expand Down
39 changes: 36 additions & 3 deletions 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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down Expand Up @@ -36,8 +36,10 @@
from typing import Dict, Optional, Union

import billiard
import celery
import psutil
from celery import Celery
from celery import Celery, states
from celery.backends.redis import RedisBackend # noqa: F401 ; Needed for celery patch
from celery.signals import worker_process_init

import merlin.common.security.encrypt_backend_traffic
Expand All @@ -50,6 +52,37 @@
LOG: logging.Logger = logging.getLogger(__name__)


def patch_celery():
"""
Patch redis backend so that errors in chords don't break workflows.
Celery has error callbacks but they do not work properly on chords that
are nested within chains.
Credit to this function goes to: https://danidee10.github.io/2019/07/09/celery-chords.html
"""

def _unpack_chord_result(
self,
tup,
decode,
EXCEPTION_STATES=states.EXCEPTION_STATES,
PROPAGATE_STATES=states.PROPAGATE_STATES,
):
_, tid, state, retval = decode(tup)

if state in EXCEPTION_STATES:
retval = self.exception_to_python(retval)
if state in PROPAGATE_STATES:
# retval is an Exception
retval = f"{retval.__class__.__name__}: {str(retval)}"

return retval

celery.backends.redis.RedisBackend._unpack_chord_result = _unpack_chord_result

return celery


# This function has to have specific args/return values for celery so ignore pylint
def route_for_task(name, args, kwargs, options, task=None, **kw): # pylint: disable=W0613,R1710
"""
Expand Down Expand Up @@ -82,7 +115,7 @@ def route_for_task(name, args, kwargs, options, task=None, **kw): # pylint: dis
RESULTS_BACKEND_URI = None

# initialize app with essential properties
app: Celery = Celery(
app: Celery = patch_celery().Celery(
"merlin",
broker=BROKER_URI,
backend=RESULTS_BACKEND_URI,
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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# 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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
3 changes: 2 additions & 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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down Expand Up @@ -48,3 +48,4 @@ class ReturnCode(IntEnum):
DRY_OK = 103
RETRY = 104
STOP_WORKERS = 105
RAISE_ERROR = 106
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.1
# This file is part of Merlin, Version: 1.12.2b1
#
# 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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# 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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
2 changes: 1 addition & 1 deletion 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.1.
# This file is part of Merlin, Version: 1.12.2b1.
#
# For details, see https://github.com/LLNL/merlin.
#
Expand Down
Loading

0 comments on commit 9e27798

Please sign in to comment.