-
Notifications
You must be signed in to change notification settings - Fork 21
Steps to register a new version of the REopt package
- Branch off of REopt.jl develop to make a feature_branch and add features/changes
- Open PR: develop <- [feature_branch]
- Have at least one reviewer approve the PR. Delete the feature_branch once it's been merged into develop
- Open PR: master <- develop. Put the new version # (following Semantic Versioning rules) in the name of the PR. In the description, link to the relevant (and now closed) PR(s) of develop <- [feature branch].
- Update the develop branch
CHANGELOG.md
with changes. Use new REopt version # as the header. - Important! Change the REopt version # manually in
Project.toml
- If you've added a new dependency, the Julia Pkg manager won’t manually update the [compat] section of
Project.toml
(you will see the new dependency under [deps] but not [compat]). You must manually update [compat] with packages and version #(s). See guidance here.
- Update the develop branch
- Once merged into master, go to repo landing page → go to last merge commit → comment at bottom: @JuliaRegistrator register.
- Go to Releases → Draft new release
- Tag = version #
- Target = master
- Summary can be from the Changelog (or can use "Generate release notes" functionality); title can be same as PR title
- This creates a GitHub tag; doesn’t affect Julia pkg version (the @JuliaRegistrator register command does this)
- Important Note: The REopt_API calls a specified version of this REopt.jl package (see here), typically the officially-registered version. If you change or add inputs or outputs to REopt.jl, you'll need to update/add the linkages between the REopt_API and REopt.jl before updating the REopt.jl version used by the API. (See steps below)
-
Branch off of REopt_API develop to make a feature_branch. Add or modify any inputs or outputs to align with the newly registered version of REopt.jl (see steps above). Create a draft PR for develop <- [feature_branch] (so that you can use GitHub's Actions to run tests).
-
If any inputs or outputs are modified, make sure to make database migrations (
python manage.py makemigrations
,python manage.py migrate
). -
Update the REopt.jl version (or branch, for testing) from within the Docker environment in the
julia_src/
directory:docker compose up
- In the Docker plugin in VSCode or Docker Desktop: attach shell to the julia_api container. (If in VSCode, click the whale, right click the "julia_api" container and click "Attach Shell")
- Spin up Julia and activate this directory:
julia --project=.
- Open package manager with
]
- Do one of the following:
-
pkg> update REopt
to update the version called by the API to the officially registered version. -
pkg> add REopt#branchname
to point to your dev branch for testing, but ensure you "update REopt
" prior to merging into develop. -
pkg> update
to reset any changes you may have accidentally made to the Manifest.
-
- Make sure your updates don't break any tests by pushing a commit to your Pull Request (will test in the highs environ) and running the
reoptjl.test.test_job_endpoint
andreoptjl.test.test_http_endpoints
files.
-
If all tests pass and PR is approved, merge develop <- [feature_branch] and deploy the develop branch to the development server to make sure it doesn't break deployment and for UI testing.
-
Create a PR for master <- develop
- Update CHANGELOG with changes, make the header the new REopt_API version (this is distinct from the REopt.jl version)
-
Once merged, publish a new release of the API with a description of the changes.
-
Deploy master to the development and staging servers
-
Ensure any changes to defaults are also reflected in the web tool, and deployed at the same time as the API deploy
- Post major updates on the Discussion board: https://github.com/NREL/REopt-Analysis-Scripts/discussions
- Ensure User Manual is updated with changes
- Ensure the REopt.jl help text is updated and descriptive of model behavior
- Ensure tooltips and defaults in the web tool reflect updates