enfrosp-enmapboxapp 0.1.0__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.
Files changed (44) hide show
  1. enfrosp_enmapboxapp-0.1.0/.coveragerc +27 -0
  2. enfrosp_enmapboxapp-0.1.0/.editorconfig +21 -0
  3. enfrosp_enmapboxapp-0.1.0/.gitignore +126 -0
  4. enfrosp_enmapboxapp-0.1.0/.gitlab-ci.yml +178 -0
  5. enfrosp_enmapboxapp-0.1.0/.gitleaks.toml +56 -0
  6. enfrosp_enmapboxapp-0.1.0/AUTHORS.rst +19 -0
  7. enfrosp_enmapboxapp-0.1.0/CITATION +13 -0
  8. enfrosp_enmapboxapp-0.1.0/CODE_OF_CONDUCT.rst +91 -0
  9. enfrosp_enmapboxapp-0.1.0/CONTRIBUTING.rst +179 -0
  10. enfrosp_enmapboxapp-0.1.0/HISTORY.rst +15 -0
  11. enfrosp_enmapboxapp-0.1.0/LICENSE +32 -0
  12. enfrosp_enmapboxapp-0.1.0/LICENSES/GPL-3.0-or-later.txt +32 -0
  13. enfrosp_enmapboxapp-0.1.0/MANIFEST.in +18 -0
  14. enfrosp_enmapboxapp-0.1.0/Makefile +122 -0
  15. enfrosp_enmapboxapp-0.1.0/PKG-INFO +145 -0
  16. enfrosp_enmapboxapp-0.1.0/README.rst +94 -0
  17. enfrosp_enmapboxapp-0.1.0/docs/Makefile +27 -0
  18. enfrosp_enmapboxapp-0.1.0/docs/_build/html/_static/file.png +0 -0
  19. enfrosp_enmapboxapp-0.1.0/docs/_build/html/_static/minus.png +0 -0
  20. enfrosp_enmapboxapp-0.1.0/docs/_build/html/_static/plus.png +0 -0
  21. enfrosp_enmapboxapp-0.1.0/docs/_static/custom.css +10 -0
  22. enfrosp_enmapboxapp-0.1.0/docs/authors.rst +8 -0
  23. enfrosp_enmapboxapp-0.1.0/docs/conf.py +349 -0
  24. enfrosp_enmapboxapp-0.1.0/docs/contributing.rst +8 -0
  25. enfrosp_enmapboxapp-0.1.0/docs/history.rst +8 -0
  26. enfrosp_enmapboxapp-0.1.0/docs/images/screenshot_enfrosp_gui_v0.1.0.png +0 -0
  27. enfrosp_enmapboxapp-0.1.0/docs/index.html +7 -0
  28. enfrosp_enmapboxapp-0.1.0/docs/index.rst +28 -0
  29. enfrosp_enmapboxapp-0.1.0/docs/installation.rst +50 -0
  30. enfrosp_enmapboxapp-0.1.0/docs/make.bat +43 -0
  31. enfrosp_enmapboxapp-0.1.0/docs/readme.rst +8 -0
  32. enfrosp_enmapboxapp-0.1.0/docs/usage.rst +18 -0
  33. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp/__init__.py +13 -0
  34. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp/enfrosp_algorithm.py +431 -0
  35. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp/enfrosp_enmapboxapp.py +128 -0
  36. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp/version.py +20 -0
  37. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp.egg-info/PKG-INFO +145 -0
  38. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp.egg-info/SOURCES.txt +42 -0
  39. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp.egg-info/dependency_links.txt +1 -0
  40. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp.egg-info/not-zip-safe +1 -0
  41. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp.egg-info/requires.txt +30 -0
  42. enfrosp_enmapboxapp-0.1.0/enfrosp_enmapboxapp.egg-info/top_level.txt +1 -0
  43. enfrosp_enmapboxapp-0.1.0/pyproject.toml +106 -0
  44. enfrosp_enmapboxapp-0.1.0/setup.cfg +4 -0
