Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 0a8bde2

Browse files
author
William McLendon
committed
Merge branch 'OSS-Licensure' into 'master'
Initial commit for v0.5.0 OSS Release See merge request trilinos-devops-consolidation/code/SetProgramOptions!19
2 parents 9febf3a + 55c2f13 commit 0a8bde2

17 files changed

+534
-21
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: SetProgramOptions Testing
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: '0 13,1 * * *'
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
env:
13+
cache-name: venv-cache
14+
venv-name: venv-python
15+
16+
jobs:
17+
install_requirements:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 10
20+
steps:
21+
- name: Cache
22+
uses: actions/cache@v2
23+
with:
24+
path: ${{ env.venv-name }}
25+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.sha }}
26+
restore-keys: |
27+
${{ runner.os }}-${{ env.cache-name }}-${{ github.sha }}
28+
29+
- name: Checkout
30+
uses: actions/checkout@v2
31+
with:
32+
path: source
33+
34+
- name: Build VirtualEnv
35+
run: |
36+
# cd ${{ github.workspace }}
37+
echo "cache name : '${{ env.cache-name }}'"
38+
echo "github.head_ref : '${{ github.head_ref }}'"
39+
echo "github.sha : '${{ github.sha }}'"
40+
#pwd
41+
#ls -ltrhF
42+
python3 --version > version.txt
43+
cat version.txt
44+
python3 -m venv ${{ env.venv-name }}
45+
#ls -ltrhF ${{ env.venv-name }}/bin/
46+
source ${{ env.venv-name }}/bin/activate
47+
echo "VIRTUAL_ENV = ${VIRTUAL_ENV}"
48+
cd source
49+
# python3 -m pip install wheel configparserenhanced @ git+https://github.com/sandialabs/ConfigParserEnhanced.git@master#egg=configparserenhanced
50+
python3 -m pip install wheel -r requirements.txt -r requirements-test.txt -r doc/requirements.txt
51+
#ls -ltrhF
52+
53+
pytest:
54+
runs-on: ubuntu-latest
55+
timeout-minutes: 10
56+
needs: [install_requirements]
57+
steps:
58+
- name: Cache
59+
uses: actions/cache@v2
60+
with:
61+
path: ${{ env.venv-name }}
62+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.sha }}
63+
restore-keys: |
64+
${{ runner.os }}-${{ env.cache-name }}-${{ github.sha }}
65+
66+
- name: Checkout
67+
uses: actions/checkout@v2
68+
with:
69+
path: source
70+
71+
- name: Execute
72+
run: |
73+
source ${{ env.venv-name }}/bin/activate
74+
cd source
75+
python3 -m pytest --version
76+
#ls -ltrhF
77+
echo "VIRTUAL_ENV = ${VIRTUAL_ENV}"
78+
python3 -m pytest --cov=setprogramoptions --cov-report=term --cov-report=html:${{ github.workspace }}/htmlcov --cov-config=.coveragerc
79+
echo "htmlcov"
80+
ls -ltrhF ${{ github.workspace }}/htmlcov
81+
82+
- name: Save Artifacts
83+
uses: actions/upload-artifact@v2
84+
with:
85+
name: coverage
86+
path: htmlcov
87+
retention-days: 5
88+
89+
90+
91+
# - name: Cache
92+
# uses: actions/cache@v2
93+
# env:
94+
# cache-name: cache-venv
95+
# with:
96+
# key: v1-deps-${{ hashFiles('**/package-lock.json') }}
97+
# restore-keys: v1-deps-
98+
99+
100+

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ tests
2828

2929
poetry.lock
3030
venv-*
31+
32+
*.bak
33+
doc/SetProgramOptions-Docs
34+
35+
_*.log

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
#### Todo (for Unreleased)
1818
-->
1919

20+
## [0.5.0] 2021-12-20
21+
#### Added
22+
- Open Source License approved. Adding 3-Clause BSD license files and
23+
source headers.
24+
- github actions files for CI/CD testing will be added to this version
25+
number once code is posted to https://github.com/sandialabs/SetProgramOptions
26+
2027
## [0.4.0] 2021-11-23
2128
#### Added
2229
#### Changed

