-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: import template repository from atlas (#23)
refs #18
- Loading branch information
Showing
42 changed files
with
12,187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directories: | ||
- / | ||
- /functions | ||
schedule: | ||
interval: monthly | ||
groups: | ||
safe-dependencies: | ||
update-types: ['minor', 'patch'] | ||
major-dependencies: | ||
update-types: ['major'] | ||
commit-message: | ||
prefix: deps | ||
prefix-development: deps(dev) | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
groups: | ||
ci-dependencies: | ||
dependency-type: 'production' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Pull Request Events | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test-check: | ||
name: Lint and check types | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: ⬇️ Set up code | ||
uses: actions/checkout@v4 | ||
with: | ||
show-progress: false | ||
|
||
- name: ⎔ Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
|
||
- name: 📥 Download dependencies | ||
run: npm ci | ||
|
||
- name: 🧶 Lint | ||
run: npm run lint | ||
|
||
- name: 🧪 Check types | ||
run: npm run check | ||
|
||
test-unit: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: ⬇️ Set up code | ||
uses: actions/checkout@v4 | ||
with: | ||
show-progress: false | ||
|
||
- name: ⎔ Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
|
||
- name: 📥 Download dependencies | ||
run: npm ci | ||
|
||
- name: 🧪 Run tests | ||
run: npm test | ||
|
||
deploy-preview: | ||
name: Firebase preview | ||
runs-on: ubuntu-latest | ||
needs: [test-unit, test-check] | ||
if: ${{ github.event.sender.type == 'User' && github.head_ref != 'dev' }} | ||
environment: | ||
name: preview | ||
|
||
steps: | ||
- name: 🚀 Deploy | ||
uses: agrc/firebase-website-deploy-composite-action@v1 | ||
with: | ||
identity-provider: ${{ secrets.IDENTITY_PROVIDER }} | ||
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} | ||
project-id: ${{ secrets.PROJECT_ID }} | ||
preview: yes | ||
build-command: npm run build -- --mode dev | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
VITE_DISCOVER: ${{ secrets.VITE_DISCOVER }} | ||
VITE_WEB_API: ${{ secrets.VITE_WEB_API }} | ||
VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.vscode | ||
/data | ||
/forklift | ||
/maps | ||
/mockups | ||
/scripts | ||
/dist | ||
/public/assets | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-packagejson", "prettier-plugin-tailwindcss"], | ||
"printWidth": 120, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"streetsidesoftware.code-spell-checker", | ||
"esbenp.prettier-vscode", | ||
"bradlc.vscode-tailwindcss", | ||
"dbaeumer.vscode-eslint", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"cSpell.words": [ | ||
"apos", | ||
"arcgis", | ||
"arcpy", | ||
"basemap", | ||
"browserslist", | ||
"cadastre", | ||
"escaperegexp", | ||
"esrijs", | ||
"firebaserc", | ||
"geocode", | ||
"geodatabase", | ||
"geodatabases", | ||
"Geospatial", | ||
"gnis", | ||
"hostingchannels", | ||
"lods", | ||
"noopener", | ||
"noreferrer", | ||
"packagejson", | ||
"sgid", | ||
"sitla", | ||
"srid", | ||
"tagname", | ||
"tailwindcss", | ||
"topo", | ||
"UDNR", | ||
"udwr", | ||
"UDWRRT", | ||
"ugrc", | ||
"usgs", | ||
"USNG", | ||
"vite", | ||
"wkid" | ||
], | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": "explicit" | ||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Intended to hold any data that you want included and version with the app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import js from '@eslint/js'; | ||
import eslintConfigPrettier from 'eslint-config-prettier'; | ||
import prettier from 'eslint-plugin-prettier'; | ||
import reactPlugin from 'eslint-plugin-react'; | ||
import reactHooks from 'eslint-plugin-react-hooks'; | ||
import globals from 'globals'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
// eslint.config.js | ||
export default tseslint.config( | ||
js.configs.recommended, | ||
...tseslint.configs.recommended, | ||
{ | ||
...reactPlugin.configs.flat.recommended, | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
...reactPlugin.configs.flat.recommended.languageOptions, | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.es2022, | ||
}, | ||
}, | ||
settings: { react: { version: 'detect' } }, | ||
plugins: { | ||
react: reactPlugin, | ||
prettier, | ||
'react-hooks': reactHooks, | ||
}, | ||
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'], | ||
rules: { | ||
...eslintConfigPrettier.rules, | ||
...reactHooks.configs.recommended.rules, | ||
...reactPlugin.configs['jsx-runtime'].rules, | ||
}, | ||
}, | ||
{ | ||
ignores: [ | ||
'.firebase', | ||
'.github/*', | ||
'.vscode/*', | ||
'data/*', | ||
'dist/*', | ||
'forklift/*', | ||
'maps/*', | ||
'mockups/*', | ||
'node_modules/*', | ||
'package-lock.json', | ||
'public/*', | ||
'scripts/*', | ||
], | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A folder location for forklift pallets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
''' | ||
WRIPallet.py | ||
A module that defines a forklift pallet for the WRI project. | ||
''' | ||
|
||
from pathlib import Path | ||
|
||
import arcpy | ||
|
||
from forklift.models import Pallet | ||
|
||
|
||
class WRIPallet(Pallet): | ||
def build(self, configuration): | ||
sgid = str(Path(self.staging_rack) / 'SGID10.gdb') | ||
udnr = str(Path(self.staging_rack) / 'UDNR.gdb') | ||
udwr = str(Path(self.staging_rack) / 'UDWRRT2.gdb') | ||
|
||
self.copy_data = [sgid, udnr, udwr] | ||
|
||
self.add_crates([ | ||
'BLMDistricts', | ||
'LandOwnership', | ||
'ZoomLocations', | ||
'Counties', | ||
'StreamsNHDHighRes', | ||
'Watersheds_Area' | ||
], {'source_workspace': str(Path(self.garage) / 'SGID.sde'), 'destination_workspace': sgid}) | ||
|
||
self.add_crates([ | ||
'SageGrouse_SGMA_outlines', | ||
'Regions' | ||
], {'source_workspace': str(Path(self.garage) / 'UDNR.sde'), 'destination_workspace': udnr}) | ||
|
||
self.add_crates([ | ||
'NRCS_precip1981_2010_a_ut', | ||
'SiteInfo' | ||
], {'source_workspace': str(Path(self.garage) / 'UDWRRT2.sde'), 'destination_workspace': udwr}) | ||
|
||
def process(self): | ||
for crate in [crate for crate in self.get_crates() if crate.was_updated()]: | ||
self.log.debug('crate %s was updated', crate.source_name.lower()) | ||
|
||
if crate.source_name.lower() != 'sgid.water.watersheds_area': | ||
continue | ||
|
||
self.log.debug('watersheds area updated, rebuilding') | ||
dissolve_location = str(Path(crate.destination_workspace) / "Watershed_Areas_Dissolved") | ||
|
||
self.log.debug('dissolve layer location %s', dissolve_location) | ||
|
||
if arcpy.Exists(dissolve_location): | ||
self.log.debug('table exists, deleting') | ||
|
||
arcpy.management.Delete(dissolve_location) | ||
|
||
arcpy.management.Dissolve(in_features=crate.destination, out_feature_class=dissolve_location, dissolve_field=["HUC_10"], statistics_fields="HU_10_NAME FIRST") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# WRI forklift pallet | ||
|
||
## Installation | ||
|
||
> [!TIP] | ||
> This pallet has no python dependencies that need to be installed. | ||
This pallet uses the following enterprise geodatabases as sources | ||
|
||
- UDNR | ||
- SGID | ||
- UDWRRT2 | ||
|
||
> [!IMPORTANT] | ||
> Three `*.sde` files need to be installed in the garage for this pallet. | ||
> | ||
> 1. SGID.sde | ||
> 1. UDNR.sde | ||
> 1. UDWRRT2.sde |
Empty file.
Oops, something went wrong.