Skip to content

Commit

Permalink
Merge pull request #9 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Merging Pre-2024 work to main
  • Loading branch information
forrestfwilliams authored Apr 22, 2024
2 parents d6b6fa7 + cb59fdc commit 4db337d
Show file tree
Hide file tree
Showing 19 changed files with 600 additions and 9 deletions.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.


**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
37 changes: 37 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Description of this release

<!--
Please describe the release here, including a brief overview of the changes in this release
-->

<!--
If applicable, indicate any upstream packages/projects this is relevant too, and the associated issues
or pull requests
-->

### Developer checklist

- [ ] Assigned a reviewer
<!-- NOTE: Pull requests should only be opened for merges to protected branches (required) and any
changes which you'd like reviewed. Do not open a pull request to update a feature or personal
branch -- simply merge with `git`
-->
- [ ] Indicated the level of changes to this package by affixing one of these labels:
* major -- Major changes to the API that may break current workflows
* minor -- Minor changes to the API that do not break current workflows
* patch -- Patches and bugfixes for the current version that do not break current workflows
* bumpless -- Changes to documentation, CI/CD pipelines, etc. that don't affect the software's version

- [ ] (If applicable) Updated the dependencies and indicated any downstream changes that are required

- [ ] Updated `CHANGELOG.md`
- [ ] Added/updated documentation for these changes
- [ ] Added/updated tests for these changes

### Reviewer checklist

- [ ] Have all dependencies been updated?
- [ ] Is the level of changes labeled appropriately?
- [ ] Are all the changes described appropriately in `CHANGELOG.md`?
- [ ] Has the documentation been adequately updated?
- [ ] Are the tests adequate?
28 changes: 28 additions & 0 deletions .github/queries/associated-pr.query.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
query: '
query($owner:String!, $name:String!, $sha:String!) {
repository(owner:$owner, name:$name) {
commit: object(expression:$sha) {
... on Commit {
associatedPullRequests(first:1, orderBy:{field: UPDATED_AT, direction: DESC}){
edges{
node{
title
number
body
}
}
}
}
}
}
}'
variables:
owner:
type: arg
name: owner
name:
type: arg
name: name
sha:
type: arg
name: sha
24 changes: 24 additions & 0 deletions .github/queries/pr-labels.query.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
query: '
query($owner:String!, $name:String!, $pr:Int!) {
repository(owner:$owner, name:$name) {
pullRequest(number:$pr) {
labels(first:100) {
nodes {
name
}
}
}
}
}'
variables:
owner:
type: arg
name: owner
name:
type: arg
name: name
pr:
type: jq
file: pr.json
query: '.data.repository.commit.associatedPullRequests.edges[0].node.number'
cast: Int
1 change: 1 addition & 0 deletions .trufflehog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.*gitleaks.toml$
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/andrewplayer3/back_projection/compare/v0.0.0...develop) -- likely 0.0.1

### Added
-- Added validation for gpu existance (defaults to cpu if none exists)
130 changes: 130 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement by emailing the
ASF APD/Tools team at [[email protected]](mailto:[email protected]).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

44 changes: 44 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM ubuntu:latest

# For opencontainers label definitions, see:
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
LABEL org.opencontainers.image.title="Back_projection"
LABEL org.opencontainers.image.description="This is a process to process L0 Raw Products using a back projection algorithm"
LABEL org.opencontainers.image.vendor="Alaska Satellite Facility"
LABEL org.opencontainers.image.authors="ASF APD/Tools Team <[email protected]>"
LABEL org.opencontainers.image.licenses="BSD-3-Clause"
LABEL org.opencontainers.image.url="https://github.com/ASFHyP3/hyp3-back-projection"
LABEL org.opencontainers.image.source="https://github.com/ASFHyP3/hyp3-back-projection"
# LABEL org.opencontainers.image.documentation=""

# Dynamic lables to define at build time via `docker build --label`
# LABEL org.opencontainers.image.created=""
# LABEL org.opencontainers.image.version=""
# LABEL org.opencontainers.image.revision=""

ENV TZ=America/Anchorage
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && apt-get install -y --no-install-recommends build-essential wget gcc gfortran libgfortran-8-dev make unzip vim gdal-bin python3-pip libsqlite3-dev libfftw3-dev libfftw3-doc nvidia-cuda-toolkit && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN useradd -ms /bin/bash user

USER user
SHELL ["/bin/bash", "-l", "-c"]
ENV PYTHONDONTWRITEBYTECODE=true
WORKDIR /home/user

COPY dist/* /home/user/

RUN python3 -m pip install /home/user/back_projection-0.0.0.tar.gz && \
tar -xvf back_projection-0.0.0.tar.gz && \
cd back_projection-0.0.0/back_projection/src && \
source build_proc && \
mkdir /home/user/back_projection-0.0.0/back_projection/src/output 2>/dev/null && \
ls /home/user/back_projection-0.0.0/back_projection/src

ENV PROC_HOME="/home/user/back_projection-0.0.0/back_projection/src"

ENTRYPOINT ["python3", "/home/user/back_projection-0.0.0/back_projection/__main__.py"]
CMD ["-h"]
18 changes: 9 additions & 9 deletions LICENSE
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
BSD 3-Clause License

Copyright (c) 2021, HyP3
Copyright (c) 0000, Alaska Satellite Facility
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form 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.
* Redistributions in binary form 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.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
* Neither the name of the copyright holder 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
Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include LICENSE
include README.md

graft back_projection

global-exclude *.py[cod] __pycache__ *.so
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Back_projection

This is a process to process L0 Raw Products using a back projection algorithm
19 changes: 19 additions & 0 deletions back_projection/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Process L0 Raw Products using a back projection algorithm"""

from importlib.metadata import PackageNotFoundError, version

from back_projection.process import back_projection

try:
__version__ = version(__name__)
except PackageNotFoundError:
print(f'{__name__} package is not installed!\n'
f'To install in editable/develop mode (from the repo\'s root):\n'
f' python -m pip install -e .[develop]\n'
f'Or, to just get the version number use:\n'
f' python setup.py --version')

__all__ = [
'__version__',
'back_projection',
]
Loading

0 comments on commit 4db337d

Please sign in to comment.