Skip to content

Commit

Permalink
Merge pull request #38 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release 0.0.2
  • Loading branch information
AndrewPlayer3 authored Jul 19, 2024
2 parents 32bf091 + 34884ae commit 422e465
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 3 deletions.
217 changes: 217 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
#### joe made this: http://goel.io/joe

#### python ####
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# static files generated from Django application using `collectstatic`
media
static


#### jetbrains ####
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser


#### vim ####
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ 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).

## [0.0.2]

## Added
* Initial .gitignore file

## [0.0.1]

### Added
Expand Down
13 changes: 12 additions & 1 deletion apps/api/cloudformation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,18 @@ Resources:
Stage:
AccessLogSettings:
DestinationArn: !GetAtt ApiLogGroup.Arn
Format: '{"sourceIp":"$context.identity.sourceIp","httpMethod":"$context.httpMethod","path":"$context.path","status":"$context.status","responseLength":"$context.responseLength","responseLatency":"$context.responseLatency","requestTime":"$context.requestTime","protocol":"$context.protocol","userAgent":"$context.identity.userAgent","requestId":"$context.requestId"}'
Format: '{
"sourceIp":"$context.identity.sourceIp",
"httpMethod":"$context.httpMethod",
"path":"$context.path",
"status":"$context.status",
"responseLength":"$context.responseLength",
"responseLatency":"$context.responseLatency",
"requestTime":"$context.requestTime",
"protocol":"$context.protocol",
"userAgent":"$context.identity.userAgent",
"requestId":"$context.requestId"
}'

ApiLogGroup:
Type: AWS::Logs::LogGroup
Expand Down
4 changes: 2 additions & 2 deletions apps/fetcher/src/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def get_s3_orbits(bucket_name: str, prefix: str) -> set[str]:
return {os.path.basename(obj['Key']) for obj in objects}


def get_cdse_orbits(orbit_type) -> list[dict]:
def get_cdse_orbits(orbit_type: str) -> list[dict]:
url = 'https://catalogue.dataspace.copernicus.eu/resto/api/collections/Sentinel1/search.json'
cdse_orbits = []

Expand Down Expand Up @@ -94,7 +94,7 @@ def copy_file(filename: str, file_id: str, token: str, bucket_name: str, orbit_t
s3.put_object(Bucket=bucket_name, Key=f'{orbit_type}/{filename}', Body=response.text)


def lambda_handler(event, context):
def lambda_handler(event: dict, context):
secret_arn = os.environ['SECRET_ARN']
bucket_name = os.environ['BUCKET_NAME']
orbit_type = event['orbit_type']
Expand Down

0 comments on commit 422e465

Please sign in to comment.