Skip to content

Commit 7e33c4f

Browse files
authored
Merge branch 'master' into event_handler_infrastructure
2 parents 0d8d16c + 08eb706 commit 7e33c4f

File tree

5 files changed

+87
-14
lines changed

5 files changed

+87
-14
lines changed

.github/workflows/ci.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,16 @@ jobs:
4949
# checkout source code
5050
- uses: actions/checkout@v2
5151

52-
# compile sipnet
52+
# install doxygen
53+
- name: Install Doxygen
54+
run: |
55+
if [[ "$RUNNER_OS" == "Linux" ]]; then
56+
sudo apt-get install doxygen -y
57+
elif [[ "$RUNNER_OS" == "macOS" ]]; then
58+
brew install --formula doxygen
59+
fi
60+
61+
# compile SIPNET
5362
- name: compile sipnet
5463
run: make
5564

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1+
# build artifacts and executables
12
*.o
23
estimate
34
sipnet
45
subsetData
56
transpose
7+
.doxygen.stamp
8+
9+
# documentation
10+
docs/html
11+
docs/latex
12+
13+
.DS_Store
14+
.Rproj.user
15+
.Rhistory
16+
17+
# System-specific files
18+
.DS_Store
19+
.Rproj.user
20+
.Rhistory
21+
22+
# Temporary and backup files
23+
*.bak
24+
*~
25+
*.tmp

CONTRIBUTING.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
## Style Guide
3+
4+
## Compiling
5+
6+
SIPNET uses `make` to build the model and documentation. There are also miscellaneous targets for running analysis workflows:
7+
8+
```sh
9+
# build SIPNET executable
10+
make sipnet
11+
# build documentation
12+
make document
13+
# clean up build artifacts
14+
make clean
15+
# list all make commands
16+
make help
17+
```

Makefile

+35-8
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,23 @@ TRANSPOSE_OFILES=$(TRANSPOSE_CFILES:.c=.o)
1919
SUBSET_DATA_CFILES=subsetData.c util.c namelistInput.c
2020
SUBSET_DATA_OFILES=$(SUBSET_DATA_CFILES:.c=.o)
2121

22+
CFILES=$(sort $(ESTIMATE_CFILES) $(SENSTEST_CFILES) $(SIPNET_CFILES) $(TRANSPOSE_CFILES) $(SUBSET_DATA_CFILES))
23+
24+
# Doxygen
25+
DOXYFILE = docs/Doxyfile
26+
DOXYGEN_HTML_DIR = docs/html
27+
DOXYGEN_LATEX_DIR = docs/latex
28+
2229
# all: estimate sensTest sipnet transpose subsetData
23-
all: estimate sipnet transpose subsetData
30+
all: estimate sipnet transpose subsetData document
31+
32+
# Only update docs if source files or Doxyfile have changed
33+
document: .doxygen.stamp
34+
35+
.doxygen.stamp: $(CFILES) $(DOXYFILE)
36+
@echo "Running Doxygen..."
37+
doxygen $(DOXYFILE)
38+
@touch .doxygen.stamp
2439

2540
estimate: $(ESTIMATE_OFILES)
2641
$(LD) -o estimate $(ESTIMATE_OFILES) $(LIBLINKS)
@@ -39,11 +54,8 @@ subsetData: $(SUBSET_DATA_OFILES)
3954

4055
clean:
4156
rm -f $(ESTIMATE_OFILES) $(SIPNET_OFILES) $(TRANSPOSE_OFILES) $(SUBSET_DATA_OFILES) estimate sensTest sipnet transpose subsetData
57+
rm -rf $(DOXYGEN_HTML_DIR) $(DOXYGEN_LATEX_DIR)
4258

43-
#clean:
44-
# rm -f $(ESTIMATE_OFILES) $(SENSTEST_OFILES) $(SIPNET_OFILES) $(TRANSPOSE_OFILES) $(SUBSET_DATA_OFILES) estimate sensTest sipnet transpose subsetData
45-
46-
#
4759
# UNIT TESTS
4860
SIPNET_TEST_DIRS:=$(shell find tests/sipnet -type d -mindepth 1 -maxdepth 1)
4961
SIPNET_TEST_DIRS_RUN:= $(addsuffix .run, $(SIPNET_TEST_DIRS))
@@ -79,11 +91,26 @@ testclean: $(SIPNET_TEST_DIRS_CLEAN)
7991
$(SIPNET_TEST_DIRS_CLEAN):
8092
$(MAKE) -C $(basename $@) clean
8193

82-
.PHONY: all test $(SIPNET_TEST_DIRS) pretest posttest $(SIPNET_LIB) testrun $(SIPNET_TEST_DIRS_RUN) testclean $(SIPNET_TEST_DIRS_CLEAN)
83-
94+
.PHONY: all clean document estimate sipnet transpose subsetData doxygen
95+
test $(SIPNET_TEST_DIRS) pretest posttest $(SIPNET_LIB) testrun
96+
$(SIPNET_TEST_DIRS_RUN) testclean $(SIPNET_TEST_DIRS_CLEAN)
97+
98+
help:
99+
@echo "Available targets:"
100+
@echo " help - Display this help message."
101+
@echo " === core targets ==="
102+
@echo " all - Builds all components."
103+
@echo " document - Generate documentation."
104+
@echo " sipnet - Builds the 'sipnet' executable."
105+
@echo " clean - Removes compiled files, executables, and documentation."
106+
@echo " depend - Automatically generates dependency information for source files."
107+
@echo " === additional tools ==="
108+
@echo " estimate - Builds 'estimate' executable to estimate parameters using MCMC."
109+
@echo " transpose - Builds 'transpose' executable to read in and transpose a matrix"
110+
@echo " subsetData - Builds 'subsetData' executable that subsets input files (e.g., .clim, .dat, .valid, .sigma, .spd) from a specified start date and length of time in days."
84111

85-
#This target automatically builds dependencies.
86112
depend::
87113
makedepend $(CFILES)
88114

89115
# DO NOT DELETE THIS LINE -- make depend depends on it.
116+

docs/Doxyfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#---------------------------------------------------------------------------
66
PROJECT_NAME = SIPNET
77
PROJECT_NUMBER = 1.0
8-
OUTPUT_DIRECTORY = /Users/aulenbac/Documents/workspace/SIPNET/docs
9-
CREATE_SUBDIRS = NO
8+
OUTPUT_DIRECTORY = docs
9+
CREATE_SUBDIRS = YES
1010
OUTPUT_LANGUAGE = English
1111
USE_WINDOWS_ENCODING = NO
1212
BRIEF_MEMBER_DESC = YES
@@ -24,8 +24,8 @@ ABBREVIATE_BRIEF = "The $name class" \
2424
the
2525
ALWAYS_DETAILED_SEC = NO
2626
INLINE_INHERITED_MEMB = NO
27-
FULL_PATH_NAMES = YES
28-
STRIP_FROM_PATH = /Applications/
27+
FULL_PATH_NAMES = NO
28+
STRIP_FROM_PATH = ../..
2929
STRIP_FROM_INC_PATH =
3030
SHORT_NAMES = NO
3131
JAVADOC_AUTOBRIEF = NO
@@ -82,7 +82,7 @@ WARN_LOGFILE =
8282
#---------------------------------------------------------------------------
8383
# configuration options related to the input files
8484
#---------------------------------------------------------------------------
85-
INPUT = /Users/aulenbac/Documents/workspace/SIPNET
85+
INPUT = ../
8686
FILE_PATTERNS = *.c \
8787
*.cc \
8888
*.cxx \

0 commit comments

Comments
 (0)