Skip to content

Commit

Permalink
Merge pull request #70 from NREL/doc-enhancements
Browse files Browse the repository at this point in the history
Doc enhancements
  • Loading branch information
calbaker authored May 21, 2024
2 parents 408a87e + ab6157c commit d8e8132
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you are an ALTRIOS developer, see [Developer Documentation](https://nrel.gith
- Option 2 -- Anaconda: we recommend https://docs.conda.io/en/latest/miniconda.html.
1. Setup a python environment. ALTRIOS can work with Python 3.9, or 3.10, but we recommend 3.10 for better performance and user experience. Create a python environment for ALTRIOS with either of two methods:
- Option 1 -- [Python Venv](https://docs.python.org/3/library/venv.html)
1. Navigate to the ALTRIOS folder you just cloned or any folder you'd like for using ALTRIOS. Remember the folder you use!
1. Navigate to your project folder in which you'd like to store model data and run ALTRIOS.
1. Assuming you have Python 3.10 installed, run `python3.10 -m venv altrios-venv` in your terminal enviroment (we recommend PowerShell in Windows, which comes pre-installed). This tells Python 3.10 to use the `venv` module to create a virtual environment (which will be ignored by git if named `altrios-venv`) in the `ALTRIOS/altrios-venv/`.
1. Activate the environment you just created to install packages or anytime you're running ALTRIOS:
- Mac and Linux: `source altrios-venv/bin/activate`
Expand Down
13 changes: 13 additions & 0 deletions rust/altrios-core/altrios-proc-macros/src/history_vec_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,20 @@ pub(crate) fn history_vec_derive(input: TokenStream) -> TokenStream {
.map(|f| {
let ident = f.ident.as_ref().unwrap();
let ty = &f.ty;
let doc_attrs = &f
.attrs
.iter()
.filter(|attr| {
if attr.path.is_ident("doc") {
attr.parse_meta()
.is_ok_and(|meta| matches!(meta, syn::Meta::NameValue(_)))
} else {
false
}
})
.collect::<Vec<&syn::Attribute>>();
quote! {
#(#doc_attrs)*
pub #ident: Vec<#ty>,
}
})
Expand Down
2 changes: 1 addition & 1 deletion rust/altrios-core/src/track/link/link_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct OldSpeedSets(Vec<OldSpeedSet>);
pub struct Link {
/// Index of current link
pub idx_curr: LinkIdx,
/// Index of adjacent link in reverse direction
/// Index of current link in reverse direction
pub idx_flip: LinkIdx,
/// see [EstTime::idx_next]
pub idx_next: LinkIdx,
Expand Down

0 comments on commit d8e8132

Please sign in to comment.