@@ -0,0 +1,27 @@
1
+ # .coveragerc to control coverage.py
2
+ [run]
3
+ branch = False
4
+ concurrency = multiprocessing
5
+ parallel = True
6
+ omit = */site-packages/*,*/tests/*,*/.eggs/*
7
+
8
+ [report]
9
+ show_missing = True
10
+
11
+ # Regexes for lines to exclude from consideration
12
+ exclude_lines =
13
+ # Have to re-enable the standard pragma
14
+ pragma: no cover
15
+
16
+ # Don't complain if tests don't hit defensive assertion code:
17
+ raise AssertionError
18
+ raise NotImplementedError
19
+
20
+ # Don't complain if non-runnable code isn't run:
21
+ if 0:
22
+ if __name__ == .__main__.:
23
+
24
+ ignore_errors = True
25
+
26
+ [html]
27
+ directory = htmlcov
@@ -0,0 +1,21 @@
1
+ # https://editorconfig.org/
2
+
3
+ root = true
4
+
5
+ [*]
6
+ indent_style = space
7
+ indent_size = 4
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+ charset = utf-8
11
+ end_of_line = lf
12
+
13
+ [*.bat]
14
+ indent_style = tab
15
+ end_of_line = crlf
16
+
17
+ [LICENSE]
18
+ insert_final_newline = false
19
+
20
+ [Makefile]
21
+ indent_style = tab
@@ -0,0 +1,126 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .coverage
41
+ .coverage.*
42
+ .cache
43
+ nosetests.xml
44
+ coverage.xml
45
+ *.cover
46
+ .hypothesis/
47
+ .pytest_cache/
48
+ report.xml
49
+ report.html
50
+
51
+ # pre-commit
52
+ tests/linting/*
53
+ !tests/linting/.gitkeep
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ target/
75
+
76
+ # Jupyter Notebook
77
+ .ipynb_checkpoints
78
+
79
+ # Dask worker cache
80
+ dask-worker-space/
81
+
82
+ # pyenv
83
+ .python-version
84
+
85
+ # celery beat schedule file
86
+ celerybeat-schedule
87
+
88
+ # SageMath parsed files
89
+ *.sage.py
90
+
91
+ # dotenv
92
+ .env
93
+
94
+ # virtualenv
95
+ .venv
96
+ venv/
97
+ ENV/
98
+
99
+ # Spyder project settings
100
+ .spyderproject
101
+ .spyproject
102
+
103
+ # Rope project settings
104
+ .ropeproject
105
+
106
+ # mkdocs documentation
107
+ /site
108
+
109
+ # mypy
110
+ .mypy_cache/
111
+
112
+ # IDE settings
113
+ .vscode/
114
+
115
+ # IntelliJ Idea family of suites
116
+ .idea
117
+ *.iml
118
+ ## File-based project format:
119
+ *.ipr
120
+ *.iws
121
+ ## mpeltonen/sbt-idea plugin
122
+ .idea_modules/
123
+
124
+
125
+ docs/enfrosp_enmapboxapp.rst
126
+ docs/modules.rst
@@ -0,0 +1,178 @@
1
+ # SPDX-License-Identifier: GPL-3.0-or-later
2
+ # FileType: CONFIG
3
+ # FileCopyrightText: 2025, GFZ Helmholtz Centre for Geosciences
4
+ # FileCopyrightText: 2025, Daniel Scheffler (danschef@gfz.de)
5
+
6
+ variables:
7
+ MAMBA_ROOT_PREFIX: "/opt/conda"
8
+
9
+
10
+ stages:
11
+ - test
12
+ - scan
13
+ - deploy
14
+ - cleanup
15
+
16
+ test_enfrosp_enmapboxapp:
17
+ stage: test
18
+ coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
19
+ script:
20
+ - source activate ci_env
21
+
22
+ # install enfrosp_enmapboxapp, otherwise the executable scripts are not in place
23
+ - pip install -e .
24
+
25
+ # update enfrosp to be sure all parameters are covered by the GUI
26
+ - mamba install 'enfrosp>=0.2.2'
27
+
28
+ # set environment variables
29
+ - export IS_CI_ENV=1 # to notify tests that they are running within a docker CI system
30
+ - export CONDA_ROOT=/opt/conda/
31
+ - export PYTHONPATH=$PYTHONPATH:/tmp/enmapbox
32
+
33
+ # run tests
34
+ - make pytest
35
+
36
+ # create the docs
37
+ - make docs
38
+
39
+ artifacts:
40
+ expose_as: 'Test and coverage report'
41
+ paths:
42
+ - htmlcov/
43
+ - report.html
44
+ - docs/_build/html/
45
+ reports:
46
+ coverage_report:
47
+ coverage_format: cobertura
48
+ path: coverage.xml
49
+ junit: report.xml
50
+ expire_in: 30 days
51
+ when: always
52
+
53
+
54
+ test_styles:
55
+ stage: test
56
+ script:
57
+ - source activate ci_env
58
+ - make lint
59
+ artifacts:
60
+ paths:
61
+ - tests/linting/flake8.log
62
+ - tests/linting/pycodestyle.log
63
+ - tests/linting/pydocstyle.log
64
+ when: always
65
+
66
+
67
+ test_urls:
68
+ stage: test
69
+ script:
70
+ - source activate ci_env
71
+ - make urlcheck
72
+ when: always
73
+
74
+
75
+ test_enfrosp_enmapboxapp_install:
76
+ stage: test
77
+ script:
78
+ - source activate
79
+
80
+ # update base environment
81
+ - mamba update mamba conda
82
+
83
+ # create an environment containing qgis, enfrosp and the EnMAP-Box requirements
84
+ - mamba env create -n enfrosp_enmapboxapp_testinstall -f tests/CI_docker/context/environment_enfrosp_enmapboxapp.yml
85
+ - conda activate enfrosp_enmapboxapp_testinstall
86
+
87
+ # install enmapbox
88
+ - cd ..
89
+ - rm -rf enmap-box
90
+ - git clone -b main --recurse-submodules https://github.com/EnMAP-Box/enmap-box.git
91
+ - cd enmap-box
92
+ # - git checkout v3.11.1 # latest stable release
93
+ # install requirements but actually everything should be there
94
+ - pip install -r https://raw.githubusercontent.com/EnMAP-Box/enmap-box/main/.env/linux/requirements_ubuntu.txt
95
+ - export PYTHONPATH=$PYTHONPATH:$(pwd)
96
+ - cd ../enfrosp_enmapboxapp
97
+
98
+ # run installer
99
+ - pip install -e .
100
+ - pwd
101
+ - ls
102
+
103
+ # check if all dependencies are correctly installed and print output
104
+ - conda list qgis
105
+ - conda list enmapbox
106
+ - conda list enfrosp
107
+ - OUTPUT=$(pip check) || { echo "$OUTPUT"; true; }
108
+
109
+ # test if its importable
110
+ - cd ..
111
+ - ls
112
+ - python -c "import enfrosp_enmapboxapp; print(enfrosp_enmapboxapp)"
113
+ only:
114
+ - main
115
+
116
+ gitleaks_scan:
117
+ stage: scan
118
+ image:
119
+ name: zricethezav/gitleaks:latest
120
+ entrypoint: [ "" ]
121
+ script:
122
+ # Scanning with gitleaks:
123
+ # scan actual version of repo
124
+ #- gitleaks dir -v $CI_PROJECT_DIR
125
+
126
+ # or scan the whole repo including with all commits and create links in the log to founded leaks
127
+ - gitleaks git --platform gitlab --config .gitleaks.toml --max-decode-depth 5 --redact -v $CI_PROJECT_DIR
128
+
129
+ pages: # this job must be called 'pages' to advise GitLab to upload content to GitLab Pages
130
+ stage: deploy
131
+ dependencies:
132
+ - test_enfrosp_enmapboxapp
133
+ script:
134
+ # Create the public directory
135
+ - rm -rf public
136
+ - mkdir public
137
+ - mkdir -p public/doc
138
+ - mkdir -p public/images/
139
+ - mkdir -p public/coverage
140
+ - mkdir -p public/test_reports
141
+
142
+ # Copy over the docs
143
+ - cp -r docs/_build/html/* public/doc/
144
+ - cp docs/index.html public/
145
+ # - cp -r docs/images/* public/images/ # we don't have images so far
146
+
147
+ # Copy over the coverage reports
148
+ - cp -r htmlcov/* public/coverage/
149
+
150
+ # Copy over the test reports
151
+ - cp report.html public/test_reports/
152
+
153
+ # Check if everything is working great
154
+ - ls -al public
155
+ - ls -al public/doc
156
+ - ls -al public/coverage
157
+ - ls -al public/test_reports
158
+ artifacts:
159
+ paths:
160
+ - public
161
+ expire_in: 30 days
162
+ only:
163
+ - main
164
+
165
+ deploy_pypi:
166
+ stage: deploy
167
+ dependencies:
168
+ - test_enfrosp_enmapboxapp
169
+ script:
170
+ - source activate ci_env
171
+ - mamba update twine python-build
172
+ - python -m build --sdist
173
+ - twine check dist/*
174
+ - twine upload dist/* # requires creds as environment variables
175
+ only:
176
+ - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
177
+ except:
178
+ - dev
@@ -0,0 +1,56 @@
1
+ [extend]
2
+ useDefault=true
3
+
4
+ [[rules]]
5
+ id = "password-detection"
6
+ description = "Detects occurrences of the word 'password'"
7
+ regex = '''(?i)\bpassword\b'''
8
+ tags = ["password"]
9
+
10
+ [[rules.allowlists]] # ❗ Fix: Changed from array to a table (map)
11
+ description = "Ignore common false positives"
12
+ regexes = [ '''(?i)password\s*=\s*"?(example|test|dummy|1234)"?''' ]
13
+
14
+ [[rules]]
15
+ id = "random-password-detection"
16
+ description = "Detects occurrences of passwords"
17
+ regex = '''(?i)(password|passwd|pwd)["\']?[:=]\s*["\'][^\n\r]{6,}["\']'''
18
+ tags = ["password"]
19
+
20
+ [[rules]]
21
+ id = "private-key-detection"
22
+ description = "Detects occurrences of private keys"
23
+ regex = '''(?i)-----BEGIN (RSA|DSA|EC|OPENSSH|PGP) PRIVATE KEY-----'''
24
+ tags = ["private-key"]
25
+
26
+ [[rules]]
27
+ id = "db_login-detection"
28
+ description = "Detects occurrences of the word 'db_login'"
29
+ regex = '''(?i)\bdb_login\b'''
30
+ tags = ["login"]
31
+
32
+ [[rules]]
33
+ id = "login-detection"
34
+ description = "Detects occurrences of the word 'login'"
35
+ regex = '''(?i)\blogin\b'''
36
+ tags = ["login"]
37
+
38
+ [[rules]]
39
+ id = "token-detection"
40
+ description = "Detects occurrences of the word 'token'"
41
+ regex = '''(?i)\btoken\b'''
42
+ tags = ["token"]
43
+
44
+ [[rules]]
45
+ id = "api_key-detection"
46
+ description = "Detects occurrences of the word 'API_key'"
47
+ regex = '''(?i)\bAPI_key\b'''
48
+ tags = ["api_key"]
49
+
50
+ [allowlist]
51
+ description = "global allow list"
52
+ paths = [
53
+ '''\.gitleaksignore''',
54
+ '''extended-gitleaks-config\.toml''',
55
+ '''tests/CI_docker/build_enfrosp_enmapboxapp_testsuite_image.sh'''
56
+ ]
@@ -0,0 +1,19 @@
1
+ .. SPDX-License-Identifier: GPL-3.0-or-later
2
+ .. FileType: DOCUMENTATION
3
+ .. FileCopyrightText: 2025, GFZ Helmholtz Centre for Geosciences, Daniel Scheffler (danschef@gfz.de)
4
+
5
+
6
+
7
+ =======
8
+ Credits
9
+ =======
10
+
11
+ Development Lead
12
+ ----------------
13
+
14
+ * Daniel Scheffler <daniel.scheffler@gfz.de>
15
+
16
+ Contributors
17
+ ------------
18
+
19
+ None yet. Why not be the first?
@@ -0,0 +1,13 @@
1
+ You are welcome to use and modify the `enfrosp_enmapboxapp` project.
2
+ See the README.rst and LICENSE files for details.
3
+
4
+ If you use this software for research we would appreciate appropriate citation.
5
+ This may be prepared using the bibliographic metadata contained in our DOI, accessible through the DOI system and at
6
+ https://zenodo.org/doi/ADD.DOI/zenodo.HERE
7
+
8
+ For information on citing software products generally, see the
9
+ FORCE11 document [*].
10
+
11
+
12
+ [*] FORCE11 Software Citation Working Group (2016), "Software Citation Principles", (Editors: Arfon M. Smith, Daniel S. Katz, Kyle E. Niemeyer).
13
+ Accessed 2017-08-08 at https://www.force11.org/sites/default/files/shared-documents/software-citation-principles.pdf
@@ -0,0 +1,91 @@
1
+ .. SPDX-License-Identifier: GPL-3.0-or-later
2
+ .. FileType: DOCUMENTATION
3
+ .. FileCopyrightText: 2025, GFZ Helmholtz Centre for Geosciences
4
+ .. FileCopyrightText: 2025, Daniel Scheffler (danschef@gfz.de)
5
+
6
+
7
+
8
+ ====================================
9
+ Contributor Covenant Code of Conduct
10
+ ====================================
11
+
12
+ Our Pledge
13
+ ----------
14
+
15
+ In the interest of fostering an open and welcoming environment, we as
16
+ contributors and maintainers pledge to make participation in our project and
17
+ our community a harassment-free experience for everyone, regardless of age, body
18
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
19
+ level of experience, education, socio-economic status, nationality, personal
20
+ appearance, race, religion, or sexual identity and orientation.
21
+
22
+ Our Standards
23
+ -------------
24
+
25
+ Examples of behavior that contributes to creating a positive environment
26
+ include:
27
+
28
+ * Using welcoming and inclusive language
29
+ * Being respectful of differing viewpoints and experiences
30
+ * Gracefully accepting constructive criticism
31
+ * Focusing on what is best for the community
32
+ * Showing empathy towards other community members
33
+
34
+ Examples of unacceptable behavior by participants include:
35
+
36
+ * The use of sexualized language or imagery and unwelcome sexual attention or
37
+ advances
38
+ * Trolling, insulting/derogatory comments, and personal or political attacks
39
+ * Public or private harassment
40
+ * Publishing others' private information, such as a physical or electronic
41
+ address, without explicit permission
42
+ * Other conduct which could reasonably be considered inappropriate in a
43
+ professional setting
44
+
45
+ Our Responsibilities
46
+ --------------------
47
+
48
+ Project maintainers are responsible for clarifying the standards of acceptable
49
+ behavior and are expected to take appropriate and fair corrective action in
50
+ response to any instances of unacceptable behavior.
51
+
52
+ Project maintainers have the right and responsibility to remove, edit, or
53
+ reject comments, commits, code, wiki edits, issues, and other contributions
54
+ that are not aligned to this Code of Conduct, or to ban temporarily or
55
+ permanently any contributor for other behaviors that they deem inappropriate,
56
+ threatening, offensive, or harmful.
57
+
58
+ Scope
59
+ -----
60
+
61
+ This Code of Conduct applies within all project spaces, and it also applies when
62
+ an individual is representing the project or its community in public spaces.
63
+ Examples of representing a project or community include using an official
64
+ project e-mail address, posting via an official social media account, or acting
65
+ as an appointed representative at an online or offline event. Representation of
66
+ a project may be further defined and clarified by project maintainers.
67
+
68
+ Enforcement
69
+ -----------
70
+
71
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
72
+ reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
73
+ complaints will be reviewed and investigated and will result in a response that
74
+ is deemed necessary and appropriate to the circumstances. The project team is
75
+ obligated to maintain confidentiality with regard to the reporter of an incident.
76
+ Further details of specific enforcement policies may be posted separately.
77
+
78
+ Project maintainers who do not follow or enforce the Code of Conduct in good
79
+ faith may face temporary or permanent repercussions as determined by other
80
+ members of the project's leadership.
81
+
82
+ Attribution
83
+ -----------
84
+
85
+ This Code of Conduct is adapted from the `Contributor Covenant`_, version 1.4,
86
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
87
+
88
+ For answers to common questions about this code of conduct, see
89
+ https://www.contributor-covenant.org/faq
90
+
91
+ .. _`Contributor Covenant`: https://www.contributor-covenant.org