Skip to content

Commit

Permalink
Release 4.3.10 (#197)
Browse files Browse the repository at this point in the history
Signed-off-by: David P. Chassin <dchassin@slac.stanford.edu>
Signed-off-by: Alyona Teyber <Ivanova.alyona5@gmail.com>
Signed-off-by: David P. Chassin <david.chassin@me.com>
Signed-off-by: Duncan Ragsdale <88173870+Thistleman@users.noreply.github.com>
Co-authored-by: David P. Chassin <dchassin@slac.stanford.edu>
Co-authored-by: Alyona Teyber <Ivanova.alyona5@gmail.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Duncan Ragsdale <88173870+Thistleman@users.noreply.github.com>
  • Loading branch information
5 people authored Sep 8, 2024
1 parent 99c3641 commit 23b67f8
Show file tree
Hide file tree
Showing 81 changed files with 540,909 additions and 9,928 deletions.
75 changes: 2 additions & 73 deletions .github/workflows/develop-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,40 +40,6 @@ jobs:
sh ./setup.sh --local
sh ./build.sh --system --parallel --upload --release
buildMacos12FastS3:

runs-on: macos-12
environment: Integration

steps:
- uses: actions/checkout@v3

# this is to fix GIT not liking owner of the checkout dir
- name: Set ownership
run: |
chown -R $(id -u):$(id -g) $PWD
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Symlink for libtool
run: |
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
ln -s /usr/local/bin/glibtool /usr/local/bin/libtool
- name: Add libraries to PATH
run: |
echo "LIBRARY_PATH=$(brew --prefix)/lib:$(brew --prefix)/opt:$(brew --prefix)/include" >> $GITHUB_ENV
- name: Deploy to S3
run: |
sh ./setup.sh --local
sh ./build.sh --system --parallel --upload --release
buildUbuntu22FastS3:

runs-on: ubuntu-22.04
Expand Down Expand Up @@ -111,47 +77,10 @@ jobs:
gridlabd python -m pip install awscli
sudo sh ./build.sh --upload --release
buildUbuntu20FastS3:

runs-on: ubuntu-20.04
environment: Integration
container:
image: ubuntu:focal

steps:
# this is to fix GIT not liking owner of the checkout dir
- name: Set ownership and prep container
run: |
mkdir -p /usr/local/var
apt-get update && apt-get install -y apt-transport-https
apt-get install -y git curl nano sudo zip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Deploy to S3
run: |
sudo aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY }} && sudo aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} && sudo aws configure set default.region ${{ secrets.AWS_REGION }}
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
chown -R root $PWD
sudo sh ./setup.sh --local
sudo sh ./build.sh --system --parallel
gridlabd python -m pip install awscli
sudo sh ./build.sh --upload --release
buildAWSUbuntuAMI:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
environment: Integration
needs: [buildUbuntu22FastS3,buildUbuntu20FastS3,buildMacos12FastS3,buildMacos13FastS3]
needs: [buildUbuntu22FastS3,buildMacos12FastS3,buildMacos13FastS3]

steps:
- uses: actions/checkout@v3
Expand Down
75 changes: 2 additions & 73 deletions .github/workflows/master-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,40 +40,6 @@ jobs:
sh ./setup.sh --local
sh ./build.sh --system --parallel --upload --release
buildMacos12FastS3:

runs-on: macos-12
environment: Integration

steps:
- uses: actions/checkout@v3

# this is to fix GIT not liking owner of the checkout dir
- name: Set ownership
run: |
chown -R $(id -u):$(id -g) $PWD
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Symlink for libtool
run: |
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
ln -s /usr/local/bin/glibtool /usr/local/bin/libtool
- name: Add libraries to PATH
run: |
echo "LIBRARY_PATH=$(brew --prefix)/lib:$(brew --prefix)/opt:$(brew --prefix)/include" >> $GITHUB_ENV
- name: Deploy to S3
run: |
sh ./setup.sh --local
sh ./build.sh --system --parallel --upload --release
buildUbuntu22FastS3:

runs-on: ubuntu-22.04
Expand Down Expand Up @@ -111,47 +77,10 @@ jobs:
gridlabd python -m pip install awscli
sudo sh ./build.sh --upload --release
buildUbuntu20FastS3:

runs-on: ubuntu-20.04
environment: Integration
container:
image: ubuntu:focal

