Skip to content

Commit a0ab2a5

Browse files
committed
init: adding skeleton for environment modules
This currently works to parse environment modules (and not LMOD). We can add the latter if needed. It is a fairly basic parsing that represents the top level module (name and version) as nodes, and any binary/libs discovered within the paths derived as children "binary" and "library." For my testing case I do not have any because I used a dummy repository of module files for which I do not actually have the software for. Signed-off-by: vsoch <[email protected]>
0 parents  commit a0ab2a5

17 files changed

+881
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM spack/ubuntu-jammy
2+
3+
LABEL maintainer="Vanessasaurus <@vsoch>"
4+
5+
# Match the default user id for a single system so we aren't root
6+
ARG USERNAME=vscode
7+
ARG USER_UID=1000
8+
ARG USER_GID=1000
9+
ENV USERNAME=${USERNAME}
10+
ENV USER_UID=${USER_UID}
11+
ENV USER_GID=${USER_GID}
12+
USER root
13+
14+
# extra interactive utilities
15+
RUN apt-get update \
16+
&& apt-get -qq install -y --no-install-recommends \
17+
vim less sudo python3-pip curl tclsh expect tcl-dev
18+
19+
# Ensure regular python is visible
20+
# And environment modules are installed
21+
RUN ln -s /usr/bin/python3 /usr/bin/python && \
22+
curl -LJO https://github.com/cea-hpc/modules/releases/download/v5.4.0/modules-5.4.0.tar.gz && \
23+
tar xfz modules-5.4.0.tar.gz && \
24+
cd modules-5.4.0 && \
25+
./configure && make && make install
26+
27+
# Add the group and user that match our ids
28+
RUN ln -s /usr/local/Modules/init/profile.sh /etc/profile.d/modules.sh
29+
RUN groupadd -g ${USER_GID} ${USERNAME} && \
30+
adduser --disabled-password --uid ${USER_UID} --gid ${USER_GID} --gecos "" ${USERNAME} && \
31+
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
32+
USER $USERNAME

.devcontainer/devcontainer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Compspec Software Modules Development Environment",
3+
"dockerFile": "Dockerfile",
4+
"context": "../",
5+
6+
"customizations": {
7+
"vscode": {
8+
"settings": {
9+
"terminal.integrated.defaultProfile.linux": "bash"
10+
},
11+
"extensions": [
12+
"ms-vscode.cmake-tools",
13+
"ms-python.python"
14+
]
15+
}
16+
},
17+
"postStartCommand": "git config --global --add safe.directory /workspaces/compspec-modules"
18+
}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.eggs
2+
compspec_modules.egg-info
3+
*.so
4+
build
5+
__pycache__
6+
env
7+
dist

.pre-commit-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-docstring-first
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
- id: mixed-line-ending
11+
12+
- repo: local
13+
hooks:
14+
- id: black
15+
name: black
16+
language: python
17+
types: [python]
18+
entry: black
19+
20+
- id: isort
21+
name: isort
22+
args: [--filter-files]
23+
language: python
24+
types: [python]
25+
entry: isort
26+
27+
- id: flake8
28+
name: flake8
29+
language: python
30+
types: [python]
31+
entry: flake8

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CHANGELOG
2+
3+
This is a manually generated log to track changes to the repository for each release.
4+
Each section should include general headers such as **Implemented enhancements**
5+
and **Merged pull requests**. Critical items to know are:
6+
7+
- renamed commands
8+
- deprecated / removed commands
9+
- changed defaults
10+
- backward incompatible changes (recipe file format? image file format?)
11+
- migration guidance (how to convert images?)
12+
- changed behaviour (recipe sections work differently)
13+
14+
The versions coincide with releases on pip. Only major versions will be released as tags on Github.
15+
16+
## [0.0.x](https://github.com/compspec/compspec-modules/tree/main) (0.0.x)
17+
- Initial creation of project skeleton (0.0.0)

COPYRIGHT

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Intellectual Property Notice
2+
----------------------------
3+
4+
HPCIC DevTools is licensed under the MIT license (LICENSE).
5+
6+
Copyrights and patents in this project are retained by
7+
contributors. No copyright assignment is required to contribute to
8+
HPCIC DevTools.
9+
10+
SPDX usage
11+
------------
12+
13+
Individual files contain SPDX tags instead of the full license text.
14+
This enables machine processing of license information based on the SPDX
15+
License Identifiers that are available here: https://spdx.org/licenses/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 LLNS, LLC and other HPCIC DevTools Developers.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
include README.md LICENSE
2+
recursive-include compspec_modules *
3+
prune OLD*
4+
prune env*
5+
global-exclude .env
6+
global-exclude *.py[co]
7+
recursive-exclude .git *
8+
global-exclude __pycache__

NOTICE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
This work was produced under the auspices of the U.S. Department of
2+
Energy by Lawrence Livermore National Laboratory under Contract
3+
DE-AC52-07NA27344.
4+
5+
This work was prepared as an account of work sponsored by an agency of
6+
the United States Government. Neither the United States Government nor
7+
Lawrence Livermore National Security, LLC, nor any of their employees
8+
makes any warranty, expressed or implied, or assumes any legal liability
9+
or responsibility for the accuracy, completeness, or usefulness of any
10+
information, apparatus, product, or process disclosed, or represents that
11+
its use would not infringe privately owned rights.
12+
13+
Reference herein to any specific commercial product, process, or service
14+
by trade name, trademark, manufacturer, or otherwise does not necessarily
15+
constitute or imply its endorsement, recommendation, or favoring by the
16+
United States Government or Lawrence Livermore National Security, LLC.
17+
18+
The views and opinions of authors expressed herein do not necessarily
19+
state or reflect those of the United States Government or Lawrence
20+
Livermore National Security, LLC, and shall not be used for advertising
21+
or product endorsement purposes.

0 commit comments

Comments
 (0)