Skip to content

Commit

Permalink
Merge branch 'develop' into epw_checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nweires committed Mar 18, 2024
2 parents bfedff3 + 6260444 commit 213bb27
Show file tree
Hide file tree
Showing 29 changed files with 864 additions and 1,178 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ jobs:
run: |
cd buildstockbatch
python -m pip install --progress-bar off --upgrade pip
pip install .[dev] --progress-bar off
- name: Linting
run: |
cd buildstockbatch
# stop the build if there are Python syntax errors or undefined names
flake8 buildstockbatch --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 buildstockbatch --count --statistics --exit-zero
pip install .[dev,aws] --progress-bar off
- name: Black
uses: psf/black@stable
with:
src: "./buildstockbatch"
- name: Run PyTest and Coverage
run: |
cd buildstockbatch
Expand Down Expand Up @@ -84,5 +81,3 @@ jobs:
with:
name: documentation
path: buildstockbatch/docs/_build/html/
- uses: pre-commit-ci/[email protected]
if: always()
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: end-of-file-fixer
exclude_types: ["csv","tsv"]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1
rev: 24.1.1
hooks:
- id: black
language_version: python3.11
41 changes: 19 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
FROM nrel/openstudio:2.9.1

ENV LANG=C.UTF-8 LC_ALL=C.UTF-8

RUN sudo apt update && \
sudo apt install -y wget build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev

RUN wget https://www.python.org/ftp/python/3.8.8/Python-3.8.8.tgz && \
tar xzf Python-3.8.8.tgz && \
cd Python-3.8.8 && \
./configure --enable-optimizations && \
make altinstall && \
rm -rf Python-3.8.8 && \
rm -rf Python-3.8.8.tgz

RUN sudo apt install -y -V ca-certificates lsb-release && \
wget https://apache.bintray.com/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb && \
sudo apt install -y -V ./apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb && \
sudo apt update && \
sudo apt install -y -V libarrow-dev libarrow-glib-dev libarrow-dataset-dev libparquet-dev libparquet-glib-dev
ARG OS_VER
FROM --platform=linux/amd64 nrel/openstudio:$OS_VER as buildstockbatch

RUN sudo apt update && sudo apt install -y python3-pip
RUN sudo -H pip install --upgrade pip
COPY . /buildstock-batch/
RUN python3.8 -m pip install /buildstock-batch
RUN python3 -m pip install "/buildstock-batch[aws]"

# Base plus custom gems
FROM buildstockbatch as buildstockbatch-custom-gems
RUN sudo cp /buildstock-batch/Gemfile /var/oscli/
# OpenStudio's docker image sets ENV BUNDLE_WITHOUT=native_ext
# https://github.com/NREL/docker-openstudio/blob/3.2.1/Dockerfile#L12
# which overrides anything set via bundle config commands.
# Unset this so that bundle config commands work properly.
RUN unset BUNDLE_WITHOUT
# Note the addition of 'set' in bundle config commands
RUN bundle config set git.allow_insecure true
RUN bundle config set path /var/oscli/gems/
RUN bundle config set without 'test development native_ext'
RUN bundle install --gemfile /var/oscli/Gemfile
Loading

0 comments on commit 213bb27

Please sign in to comment.