Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Sep 7, 2021
1 parent 654ad48 commit d5988be
Show file tree
Hide file tree
Showing 21 changed files with 434 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
my_pds_module/_version.py export-subst
archive-analytics/_version.py export-subst
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ assignees: jordanpadams

## ⚙️ Engineering Details
<!--
Provide some design / implementation details and/or a sub-task checklist as needed.
Provide some design / implementation details and/or a sub-task checklist as needed.
Convert issue to Epic if estimate is outside the scope of 1 sprint.
-->
15 changes: 9 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
**Summary***
## 📜 Summary

Brief summary of changes if not sufficiently described by commit messages.

**Test Data and/or Report**
## 🩺 Test Data and/or Report

One of the following should be included here:
* Reference to regression test included in code (preferred wherever reasonable)
* Attach test data here + outputs of tests
- Reference to regression test included in code (preferred wherever reasonable)
- Attach test data here + outputs of tests

## 🧩 Related Issues

**Related Issues**
<!--
Reference related issues here and use `Fixes` or `Resolves` in order to automatically close the issue upon merge. For more information on autolinking to tickets see https://docs.github.com/en/github/writing-on-github/autolinked-references-and-urls.
Expand All @@ -15,4 +18,4 @@ One of the following should be included here:
- fixes #2
- refs #3
* for issues in other repos: NASA-PDS/my_repo#1, NASA-PDS/her_repo#2
->
->
74 changes: 74 additions & 0 deletions .github/workflows/stable-cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 🏃‍♀️ Continuous Integration and Delivery: Stable
# ===============================================
#
# Note: for this workflow to succeed, the following secrets must be installed
# in the repository:
#
# ``ADMIN_GITHUB_TOKEN``
# A personal access token of a user with collaborator or better access to
# the project repository. You can generate this by visiting GitHub →
# Settings → Developer settings → Personal access tokens → Generate new
# token. Give the token scopes on ``repo``, ``write:packages``,
# ``delete:packages``, ``workflow``, and ``read:gpg_key``.
# ``PYPI_USERNAME``
# Username for pypi.org.
# ``PYPI_PASSWORD``
# Password for ``PYPI_USERNAME``.
#


---

name: 😌 Stable integration & delivery


# Driving Event
# -------------
#
# What event starts this workflow: a push of a release tag. Note: according to
# https://git.io/JJZQt we have been doing our tag matching wrong. It's not
# regexp, it's not glob…it's more like…glob++ 😮

on:
push:
branches:
- 'release/*'


# What to Do
# ----------
#
# Round up, yee-haw!

jobs:
stable-assembly:
name: 🐴 Stable Assembly
runs-on: ubuntu-latest
steps:
-
name: 💳 Checkout
uses: actions/checkout@v2
with:
lfs: true
token: ${{secrets.ADMIN_GITHUB_TOKEN}}
fetch-depth: 0
-
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: 🤠 Roundup
uses: NASA-PDS/roundup-action@main
with:
assembly: stable
env:
pypi_username: ${{secrets.PYPI_USERNAME}}
pypi_password: ${{secrets.PYPI_PASSWORD}}
ADMIN_GITHUB_TOKEN: ${{secrets.ADMIN_GITHUB_TOKEN}}
81 changes: 81 additions & 0 deletions .github/workflows/unstable-cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# 🏃‍♀️ Continuous Integration and Delivery: Unstable
# =================================================
#
# Note: for this workflow to succeed, the following secrets must be installed
# in the repository (or inherited from the repository's organization):
#
# ``ADMIN_GITHUB_TOKEN``
# A personal access token of a user with collaborator or better access to
# the project repository. You can generate this by visiting GitHub →
# Settings → Developer settings → Personal access tokens → Generate new
# token. Give the token scopes on ``repo``, ``write:packages``,
# ``delete:packages``, ``workflow``, and ``read:gpg_key``.
# ``TEST_PYPI_USERNAME``
# Username for test.pypi.org.
# ``TEST_PYPI_PASSWORD``
# Password for ``TEST_PYPI_USERNAME``.
#


---

name: 🤪 Unstable integration & delivery


# Driving Event
# -------------
#
# What event starts this workflow: a push to ``main`` (or ``master`` in old
# parlance). For the "glob++" pattern syntax, see https://git.io/JJZQt

on:
push:
branches:
- main
paths-ignore:
- 'CHANGELOG.md'
- 'docs/requirements/**'


# What to Do
# ----------
#
# Round up, yee-haw!

jobs:
unstable-assembly:
name: 🧩 Unstable Assembly
if: github.actor != 'pdsen-ci'
runs-on: ubuntu-latest
steps:
-
name: 💳 Checkout
uses: actions/checkout@v2
with:
lfs: true
token: ${{secrets.ADMIN_GITHUB_TOKEN}}
fetch-depth: 0
-
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: 🤠 Roundup
uses: NASA-PDS/roundup-action@main
with:
assembly: unstable
env:
pypi_username: ${{secrets.TEST_PYPI_USERNAME}}
pypi_password: ${{secrets.TEST_PYPI_PASSWORD}}
ADMIN_GITHUB_TOKEN: ${{secrets.ADMIN_GITHUB_TOKEN}}

...

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

# Python testing artifacts
.coverage
htmlcov
.tox/

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

# Libraries
*.lib
Expand All @@ -20,15 +30,20 @@ build/
*.project
*.classpath

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


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

# Executables
*.exe
Expand All @@ -37,10 +52,22 @@ build/

# Temporary files
*~
.*.swp
var/

# other stuff
*.log
*.xpr
*.swp
/bin/
bin/
.*.swp
*.sublime-*

# OS-specific artifacts
.DS_Store
._*

# Exclusions
!.coveragerc
!.editorconfig
!.gitattributes
!.gitignore
!.gitkeep
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
9 changes: 6 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
graft src
graft data
include versioneer.py
include my_pds_module/_version.py
include src/pds/archive_analytics/_version.py
global-exclude *.py[cod]

# Include package-level files and directories here; e.g.:
#
# include *.png *.jpeg
# exclude *.webp
# graft spice-kernels
# prune my_pds_module/obsolete-dir
# global-exclude *.py[cod]
# prune src/pds/archive_analytics/obsolete-dir
# global-exclude *.log *.so
10 changes: 5 additions & 5 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
PDS XYZ Tool (update licensing below per specific organization)
PDS Archive Analytics (update licensing below per specific organization)

Copyright 2020, California Institute of Technology ("Caltech").
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,
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
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
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.
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Kibana-based reporting tool for analytics of the archive


## Documentation

1. Procedure for exporting config
* Go to Kibana
* Click on Stack Management
Expand All @@ -21,6 +23,7 @@ Kibana-based reporting tool for analytics of the archive
* There is a toggle button and statement at the bottom on the page that says "Automatically overwrite all saved objects?" (This is your choice)
* Then, click on Import Button


## Contribute

* Issue Tracker: https://github.com/NASA-PDS/archive-analytics/issues
Expand All @@ -40,5 +43,5 @@ Or you can reach us at https://pds.nasa.gov/?feedback=true
The project is licensed under the Apache License, version 2. See the
LICENSE.txt file for details.

.. Copyright © 2019–2020 California Institute of Technology ("Caltech").
ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
Copyright © 2019–2021 California Institute of Technology ("Caltech").
ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
Loading

0 comments on commit d5988be

Please sign in to comment.