icesat2db 2026.4.13__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 (109) hide show
  1. icesat2db-2026.4.13/.codecov.yml +38 -0
  2. icesat2db-2026.4.13/.github/CONTRIBUTING.md +2 -0
  3. icesat2db-2026.4.13/.github/ISSUE_TEMPLATE/bug-report.yml +59 -0
  4. icesat2db-2026.4.13/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. icesat2db-2026.4.13/.github/ISSUE_TEMPLATE/documentation.yml +19 -0
  6. icesat2db-2026.4.13/.github/ISSUE_TEMPLATE/misc.yml +17 -0
  7. icesat2db-2026.4.13/.github/ISSUE_TEMPLATE/new-feature.yml +35 -0
  8. icesat2db-2026.4.13/.github/ISSUE_TEMPLATE/post-install.yml +28 -0
  9. icesat2db-2026.4.13/.github/PULL_REQUEST_TEMPLATE.md +5 -0
  10. icesat2db-2026.4.13/.github/dependabot.yml +10 -0
  11. icesat2db-2026.4.13/.github/pr-prefix-labeler.yml +16 -0
  12. icesat2db-2026.4.13/.github/release.yml +5 -0
  13. icesat2db-2026.4.13/.github/workflows/ci.yaml +147 -0
  14. icesat2db-2026.4.13/.github/workflows/pylint.yaml +50 -0
  15. icesat2db-2026.4.13/.github/workflows/pypi-release.yaml +115 -0
  16. icesat2db-2026.4.13/.gitignore +122 -0
  17. icesat2db-2026.4.13/.readthedocs.yaml +18 -0
  18. icesat2db-2026.4.13/.zenodo.json +54 -0
  19. icesat2db-2026.4.13/CITATION.cff +36 -0
  20. icesat2db-2026.4.13/CODE_OF_CONDUCT.md +45 -0
  21. icesat2db-2026.4.13/LICENSE +287 -0
  22. icesat2db-2026.4.13/MANIFEST.in +16 -0
  23. icesat2db-2026.4.13/PKG-INFO +454 -0
  24. icesat2db-2026.4.13/README.md +94 -0
  25. icesat2db-2026.4.13/ci/requirements/doc.yml +36 -0
  26. icesat2db-2026.4.13/ci/requirements/environment.yml +41 -0
  27. icesat2db-2026.4.13/conftest.py +58 -0
  28. icesat2db-2026.4.13/data/bucketpolicy.json +45 -0
  29. icesat2db-2026.4.13/data/config_files/data_config.yml +705 -0
  30. icesat2db-2026.4.13/data/geojson/BR-Sa3.geojson +33 -0
  31. icesat2db-2026.4.13/data/geojson/global_geojson.geojson +38 -0
  32. icesat2db-2026.4.13/data/geojson/problematic_shot_bbox.geojson +1 -0
  33. icesat2db-2026.4.13/doc/Makefile +248 -0
  34. icesat2db-2026.4.13/doc/README.rst +6 -0
  35. icesat2db-2026.4.13/doc/_static/icesat2db.css +74 -0
  36. icesat2db-2026.4.13/doc/_static/images/global_canopy_dynamics.png +0 -0
  37. icesat2db-2026.4.13/doc/_static/images/tileDB_fragment_structure.png +0 -0
  38. icesat2db-2026.4.13/doc/_static/index-images/api_reference.svg +97 -0
  39. icesat2db-2026.4.13/doc/_static/index-images/contributor.svg +76 -0
  40. icesat2db-2026.4.13/doc/_static/index-images/getting_started.svg +66 -0
  41. icesat2db-2026.4.13/doc/_static/index-images/user_guide.svg +67 -0
  42. icesat2db-2026.4.13/doc/_static/logos/icesat2db_logo.png +0 -0
  43. icesat2db-2026.4.13/doc/_static/logos/icesat2db_logo.svg +500 -0
  44. icesat2db-2026.4.13/doc/_static/test_files/amazon.geojson +21 -0
  45. icesat2db-2026.4.13/doc/_static/test_files/data_config.yml +654 -0
  46. icesat2db-2026.4.13/doc/_static/test_files/test.geojson +22 -0
  47. icesat2db-2026.4.13/doc/conf.py +498 -0
  48. icesat2db-2026.4.13/doc/gallery/README.rst +2 -0
  49. icesat2db-2026.4.13/doc/gallery/authentification.py +44 -0
  50. icesat2db-2026.4.13/doc/gallery/data_processor.py +86 -0
  51. icesat2db-2026.4.13/doc/gallery/data_provider.py +120 -0
  52. icesat2db-2026.4.13/doc/gallery/get_variable_list.py +48 -0
  53. icesat2db-2026.4.13/doc/gallery/regional_tileDBdatabase.py +93 -0
  54. icesat2db-2026.4.13/doc/index.html +3 -0
  55. icesat2db-2026.4.13/doc/index.rst +96 -0
  56. icesat2db-2026.4.13/doc/user/api.rst +64 -0
  57. icesat2db-2026.4.13/doc/user/contributing.rst +132 -0
  58. icesat2db-2026.4.13/doc/user/database.rst +104 -0
  59. icesat2db-2026.4.13/doc/user/faq.rst +66 -0
  60. icesat2db-2026.4.13/doc/user/fundamentals.authenticate.rst +92 -0
  61. icesat2db-2026.4.13/doc/user/fundamentals.filters.rst +58 -0
  62. icesat2db-2026.4.13/doc/user/fundamentals.processor.rst +118 -0
  63. icesat2db-2026.4.13/doc/user/fundamentals.provider.rst +174 -0
  64. icesat2db-2026.4.13/doc/user/fundamentals.rst +24 -0
  65. icesat2db-2026.4.13/doc/user/fundamentals.setup.rst +118 -0
  66. icesat2db-2026.4.13/doc/user/index.rst +40 -0
  67. icesat2db-2026.4.13/doc/user/installing.rst +92 -0
  68. icesat2db-2026.4.13/doc/user/quick-overview.rst +91 -0
  69. icesat2db-2026.4.13/doc/user/tiledb_database.rst +558 -0
  70. icesat2db-2026.4.13/doc/user/why-icesat2db.rst +86 -0
  71. icesat2db-2026.4.13/environment.yml +303 -0
  72. icesat2db-2026.4.13/examples/authentification.ipynb +63 -0
  73. icesat2db-2026.4.13/examples/data_processor.ipynb +112 -0
  74. icesat2db-2026.4.13/examples/data_provider.ipynb +183 -0
  75. icesat2db-2026.4.13/examples/regional_tileDBdatabase.ipynb +119 -0
  76. icesat2db-2026.4.13/icesat2db/__init__.py +103 -0
  77. icesat2db-2026.4.13/icesat2db/beam/Beam.py +135 -0
  78. icesat2db-2026.4.13/icesat2db/beam/__init__.py +7 -0
  79. icesat2db-2026.4.13/icesat2db/beam/atl08_beam.py +157 -0
  80. icesat2db-2026.4.13/icesat2db/core/__init__.py +7 -0
  81. icesat2db-2026.4.13/icesat2db/core/icesat2database.py +804 -0
  82. icesat2db-2026.4.13/icesat2db/core/icesat2granule.py +152 -0
  83. icesat2db-2026.4.13/icesat2db/core/icesat2processor.py +710 -0
  84. icesat2db-2026.4.13/icesat2db/core/icesat2provider.py +594 -0
  85. icesat2db-2026.4.13/icesat2db/downloader/__init__.py +7 -0
  86. icesat2db-2026.4.13/icesat2db/downloader/authentication.py +142 -0
  87. icesat2db-2026.4.13/icesat2db/downloader/cmr_query.py +230 -0
  88. icesat2db-2026.4.13/icesat2db/downloader/data_downloader.py +355 -0
  89. icesat2db-2026.4.13/icesat2db/granule/Granule.py +224 -0
  90. icesat2db-2026.4.13/icesat2db/granule/__init__.py +7 -0
  91. icesat2db-2026.4.13/icesat2db/granule/atl08_granule.py +84 -0
  92. icesat2db-2026.4.13/icesat2db/granule/granule_name.py +88 -0
  93. icesat2db-2026.4.13/icesat2db/granule/granule_parser.py +115 -0
  94. icesat2db-2026.4.13/icesat2db/providers/__init__.py +7 -0
  95. icesat2db-2026.4.13/icesat2db/providers/tiledb_provider.py +495 -0
  96. icesat2db-2026.4.13/icesat2db/utils/__init__.py +7 -0
  97. icesat2db-2026.4.13/icesat2db/utils/constants.py +39 -0
  98. icesat2db-2026.4.13/icesat2db/utils/filters.py +185 -0
  99. icesat2db-2026.4.13/icesat2db/utils/geo_processing.py +231 -0
  100. icesat2db-2026.4.13/icesat2db/utils/print_versions.py +151 -0
  101. icesat2db-2026.4.13/icesat2db/utils/progress_ledger.py +192 -0
  102. icesat2db-2026.4.13/icesat2db/utils/tiledb_consolidation.py +246 -0
  103. icesat2db-2026.4.13/icesat2db.egg-info/PKG-INFO +454 -0
  104. icesat2db-2026.4.13/icesat2db.egg-info/SOURCES.txt +107 -0
  105. icesat2db-2026.4.13/icesat2db.egg-info/dependency_links.txt +1 -0
  106. icesat2db-2026.4.13/icesat2db.egg-info/requires.txt +59 -0
  107. icesat2db-2026.4.13/icesat2db.egg-info/top_level.txt +6 -0
  108. icesat2db-2026.4.13/pyproject.toml +122 -0
  109. icesat2db-2026.4.13/setup.cfg +4 -0
