Skip to content

Commit 2e3056b

Browse files
authored
Merge pull request #62 from sandialabs/final-tweaks-before-initial-release
Final tweaks before initial release
2 parents 78bf1b9 + 984e1ee commit 2e3056b

27 files changed

+189
-71
lines changed

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: pip
9+
directory: /doc
10+
schedule:
11+
interval: daily
12+
13+
- package-ecosystem: pip
14+
directory: /example
15+
schedule:
16+
interval: daily
17+
18+
- package-ecosystem: pip
19+
directory: /
20+
schedule:
21+
interval: daily
22+
23+
- package-ecosystem: pip
24+
directory: /test
25+
schedule:
26+
interval: daily

.github/workflows/codeql.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
schedule:
9+
- cron: "0 0 * * 1"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
analyze:
16+
name: Analyze
17+
runs-on: ubuntu-latest
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: ["javascript-typescript", "python"]
27+
28+
steps:
29+
- name: Harden Runner
30+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
31+
with:
32+
egress-policy: audit
33+
34+
- name: Checkout repository
35+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
36+
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
39+
with:
40+
languages: ${{ matrix.language }}
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
44+
with:
45+
category: "/language:${{ matrix.language }}"

.github/workflows/continuous-integration.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ defaults:
1111
run:
1212
shell: bash
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
test:
1619
runs-on: macos-latest
@@ -19,6 +22,11 @@ jobs:
1922
version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2023
steps:
2124

25+
- name: Harden Runner
26+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
27+
with:
28+
egress-policy: audit
29+
2230
- name: Check out the commit
2331
uses: actions/checkout@v4
2432

@@ -67,6 +75,11 @@ jobs:
6775
commits:
6876
runs-on: ubuntu-latest
6977
steps:
78+
- name: Harden Runner
79+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
80+
with:
81+
egress-policy: audit
82+
7083
- name: Conventional Commits
7184
uses: taskmedia/action-conventional-commits@v1.1.14
7285
with:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Dependency Review'
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Harden Runner
12+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
13+
with:
14+
egress-policy: audit
15+
16+
- name: 'Checkout Repository'
17+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
18+
19+
- name: 'Dependency Review'
20+
uses: actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a # v4.3.3

.github/workflows/scorecard.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ jobs:
2323
id-token: write
2424

2525
steps:
26+
- name: Harden Runner
27+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
28+
with:
29+
egress-policy: audit
30+
2631
- name: "Checkout code"
2732
uses: actions/checkout@v4
2833
with:

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ repos:
1313
args: [ --fix ]
1414
- id: ruff-format
1515

16+
- repo: https://github.com/gitleaks/gitleaks
17+
rev: v8.18.4
18+
hooks:
19+
- id: gitleaks
20+
1621
# - repo: https://github.com/pre-commit/mirrors-mypy
1722
# rev: v1.8.0
1823
# hooks:
@@ -48,3 +53,8 @@ repos:
4853
hooks:
4954
- id: pyroma
5055
additional_dependencies: ["poetry"]
56+
57+
- repo: https://github.com/shellcheck-py/shellcheck-py
58+
rev: v0.10.0.1
59+
hooks:
60+
- id: shellcheck

CONTRIBUTING.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ The checks we perform are the following:
7777
* Ensure files don't contain merge conflict strings.
7878
* Ensure files end with a single blank line.
7979
* Ensure we only use Unix line endings.
80-
* Ensure test files are correctly named.
8180
* Trim trailing whitespace.
8281
* Ensure we use [type-hinting][typing].
8382
* Check for common mistakes in [reStructuredText][rest] in our documentation.
@@ -133,8 +132,6 @@ search for and install them. These are the ones we recommend:
133132
* **Conventional Commits:** Adhere to the [Conventional Commits][conventional]
134133
specification for commit messages.
135134
* **Coverage Gutters:** Display test coverage in the editor.
136-
* **GitLab Workflow:** Integrate GitLab issues, merge requests, and pipelines
137-
into VS Code.
138135
* **GitLens — Git supercharged:** Integrate some of the powerful features of
139136
[GitKraken][kraken] into VS Code.
140137
* **IntelliCode:** AI-assisted development features.
@@ -472,10 +469,10 @@ Feel free to commit and push small chunks early and often and then use `git
472469
rebase -i` to reorganize your commits before sharing.
473470

