Skip to content

Commit

Permalink
Remove duplicate templates, add to MANIFEST.in (#3183)
Browse files Browse the repository at this point in the history
- Remove duplicate templates files after provision refactor, update
paths
- Build process does not include lighter/templates -> added to
MANIFEST.in

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Quick tests passed locally by running `./runtest.sh`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated.
  • Loading branch information
SYangster authored Jan 27, 2025
1 parent 4f48ed4 commit d226101
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2,007 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ include nvflare/_version.py
include nvflare/libs/*.so
include nvflare/fuel/utils/*.json
include nvflare/private/fed/app/simulator/log_config.json
include nvflare/lighter/templates
4 changes: 2 additions & 2 deletions nvflare/dashboard/application/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
from .models import Client, Project, User

lighter_folder = os.path.dirname(utils.__file__)
template = utils.load_yaml(os.path.join(lighter_folder, "impl", "master_template.yml"))
template = utils.load_yaml(os.path.join(lighter_folder, "templates", "master_template.yml"))
supported_csps = ["aws", "azure"]
for csp in supported_csps:
csp_template_file = os.path.join(lighter_folder, "impl", f"{csp}_template.yml")
csp_template_file = os.path.join(lighter_folder, "templates", f"{csp}_template.yml")
if os.path.exists(csp_template_file):
template.update(utils.load_yaml(csp_template_file))

Expand Down
6 changes: 3 additions & 3 deletions nvflare/dashboard/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def stop():

def cloud(args):
lighter_folder = os.path.dirname(utils.__file__)
template = utils.load_yaml(os.path.join(lighter_folder, "impl", "master_template.yml"))
template.update(utils.load_yaml(os.path.join(lighter_folder, "impl", "aws_template.yml")))
template.update(utils.load_yaml(os.path.join(lighter_folder, "impl", "azure_template.yml")))
template = utils.load_yaml(os.path.join(lighter_folder, "templates", "master_template.yml"))
template.update(utils.load_yaml(os.path.join(lighter_folder, "templates", "aws_template.yml")))
template.update(utils.load_yaml(os.path.join(lighter_folder, "templates", "azure_template.yml")))
tplt = tplt_utils.Template(template)
cwd = os.getcwd()
csp = args.cloud
Expand Down
Loading

0 comments on commit d226101

Please sign in to comment.