@@ -0,0 +1,38 @@
1
+ codecov:
2
+ require_ci_to_pass: true
3
+
4
+ coverage:
5
+ status:
6
+ project:
7
+ default:
8
+ # Require 1% coverage, i.e., always succeed
9
+ target: 1%
10
+ flags:
11
+ - unittests
12
+ paths:
13
+ - "!icesat2db/tests/"
14
+ unittests:
15
+ target: 90%
16
+ flags:
17
+ - unittests
18
+ paths:
19
+ - "!icesat2db/tests/"
20
+ mypy:
21
+ target: 20%
22
+ flags:
23
+ - mypy
24
+ patch: false
25
+ changes: false
26
+
27
+ comment: false
28
+
29
+ flags:
30
+ unittests:
31
+ paths:
32
+ - "icesat2db"
33
+ - "!icesat2db/tests"
34
+ carryforward: false
35
+ mypy:
36
+ paths:
37
+ - "icesat2db"
38
+ carryforward: false
@@ -0,0 +1,2 @@
1
+ Please see the contributing guide on our Docs:
2
+ https://icesat2db.readthedocs.io/en/latest/user/contributing.html#
@@ -0,0 +1,59 @@
1
+ name: Bug report
2
+ description: Report a bug. For security vulnerabilities see Report a security vulnerability in the templates.
3
+ title: "BUG: <Please write a comprehensive title after the 'BUG: ' prefix>"
4
+ labels: [00 - Bug]
5
+
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: >
10
+ Thank you for taking the time to file a bug report. Before creating a new
11
+ issue, please make sure to take a few minutes to check the issue tracker
12
+ for existing issues about the bug.
13
+
14
+ - type: textarea
15
+ attributes:
16
+ label: "Describe the issue:"
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ attributes:
22
+ label: "Reproduce the code example:"
23
+ description: >
24
+ A short code example that reproduces the problem/missing feature. It
25
+ should be self-contained, i.e., can be copy-pasted into the Python
26
+ interpreter or run as-is via `python myproblem.py`.
27
+ placeholder: |
28
+ import icesat2db as gdb
29
+ << your code here >>
30
+ render: python
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ attributes:
36
+ label: "Error message:"
37
+ description: >
38
+ Please include full error message, if any.
39
+ placeholder: |
40
+ << Full traceback starting from `Traceback: ...` >>
41
+ render: shell
42
+
43
+ - type: textarea
44
+ attributes:
45
+ label: "Python and icesat2db Versions:"
46
+ description: >
47
+ Output from `import sys, icesat2db; print(icesat2db.__version__); print(sys.version)`.
48
+ validations:
49
+ required: true
50
+
51
+ - type: textarea
52
+ attributes:
53
+ label: "Context for the issue:"
54
+ description: |
55
+ Please explain how this issue affects your work or why it should be prioritized.
56
+ placeholder: |
57
+ << your explanation here >>
58
+ validations:
59
+ required: false
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: ❓ Usage question
4
+ url: https://github.com/simonbesnard1/icesat2db/discussions
5
+ about: |
6
+ Ask questions and discuss with other community members here.
7
+ If you have a question like "How do I concatenate a list of datasets?" then
8
+ please include a self-contained reproducible example if possible.
@@ -0,0 +1,19 @@
1
+ name: Documentation
2
+ description: Report an issue related to the icesat2db documentation.
3
+ title: "DOC: <Please write a comprehensive title after the 'DOC: ' prefix>"
4
+ labels: [04 - Documentation]
5
+
6
+ body:
7
+ - type: textarea
8
+ attributes:
9
+ label: "Issue with current documentation:"
10
+ description: >
11
+ Please make sure to leave a reference to the document/code you're
12
+ referring to.
13
+
14
+ - type: textarea
15
+ attributes:
16
+ label: "Idea or request for content:"
17
+ description: >
18
+ Please describe as clearly as possible what topics you think are missing
19
+ from the current documentation.
@@ -0,0 +1,17 @@
1
+ name: 📝 Issue
2
+ description: General issue, that's not a bug report.
3
+ labels: ["needs triage"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Please describe your issue here.
9
+ - type: textarea
10
+ id: issue-description
11
+ attributes:
12
+ label: What is your issue?
13
+ description: |
14
+ Thank you for filing an issue! Please give us further information on how we can help you.
15
+ placeholder: Please describe your issue.
16
+ validations:
17
+ required: true
@@ -0,0 +1,35 @@
1
+ name: 💡 Feature Request
2
+ description: Suggest an idea for icesat2db
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: description
7
+ attributes:
8
+ label: Is your feature request related to a problem?
9
+ description: |
10
+ Please do a quick search of existing issues to make sure that this has not been asked before.
11
+ Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+ validations:
13
+ required: true
14
+ - type: textarea
15
+ id: solution
16
+ attributes:
17
+ label: Describe the solution you'd like
18
+ description: |
19
+ A clear and concise description of what you want to happen.
20
+ - type: textarea
21
+ id: alternatives
22
+ attributes:
23
+ label: Describe alternatives you've considered
24
+ description: |
25
+ A clear and concise description of any alternative solutions or features you've considered.
26
+ validations:
27
+ required: false
28
+ - type: textarea
29
+ id: additional-context
30
+ attributes:
31
+ label: Additional context
32
+ description: |
33
+ Add any other context about the feature request here.
34
+ validations:
35
+ required: false
@@ -0,0 +1,28 @@
1
+ name: Post-install/importing issue
2
+ description: Report an issue if you have trouble importing or using icesat2db after installation.
3
+ title: "<Please write a comprehensive title here>"
4
+ labels: [32 - Installation]
5
+
6
+ body:
7
+ - type: textarea
8
+ attributes:
9
+ label: "Steps to reproduce:"
10
+ description: >
11
+ Please describe the installation method (e.g. building from source,
12
+ Anaconda, pip), your OS and icesat2db/Python version information.
13
+ validations:
14
+ required: true
15
+
16
+ - type: textarea
17
+ attributes:
18
+ label: "Error message:"
19
+ description: >
20
+ Please include full error message, if any.
21
+ placeholder: |
22
+ << Full traceback starting from `Traceback: ...` >>
23
+ render: shell
24
+
25
+ - type: textarea
26
+ attributes:
27
+ label: "Additional information:"
28
+ description: Please add any additional information that could help us diagnose the problem better.
@@ -0,0 +1,5 @@
1
+ <!-- Feel free to remove check-list items aren't relevant to your change -->
2
+
3
+ - [ ] Closes #xxxx
4
+ - [ ] Tests added
5
+ - [ ] New functions/methods are listed in `api.rst`
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: daily
7
+ commit-message:
8
+ prefix: "MAINT"
9
+ labels:
10
+ - "03 - Maintenance"
@@ -0,0 +1,16 @@
1
+ "API": "30 - API"
2
+ "BENCH": "28 - Benchmark"
3
+ "BLD": "36 - Build"
4
+ "BUG": "00 - Bug"
5
+ "DEP": "07 - Deprecation"
6
+ "DEV": "16 - Development"
7
+ "DOC": "04 - Documentation"
8
+ "ENH": "01 - Enhancement"
9
+ "MAINT": "03 - Maintenance"
10
+ "MNT": "03 - Maintenance"
11
+ "REL": "14 - Release"
12
+ "REV": "34 - Reversion"
13
+ "STY": "03 - Maintenance"
14
+ "TST": "05 - Testing"
15
+ "TYP": "41 - Static typing"
16
+ "WIP": "25 - WIP"
@@ -0,0 +1,5 @@
1
+ changelog:
2
+ exclude:
3
+ authors:
4
+ - dependabot
5
+ - pre-commit-ci
@@ -0,0 +1,147 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches:
5
+ - "main"
6
+ pull_request:
7
+ branches:
8
+ - "main"
9
+ workflow_dispatch: # Allows manual trigger
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ env:
16
+ FORCE_COLOR: 3
17
+
18
+ jobs:
19
+ detect-ci-trigger:
20
+ name: Detect CI Trigger
21
+ runs-on: ubuntu-latest
22
+ if: |
23
+ github.repository == 'simonbesnard1/icesat2db'
24
+ && (github.event_name == 'push' || github.event_name == 'pull_request')
25
+ outputs:
26
+ triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
27
+ steps:
28
+ - uses: actions/checkout@v6
29
+ with:
30
+ fetch-depth: 2
31
+ - uses: xarray-contrib/ci-trigger@v1
32
+ id: detect-trigger
33
+ with:
34
+ keyword: "[skip-ci]"
35
+
36
+ test:
37
+ name: "Ubuntu-latest Python 3.10"
38
+ runs-on: ubuntu-latest
39
+ needs: detect-ci-trigger
40
+ if: needs.detect-ci-trigger.outputs.triggered == 'false'
41
+
42
+ steps:
43
+ - name: Checkout Code
44
+ uses: actions/checkout@v6
45
+ with:
46
+ fetch-depth: 0
47
+
48
+ - name: Setup micromamba
49
+ uses: mamba-org/setup-micromamba@v3
50
+ with:
51
+ environment-file: ci/requirements/environment.yml
52
+ environment-name: icesat2db-tests
53
+ cache-environment: true
54
+ cache-environment-key: "ubuntu-latest-py3.10-${{ hashFiles('ci/requirements/environment.yml') }}"
55
+ create-args: >-
56
+ python=3.10
57
+
58
+ - name: Activate Conda & Install icesat2db
59
+ shell: bash -l {0}
60
+ run: |
61
+ micromamba activate icesat2db-tests
62
+ python -m pip install --no-deps -e .
63
+
64
+ - name: Check Installed Packages
65
+ shell: bash -l {0}
66
+ run: |
67
+ micromamba activate icesat2db-tests
68
+ python -c "import pkg_resources; print([d.project_name for d in pkg_resources.working_set])"
69
+
70
+ - name: Verify icesat2db Import
71
+ shell: bash -l {0}
72
+ run: |
73
+ micromamba activate icesat2db-tests
74
+ python -c "import icesat2db"
75
+
76
+ - name: Version info
77
+ shell: bash -l {0}
78
+ run: |
79
+ micromamba activate icesat2db-tests
80
+ python icesat2db/utils/print_versions.py
81
+
82
+ - name: Restore Hypothesis Cache
83
+ id: cache-hypothesis
84
+ uses: actions/cache/restore@v5
85
+ with:
86
+ path: .hypothesis/
87
+ key: cache-hypothesis
88
+ enableCrossOsArchive: true
89
+
90
+ - name: Create .netrc
91
+ run: |
92
+ echo "machine urs.earthdata.nasa.gov" > ~/.netrc
93
+ echo "login $EARTHDATA_USERNAME" >> ~/.netrc
94
+ echo "password $EARTHDATA_PASSWORD" >> ~/.netrc
95
+ chmod 600 ~/.netrc
96
+
97
+ ls -la $HOME/.netrc
98
+ echo $HOME
99
+ env:
100
+ EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
101
+ EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
102
+
103
+ - name: Run tests
104
+ shell: bash -l {0}
105
+ run: |
106
+ micromamba activate icesat2db-tests
107
+ python -m pytest -n 4 --timeout 180 \
108
+ --cov=icesat2db --cov-report=xml --junitxml=pytest.xml
109
+
110
+ - name: Save Hypothesis Cache
111
+ if: always()
112
+ uses: actions/cache/save@v5
113
+ with:
114
+ path: .hypothesis/
115
+ key: cache-hypothesis
116
+ enableCrossOsArchive: true
117
+
118
+ - name: Upload test results
119
+ if: always()
120
+ uses: actions/upload-artifact@v7
121
+ with:
122
+ name: Test results for ${{ runner.os }}-${{ matrix.python-version }} ${{ matrix.env }}
123
+ path: pytest.xml
124
+
125
+ - name: Upload code coverage to Codecov
126
+ uses: codecov/codecov-action@v6.0.0
127
+ env:
128
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
129
+ with:
130
+ file: ./coverage.xml
131
+ flags: unittests
132
+ env_vars: RUNNER_OS,PYTHON_VERSION
133
+ name: codecov-umbrella
134
+ fail_ci_if_error: false
135
+
136
+ event_file:
137
+ name: "Event File"
138
+ runs-on: ubuntu-latest
139
+ if: github.repository == 'simonbesnard1/icesat2db'
140
+ steps:
141
+ - name: Upload
142
+ uses: actions/upload-artifact@v7
143
+ with:
144
+ name: Event File
145
+ path: ${{ github.event_path }}
146
+
147
+
@@ -0,0 +1,50 @@
1
+ name: Code Quality
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ detect-ci-trigger:
7
+ name: Detect CI Trigger
8
+ runs-on: ubuntu-latest
9
+ if: |
10
+ github.repository == 'simonbesnard1/icesat2db'
11
+ && (github.event_name == 'push' || github.event_name == 'pull_request')
12
+ outputs:
13
+ triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+ with:
17
+ fetch-depth: 2
18
+ - uses: xarray-contrib/ci-trigger@v1
19
+ id: detect-trigger
20
+ with:
21
+ keyword: "[skip-ci]"
22
+
23
+ lint:
24
+ name: "Linting with Pylint, Black, and Isort"
25
+ runs-on: ubuntu-latest
26
+ needs: detect-ci-trigger
27
+ if: needs.detect-ci-trigger.outputs.triggered == 'false'
28
+ strategy:
29
+ matrix:
30
+ python-version: ["3.12"]
31
+
32
+ steps:
33
+ - uses: actions/checkout@v6
34
+
35
+ - name: Set up Python ${{ matrix.python-version }}
36
+ uses: actions/setup-python@v6
37
+ with:
38
+ python-version: ${{ matrix.python-version }}
39
+
40
+ - name: Install dependencies
41
+ run: |
42
+ python -m pip install --upgrade pip
43
+ pip install pylint black
44
+ python -m pip install --no-deps -e .
45
+
46
+ - name: Run Black (Check Code Formatting)
47
+ run: black --check --diff .
48
+
49
+ - name: Run Pylint (Check Code Quality)
50
+ run: pylint icesat2db/ --disable=C0301 --exit-zero
@@ -0,0 +1,115 @@
1
+ name: Build and Upload icesat2DB to PyPI
2
+ on:
3
+ release:
4
+ types:
5
+ - published
6
+ push:
7
+ tags:
8
+ - "v*"
9
+
10
+ jobs:
11
+ build-artifacts:
12
+ runs-on: ubuntu-latest
13
+ if: github.repository == 'simonbesnard1/icesat2db'
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+ with:
17
+ fetch-depth: 0
18
+ - uses: actions/setup-python@v6
19
+ name: Install Python
20
+ with:
21
+ python-version: "3.12"
22
+
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ python -m pip install build twine
27
+
28
+ - name: Build tarball and wheels
29
+ run: |
30
+ git clean -xdf
31
+ git restore -SW .
32
+ python -m build
33
+
34
+ - name: Check built artifacts
35
+ run: |
36
+ python -m twine check --strict dist/*
37
+ pwd
38
+ if [ -f dist/icesat2db-0.0.0.tar.gz ]; then
39
+ echo "❌ INVALID VERSION NUMBER"
40
+ exit 1
41
+ else
42
+ echo "✅ Looks good"
43
+ fi
44
+ - uses: actions/upload-artifact@v7
45
+ with:
46
+ name: releases
47
+ path: dist
48
+
49
+ test-built-dist:
50
+ needs: build-artifacts
51
+ runs-on: ubuntu-latest
52
+ steps:
53
+ - uses: actions/setup-python@v6
54
+ name: Install Python
55
+ with:
56
+ python-version: "3.12"
57
+ - uses: actions/download-artifact@v8
58
+ with:
59
+ name: releases
60
+ path: dist
61
+ - name: List contents of built dist
62
+ run: |
63
+ ls -ltrh
64
+ ls -ltrh dist
65
+
66
+ - name: Verify the built dist/wheel is valid
67
+ if: github.event_name == 'push'
68
+ run: |
69
+ python -m pip install --upgrade pip
70
+ python -m pip install dist/icesat2db*.whl
71
+ python -m icesat2db.utils.print_versions
72
+
73
+ upload-to-test-pypi:
74
+ needs: test-built-dist
75
+ if: github.event_name == 'push'
76
+ runs-on: ubuntu-latest
77
+
78
+ environment:
79
+ name: testpypi
80
+ url: https://test.pypi.org/p/icesat2db
81
+ permissions:
82
+ id-token: write
83
+
84
+ steps:
85
+ - uses: actions/download-artifact@v8
86
+ with:
87
+ name: releases
88
+ path: dist
89
+ - name: Publish package to TestPyPI
90
+ if: github.event_name == 'push'
91
+ uses: pypa/gh-action-pypi-publish@v1.14.0
92
+ with:
93
+ repository_url: https://test.pypi.org/legacy/
94
+ verbose: true
95
+
96
+ upload-to-pypi:
97
+ needs: test-built-dist
98
+ if: github.event_name == 'release'
99
+ runs-on: ubuntu-latest
100
+
101
+ environment:
102
+ name: pypi
103
+ url: https://pypi.org/p/icesat2db
104
+ permissions:
105
+ id-token: write
106
+
107
+ steps:
108
+ - uses: actions/download-artifact@v8
109
+ with:
110
+ name: releases
111
+ path: dist
112
+ - name: Publish package to PyPI
113
+ uses: pypa/gh-action-pypi-publish@v1.14.0
114
+ with:
115
+ verbose: true
@@ -0,0 +1,122 @@
1
+ output/
2
+ data/
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ *.py[cod]
6
+ __pycache__
7
+ .env
8
+ .venv
9
+ *$py.class
10
+
11
+ # C extensions
12
+ *.so
13
+
14
+ # Distribution / packaging
15
+ .Python
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ downloads/
20
+ eggs/
21
+ .eggs/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ doc/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # pyenv
81
+ .python-version
82
+
83
+ # celery beat schedule file
84
+ celerybeat-schedule
85
+
86
+ # SageMath parsed files
87
+ *.sage.py
88
+
89
+ # Environments
90
+ .env
91
+ .venv
92
+ env/
93
+ venv/
94
+ ENV/
95
+ env.bak/
96
+ venv.bak/
97
+
98
+ # Spyder project settings
99
+ .spyderproject
100
+ .spyproject
101
+
102
+ # Rope project settings
103
+ .ropeproject
104
+
105
+ # mkdocs documentation
106
+ /site
107
+
108
+ # mypy
109
+ .mypy_cache/
110
+ LICENSE
111
+
112
+ # misc
113
+ /config_files/
114
+ /testing
115
+ .idea
116
+ /scripts/
117
+
118
+ # Sphinx doc
119
+ _build/
120
+
121
+ # Ignore generated PDFs
122
+ paper/paper.pdf