474471
> **Note:** If you rebase a branch that's already been pushed to a remote,
475-
> you'll wind up changing the history, which will require a force push with
476-
> `git push origin +<branch-name>`. That is permissible (even encouraged), but
477-
> if you've had one or more reviewers or collaborators working with you on the
478-
> branch, *get their buy-in first* before doing a force push.
472+
> you'll wind up changing the history, which will require a force push. That
473+
> is permissible (even encouraged), but if you've had one or more reviewers or
474+
> collaborators working with you on the branch, *get their buy-in first* before
475+
> doing a force push.
479476
480477
### When Work is Complete
481478

COPYRIGHT.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright
2+
3+
*Copyright © 2023, National Technology & Engineering Solutions of
4+
Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
5+
NTESS, the U.S. Government retains certain rights in this software.
6+
All rights reserved.*

LICENSE.md

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# 3-Clause BSD License
1+
# BSD 3-Clause "New" or "Revised" License
22

3-
_Copyright © 2024, National Technology & Engineering Solutions of
4-
Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
5-
NTESS, the U.S. Government retains certain rights in this software.
6-
All rights reserved._
3+
Copyright 2023 NTESS.
74

85
Redistribution and use in source and binary forms, with or without
96
modification, are permitted provided that the following conditions are
@@ -14,7 +11,7 @@ met:
1411
2. Redistributions in binary form must reproduce the above copyright
1512
notice, this list of conditions and the following disclaimer in the
1613
documentation and/or other materials provided with the distribution.
17-
3. Neither the name of Sandia National Laboratories nor the names of its
14+
3. Neither the name of the copyright holder nor the names of its
1815
contributors may be used to endorse or promote products derived from
1916
this software without specific prior written permission.
2017

@@ -30,41 +27,14 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
3027
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3128
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3229

30+
31+
3332
## Third-Party Software
3433

3534
This project also bundles minified third-party software licensed under
3635
the MIT license.
3736

