Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache license precommit action #91

Merged
merged 4 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build_prod_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

# NOTE: this only tests building, there is no good way to test
# runtime functionality in prod without using pytest
name: Test Prod Build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

name: E2E Test Pipeline

on:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

name: Pyright Type Checks

on:
Expand Down
11 changes: 9 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

minimum_pre_commit_version: "2.9.0"
ci:
autoupdate_schedule: monthly
Expand Down Expand Up @@ -25,8 +28,6 @@ repos:
- id: check-shebang-scripts-are-executable
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
exclude_types: [svg]
- id: fix-byte-order-marker
- id: mixed-line-ending
- repo: https://github.com/pre-commit/mirrors-prettier
Expand All @@ -48,3 +49,9 @@ repos:
# Update the uv lockfile
- id: uv-lock
- id: uv-export
- repo: https://github.com/google/addlicense
rev: "55a521bf81c24480094950caa3566548fa63875e"
hooks:
- id: addlicense
args:
["-s=only", -l, "Apache-2.0", -c, "Lincoln Institute of Land Policy"]
3 changes: 3 additions & 0 deletions Docker/Docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

name: geoconnex_scheduler

services:
Expand Down
3 changes: 3 additions & 0 deletions Docker/dagster/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0


# Create an entrypoint for the code server. This could be either dagster dev with debugpy
# for debugging or just dagster code-server for running in production
Expand Down
3 changes: 3 additions & 0 deletions Docker/dagster/workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

# This file specifies how dagster should load user code
load_from:
# Each entry here corresponds to a service in the docker-compose file that exposes user code.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

name: "Geoconnex Scheduler E2E Test"
description: "Reusable GitHub Action to run E2E tests for the Dagster build"
# Allow specifying a custom docker image so we can test specific versions
Expand Down
3 changes: 3 additions & 0 deletions dagster.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

scheduler:
module: dagster.core.scheduler
class: DagsterDaemonScheduler
Expand Down
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

import os
import shutil
import subprocess
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

[project]
name = "scheduler"
version = "0.1.0"
Expand Down
3 changes: 3 additions & 0 deletions userCode/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions userCode/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions userCode/lib/classes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

import io
from pathlib import Path
import subprocess
Expand Down
3 changes: 3 additions & 0 deletions userCode/lib/dagster_helpers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

import json
from dagster import (
DagsterInstance,
Expand Down
3 changes: 3 additions & 0 deletions userCode/lib/env.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

import os
from pathlib import Path

Expand Down
3 changes: 3 additions & 0 deletions userCode/lib/lakefsUtils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

from typing import Optional
import lakefs
from lakefs import Client
Expand Down
3 changes: 3 additions & 0 deletions userCode/lib/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

from typing import Literal, TypeAlias, TypedDict


Expand Down
3 changes: 3 additions & 0 deletions userCode/lib/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

from datetime import datetime
import os
import re
Expand Down
3 changes: 3 additions & 0 deletions userCode/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

import asyncio
from datetime import datetime
import os
Expand Down
5 changes: 5 additions & 0 deletions userCode/templates/gleanerconfig.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{#
Copyright 2025 Lincoln Institute of Land Policy
SPDX-License-Identifier: Apache-2.0
#}

# This file represents the prefix for the gleaner config file

---
Expand Down
5 changes: 5 additions & 0 deletions userCode/templates/nabuconfig.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{#
Copyright 2025 Lincoln Institute of Land Policy
SPDX-License-Identifier: Apache-2.0
#}

---
minio:
address: {{ GLEANERIO_MINIO_ADDRESS }}
Expand Down
5 changes: 5 additions & 0 deletions userCode/templates/rclone.conf.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{#
Copyright 2025 Lincoln Institute of Land Policy
SPDX-License-Identifier: Apache-2.0
#}

[lakefs]
type = s3
provider = Other
Expand Down
3 changes: 3 additions & 0 deletions userCode/test/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

3 changes: 3 additions & 0 deletions userCode/test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

import os
import pytest

Expand Down
3 changes: 3 additions & 0 deletions userCode/test/lib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

import requests


Expand Down
3 changes: 3 additions & 0 deletions userCode/test/test_e2e.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

from dagster import (
DagsterInstance,
load_assets_from_modules,
Expand Down
3 changes: 3 additions & 0 deletions userCode/test/test_unit.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2025 Lincoln Institute of Land Policy
# SPDX-License-Identifier: Apache-2.0

import os
from dagster import materialize_to_memory
import lakefs
Expand Down