Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8511b58
Move into separate folder
SvenVw Oct 29, 2024
e62c51d
Add srm as dataset
SvenVw Oct 29, 2024
0a9ddb7
Update unit test for srm
SvenVw Oct 29, 2024
b0c4978
Use consistent naming for a set of fertilizer
SvenVw Oct 29, 2024
ebee132
Add prerelease workflow for fdm-data
SvenVw Oct 29, 2024
08ac0ed
Add to changeset
SvenVw Oct 29, 2024
37ad94a
Fix that workspace is used
SvenVw Oct 29, 2024
6e6c763
Fix use of pnpm packageExtension
SvenVw Oct 29, 2024
9a34dd5
Fixes to use fdm-core in fdm-data
SvenVw Oct 29, 2024
22b344e
Maybe this works?
SvenVw Oct 29, 2024
c722ce2
Fix name
SvenVw Oct 29, 2024
4fbd341
Link packages through workspace
SvenVw Oct 29, 2024
e6a4b9a
Update dependency of fdm-data on fdm-core
SvenVw Oct 29, 2024
c36a673
Install only relevant dependencies
SvenVw Oct 29, 2024
9550ad6
Fix depencencies
SvenVw Oct 31, 2024
909c7e8
Use single prerelease action
SvenVw Oct 31, 2024
de4911a
Fix trigger
SvenVw Oct 31, 2024
3513526
Switch off concurrency
SvenVw Oct 31, 2024
ff47706
Fix typo
SvenVw Oct 31, 2024
f5d51fc
Fix scopes
SvenVw Oct 31, 2024
ac66a44
Preserve symlinks
SvenVw Oct 31, 2024
8d9b2b6
Fix permissions
SvenVw Oct 31, 2024
7b46f5a
Add turbo cache
SvenVw Oct 31, 2024
652a213
Cancel earlier concurrent build
SvenVw Oct 31, 2024
a243441
Set vite log level to error for fdm-data to prevent slowdown of GH Ac…
SvenVw Oct 31, 2024
bd48f0e
Replace changeset action with custom steps
SvenVw Oct 31, 2024
c333d6b
Fix name change of package
SvenVw Oct 31, 2024
a2ee857
Add to `fertilizers_catalogue` the columns:`p_density`, `p_type_manur…
SvenVw Oct 31, 2024
787f33f
Add p_density p_type_* of srm to catalogue
SvenVw Oct 31, 2024
b2803db
Fix fdm-calculator config
SvenVw Oct 31, 2024
412e5d5
Fix drizzle-rom version across packages
SvenVw Oct 31, 2024
b08d78b
Add workaround for fdm-data test to connect to fdm
SvenVw Oct 31, 2024
ca8107e
Fix that fertilizer is added to catalogue
SvenVw Nov 5, 2024
cb90c93
Improve adding fertilzers from catalogue
SvenVw Nov 5, 2024
8297765
Bump version numbers and update changelog
SvenVw Nov 5, 2024
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
65 changes: 0 additions & 65 deletions .github/workflows/prerelease-fdm-core.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Prerelease

on:
pull_request:
paths:
- 'fdm-core/**'
- 'fdm-data/**'
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
prerelease:
name: Prerelease
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
permissions:
contents: read
packages: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Setup pnpm 9
uses: pnpm/action-setup@v4
with:
version: 9.12.2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm i

- name: Bump snapshot
run: pnpm changeset version --snapshot ${{ github.head_ref }} --ignore fdm-docs

- name: Build packages
run: pnpm build --filter=@svenvw/fdm-core --filter=@svenvw/fdm-data

- name: Publish snapshot
run: pnpm changeset publish --tag ${{ github.head_ref }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
link-workspace-packages=true
1 change: 1 addition & 0 deletions fdm-calculator/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.env
6 changes: 4 additions & 2 deletions fdm-calculator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@
"lint": "eslint ."
},
"devDependencies": {
"@dotenvx/dotenvx": "^1.20.0",
"@svenvw/fdm-core": "workspace:*",
"typescript": "^5.5.3",
"vite": "^5.4.8",
"vite-plugin-dts": "^4.0.2",
"vitest": "^2.0.5"
},
"dependencies": {
"fdm-core": "workspace:*"
"peerDependencies": {
"@svenvw/fdm-core": "workspace:>=0.3.1"
},
"packageManager": "pnpm@9.12.2"
}
7 changes: 7 additions & 0 deletions fdm-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog fdm-core

## 0.4.0

### Minor Changes

- For `addFertilizersToCatalogue` include all parameters in `properties`
- a2ee857: Add to `fertilizers_catalogue` the columns:`p_density`, `p_type_manure`, `p_type_mineral` and `p_type_compost`

## 0.3.1

### Patch Changes
Expand Down
21 changes: 2 additions & 19 deletions fdm-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@svenvw/fdm-core",
"private": false,
"version": "0.3.1",
"version": "0.4.0",
"description": "Interface for the Farm Data Model",
"license": "MIT",
"homepage": "https://svenvw.github.io/fdm/",
Expand Down Expand Up @@ -68,30 +68,13 @@
"dependencies": {
"@electric-sql/pglite": "^0.2.12",
"drizzle-graphql": "^0.8.5",
"drizzle-orm": "^0.35.3",
"drizzle-orm": "catalog:",
"graphql": "^16.9.0",
"nanoid": "^5.0.7",
"postgres": "^3.4.4"
},
"packageManager": "pnpm@9.12.2",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"pnpm": {
"packageExtensions": {
"vite-plugin-dts": {
"dependenciesMeta": {
"@volar/typescript": {
"optional": true
},
"vue-tsc": {
"optional": true
},
"@vue/language-core": {
"optional": true
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
CREATE SCHEMA "fdm-dev";
--> statement-breakpoint
DO $$ BEGIN
CREATE TYPE "fdm-dev"."b_manage_type" AS ENUM('owner', 'lease');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
CREATE TYPE "fdm-dev"."b_sector" AS ENUM('diary', 'arable', 'tree_nursery', 'bulbs');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
CREATE TYPE "fdm-dev"."b_manage_type" AS ENUM('owner', 'lease');--> statement-breakpoint
CREATE TYPE "fdm-dev"."b_sector" AS ENUM('diary', 'arable', 'tree_nursery', 'bulbs');--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "fdm-dev"."farm_managing" (
"b_id" text NOT NULL,
"b_id_farm" text NOT NULL,
Expand Down Expand Up @@ -61,6 +51,7 @@ CREATE TABLE IF NOT EXISTS "fdm-dev"."fertilizers_catalogue" (
"p_name_en" text,
"p_description" text,
"p_dm" numeric,
"p_density" numeric,
"p_om" numeric,
"p_a" numeric,
"p_hc" numeric,
Expand Down Expand Up @@ -99,6 +90,9 @@ CREATE TABLE IF NOT EXISTS "fdm-dev"."fertilizers_catalogue" (
"p_pb_rt" numeric,
"p_hg_rt" numeric,
"p_cl_cr" numeric,
"p_type_manure" boolean,
"p_type_mineral" boolean,
"p_type_compost" boolean,
"created" timestamp with time zone DEFAULT now() NOT NULL,
"updated" timestamp with time zone
);
Expand Down
48 changes: 40 additions & 8 deletions fdm-core/src/db/migrations/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "ca7ff342-727b-4512-946e-d4fd95e324a2",
"id": "ba4dd387-e576-411c-8f10-79e84712e7a3",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
Expand Down Expand Up @@ -115,7 +115,8 @@
]
}
},
"uniqueConstraints": {}
"uniqueConstraints": {},
"checkConstraints": {}
},
"fdm-dev.farms": {
"name": "farms",
Expand Down Expand Up @@ -173,7 +174,8 @@
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
"uniqueConstraints": {},
"checkConstraints": {}
},
"fdm-dev.fertilizer_aquiring": {
"name": "fertilizer_aquiring",
Expand Down Expand Up @@ -249,7 +251,8 @@
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
"uniqueConstraints": {},
"checkConstraints": {}
},
"fdm-dev.fertilizer_picking": {
"name": "fertilizer_picking",
Expand Down Expand Up @@ -319,7 +322,8 @@
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
"uniqueConstraints": {},
"checkConstraints": {}
},
"fdm-dev.fertilizers": {
"name": "fertilizers",
Expand Down Expand Up @@ -364,7 +368,8 @@
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
"uniqueConstraints": {},
"checkConstraints": {}
},
"fdm-dev.fertilizers_catalogue": {
"name": "fertilizers_catalogue",
Expand Down Expand Up @@ -406,6 +411,12 @@
"primaryKey": false,
"notNull": false
},
"p_density": {
"name": "p_density",
"type": "numeric",
"primaryKey": false,
"notNull": false
},
"p_om": {
"name": "p_om",
"type": "numeric",
Expand Down Expand Up @@ -634,6 +645,24 @@
"primaryKey": false,
"notNull": false
},
"p_type_manure": {
"name": "p_type_manure",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"p_type_mineral": {
"name": "p_type_mineral",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"p_type_compost": {
"name": "p_type_compost",
"type": "boolean",
"primaryKey": false,
"notNull": false
},
"created": {
"name": "created",
"type": "timestamp with time zone",
Expand Down Expand Up @@ -667,7 +696,8 @@
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
"uniqueConstraints": {},
"checkConstraints": {}
},
"fdm-dev.fields": {
"name": "fields",
Expand Down Expand Up @@ -718,7 +748,8 @@
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"enums": {
Expand All @@ -745,6 +776,7 @@
"fdm-dev": "fdm-dev"
},
"sequences": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
Expand Down
4 changes: 2 additions & 2 deletions fdm-core/src/db/migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{
"idx": 0,
"version": "7",
"when": 1729004382718,
"tag": "0000_pale_jean_grey",
"when": 1730387776036,
"tag": "0000_slim_lockheed",
"breakpoints": true
}
]
Expand Down
Loading