Skip to content

Commit 257a662

Browse files
authored
Merge branch 'develop' into main
2 parents f0f0ebd + 0999c9e commit 257a662

19 files changed

+1156
-93
lines changed

.github/workflows/pre-commit.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Pre-Commit
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
pre-commit:
8+
name: Run Pre-Commit Checks
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.9
19+
20+
- name: Install Pre-Commit
21+
run: |
22+
pip install pre-commit
23+
24+
- name: Run Pre-Commit
25+
run: |
26+
pre-commit run --all-files

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: R-tests
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
env:
10+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
11+
NOAA_TOKEN: ${{ secrets.NOAA_TOKEN }}
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up R
17+
uses: r-lib/actions/setup-r@v2
18+
with:
19+
r-version: "4.5.0"
20+
21+
- name: Install system dependencies for R packages
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y \
25+
git \
26+
libcurl4-openssl-dev \
27+
libfontconfig1-dev \
28+
libfreetype6-dev \
29+
libfribidi-dev \
30+
libgit2-dev \
31+
libharfbuzz-dev \
32+
libjpeg-dev \
33+
libpng-dev \
34+
libssl-dev \
35+
libtiff5-dev \
36+
libv8-dev \
37+
libxml2-dev \
38+
wget
39+
40+
- name: Run script
41+
run: |
42+
Rscript setup_environment.R
43+
Rscript -e "testthat::test_dir('tests')"

.gitignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
.Rproj.user
2-
.Rhistory
3-
.RData
4-
.Ruserdata
51
.DS_Store
6-
inst/doc
7-
*.html
2+
.python-version
3+
4+
node_modules
5+
6+
vignettes/*.html
7+
vignettes/*.R
8+
vignettes/output

.pre-commit-config.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
exclude: |
2+
(?x)(
3+
^data/
4+
)
5+
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v5.0.0
9+
hooks:
10+
- id: check-ast
11+
- id: check-added-large-files
12+
args: ["--maxkb=2000"]
13+
- id: end-of-file-fixer
14+
- id: trailing-whitespace
15+
- id: check-toml
16+
- id: check-yaml
17+
- id: check-json
18+
- id: name-tests-test
19+
args: ["--pytest-test-first"]
20+
- id: fix-byte-order-marker
21+
- id: check-case-conflict
22+
- id: check-docstring-first
23+
- id: check-executables-have-shebangs
24+
- id: check-merge-conflict
25+
- id: check-xml
26+
- id: debug-statements
27+
- id: mixed-line-ending
28+
- id: pretty-format-json
29+
args: ["--autofix", "--no-sort-keys"]
30+
files: \.(json|template)$
31+
- repo: https://github.com/pre-commit/mirrors-prettier
32+
rev: v4.0.0-alpha.8
33+
hooks:
34+
- id: prettier
35+
types_or: [yaml, markdown]
36+
- repo: https://github.com/astral-sh/ruff-pre-commit
37+
rev: v0.11.6
38+
hooks:
39+
- id: ruff
40+
args: [--fix, --exit-non-zero-on-fix, --output-format=full]
41+
types_or: [python, pyi, jupyter]
42+
- id: ruff-format
43+
types_or: [python, pyi, jupyter]

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Version 0.1
2+
3+
- initial release. This is currently only released to GitHub.
4+
- Upgrade to latest version of NMECR (Version 1.0.17)
5+
- Add integration and unit test
6+
- Move source code out of R directory and into src directory

DESCRIPTION

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
Package: bsyncr
22
Type: Package
3-
Title: What the Package Does (Title Case)
3+
Title: Read BSync files for R
44
Version: 0.1.0
5-
Author: Cory Mosiman
6-
Maintainer: Not Maintained <not@abc.com>
7-
Description: More about what it does (maybe more than one line)
8-
Use four spaces when indenting paragraphs within the Description.
5+
Author: Cory Mosiman, Nicholas Long
6+
Maintainer: Nicholas Long <nicholas.long@nrel.gov>
7+
Description: Generic functions for reading BSync files into R. The package
8+
provides a set of functions to read BSync files and convert them into R data structures.
99
License: See LICENSE.txt
1010
Encoding: UTF-8
1111
LazyData: true
1212
Imports:
1313
xml2 (>= 1.3.2),
14-
nmecr (>= 1.0.4),
14+
nmecr (>= 1.0.17),
1515
anytime
1616
RoxygenNote: 7.1.0
17-
Suggests:
17+
Suggests:
1818
knitr,
1919
rmarkdown
2020
VignetteBuilder: knitr

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020, Alliance for Sustainable Energy, LLC. All rights reserved.
1+
Copyright (c) 2020-2025, Alliance for Sustainable Energy, LLC. All rights reserved.
22

33
BSD 3-Clause License
44

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export(bs_add_scenario_type)
44
export(bs_gen_dm_nmecr)
55
export(bs_gen_root_doc)
66
export(bs_link_bldg)
7+
export(bs_parse_nmecr_df)
78
export(bs_stub_bldg)
89
export(bs_stub_derived_model)
910
export(bs_stub_scenarios)

0 commit comments

Comments
 (0)