Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Sep 14, 2021
1 parent f831f39 commit e7f9164
Show file tree
Hide file tree
Showing 127 changed files with 4,109 additions and 4,087 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ doi_temp.db
transaction_history/
**/test*
**/.DS_Store
**/._*
**/__pycache__
**/.pytest_cache
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/pds/my_pds_module/_version.py export-subst
47 changes: 37 additions & 10 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,19 +1,46 @@
# This is a comment.
# 📀 Code Owners
#
# Copyright © 2021, California Institute of Technology ("Caltech").
# U.S. Government sponsorship acknowledged.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# • Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# • Redistributions must reproduce the above copyright notice, this list of
# conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
# • Neither the name of Caltech nor its operating division, the Jet Propulsion
# Laboratory, nor the names of its contributors may be used to endorse or
# promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
#
# Each line is a file pattern followed by one or more owners.

#
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.

# ***************************************************************
#
# Go to https://github.com/orgs/pds-data-dictionaries/teams to
# find out more information about your applicable team

* @NASA-PDS/pdsen-python-committers
# Go to https://github.com/orgs/NASA-PDS/teams to find out about our teams

# **************************************************************
* @NASA-PDS/pdsen-python-committers

# For more information on populating this file, go to
# For more information on populating this file, check out
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
34 changes: 24 additions & 10 deletions .github/workflows/stable-cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,28 @@ jobs:
token: ${{secrets.ADMIN_GITHUB_TOKEN}}
fetch-depth: 0
-
name: Update default configuration
name: 💵 Python Cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
# The "key" used to indicate a set of cached files is the operating system runner
# plus "py" for Python-specific builds, plus a hash of the wheels, plus "pds" because
# we pds-prefix everything with "pds" in PDS! 😅
key: pds-${{runner.os}}-py-${{hashFiles('**/*.whl')}}
# To restore a set of files, we only need to match a prefix of the saved key.
restore-keys: pds-${{runner.os}}-py-
-
name: 🔧 Update default configuration
run: |
import sys
import os
print("Running python version {}".format(sys.version))
conf_file = "pds_doi_service.ini"
print("Create config file for unit test {}".format(conf_file))
with open(conf_file, "w") as f:
f.write("[OSTI]\n")
f.write("user = {}\n".format("${{secrets.osti_login}}"))
f.write("password = {}\n".format("${{secrets.osti_password}}"))
import sys
import os
print("Running python version {}".format(sys.version))
conf_file = "pds_doi_service.ini"
print("Create config file for unit test {}".format(conf_file))
with open(conf_file, "w") as f:
f.write("[OSTI]\n")
f.write("user = {}\n".format("${{secrets.osti_login}}"))
f.write("password = {}\n".format("${{secrets.osti_password}}"))
shell: python
-
name: 🤠 Roundup
Expand All @@ -74,3 +85,6 @@ jobs:
pypi_username: ${{secrets.PYPI_USERNAME}}
pypi_password: ${{secrets.PYPI_PASSWORD}}
ADMIN_GITHUB_TOKEN: ${{secrets.ADMIN_GITHUB_TOKEN}}

...
# -*- mode: yaml; indent: 4; fill-column: 120; coding: utf-8 -*-
14 changes: 13 additions & 1 deletion .github/workflows/unstable-cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ on:
jobs:
unstable-assembly:
name: 🧩 Unstable Assembly
if: github.actor != 'pdsen-ci'
runs-on: ubuntu-latest
steps:
-
Expand All @@ -54,6 +55,17 @@ jobs:
lfs: true
fetch-depth: 0
token: ${{secrets.ADMIN_GITHUB_TOKEN}}
-
name: 💵 Python Cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
# The "key" used to indicate a set of cached files is the operating system runner
# plus "py" for Python-specific builds, plus a hash of the wheels, plus "pds" because
# we pds-prefix everything with "pds" in PDS! 😅
key: pds-${{runner.os}}-py-${{hashFiles('**/*.whl')}}
# To restore a set of files, we only need to match a prefix of the saved key.
restore-keys: pds-${{runner.os}}-py-
-
name: Update default configuration
run: |
Expand All @@ -77,5 +89,5 @@ jobs:
pypi_password: ${{secrets.TEST_PYPI_PASSWORD}}
ADMIN_GITHUB_TOKEN: ${{secrets.ADMIN_GITHUB_TOKEN}}


...
# -*- mode: yaml; indent: 4; fill-column: 120; coding: utf-8 -*-
78 changes: 65 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,86 @@
# Python build, virtual environments, and buildouts
venv
__pycache__/
dist/
build/
*.egg-info
.*.cfg
develop-eggs/
.python-eggs/
.eggs/
pip-selfcheck.json
.python-version

# Python testing artifacts
.coverage
htmlcov
.tox/

# Object files
*.pyc
*.o
*.pkl
*.py[ocd]

# IntelliJ files
# Libraries
*.lib
*.a

# Eclipse files
.settings/
*.project
*.classpath

# Editor support
.idea/
*.iml
.vscode
*.sublime-*

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
lib/
lib64/

# Executables
*.exe
*.out
*.app

# Temporary files
*~
.*.swp
var/

# other stuff
dist/
pds_doi_service.ini
*.log
*.xpr
bin/
.*.swp

# OS-specific artifacts
.DS_Store
._*

# Exclusions
!.coveragerc
!.editorconfig
!.gitattributes
!.gitignore
!.gitkeep

# Project-specific
pds_doi_service.ini
allure/
pds_doi_service/api/pds_doi_api.egg-info/
pds_doi_core.egg-info/
pds_doi_service.egg-info/
pds_doi_service/core/.DS_Store
venv/
WhereAmI.py
build/
doi.db
output/
transaction_history/
.eggs/
docs/Makefile
docs/design/PDS-technical-architecture.pdf
docs/make.bat
doi_temp.db
tests/aaDOI_production_submitted_labels.zip
tests/aaDOI_production_submitted_labels/


44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$

- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
files: ^src/|tests/

- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v0.910
hooks:
- id: mypy
files: ^src/|tests/

- repo: https://github.com/python/black
rev: 21.7b0
hooks:
- id: black
files: ^src/|tests/

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
files: ^src/|tests/

- repo: local
hooks:
- id: tests
name: Tests
entry: pytest
language: system
stages: [push]
pass_filenames: false
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit e7f9164

Please sign in to comment.