LICENSE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
BSD 3-Clause License
2+
3+
Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
4+
Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains
5+
certain rights in this software.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
1. Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
13+
2. Redistributions in binary form must reproduce the above copyright notice,
14+
this list of conditions and the following disclaimer in the documentation
15+
and/or other materials provided with the distribution.
16+
17+
3. Neither the name of the copyright holder nor the names of its contributors
18+
may be used to endorse or promote products derived from this software without
19+
specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31+

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1+
<!--
12
[![pipeline status](https://gitlab-ex.sandia.gov/trilinos-devops-consolidation/code/SetProgramOptions/badges/master/pipeline.svg)](https://gitlab-ex.sandia.gov/trilinos-devops-consolidation/code/SetProgramOptions/-/commits/master)
23
[![coverage report](https://gitlab-ex.sandia.gov/trilinos-devops-consolidation/code/SetProgramOptions/badges/master/coverage.svg)](http://10.202.35.89:8080/SetProgramOptions/coverage/index.html)
34
[![Generic badge](https://img.shields.io/badge/docs-latest-green.svg)](http://10.202.35.89:8080/SetProgramOptions/doc/index.html)
5+
-->
6+
<!-- Github Badges -->
7+
[![SetProgramOptions Testing](https://github.com/sandialabs/SetProgramOptions/actions/workflows/test-driver-core.yml/badge.svg)](https://github.com/sandialabs/SetProgramOptions/actions/workflows/test-driver-core.yml)
8+
[![Documentation Status](https://readthedocs.org/projects/SetProgramOptions/badge/?version=latest)](https://setprogramoptions.readthedocs.io/en/latest/?badge=latest)
9+
410

511
SetProgramOptions
612
=================
7-
The `SetProgramOptions` package extends `ConfigParserEnhanced` to enable the processing
13+
The `SetProgramOptions` package extends [`ConfigParserEnhanced`][2] to enable the processing
814
of **.ini** files that specify *Program Options*.
915

10-
`SetProgramOptions` supports all the _operations_ that `ConfigParserEnhanced` supports
16+
`SetProgramOptions` supports all the _operations_ that [`ConfigParserEnhanced`][2] supports
1117
and adds some of its own.
1218

13-
| Operation | Format | Defined By |
14-
| ------------ | --------------------------------------------- | ---------------------- |
15-
| `use` | `use <section>` | `ConfigParserEnhanced` |
16-
| `opt-set` | `opt-set Param1 [Param2..ParamN] [: <VALUE>]` | `SetProgramOptions` |
17-
| `opt-remove` | `opt-remove Param [SUBSTR]` | `SetProgramOptions` |
19+
| Operation | Format | Defined By |
20+
| ------------ | --------------------------------------------- | --------------------------- |
21+
| `use` | `use <section>` | [`ConfigParserEnhanced`][2] |
22+
| `opt-set` | `opt-set Param1 [Param2..ParamN] [: <VALUE>]` | `SetProgramOptions` |
23+
| `opt-remove` | `opt-remove Param [SUBSTR]` | `SetProgramOptions` |
1824

1925

2026
INI File Format
@@ -103,7 +109,7 @@ Operations Explained
103109
--------------------
104110

105111
### `use`
106-
The `use` operation is provided by `ConfigParserEnhanced`. Please see its documentation on this command and its use.
112+
The `use` operation is provided by [`ConfigParserEnhanced`][2]. Please see its documentation on this command and its use.
107113

108114
### `opt-set`
109115
Sets a generic _command line_ style option.
@@ -377,3 +383,6 @@ Done
377383

378384

379385
[1]: https://cmake.org/cmake/help/latest/command/set.html
386+
[2]: https://github.com/sandialabs/ConfigParserEnhanced
387+
388+

doc/source/conf.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,45 @@
11
#!/usr/bin/env python3
2+
# -*- mode: python; py-indent-offset: 4; py-continuation-offset: 4 -*-
3+
#===============================================================================
4+
# Copyright Notice
5+
# ----------------
6+
# Copyright 2021 National Technology & Engineering Solutions of Sandia,
7+
# LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS,
8+
# the U.S. Government retains certain rights in this software.
9+
#
10+
# License (3-Clause BSD)
11+
# ----------------------
12+
# Copyright 2021 National Technology & Engineering Solutions of Sandia,
13+
# LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS,
14+
# the U.S. Government retains certain rights in this software.
15+
#
16+
# Redistribution and use in source and binary forms, with or without
17+
# modification, are permitted provided that the following conditions
18+
# are met:
19+
#
20+
# 1. Redistributions of source code must retain the above copyright
21+
# notice, this list of conditions and the following disclaimer.
22+
#
23+
# 2. Redistributions in binary form must reproduce the above
24+
# copyright notice, this list of conditions and the following
25+
# disclaimer in the documentation and/or other materials provided
26+
# with the distribution.
27+
#
28+
# 3. Neither the name of the copyright holder nor the names of its
29+
# contributors may be used to endorse or promote products derived
30+
# from this software without specific prior written permission.
31+
#
32+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
36+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
39+
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42+
#===============================================================================
243

344
# Configuration file for the Sphinx documentation builder.
445
#

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "setprogramoptions"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
description = "Program options helper."
55
authors = [
66
"William McLendon <[email protected]>"

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66

77

88
# Privately hosted repositories
9-
configparserenhanced @ git+ssh://[email protected]/trilinos-devops-consolidation/code/ConfigParserEnhanced.git@master#egg=configparserenhanced
9+
#configparserenhanced @ git+ssh://[email protected]/trilinos-devops-consolidation/code/ConfigParserEnhanced.git@master#egg=configparserenhanced
10+
11+
configparserenhanced @ git+https://github.com/sandialabs/ConfigParserEnhanced.git@master#egg=configparserenhanced
1012

src/setprogramoptions/SetProgramOptions.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
#!/usr/bin/env python3
22
# -*- mode: python; py-indent-offset: 4; py-continuation-offset: 4 -*-
3+
#===============================================================================
4+
#
5+
# License (3-Clause BSD)
6+
# ----------------------
7+
# Copyright 2021 National Technology & Engineering Solutions of Sandia,
8+
# LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS,
9+
# the U.S. Government retains certain rights in this software.
10+
#
11+
# Redistribution and use in source and binary forms, with or without
12+
# modification, are permitted provided that the following conditions
13+
# are met:
14+
#
15+
# 1. Redistributions of source code must retain the above copyright
16+
# notice, this list of conditions and the following disclaimer.
17+
#
18+
# 2. Redistributions in binary form must reproduce the above
19+
# copyright notice, this list of conditions and the following
20+
# disclaimer in the documentation and/or other materials provided
21+
# with the distribution.
22+
#
23+
# 3. Neither the name of the copyright holder nor the names of its
24+
# contributors may be used to endorse or promote products derived
25+
# from this software without specific prior written permission.
26+
#
27+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
28+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
31+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
32+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
34+
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37+
#===============================================================================
338
"""
439
SetProgramOptions
540
=================

src/setprogramoptions/SetProgramOptionsCMake.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
#!/usr/bin/env python3
22
# -*- mode: python; py-indent-offset: 4; py-continuation-offset: 4 -*-
3+
#===============================================================================
4+
#
5+
# License (3-Clause BSD)
6+
# ----------------------
7+
# Copyright 2021 National Technology & Engineering Solutions of Sandia,
8+
# LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS,
9+
# the U.S. Government retains certain rights in this software.
10+
#
11+
# Redistribution and use in source and binary forms, with or without
12+
# modification, are permitted provided that the following conditions
13+
# are met:
14+
#
15+
# 1. Redistributions of source code must retain the above copyright
16+
# notice, this list of conditions and the following disclaimer.
17+
#
18+
# 2. Redistributions in binary form must reproduce the above
19+
# copyright notice, this list of conditions and the following
20+
# disclaimer in the documentation and/or other materials provided
21+
# with the distribution.
22+
#
23+
# 3. Neither the name of the copyright holder nor the names of its
24+
# contributors may be used to endorse or promote products derived
25+
# from this software without specific prior written permission.
26+
#
27+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
28+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
31+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
32+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
34+
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37+
#===============================================================================
338
"""
439
SetProgramOptionsCMake
540
======================

0 commit comments

Comments
 (0)