datacube-alchemist 0.6.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- datacube-alchemist-0.6.7/.github/.codecov.yml +29 -0
- datacube-alchemist-0.6.7/.github/dependabot.yml +18 -0
- datacube-alchemist-0.6.7/.github/workflows/publish-pypi.yml +30 -0
- datacube-alchemist-0.6.7/.github/workflows/scan.yml +54 -0
- datacube-alchemist-0.6.7/.github/workflows/test-and-push.yml +132 -0
- datacube-alchemist-0.6.7/.gitignore +117 -0
- datacube-alchemist-0.6.7/.pre-commit-config.yaml +30 -0
- datacube-alchemist-0.6.7/.yamllint +22 -0
- datacube-alchemist-0.6.7/Dockerfile +57 -0
- datacube-alchemist-0.6.7/LICENSE +201 -0
- datacube-alchemist-0.6.7/Makefile +317 -0
- datacube-alchemist-0.6.7/PKG-INFO +149 -0
- datacube-alchemist-0.6.7/README.md +130 -0
- datacube-alchemist-0.6.7/datacube_alchemist/__init__.py +4 -0
- datacube-alchemist-0.6.7/datacube_alchemist/_dask.py +99 -0
- datacube-alchemist-0.6.7/datacube_alchemist/_utils.py +237 -0
- datacube-alchemist-0.6.7/datacube_alchemist/_version.py +4 -0
- datacube-alchemist-0.6.7/datacube_alchemist/cli.py +311 -0
- datacube-alchemist-0.6.7/datacube_alchemist/settings.py +82 -0
- datacube-alchemist-0.6.7/datacube_alchemist/transforms.py +759 -0
- datacube-alchemist-0.6.7/datacube_alchemist/worker.py +594 -0
- datacube-alchemist-0.6.7/datacube_alchemist.egg-info/PKG-INFO +149 -0
- datacube-alchemist-0.6.7/datacube_alchemist.egg-info/SOURCES.txt +72 -0
- datacube-alchemist-0.6.7/datacube_alchemist.egg-info/dependency_links.txt +1 -0
- datacube-alchemist-0.6.7/datacube_alchemist.egg-info/entry_points.txt +2 -0
- datacube-alchemist-0.6.7/datacube_alchemist.egg-info/requires.txt +23 -0
- datacube-alchemist-0.6.7/datacube_alchemist.egg-info/top_level.txt +1 -0
- datacube-alchemist-0.6.7/datacube_alchemist.egg-info/zip-safe +1 -0
- datacube-alchemist-0.6.7/docker-compose.yml +32 -0
- datacube-alchemist-0.6.7/examples/archive/DEAfrica_fc_config.yaml +45 -0
- datacube-alchemist-0.6.7/examples/archive/DEAfrica_ls8_fc_config.yaml +52 -0
- datacube-alchemist-0.6.7/examples/archive/DEAfrica_ls8_fc_scale_config.yaml +49 -0
- datacube-alchemist-0.6.7/examples/archive/DEAfrica_ls8_fc_scale_fake_config.yaml +49 -0
- datacube-alchemist-0.6.7/examples/archive/DEAfrica_wofs_c2_no_dsm.yaml +44 -0
- datacube-alchemist-0.6.7/examples/archive/DEAfrica_wofs_no_dsm.yaml +45 -0
- datacube-alchemist-0.6.7/examples/archive/ard_interop_config.yaml +52 -0
- datacube-alchemist-0.6.7/examples/archive/c3_samples_config.yaml +54 -0
- datacube-alchemist-0.6.7/examples/archive/fc_config.yaml +49 -0
- datacube-alchemist-0.6.7/examples/archive/fc_config_africa.yaml +58 -0
- datacube-alchemist-0.6.7/examples/archive/fc_config_sentinel2a_alex.yaml +59 -0
- datacube-alchemist-0.6.7/examples/archive/fc_config_sentinel2b_alex.yaml +61 -0
- datacube-alchemist-0.6.7/examples/archive/fc_product.yaml +25 -0
- datacube-alchemist-0.6.7/examples/archive/nci_ls8c_l2_c2tofc.yaml +51 -0
- datacube-alchemist-0.6.7/examples/archive/sample_kubernetes_deployment.yaml +77 -0
- datacube-alchemist-0.6.7/examples/archive/virtual_box_ls8c_l2_c2tofc.yaml +51 -0
- datacube-alchemist-0.6.7/examples/archive/wofs.yaml +30 -0
- datacube-alchemist-0.6.7/examples/archive/wofs_config_sentinel2b_alex.yaml +44 -0
- datacube-alchemist-0.6.7/examples/archive/wofs_no_dsm.yaml +33 -0
- datacube-alchemist-0.6.7/examples/c3_config_bai.yaml +42 -0
- datacube-alchemist-0.6.7/examples/c3_config_bai_s2be.yaml +37 -0
- datacube-alchemist-0.6.7/examples/c3_config_dnbr.yaml +43 -0
- datacube-alchemist-0.6.7/examples/c3_config_dnbr_3band.yaml +42 -0
- datacube-alchemist-0.6.7/examples/c3_config_fc.yaml +69 -0
- datacube-alchemist-0.6.7/examples/c3_config_wo.yaml +56 -0
- datacube-alchemist-0.6.7/examples/config_ba_C3_ARD_provisional.yaml +44 -0
- datacube-alchemist-0.6.7/examples/config_ba_L2_ARD.yaml +44 -0
- datacube-alchemist-0.6.7/examples/fc_ls.alchemist.yaml +72 -0
- datacube-alchemist-0.6.7/examples/wofs_ls.alchemist.yaml +65 -0
- datacube-alchemist-0.6.7/output/.gitkeep +0 -0
- datacube-alchemist-0.6.7/pylintrc +251 -0
- datacube-alchemist-0.6.7/pyproject.toml +5 -0
- datacube-alchemist-0.6.7/requirements.in +21 -0
- datacube-alchemist-0.6.7/requirements.txt +442 -0
- datacube-alchemist-0.6.7/setup.cfg +74 -0
- datacube-alchemist-0.6.7/setup.py +4 -0
- datacube-alchemist-0.6.7/tests/c3_config_bai_s2be.yaml +37 -0
- datacube-alchemist-0.6.7/tests/c3_config_dnbr_3band_s2be.yaml +42 -0
- datacube-alchemist-0.6.7/tests/c3_config_wo_noresampling.yaml +57 -0
- datacube-alchemist-0.6.7/tests/c3_config_wo_resampling.yaml +60 -0
- datacube-alchemist-0.6.7/tests/conftest.py +67 -0
- datacube-alchemist-0.6.7/tests/data/fc_ls_159069_2021-07-17.stac-item.json +1 -0
- datacube-alchemist-0.6.7/tests/integration_tests.sh +41 -0
- datacube-alchemist-0.6.7/tests/test_datacube_alchemist.py +66 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
codecov:
|
|
2
|
+
require_ci_to_pass: yes
|
|
3
|
+
|
|
4
|
+
coverage:
|
|
5
|
+
status:
|
|
6
|
+
project:
|
|
7
|
+
default: # This can be anything, but it needs to exist as the name
|
|
8
|
+
# basic settings
|
|
9
|
+
target: auto
|
|
10
|
+
threshold: 40%
|
|
11
|
+
precision: 2
|
|
12
|
+
round: down
|
|
13
|
+
range: "20...100"
|
|
14
|
+
|
|
15
|
+
parsers:
|
|
16
|
+
gcov:
|
|
17
|
+
branch_detection:
|
|
18
|
+
conditional: yes
|
|
19
|
+
loop: yes
|
|
20
|
+
method: no
|
|
21
|
+
macro: no
|
|
22
|
+
|
|
23
|
+
fixes:
|
|
24
|
+
- "/code::"
|
|
25
|
+
|
|
26
|
+
comment:
|
|
27
|
+
layout: "reach,diff,flags,tree"
|
|
28
|
+
behavior: default
|
|
29
|
+
require_changes: no
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "pip" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "daily"
|
|
12
|
+
|
|
13
|
+
- package-ecosystem: "github-actions"
|
|
14
|
+
# Workflow files stored in the
|
|
15
|
+
# default location of `.github/workflows`
|
|
16
|
+
directory: "/"
|
|
17
|
+
schedule:
|
|
18
|
+
interval: "daily"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish_pypi:
|
|
9
|
+
if: github.repository == 'opendatacube/datacube-alchemist'
|
|
10
|
+
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v2
|
|
15
|
+
|
|
16
|
+
- name: Setup Python
|
|
17
|
+
uses: actions/setup-python@v1
|
|
18
|
+
with:
|
|
19
|
+
python-version: 3.8
|
|
20
|
+
|
|
21
|
+
- name: Install Twine
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade twine
|
|
24
|
+
python -m pip freeze
|
|
25
|
+
|
|
26
|
+
- name: Upload to PyPI
|
|
27
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
28
|
+
with:
|
|
29
|
+
password: ${{ secrets.PYPI_TOKEN }}
|
|
30
|
+
skip_existing: true
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Scan
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: '0 0 * * *'
|
|
7
|
+
env:
|
|
8
|
+
IMAGE_NAME: opendatacube/datacube-alchemist
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
cve-scanner:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout git
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Get unstable git tag
|
|
20
|
+
run: >
|
|
21
|
+
echo "UNSTABLE_TAG=$(git describe --tags)" >> $GITHUB_ENV
|
|
22
|
+
|
|
23
|
+
- name: Log the unstable tag
|
|
24
|
+
run: echo $UNSTABLE_TAG
|
|
25
|
+
|
|
26
|
+
- name: Build unstable + latest Docker image tag
|
|
27
|
+
if: github.event_name != 'release'
|
|
28
|
+
uses: whoan/docker-build-with-cache-action@v5.11.1
|
|
29
|
+
with:
|
|
30
|
+
image_name: ${{ env.IMAGE_NAME }}
|
|
31
|
+
image_tag: ${{ env.UNSTABLE_TAG }},latest
|
|
32
|
+
build_extra_args: "--build-arg=ENVIRONMENT=deployment"
|
|
33
|
+
push_image_and_stages: false
|
|
34
|
+
|
|
35
|
+
- name: Run vulnerability scanner
|
|
36
|
+
if: github.event_name != 'release'
|
|
37
|
+
uses: aquasecurity/trivy-action@0.7.1
|
|
38
|
+
with:
|
|
39
|
+
image-ref: "${{ env.IMAGE_NAME }}:${{ env.UNSTABLE_TAG }}"
|
|
40
|
+
format: "table"
|
|
41
|
+
exit-code: "1"
|
|
42
|
+
severity: "CRITICAL,HIGH"
|
|
43
|
+
|
|
44
|
+
- name: Notify Slack for Failures
|
|
45
|
+
uses: rtCamp/action-slack-notify@v2.2.0
|
|
46
|
+
if: failure()
|
|
47
|
+
env:
|
|
48
|
+
SLACK_CHANNEL: ga-wms-ops
|
|
49
|
+
SLACK_ICON: "https://github.com/docker.png?size=48"
|
|
50
|
+
SLACK_COLOR: "#482de1"
|
|
51
|
+
SLACK_MESSAGE: ""
|
|
52
|
+
SLACK_TITLE: CVE Scan alert
|
|
53
|
+
SLACK_USERNAME: Alchemist Scanner
|
|
54
|
+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
name: Test and Push
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'datacube_alchemist/**'
|
|
9
|
+
- 'tests/**'
|
|
10
|
+
- '.github/workflows/push-and-test.yml'
|
|
11
|
+
- 'Dockerfile'
|
|
12
|
+
- 'requirements.txt'
|
|
13
|
+
- 'constraints.txt'
|
|
14
|
+
- 'setup.py'
|
|
15
|
+
|
|
16
|
+
pull_request:
|
|
17
|
+
branches:
|
|
18
|
+
- main
|
|
19
|
+
paths:
|
|
20
|
+
- 'datacube_alchemist/**'
|
|
21
|
+
- 'tests/**'
|
|
22
|
+
- '.github/workflows/push-and-test.yml'
|
|
23
|
+
- 'Dockerfile'
|
|
24
|
+
- 'requirements.txt'
|
|
25
|
+
- 'constraints.txt'
|
|
26
|
+
- 'setup.py'
|
|
27
|
+
|
|
28
|
+
release:
|
|
29
|
+
types: [created, edited]
|
|
30
|
+
|
|
31
|
+
env:
|
|
32
|
+
IMAGE_NAME: opendatacube/datacube-alchemist
|
|
33
|
+
|
|
34
|
+
jobs:
|
|
35
|
+
test:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v3
|
|
40
|
+
with:
|
|
41
|
+
fetch-depth: 0
|
|
42
|
+
|
|
43
|
+
- uses: rickstaa/action-black@v1
|
|
44
|
+
with:
|
|
45
|
+
black_args: "--check datacube_alchemist"
|
|
46
|
+
|
|
47
|
+
- name: Build the docker container
|
|
48
|
+
run: |
|
|
49
|
+
docker-compose build
|
|
50
|
+
|
|
51
|
+
- name: Bring up the docker container
|
|
52
|
+
run: |
|
|
53
|
+
docker-compose up -d
|
|
54
|
+
sleep 5
|
|
55
|
+
docker-compose exec -T alchemist datacube system init
|
|
56
|
+
|
|
57
|
+
- name: Run tests
|
|
58
|
+
run: |
|
|
59
|
+
docker-compose exec -T alchemist pytest --cov=./datacube_alchemist --cov-report=xml tests/
|
|
60
|
+
|
|
61
|
+
- name: Upload coverage to Codecov
|
|
62
|
+
uses: codecov/codecov-action@v3
|
|
63
|
+
with:
|
|
64
|
+
fail_ci_if_error: false
|
|
65
|
+
|
|
66
|
+
- name: Integration tests
|
|
67
|
+
run: |
|
|
68
|
+
docker-compose exec -T alchemist bash ./tests/integration_tests.sh
|
|
69
|
+
|
|
70
|
+
push:
|
|
71
|
+
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
|
|
72
|
+
needs: test
|
|
73
|
+
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v3
|
|
78
|
+
with:
|
|
79
|
+
fetch-depth: 0
|
|
80
|
+
|
|
81
|
+
# Build and Push for main branch
|
|
82
|
+
# Docker
|
|
83
|
+
- name: Get git commit hash for push to main
|
|
84
|
+
if: github.event_name != 'release'
|
|
85
|
+
run: |
|
|
86
|
+
git fetch --all --tags
|
|
87
|
+
echo "GITHASH=$(git describe --tags)" >> $GITHUB_ENV
|
|
88
|
+
|
|
89
|
+
- name: Build and Push unstable Docker Image for push to main
|
|
90
|
+
uses: whoan/docker-build-with-cache-action@v5.11.1
|
|
91
|
+
if: github.event_name != 'release'
|
|
92
|
+
with:
|
|
93
|
+
image_name: ${{ env.IMAGE_NAME }}
|
|
94
|
+
username: ${{ secrets.DOCKER_USER }}
|
|
95
|
+
password: ${{ secrets.DOCKER_PASS }}
|
|
96
|
+
image_tag: latest,${{ env.GITHASH }}
|
|
97
|
+
|
|
98
|
+
# Build and Push for release
|
|
99
|
+
# Python
|
|
100
|
+
- name: Build the package
|
|
101
|
+
if: github.event_name == 'release'
|
|
102
|
+
run: |
|
|
103
|
+
pip install build
|
|
104
|
+
python -m build
|
|
105
|
+
|
|
106
|
+
- name: Deploy packages to DEA Packages
|
|
107
|
+
if: github.event_name == 'release'
|
|
108
|
+
uses: jakejarvis/s3-sync-action@master
|
|
109
|
+
with:
|
|
110
|
+
args: --acl public-read --follow-symlinks
|
|
111
|
+
env:
|
|
112
|
+
AWS_S3_BUCKET: "datacube-core-deployment"
|
|
113
|
+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
114
|
+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
115
|
+
AWS_REGION: "ap-southeast-2" # optional: defaults to us-east-1
|
|
116
|
+
SOURCE_DIR: "dist" # optional: defaults to entire repository
|
|
117
|
+
DEST_DIR: "datacube-alchemist"
|
|
118
|
+
|
|
119
|
+
# Docker
|
|
120
|
+
- name: Get tag for this build if it exists
|
|
121
|
+
if: github.event_name == 'release'
|
|
122
|
+
run: |
|
|
123
|
+
echo "RELEASE=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
|
|
124
|
+
|
|
125
|
+
- name: Build and Push semver tagged Docker Image for Release
|
|
126
|
+
uses: whoan/docker-build-with-cache-action@v5.11.1
|
|
127
|
+
if: github.event_name == 'release'
|
|
128
|
+
with:
|
|
129
|
+
image_name: ${{ env.IMAGE_NAME }}
|
|
130
|
+
username: ${{ secrets.DOCKER_USER }}
|
|
131
|
+
password: ${{ secrets.DOCKER_PASS }}
|
|
132
|
+
image_tag: ${{ env.RELEASE }}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
.DS_Store
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*$py.class
|
|
6
|
+
dask-worker-space/
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
build/
|
|
14
|
+
develop-eggs/
|
|
15
|
+
dist/
|
|
16
|
+
downloads/
|
|
17
|
+
eggs/
|
|
18
|
+
.eggs/
|
|
19
|
+
lib/
|
|
20
|
+
lib64/
|
|
21
|
+
parts/
|
|
22
|
+
sdist/
|
|
23
|
+
var/
|
|
24
|
+
wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
.hypothesis/
|
|
50
|
+
.pytest_cache/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
|
|
61
|
+
# Flask stuff:
|
|
62
|
+
instance/
|
|
63
|
+
.webassets-cache
|
|
64
|
+
|
|
65
|
+
# Scrapy stuff:
|
|
66
|
+
.scrapy
|
|
67
|
+
|
|
68
|
+
# Sphinx documentation
|
|
69
|
+
docs/_build/
|
|
70
|
+
|
|
71
|
+
# PyBuilder
|
|
72
|
+
target/
|
|
73
|
+
|
|
74
|
+
# Jupyter Notebook
|
|
75
|
+
.ipynb_checkpoints
|
|
76
|
+
|
|
77
|
+
# pyenv
|
|
78
|
+
.python-version
|
|
79
|
+
|
|
80
|
+
# celery beat schedule file
|
|
81
|
+
celerybeat-schedule
|
|
82
|
+
|
|
83
|
+
# SageMath parsed files
|
|
84
|
+
*.sage.py
|
|
85
|
+
|
|
86
|
+
# Environments
|
|
87
|
+
.env
|
|
88
|
+
.venv
|
|
89
|
+
env/
|
|
90
|
+
venv/
|
|
91
|
+
ENV/
|
|
92
|
+
env.bak/
|
|
93
|
+
venv.bak/
|
|
94
|
+
|
|
95
|
+
# Spyder project settings
|
|
96
|
+
.spyderproject
|
|
97
|
+
.spyproject
|
|
98
|
+
|
|
99
|
+
# Rope project settings
|
|
100
|
+
.ropeproject
|
|
101
|
+
|
|
102
|
+
# mkdocs documentation
|
|
103
|
+
/site
|
|
104
|
+
|
|
105
|
+
# mypy
|
|
106
|
+
.mypy_cache/
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
.idea
|
|
110
|
+
|
|
111
|
+
# Othis stuff
|
|
112
|
+
.vscode/
|
|
113
|
+
datacube-index/
|
|
114
|
+
output
|
|
115
|
+
|
|
116
|
+
# Let setuptools_scm manage the _version.py file
|
|
117
|
+
datacube_alchemist/_version.py
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/adrienverge/yamllint.git
|
|
3
|
+
rev: v1.25.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: yamllint
|
|
6
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
+
rev: v3.2.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: end-of-file-fixer
|
|
10
|
+
- id: check-docstring-first
|
|
11
|
+
- id: check-json
|
|
12
|
+
- id: check-yaml
|
|
13
|
+
- id: debug-statements
|
|
14
|
+
- id: name-tests-test
|
|
15
|
+
args: ['--django']
|
|
16
|
+
- id: requirements-txt-fixer
|
|
17
|
+
- id: check-added-large-files
|
|
18
|
+
- id: check-merge-conflict
|
|
19
|
+
- repo: https://github.com/pre-commit/mirrors-pylint
|
|
20
|
+
rev: 'v2.6.0' # Use the sha / tag you want to point at
|
|
21
|
+
hooks:
|
|
22
|
+
- id: pylint
|
|
23
|
+
- repo: https://gitlab.com/pycqa/flake8
|
|
24
|
+
rev: '3.8.4'
|
|
25
|
+
hooks:
|
|
26
|
+
- id: flake8
|
|
27
|
+
- repo: https://github.com/psf/black
|
|
28
|
+
rev: 20.8b1
|
|
29
|
+
hooks:
|
|
30
|
+
- id: black
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
extends: default
|
|
2
|
+
|
|
3
|
+
rules:
|
|
4
|
+
# We could enable these if we find a decent yaml autoformatter.
|
|
5
|
+
# (yamlfmt in pip is too buggy at the moment for our files)
|
|
6
|
+
#
|
|
7
|
+
# The effort of fixing them by hand, especially auto-generated yamls, is not
|
|
8
|
+
# currently worth it.
|
|
9
|
+
|
|
10
|
+
# Many tools (eg. generated secure keys) don't output wrapped lines.
|
|
11
|
+
line-length: disable
|
|
12
|
+
|
|
13
|
+
# The existing documents will need to be cleaned up first
|
|
14
|
+
indentation: disable
|
|
15
|
+
|
|
16
|
+
# Pedantry & existing docs don't have it.
|
|
17
|
+
document-start: disable
|
|
18
|
+
|
|
19
|
+
# Warning that truthy values are not quoted.
|
|
20
|
+
# All documents currently use "True" without quotes, so this would be a
|
|
21
|
+
# larger change across almost every doc.
|
|
22
|
+
truthy: disable
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
FROM osgeo/gdal:ubuntu-small-3.4.1
|
|
2
|
+
|
|
3
|
+
ENV DEBIAN_FRONTEND=noninteractive \
|
|
4
|
+
LC_ALL=C.UTF-8 \
|
|
5
|
+
LANG=C.UTF-8
|
|
6
|
+
|
|
7
|
+
# Apt installation
|
|
8
|
+
RUN apt-get update && \
|
|
9
|
+
apt-get install -y \
|
|
10
|
+
build-essential \
|
|
11
|
+
fish \
|
|
12
|
+
git \
|
|
13
|
+
vim \
|
|
14
|
+
nano \
|
|
15
|
+
wget \
|
|
16
|
+
python3-pip \
|
|
17
|
+
# For FC
|
|
18
|
+
libgfortran5 \
|
|
19
|
+
# For Psycopg2
|
|
20
|
+
libpq-dev python-dev \
|
|
21
|
+
&& apt-get autoclean && \
|
|
22
|
+
apt-get autoremove && \
|
|
23
|
+
rm -rf /var/lib/{apt,dpkg,cache,log}
|
|
24
|
+
|
|
25
|
+
# Environment can be whatever is supported by setup.py
|
|
26
|
+
# so, either deployment, test
|
|
27
|
+
ARG ENVIRONMENT=deployment
|
|
28
|
+
RUN echo "Environment is: $ENVIRONMENT"
|
|
29
|
+
|
|
30
|
+
# Pip installation
|
|
31
|
+
RUN mkdir -p /conf
|
|
32
|
+
COPY requirements.txt /conf/
|
|
33
|
+
RUN pip install -r /conf/requirements.txt
|
|
34
|
+
|
|
35
|
+
# Set up a nice workdir and add the live code
|
|
36
|
+
ENV APPDIR=/code
|
|
37
|
+
RUN mkdir -p $APPDIR
|
|
38
|
+
WORKDIR $APPDIR
|
|
39
|
+
ADD . $APPDIR
|
|
40
|
+
|
|
41
|
+
# These ENVIRONMENT flags make this a bit complex, but basically, if we are in dev
|
|
42
|
+
# then we want to link the source (with the -e flag) and if we're in prod, we
|
|
43
|
+
# want to delete the stuff in the /code folder to keep it simple.
|
|
44
|
+
# no-use-pep517 because of this https://github.com/pypa/pip/issues/7953
|
|
45
|
+
RUN if [ "$ENVIRONMENT" = "deployment" ] ; then\
|
|
46
|
+
pip install . ; \
|
|
47
|
+
rm -rf $APPDIR/* ; \
|
|
48
|
+
else \
|
|
49
|
+
pip install --no-use-pep517 --editable ".[$ENVIRONMENT]" ; \
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
RUN pip freeze
|
|
53
|
+
|
|
54
|
+
# Check it works
|
|
55
|
+
RUN datacube-alchemist --version
|
|
56
|
+
|
|
57
|
+
CMD ["datacube-alchemist", "--help"]
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|