Skip to content

Commit d49b6af

Browse files
first commit
0 parents  commit d49b6af

File tree

4 files changed

+109
-0
lines changed

4 files changed

+109
-0
lines changed

.github/workflows/build.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
branches: ["main"]
8+
9+
jobs:
10+
11+
build:
12+
name: Building Python Tools ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
include:
18+
- os: windows-latest
19+
artifact_name: python-env-windows.zip
20+
# - os: macos-13 # Intel Mac (x64)
21+
# artifact_name: python-env-macos-x64.tar.gz
22+
- os: macos-latest
23+
artifact_name: python-env-macos-arm64.tar.gz
24+
25+
steps:
26+
- name: Checkout Code
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Miniconda
30+
uses: conda-incubator/setup-miniconda@v3
31+
with:
32+
auto-update-conda: true
33+
python-version: "3.10"
34+
activate-environment: ogs_python_tools
35+
environment-file: environment.yml
36+
channels: conda-forge,nodefaults
37+
38+
- name: Install Requirements
39+
shell: bash -el {0}
40+
run: conda install -n base -c conda-forge conda-pack mamba -y
41+
42+
- name: Cleanup Environment
43+
shell: bash -el {0}
44+
run: |
45+
conda clean --all -y
46+
pip cache purge
47+
48+
- name: Pack Environment
49+
shell: bash -el {0}
50+
run: conda-pack -n ogs_geo_tools -o ${{ matrix.artifact_name }}
51+
52+
- name: Upload Artifact
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: ${{ matrix.artifact_name }}
56+
path: ${{ matrix.artifact_name }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ogs_meshery_tools
2+
out
3+
.DS_*

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Python tools for processing lidar, geotiffs, and feature extraction for automation of most course building steps.
2+
3+
4+
Install mamba and conda-forge on the dev machine
5+
6+
```bash
7+
conda install -n base -c conda-forge mamba
8+
```
9+
10+
Create environment
11+
12+
```bash
13+
mamba env create --prefix ./ogs_python_tools -f environment.yml
14+
```
15+
16+
Activate environment
17+
18+
```bash
19+
conda activate ./ogs_python_tools
20+
21+
```
22+
23+
24+
Then to pack the conda environment:
25+
```bash
26+
# exit the environment
27+
conda deactivate
28+
29+
# clean up unneeded files
30+
conda clean --all --name ogs_python_tools -y
31+
32+
# create the packed environment
33+
conda pack -n ogs_python_tools -o out/ogs_python_tools.tar.gz
34+
```
35+
36+
To install/unpack python tools:
37+
```bash
38+
mkdir myenv
39+
tar -xf example.tar.gz -C myenv
40+
```

environment.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: ogs_python_tools
2+
channels:
3+
- conda-forge
4+
- nodefaults
5+
dependencies:
6+
- python=3.10
7+
- gdal>=3.8
8+
- pdal>=2.7
9+
- python-pdal
10+
- pip

0 commit comments

Comments
 (0)