steps:
# this is to fix GIT not liking owner of the checkout dir
- name: Set ownership and prep container
run: |
mkdir -p /usr/local/var
apt-get update && apt-get install -y apt-transport-https
apt-get install -y git curl nano sudo zip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Deploy to S3
run: |
sudo aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY }} && sudo aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} && sudo aws configure set default.region ${{ secrets.AWS_REGION }}
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
chown -R root $PWD
sudo sh ./setup.sh --local
sudo sh ./build.sh --system --parallel
gridlabd python -m pip install awscli
sudo sh ./build.sh --upload --release
buildAWSUbuntuAMI:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
environment: Integration
needs: [buildUbuntu22FastS3,buildUbuntu20FastS3,buildMacos12FastS3]
needs: [buildUbuntu22FastS3,buildMacos12FastS3]

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ fault_check.txt
# files that should be ignored by git
*_ignore.*

# requirements files
requirements.txt

# terraform artifacts
*.zip
terraform.*
Expand All @@ -116,3 +113,6 @@ validate.zip.gz
validate.tar.gz
gridlabd-core.*
openfido.err

# docs
html/
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ python-venv:

# NB: it's ok to use the runner's python to generate the requirements.txt file
requirements.txt: python/requirements.csv
@python3 -m pip -q install pandas==2.0.0
@python3 -m pip -q install pandas==2.1.4
@python3 $(top_srcdir)/python/requirements.py $< >$@

