Skip to content

Commit

Permalink
Merge pull request #331 from systemaccounting/330-crates-service
Browse files Browse the repository at this point in the history
add crates/service
  • Loading branch information
mxfactorial committed Mar 8, 2024
2 parents 66329ec + f1be033 commit e096a8c
Show file tree
Hide file tree
Showing 20 changed files with 2,281 additions and 263 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/dev-crates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: crates unit tests
run: cargo test -p pg -p types -p httpclient
- name: crates coverage reports
- name: crates/types coverage report
run: |
make rust-coverage RUST_PKG=types
- name: crates/pg coverage report
run: |
make rust-coverage RUST_PKG=pg
- name: crates/httpclient coverage report
run: |
make rust-coverage RUST_PKG=httpclient
24 changes: 18 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ resolver = "2"
members = [
"crates/httpclient",
"crates/pg",
"crates/service",
"crates/types",
"services/graphql",
"services/rule",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ government is not above failure, nor is it entitled to steal from the private se
public demonstration of the following use cases through a systemaccounting function:
* expressing a [conservation law](https://en.wikipedia.org/wiki/Conservation_law) through a [data structure](https://github.com/systemaccounting/mxfactorial/blob/develop/mxfactorial.ipynb) disambiguates *delivered* value from *expected* value, and replaces [committees](https://www.federalreserve.gov/financial-stability.htm) with an automated [financial stability criterion](https://en.wikipedia.org/wiki/BIBO_stability)
* producing a [scientific measure](http://www.systemaccounting.org/how_does_systemaccounting_produce_a_scientific_measure_of_the_cost_of_capital) of the equilibrium price of capital signals the demand for capital with an empirical rate of return instead of a [government defined word](https://www.systemaccounting.org/what_is_a_bank), and removes the ability of a central authority to [manipulate](https://en.wikipedia.org/wiki/Federal_funds_rate) the price of credit
* `SELECT SUM(price*quantity) FROM transactions WHERE time = NOW();` maximizes & protects for individuals a scientific standard the publicly-measured quarterly or annual '[GDP](https://en.wikipedia.org/wiki/Gross_domestic_product)' violates
* where an industry is [chartered](http://www.occ.gov/topics/licensing/index-licensing.html), [protected](https://en.wikipedia.org/wiki/Bailout), and [primarily depended upon](http://www.opensecrets.org/industries./) by a government requiring [election assistance](https://en.wikipedia.org/wiki/Collusion), conserving value & liability (information) separates the balance sheets of governments from individuals, and eliminates [socializing](https://en.wikipedia.org/wiki/Externality#Negative) the [default risk](https://en.wikipedia.org/wiki/Liability_(financial_accounting)) of any individual or firm
* `SELECT SUM(price*quantity) FROM transactions WHERE time = NOW()` maximizes & protects for individuals a scientific standard the publicly-measured quarterly or annual '[GDP](https://en.wikipedia.org/wiki/Gross_domestic_product)' violates
* where an industry is [chartered](http://www.occ.gov/topics/licensing/index-licensing.html), [protected](https://en.wikipedia.org/wiki/Bailout), and [primarily depended upon](https://www.opensecrets.org/industries) by a government requiring [election assistance](https://en.wikipedia.org/wiki/Collusion), conserving value & liability (information) separates the balance sheets of governments from individuals, and eliminates [socializing](https://en.wikipedia.org/wiki/Externality#Negative) the [default risk](https://en.wikipedia.org/wiki/Liability_(financial_accounting)) of any individual or firm
* establishing the conditions studied by [combinatorial game theory](https://en.wikipedia.org/wiki/Combinatorial_game_theory) through physics & data science ends public dependency on such resources as [credit ratings](https://en.wikipedia.org/wiki/Bond_credit_rating), [quarterly filings](https://en.wikipedia.org/wiki/Form_10-Q), the Consumer Price Index ([CPI](https://en.wikipedia.org/wiki/Consumer_price_index)), and the federal reserve economic data ([FRED](https://en.wikipedia.org/wiki/Federal_Reserve_Economic_Data)) platform
* *accounts as projective coordinates*: structuring transactions between debiting and crediting users [across time](https://en.wikipedia.org/wiki/Homogeneous_coordinates) as a [binary logarithmic event](https://en.wikipedia.org/wiki/Binary_logarithm#Information_theory) creates a [2^n dimensional space](https://en.wikipedia.org/wiki/Clifford_algebra#Basis_and_dimension) in a data model
* *data as multivectors*: financial value is a [bivector](https://en.wikipedia.org/wiki/Bivector)-valued function of buyers and sellers adding ownership-coordinates to a [3d space](https://en.wikipedia.org/wiki/Conformal_geometric_algebra) parameterized by "time". the [dual](https://en.wikipedia.org/wiki/Hodge_star_operator) positive and negative string values expressed by the anticommutativity of the `"creditor" ∧ "debitor" = - ("debitor" ∧ "creditor")` exterior product defines the [continuity point](https://en.wikipedia.org/wiki/Path_(topology)) a [time](https://en.wikipedia.org/wiki/Time-scale_calculus)-dependent projection depends on to propagate [zero-sum](https://en.wikipedia.org/wiki/Zero-sum_game) changes to account balances
Expand Down
1 change: 1 addition & 0 deletions crates/pg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dotenvy = "0.15.7"
serde_json = "1.0.113"
serial_test = "*"
tokio = { version = "1.35.1", default-features = false, features = ["macros"] }
regex = "1.5.4"

[features]
db_tests = []
5 changes: 3 additions & 2 deletions crates/pg/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ RELATIVE_PROJECT_ROOT_PATH=$(shell REL_PATH="."; while [ $$(ls "$$REL_PATH" | gr
APP_NAME=$(shell basename $(CURDIR))
PROJECT_CONF_FILE_NAME=project.yaml
TEST_NAME?=model::integration_tests::
MIGRATIONS_DIR=$(RELATIVE_PROJECT_ROOT_PATH)/migrations

test-unit:
cargo test
Expand All @@ -23,9 +24,9 @@ watch-db:
test-db:
@$(MAKE) get-secrets
@if [[ $$(pg_isready -h localhost) ]]; then \
$(MAKE) -C ../../migrations reset; \
$(MAKE) -C $(MIGRATIONS_DIR) reset; \
else \
$(MAKE) -C ../../migrations start; \
$(MAKE) -C $(MIGRATIONS_DIR) start; \
fi
@until pg_isready -h localhost; do sleep 1; done
cargo test $(TEST_NAME) --features db_tests -- --test-threads=1
Expand Down
Loading

0 comments on commit e096a8c

Please sign in to comment.