Skip to content

Commit

Permalink
Merge pull request #317 from systemaccounting/316-pg-crate-unit-tests
Browse files Browse the repository at this point in the history
316 pg crate unit tests
  • Loading branch information
mxfactorial authored Dec 29, 2023
2 parents 4dc9c79 + 99d4cd2 commit c0c4ebe
Show file tree
Hide file tree
Showing 12 changed files with 716 additions and 157 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/dev-crates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ jobs:
if [[ $(make rust-coverage-percent RUST_PKG=types) -lt ${{ env.MIN_CODE_COV }} ]]; then
echo 'coverage dropped below ${{ env.MIN_CODE_COV }}%'
exit 1
fi
- name: crates/pg coverage report
run: |
make rust-coverage RUST_PKG=pg
echo "MIN_CODE_COV=$(yq .crates.pg.min_code_cov project.yaml)" >> $GITHUB_ENV
- name: fail crates/pg coverage under ${{ env.MIN_CODE_COV }}%
run: |
if [[ $(make rust-coverage-percent RUST_PKG=pg) -lt ${{ env.MIN_CODE_COV }} ]]; then
echo 'coverage dropped below ${{ env.MIN_CODE_COV }}%'
exit 1
fi
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"files.insertFinalNewline": false,
"files.trimFinalNewlines": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.workingDirectories": [
"./client",
Expand Down Expand Up @@ -78,5 +78,6 @@
"unused-export-let": "ignore",
"a11y-click-events-have-key-events": "ignore",
"a11y-no-noninteractive-tabindex": "ignore",
}
},
"editor.inlineSuggest.showToolbar": "onHover"
}
73 changes: 73 additions & 0 deletions Cargo.lock

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

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ encryption and replication are secondary
**q.** what is the equation?
**a.** *u* = transactions per second, *w<sub>i</sub>* = value conserved per transaction, *Mx!* = value visible in a combinatorial game

**q.** how does standardizing financial value as a conserved quantity protect individuals?
**a.** applying a conservation law to financial value protects producers and consumers from an abuse of government authority. when producers increase the [purchasing power](https://en.wikipedia.org/wiki/Information_content) of money by shipping useful r&d, consumer wealth increases. but government printing money, and government chartered "bankers" expecting money, are not the same types of events as producers shipping useful r&d. theyre not even the same types of events as producers shipping common goods and services. so when government authority is used to violate conservation by defining money as something you can just print, and [mix](https://en.wikipedia.org/wiki/Money_multiplier) with failing "bank" notes, the loss of information in money from these physically negative events steals away the purchasing power created by producers, the increased wealth of consumers, and the value of all property owned by individuals
government is not above failure, nor is it entitled to steal from the private sector to conceal its failure. improving government depends on failure [predicting](https://en.wikipedia.org/wiki/Time_travel_debugging) the individuals and laws that must be replaced. flying a flag and demanding loyalty before this step is just misdirection

**q.** will a government hosted payment app reduce my freedom?
**a.** the government can already see your transactions. systemaccounting empowers you to see the transactions of your government. access to the realtime financial performance of your government helps protect you from electing individuals who exploit money printing, price manipulation and the absence of accountability to systematize the cost of their failures to everyone else

Expand Down Expand Up @@ -169,7 +173,7 @@ encryption and replication are secondary
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) 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
* `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
* 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
Expand Down
7 changes: 5 additions & 2 deletions crates/pg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ bb8 = "0.8.0"
bb8-postgres = "0.8.1"
tokio = "1.26.0"
async-trait = "0.1.73"
tokio-postgres = {version = "0.7.7", features = ["with-chrono-0_4"]}
tokio-postgres = { version = "0.7.7", features = ["with-chrono-0_4"] }
types = { path = "../types" }
sqls = { path = "../sqls" }
sqls = { path = "../sqls" }

[dev-dependencies]
serial_test = "*"
Loading

0 comments on commit c0c4ebe

Please sign in to comment.