Skip to content

Commit

Permalink
Merge pull request #8 from NREL/v0.1.2
Browse files Browse the repository at this point in the history
V0.1.2
  • Loading branch information
calbaker authored Oct 4, 2023
2 parents 169d3ea + 4aed38a commit eb4ee31
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 31 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,17 @@ Any time anyone pushes to `main` or does any pull request, the GitHub Actions [t

### Releasing

#### With GitHub Actions
#### To PyPI With GitHub Actions
To release the package with GitHub Actions, you can follow these steps:

1. With the changes already committed, create a new branch in the format `v<major>.<minor>.<patch>`. For example `v0.2.1`.
1. Update the version number in the `pyproject.toml` file. Commit and push to https://github.com/NREL/altrios.
1. Open a pull request into the main branch and make sure all checks pass.
1. Once the pull request is merged into the main branch by a reviewer, create a new GitHub release and create a tag that matches the branch name. Once the release is created, a [GitHub action](https://github.com/NREL/altrios/blob/686e8c28828cb980cc45567d08091e69b7bee52c/.github/workflows/wheels.yaml#L5) will be launched to build the wheels and publish them to PyPI.

#### To crates.io
Instructions for releasing `altrios-core` and `altrios-proc-macros` are found in the README.md files in both of these crates. `altrios-core-py` is a `cdylib` crate and cannot be released.

# How to run ALTRIOS

With your activated Python environment with ALTRIOS fully installed, you can download the demo scripts to the current working directory inside of a `demos/` folder with:
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "altrios"
version = "0.1.1.post2"
version = "0.1.2"
authors = [
{ name = "ALTRIOS Team", email = "[email protected]" },
{ name = "Chad Baker, Lead Developer" },
Expand Down Expand Up @@ -46,12 +46,13 @@ dependencies = [
"requests",
]

[project.urls]
homepage = "https://www.nrel.gov/transportation/altrios.html"
source = "https://github.com/NREL/altrios"

[project.optional-dependencies]
dev = ["black", "pytest", "maturin", "ipykernel"]

[project.urls]
Homepage = "https://www.nrel.gov/transportation/altrios.html"

[tool.maturin]
profile = "release"
python-source = "python"
Expand Down
40 changes: 31 additions & 9 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ alive-progress==3.1.2
# via
# -c requirements.txt
# pymoo
appnope==0.1.3
# via
# ipykernel
# ipython
asttokens==2.2.1
# via stack-data
autograd==1.5
Expand All @@ -24,17 +28,20 @@ backcall==0.2.0
# via ipython
black==23.3.0
# via altrios
certifi==2023.7.22
# via
# -c requirements.txt
# requests
charset-normalizer==3.3.0
# via
# -c requirements.txt
# requests
click==8.1.3
# via black
cma==3.2.2
# via
# -c requirements.txt
# pymoo
colorama==0.4.6
# via
# click
# ipython
# pytest
comm==0.1.3
# via ipykernel
contourpy==1.0.7
Expand Down Expand Up @@ -77,6 +84,10 @@ grapheme==0.6.0
# via
# -c requirements.txt
# alive-progress
idna==3.4
# via
# -c requirements.txt
# requests
iniconfig==2.0.0
# via pytest
ipykernel==6.23.0
Expand Down Expand Up @@ -145,6 +156,8 @@ parso==0.8.3
# via jedi
pathspec==0.11.1
# via black
pexpect==4.8.0
# via ipython
pickleshare==0.7.5
# via ipython
pillow==9.5.0
Expand All @@ -169,6 +182,8 @@ prompt-toolkit==3.0.38
# via ipython
psutil==5.9.5
# via ipykernel
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
# via stack-data
pyarrow==12.0.0
Expand All @@ -177,7 +192,7 @@ pyarrow==12.0.0
# altrios
pygments==2.15.1
# via ipython
pymoo==0.6
pymoo==0.6.0
# via
# -c requirements.txt
# altrios
Expand All @@ -197,8 +212,6 @@ pytz==2023.3
# via
# -c requirements.txt
# pandas
pywin32==306
# via jupyter-core
pyyaml==6.0
# via
# -c requirements.txt
Expand All @@ -207,6 +220,10 @@ pyzmq==25.0.2
# via
# ipykernel
# jupyter-client
requests==2.31.0
# via
# -c requirements.txt
# altrios
scipy==1.10.1
# via
# -c requirements.txt
Expand All @@ -218,6 +235,7 @@ seaborn==0.12.2
six==1.16.0
# via
# -c requirements.txt
# asttokens
# python-dateutil
stack-data==0.6.2
# via ipython
Expand All @@ -230,7 +248,7 @@ tomli==2.0.1
# black
# maturin
# pytest
tornado>=6.3.2
tornado==6.3.3
# via
# ipykernel
# jupyter-client
Expand All @@ -250,6 +268,10 @@ tzdata==2023.3
# via
# -c requirements.txt
# pandas
urllib3==2.0.6
# via
# -c requirements.txt
# requests
wcwidth==0.2.6
# via prompt-toolkit
wrapt==1.15.0
Expand Down
36 changes: 23 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ alive-progress==3.1.2
# via pymoo
autograd==1.5
# via pymoo
certifi==2023.7.22
# via requests
charset-normalizer==3.3.0
# via requests
cma==3.2.2
# via pymoo
contourpy==1.0.7
Expand All @@ -28,16 +32,18 @@ future==0.18.3
# via autograd
grapheme==0.6.0
# via alive-progress
idna==3.4
# via requests
kiwisolver==1.4.4
# via matplotlib
matplotlib==3.7.1
# via
# altrios (setup.py)
# altrios (pyproject.toml)
# pymoo
# seaborn
numpy==1.24.3
# via
# altrios (setup.py)
# altrios (pyproject.toml)
# autograd
# cma
# contourpy
Expand All @@ -48,25 +54,25 @@ numpy==1.24.3
# scipy
# seaborn
openpyxl==3.1.2
# via altrios (setup.py)
# via altrios (pyproject.toml)
packaging==23.1
# via
# matplotlib
# plotly
pandas==2.0.1
# via
# altrios (setup.py)
# altrios (pyproject.toml)
# seaborn
pillow==9.5.0
# via matplotlib
plotly==5.14.1
# via altrios (setup.py)
# via altrios (pyproject.toml)
polars==0.18.7
# via altrios (setup.py)
# via altrios (pyproject.toml)
pyarrow==12.0.0
# via altrios (setup.py)
pymoo==0.6
# via altrios (setup.py)
# via altrios (pyproject.toml)
pymoo==0.6.0
# via altrios (pyproject.toml)
pyparsing==3.0.9
# via matplotlib
python-dateutil==2.8.2
Expand All @@ -76,20 +82,24 @@ python-dateutil==2.8.2
pytz==2023.3
# via pandas
pyyaml==6.0
# via altrios (setup.py)
# via altrios (pyproject.toml)
requests==2.31.0
# via altrios (pyproject.toml)
scipy==1.10.1
# via pymoo
seaborn==0.12.2
# via altrios (setup.py)
# via altrios (pyproject.toml)
six==1.16.0
# via python-dateutil
tenacity==8.2.2
# via plotly
typing-extensions==4.5.0
# via altrios (setup.py)
# via altrios (pyproject.toml)
tzdata==2023.3
# via pandas
urllib3==2.0.6
# via requests
wrapt==1.15.0
# via deprecated
xlrd==2.0.1
# via altrios (setup.py)
# via altrios (pyproject.toml)
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rust/altrios-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "altrios-core"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
license = "BSD-3-Clause"
authors = ["NREL/MTES/CIMS/MBAP Group"]
description = "ALTRIOS Core model for train simulation"
homepage = "https://www.nrel.gov/transportation/altrios.html"
readme = "../../README.md"
readme = "README.md"
repository = "https://github.com/NREL/altrios"

[dependencies]
Expand Down
8 changes: 8 additions & 0 deletions rust/altrios-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# altrios-core

This crate is primarily intended to be used as a backend for the [ALTRIOS PyPI package](https://pypi.org/project/altrios/), but it can also function as a dependency for other crates.

## Developers
To release this crate, you need to be setup as developer for this crate in crates.io. After making changes and updating the version number in Cargo.toml, you can run `cargo publish --dry-run` to make sure everything checks and then run `cargo publish` to release the update.

In the future, we may incorporate this into GitHub Actions.
2 changes: 1 addition & 1 deletion rust/altrios-core/altrios-proc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "BSD-3-Clause"
authors = ["NREL/MTES/CIMS/MBAP Group"]
description = "ALTRIOS procedural macros"
homepage = "https://www.nrel.gov/transportation/altrios.html"
readme = "../../../README.md"
readme = "README.md"
repository = "https://github.com/NREL/altrios"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
8 changes: 8 additions & 0 deletions rust/altrios-core/altrios-proc-macros/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# altrios-proc-macros

This crate contains procedural macros used in [altrios-core](https://crates.io/crates/altrios-core).

## Developers
To release this crate, you need to be setup as developer for this crate in crates.io. After making changes and updating the version number in Cargo.toml, you can run `cargo publish --dry-run` to make sure everything checks and then run `cargo publish` to release the update.

In the future, we may incorporate this into GitHub Actions.

0 comments on commit eb4ee31

Please sign in to comment.