@@ -12,7 +12,7 @@ Clone the repository:
12
12
1 . Open git bash, and inside the directory you created,
13
13
[ clone] ( https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository )
14
14
the [ ALTRIOS repository] ( https://github.com/NREL/ALTRIOS ) with e.g. `git clone
15
- https://github.com/NREL/ALTRIOS.git` .
15
+ https://github.com/NREL/ALTRIOS.git` .
16
16
17
17
## Installing the Python Package
18
18
@@ -65,52 +65,63 @@ tests pass. Also, be sure to rebuild the Python API regularly to ensure that it
65
65
Python unit tests run with ` python -m unittest discover ` in the root folder of the git repository.
66
66
67
67
### With GitHub Actions
68
+
68
69
Any time anyone pushes to ` main ` or does any pull request, the [ GitHub Actions test
69
- workflows] ( https://github.com/NREL/altrios/tree/main/.github/workflows ) are triggered.
70
+ workflows] ( https://github.com/NREL/altrios/tree/main/.github/workflows ) are triggered.
70
71
71
72
## Releasing
72
73
73
74
### To PyPI With GitHub Actions
75
+
74
76
To release the package with GitHub Actions, you can follow these steps:
75
77
76
78
1 . Create a new branch in the format ` v<major>.<minor>.<patch> ` , for example ` v0.2.1 ` .
77
- 1 . Update the version number in the ` pyproject.toml ` file. Commit and push to
78
- https://github.com/NREL/altrios .
79
+ 1 . Update the version number in the ` pyproject.toml ` file. Commit and push to
80
+ https://github.com/NREL/altrios .
79
81
1 . Open a pull request into the main branch and make sure all checks pass.
80
82
1 . Once the pull request is merged into the main branch by a reviewer, create a new GitHub release
81
83
and create a tag that matches the branch name. Once the release is created, a [ GitHub
82
84
action] ( https://github.com/NREL/altrios/blob/686e8c28828cb980cc45567d08091e69b7bee52c/.github/workflows/wheels.yaml#L5 )
83
- will be launched to build the wheels and publish them to PyPI.
85
+ will be launched to build the wheels and publish them to PyPI.
84
86
85
87
### To crates.io
88
+
86
89
#### altrios-core
90
+
87
91
If you've updated ` altrios-proc-macros ` , be sure to publish that crate first and then update the
88
- Cargo.toml dependency for this crate.
92
+ Cargo.toml dependency for this crate.
93
+
94
+ To release this crate, you need to be setup as developer for this crate in crates.io. Follow these steps:
89
95
90
- To release this crate, you need to be setup as developer for this crate in crates.io. Follow these steps:
91
96
1 . Increment the version number in
92
- [ rust/altrios-core/Cargo.toml] ( https://github.com/NREL/altrios/blob/main/rust/altrios-core/Cargo.toml ) .
97
+ [ rust/altrios-core/Cargo.toml] ( https://github.com/NREL/altrios/blob/426f50e4ebd0fbf1d7e346aa31604107df8f83fe/rust/altrios-core/Cargo.toml#L8 ) :
98
+
99
+ ` version = "0.2.1" ` .
93
100
1 . If changes were made in ` altrios-proc-macros ` , follow [ the release process for that
94
101
crate] ( #altrios-proc-macros ) first, and then update the ` altrios-proc-macros ` dependency version
95
- to match the new ` altrios-proc-macros ` version in ` rust/altrios-core/Cargo.toml ` .
102
+ to match the new ` altrios-proc-macros ` version in ` rust/altrios-core/Cargo.toml ` .
96
103
1 . Run ` git tag ac<major>.<minor>.<patch> ` , where ` ac<major>.<minor>.<patch> ` should look like
97
104
` ac0.1.4 ` , reflecting whatever the current version is.
98
105
1 . Push the tag with ` git push public ac<major>.<minor>.<patch> ` , where ` public ` is this remote:
99
106
` [email protected] :NREL/altrios.git` .
100
107
1 . Run ` cargo publish --dry-run ` to make sure everything checks.
101
- 1 . Run ` cargo publish ` to release the update.
108
+ 1 . Run ` cargo publish ` to release the update.
102
109
103
- In the future, we may incorporate this into GitHub Actions.
110
+ In the future, we may incorporate this into GitHub Actions.
104
111
105
112
#### altrios-proc-macros
106
- To release this crate, you need to be setup as developer for this crate in crates.io. Follow these steps:
113
+
114
+ To release this crate, you need to be setup as developer for this crate in crates.io. Follow these steps:
115
+
107
116
1 . Increment the version number in
108
- [ rust/altrios-core/altrios-proc-macros/Cargo.toml] ( https://github.com/NREL/altrios/blob/main/rust/altrios-core/altrios-proc-macros/Cargo.toml ) .
117
+ [ rust/Cargo.toml] ( https://github.com/NREL/altrios/blob/dced44b42c456da88363d03dc43259b039a94e6d/rust/Cargo.toml#L48 ) :
118
+
119
+ ` altrios-proc-macros = { path = "./altrios-core/altrios-proc-macros", version = "0.2.0" } ` .
109
120
1 . Run ` git tag apm<major>.<minor>.<patch> ` , where ` apm<major>.<minor>.<patch> ` should look like
110
121
` apm0.1.4 ` , reflecting whatever the current version is.
111
122
1 . Push the tag with ` git push public apm<major>.<minor>.<patch> ` , where ` public ` is this remote:
112
123
` [email protected] :NREL/altrios.git` .
113
124
1 . Run ` cargo publish --dry-run ` to make sure everything checks.
114
- 1 . Run ` cargo publish ` to release the update.
125
+ 1 . Run ` cargo publish ` to release the update.
115
126
116
- In the future, we may incorporate this into GitHub Actions.
127
+ In the future, we may incorporate this into GitHub Actions.
0 commit comments