$(PYENV): requirements.txt
Expand All @@ -137,7 +137,7 @@ $(PYENV): requirements.txt
@(deactivate 1>/dev/null 2>&1 || true ; $(SYSPYTHON) -m venv $(PYENV))
@$(ENVPYTHON) --version 1>/dev/null || ( echo "ERROR [Makefile]: $(ENVPYTHON) is not found" > /dev/stderr ; false )
@$(ENVPYTHON) -m pip install --upgrade pip
@$(ENVPYTHON) -m pip install pandas==2.0.0
@$(ENVPYTHON) -m pip install pandas==2.1.4
@$(ENVPYTHON) $(top_srcdir)/python/requirements.py --buildenv | bash
@$(ENVPYTHON) -m pip install -r requirements.txt
@touch $(PYENV)
Expand Down
1 change: 1 addition & 0 deletions converters/py2glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def convert(ifile,ofile,options={}):
oname = f"{NL} name pp_gencost_{n};" if autoname else ""
glm.write(f"""object pypower.gencost
{{{oname}
parent pp_gen_{n+1};
model {int(model)};
startup {startup};
shutdown {shutdown};
Expand Down
2 changes: 1 addition & 1 deletion docker/packer/Dockerfile.dev.ul
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set the base image to latest Ubuntu image
FROM ubuntu:latest
FROM ubuntu:22.04

# Update the package lists and install sudo and curl
RUN apt-get update && apt-get install -y sudo curl git nano
Expand Down
2 changes: 1 addition & 1 deletion docker/packer/Dockerfile.prod.ul
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set the base image to latest Ubuntu image
FROM ubuntu:latest
FROM ubuntu:22.04

# Update the package lists and install sudo and curl
RUN apt-get update && apt-get install -y sudo curl git nano
Expand Down
15 changes: 8 additions & 7 deletions docs/Developer/Module/Create.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ This section describes how to public properties in a class.
The `gl_publish_variable(...)` function uses property offsets in memory. Every object attribute is listed sequentially in memory in the order in which they are declared. This function returns the difference in the memory address of an attribute from the start of the object in memory. It's defined by a macro, `GL_ATOMIC(type, attribute name)` which generates a callable function specific to every attribute it's applied to.

The code looks like this:
static inline size_t get_##X##_offset(void) { return (char*)&(defaults->X)-(char*)defaults; };

`defaults` is a class attribute, a pointer to an object of the same type as the class it's a part of. Say we are looking at the `pole` class. `defaults` will be a pointer to a pole object. Confusingly, `defaults` is never inititialized to anything beyond NULL. How does this work? Back when this program was written in C, `defaults` pointed to a chunk of memory holding an object with all attributes initilized to default values. In C you could create a new object by simply copying this memory chunk. In C++ you need to declare all the attributes within an object, not just the object itself. The old method of setting defaults stopped working, so it's done differently now. The `defaults` pointer was retained as an attribute in the class declaration. The get offset function uses it for pointer math, finding the differences in memory location between the start of an object and all of it's attributes. Because a class declaration includes the type of all attributes, the compiler can figure out how much space they will take up in memory. (In C++ all types have a fixed size.) 'defaults' never needs to be initialized.
`static inline size_t get_##X##_offset(void) { return (char*)&(defaults->X)-(char*)defaults; };`

`defaults` is a class attribute, a pointer to an object of the same type as the class it's a part of. Say we are looking at the `pole` class. `defaults` will be a pointer to a pole object. Confusingly, `defaults` is never inititialized to anything beyond `NULL`. How does this work? Back when this program was written in C, `defaults` pointed to a chunk of memory holding an object with all attributes initilized to default values. In C you could create a new object by simply copying this memory chunk. In C++ you need to declare all the attributes within an object, not just the object itself. The old method of setting defaults stopped working, so it's done differently now. The `defaults` pointer was retained as an attribute in the class declaration. The get offset function uses it for pointer math, finding the differences in memory location between the start of an object and all of it's attributes. Because a class declaration includes the type of all attributes, the compiler can figure out how much space they will take up in memory. (In C++ all types have a fixed size.) 'defaults' never needs to be initialized.

Published properties are declared using the `GL_*` declaration macros:
### `GL_ATOMIC(TYPE,NAME)` defines the following members:
Expand Down Expand Up @@ -96,7 +97,7 @@ Published properties are declared using the `GL_*` declaration macros:
* `gld_object *get_NAME(gld_wlock &lock)` - returns a pointer to the underlying object using a write lock
* `void set_NAME(OBJECT *ptr)` - sets the property to a new object pointer
* `void set_NAME(const char *name)` - sets the property to a new object name
* `void init_NAME(void)` - initializes the object pointer (sets to NULL)
* `void init_NAME(void)` - initializes the object pointer (sets to `NULL`)
* `void init_NAME(OBJECT *ptr)` - initializes the object pointer
* `OBJECT *get_NAME_object(void)` - get the object pointer

Expand All @@ -113,10 +114,10 @@ The `PT_` prefix for variable specifications indicates Property Types:
* `PT_int16` - the data is a 16-bit integer
* `PT_int32` - the data is a 32-bit integer
* `PT_int64` - the data is a 64-bit integer
* `PT_char8` - the data is \p NULL -terminated string up to 8 characters in length
* `PT_char32` - the data is \p NULL -terminated string up to 32 characters in length
* `PT_char256` - the data is \p NULL -terminated string up to 256 characters in length
* `PT_char1024` - the data is \p NULL -terminated string up to 1024 characters in length
* `PT_char8` - the data is `NULL` -terminated string up to 8 characters in length
* `PT_char32` - the data is `NULL` -terminated string up to 32 characters in length
* `PT_char256` - the data is `NULL` -terminated string up to 256 characters in length
* `PT_char1024` - the data is `NULL` -terminated string up to 1024 characters in length
* `PT_object` - the data is a pointer to a GridLAB object
* `PT_delegated` - the data is delegated to a module for implementation (experimental)
* `PT_bool` - the data is a true/false value, implemented as a C++ bool
Expand Down
2 changes: 1 addition & 1 deletion docs/GLM/Macro/Version.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Three aspects of the version can be checked. They are the version number, e.g.,
Multiple tests may be specified, in which case the tests conjunction is the `or` operation, i.e., either one may be true for the test to succeed. To achieve an `and` operation, simply use the macro multiple times.

# Example
The following example checks that the version $\ge 4.2.1$ or the build number is $\gt 191225$ and the branch is $develop$.
The following example checks that the version $\ge 4.2.1$ or the build number is $> 191225$ and the branch is $develop$.
~~~
#version -ge 4.2.1 -gt 191225
#version develop
Expand Down
8 changes: 8 additions & 0 deletions docs/Getting Started.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Arras Energy is a commercial version of GridLAB-D.

# Docker

The preferred method for running GridLAB-D is using [Docker](www.docker.org). Once you have installed Docker, you can run GridLAB-D as follows.

~~~
Expand All @@ -13,3 +17,7 @@ bash% docker run -vit $PWD:$PWD arras-energy/gridlabd:latest gridlabd -W $PWD <f
~~~

More information on using GridLAB-D docker containers can be found at [[/Install/Docker]].

# GitHub Tutorials

You can find tutorial on using GridLAB-D with GitHub projects at https://github.com/gridlabd-tutorials
10 changes: 5 additions & 5 deletions docs/Global/Initializeonly.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
GLM:

~~~
#set Initializeonly=FALSE
#set initializeonly=FALSE
~~~

Shell:

~~~
bash$ gridlabd -D Initializeonly=FALSE
bash$ gridlabd --define Initializeonly=FALSE
bash$ gridlabd -D initializeonly=FALSE
bash$ gridlabd --define initializeonly=FALSE
~~~

# Description

Initialize only enable flag
Initialize only enable flag.

# Example

~~~
#set compileonly=FALSE
#set initializeonly=FALSE
~~~

# See also
Expand Down
Loading

0 comments on commit 23b67f8

Please sign in to comment.