Skip to content

Commit

Permalink
Merge pull request #34 from dingraha/registrator
Browse files Browse the repository at this point in the history
Registrator
  • Loading branch information
dingraha committed Jun 12, 2023
2 parents d783055 + 21811d2 commit 892afe5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
36 changes: 36 additions & 0 deletions docs/src/dev_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,49 @@ or
on a new issue, like [here](https://github.com/byuflowlab/OpenMDAO.jl/issues/22).
Be sure to adjust the `version` field in the appropriate `Project.toml` before you do that.
And after the new version is registered, don't forget to tag it as suggested by the JuliaRegistrator bot.
For example, OpenMDAOCore.jl version 0.3.1 was tagged like this:

```
$ git tag OpenMDAOCore.jl-v0.3.1 ea03a4e1be02a989021e5b466fc1fe51534e6fdb
$ git push upstream OpenMDAOCore.jl-v0.3.1
```

where `upstream` is the remote corresponding to `byuflowlab/OpenMDAO.jl.git`:

```
$ git remote -v
origin git@github.com:dingraha/OpenMDAO.jl.git (fetch)
origin git@github.com:dingraha/OpenMDAO.jl.git (push)
upstream git@github.com:byuflowlab/OpenMDAO.jl.git (fetch)
upstream git@github.com:byuflowlab/OpenMDAO.jl.git (push)
$
```

For `omjlcomps`, registration is done by manually running the "Register to PyPI" workflow from the GitHub Actions tab (basically copied from [PythonCall.jl](https://github.com/cjdoris/PythonCall.jl)).
Be sure to adjust the version in the `python/setup.py` file before registering a new version.
After clicking on the Actions tab on https://github.com/byuflowlab/OpenMDAO.jl, you'll see "Register to PyPI" listed under "All workflows" on the left-hand side.
Click on that, then click on the "Run workflow" dropdown button on the right-hand side of the screen.
Run it from the master branch, then wait for the workflow to finish.
After that, you should see the new version of `omjlcomps` on PyPI: https://pypi.org/project/omjlcomps/.
Once that's done, tag the commit that contains the new version of `omjlcomps` and push that to `byuflowlab/OpenMDAO.jl.git`.
For example, `omjlcomps` version 0.2.3 was tagged with

```
$ git tag omjlcomps-v0.2.3 d7830552dc3d54fe18b89dc91b36219739d13a62
$ git push upstream omjlcomps-v0.2.3
```

where `upstream` is the remote corresponding to `byuflowlab/OpenMDAO.jl.git`:

```
$ git remote -v
origin git@github.com:dingraha/OpenMDAO.jl.git (fetch)
origin git@github.com:dingraha/OpenMDAO.jl.git (push)
upstream git@github.com:byuflowlab/OpenMDAO.jl.git (fetch)
upstream git@github.com:byuflowlab/OpenMDAO.jl.git (push)
$
```

## How to Release a New Version (Old, LocalRegistry Way)
> **Note**
Expand Down
3 changes: 2 additions & 1 deletion julia/OpenMDAO.jl/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ version = "0.4.1"
[deps]
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
OpenMDAOCore = "24d19c10-6eee-420f-95df-4537264b2753"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"

[compat]
julia = "1.8.5"
CondaPkg = "0.2.17"
OpenMDAOCore = "0.3.0"
PythonCall = "0.9.12"
julia = "1.8.5"
2 changes: 2 additions & 0 deletions julia/OpenMDAO.jl/src/OpenMDAO.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module OpenMDAO

using Pkg: Pkg
using OpenMDAOCore: OpenMDAOCore
using PythonCall: PythonCall

Expand All @@ -11,6 +12,7 @@ const omjlcomps = PythonCall.pynew()

function __init__()
PythonCall.pycopy!(om, PythonCall.pyimport("openmdao.api"))
Pkg.add("OpenMDAOCore")
PythonCall.pycopy!(omjlcomps, PythonCall.pyimport("omjlcomps"))
end

Expand Down

0 comments on commit 892afe5

Please sign in to comment.