38-
### Bootstrap
39-
40-
Copyright 2011–2021 The Bootstrap Authors
41-
(https://github.com/twbs/bootstrap/graphs/contributors)
42-
43-
### Chart.js
44-
45-
Copyright 2020 Chart.js Contributors
46-
47-
### JQuery
48-
49-
Copyright JS Foundation and other contributors
50-
51-
### MIT License
52-
53-
Permission is hereby granted, free of charge, to any person obtaining a
54-
copy of this software and associated documentation files (the
55-
“Software”), to deal in the Software without restriction, including
56-
without limitation the rights to use, copy, modify, merge, publish,
57-
distribute, sublicense, and/or sell copies of the Software, and to
58-
permit persons to whom the Software is furnished to do so, subject to
59-
the following conditions:
60-
61-
The above copyright notice and this permission notice shall be included
62-
in all copies or substantial portions of the Software.
63-
64-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
65-
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
66-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
67-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
68-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
69-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
70-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37+
* **Bootstrap:** Copyright 2011–2021 The Bootstrap Authors
38+
(https://github.com/twbs/bootstrap/graphs/contributors)
39+
* **Chart.js:** Copyright 2020 Chart.js Contributors
40+
* **JQuery:** Copyright JS Foundation and other contributors

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
> **WARNING:** *This package is still in the process of being open sourced.
2-
> Until that work is done and this banner is removed, don't expect anything
3-
> documented here to be accurate.*
4-
51
![Lines of code](https://sloc.xyz/github/sandialabs/shell-logger/?category=code)
62
[![codecov](https://codecov.io/gh/sandialabs/shell-logger/branch/master/graph/badge.svg?token=FmDStZ6FVR)](https://codecov.io/gh/sandialabs/shell-logger)
73
[![CodeFactor](https://www.codefactor.io/repository/github/sandialabs/shell-logger/badge/master)](https://www.codefactor.io/repository/github/sandialabs/shell-logger/overview/master)
@@ -81,9 +77,9 @@ love to have your help :grinning: Check out our
8177

8278
[contributors]: https://github.com/sandialabs/shell-logger/graphs/contributors
8379

84-
## License
80+
## License & Copyright
8581

86-
See [LICENSE.md](LICENSE.md).
82+
See [LICENSE.md](LICENSE.md) and [COPYRIGHT.md](COPYRIGHT.md).
8783

8884
## Credits
8985

example/build_flex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
"""An example of cloning, configuring, building, and installing software."""
33

4-
# © 2024 National Technology & Engineering Solutions of Sandia, LLC
4+
# © 2023 National Technology & Engineering Solutions of Sandia, LLC
55
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
66
# U.S. Government retains certain rights in this software.
77

example/build_flex.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ git clone \
88
flex-2.5.39
99

1010
# Run `autogen`.
11-
cd flex-2.5.39
11+
cd flex-2.5.39 || exit
1212
./autogen.sh
1313

1414
# Configure flex.
15-
./configure --prefix=$(dirname $(pwd))/flex
15+
./configure --prefix="$(dirname "$(pwd)")/flex"
1616

1717
# Build `libcompat.la`.
18-
cd lib
18+
cd lib || exit
1919
make libcompat.la
2020

2121
# Build & install flex.

example/hello_world_html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
"""A simple example."""
33

4-
# © 2024 National Technology & Engineering Solutions of Sandia, LLC
4+
# © 2023 National Technology & Engineering Solutions of Sandia, LLC
55
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
66
# U.S. Government retains certain rights in this software.
77

example/hello_world_html_and_console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
"""A simple example, sending output to the log file and console."""
33

4-
# © 2024 National Technology & Engineering Solutions of Sandia, LLC
4+
# © 2023 National Technology & Engineering Solutions of Sandia, LLC
55
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
66
# U.S. Government retains certain rights in this software.
77

example/hello_world_html_with_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
"""A simple example, capturing various system statistics."""
33

4-
# © 2024 National Technology & Engineering Solutions of Sandia, LLC
4+
# © 2023 National Technology & Engineering Solutions of Sandia, LLC
55
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
66
# U.S. Government retains certain rights in this software.
77

example/run-all.bash

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
quote_arg() {
3+
if [[ "$1" =~ ( ) ]]; then
4+
echo -n "'$1' "
5+
else
6+
echo -n "$1 "
7+
fi
8+
}
9+
10+
run_script() {
11+
echo
12+
echo -n "~~~~~ Running "
13+
for arg in "$@"; do
14+
quote_arg "${arg}"
15+
done
16+
echo " ~~~~~"
17+
echo
18+
python3 "$@"
19+
echo
20+
}
21+
22+
ORIG_DIR=$(pwd)
23+
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
24+
cd "${SCRIPT_DIR}" || exit 1
25+
python3 -m pip uninstall -y shell-logger
26+
cd ..
27+
python3 -m pip install .
28+
cd "${SCRIPT_DIR}" || exit 1
29+
run_script hello_world_html.py
30+
run_script hello_world_html_and_console.py
31+
run_script hello_world_html_with_stats.py
32+
run_script build_flex.py
33+
cd "${ORIG_DIR}" || exit 1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
To install, simply ``python3 -m pip install .`` in the repository root.
55
"""
66

7-
# © 2024 National Technology & Engineering Solutions of Sandia, LLC
7+
# © 2023 National Technology & Engineering Solutions of Sandia, LLC
88
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
99
# U.S. Government retains certain rights in this software.
1010

shell_logger/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""The ``shell_logger`` package."""
22

3-
# © 2024 National Technology & Engineering Solutions of Sandia, LLC
3+
# © 2023 National Technology & Engineering Solutions of Sandia, LLC
44
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
55
# U.S. Government retains certain rights in this software.
66

0 commit comments

Comments
 (0)