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

JST-576 - Update the frontmatter output #646

Closed
wants to merge 13 commits into from
Closed
2 changes: 1 addition & 1 deletion .docs/summary-generator.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function prepareDocAnchor(docsDir, type, file) {
logStream.write(`---
title: golem-js API reference overview
description: Dive into the content overview of the Golem-JS API reference.
type: reference
type: JS API Reference
---
`);

Expand Down
7 changes: 4 additions & 3 deletions .docs/typedoc-frontmatter-theme.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ class ModifiedHugoTheme extends HugoTheme {

onHugoPageEnd(page) {
const yamlVars = {
title: `${typedoc.ReflectionKind[page.model.kind]} ${this.getPageTitle(page)} - golem-js API Reference`,
title: `${typedoc.ReflectionKind[page.model.kind]} ${this.getPageTitle(page)}`,
pageTitle: `${typedoc.ReflectionKind[page.model.kind]} ${this.getPageTitle(page)} - golem-js API Reference`,
description: `Explore the detailed API reference documentation for the ${
typedoc.ReflectionKind[page.model.kind]
} ${this.getPageTitle(page)} within the golem-js SDK for the Golem Network.`,
type: "reference",
type: "JS API Reference",
};
page.contents && (page.contents = this.prependYAML(page.contents, yamlVars));
}
Expand All @@ -31,7 +32,7 @@ class ModifiedHugoTheme extends HugoTheme {
return (
"---\n" +
Object.entries(yamlVars)
.map(([key, value]) => `${key}: "${value}"`)
.map(([key, value]) => `${key}: ${value}`)
.join("\n") +
"\n---\n" +
contents
Expand Down
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
target-branch: "beta"
schedule:
interval: "weekly"
6 changes: 3 additions & 3 deletions .github/workflows/cypress-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
uses: actions/checkout@v3

- name: Use random string for subnet
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: echo "YAGNA_SUBNET=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '')" >> $GITHUB_ENV

- name: Build the docker containers
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: docker compose -f tests/docker/docker-compose.yml build

- name: Start the docker containers
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: docker compose -f tests/docker/docker-compose.yml down && docker compose -f tests/docker/docker-compose.yml up -d
# Restart docker to avoid issues with the docker compose down due to improper cleanup of the previous run.
run: sudo service docker restart && docker compose -f tests/docker/docker-compose.yml down && docker compose -f tests/docker/docker-compose.yml up -d

- name: Fund the requestor
# Use a funding script which will retry funding the requestor 3 times, else it exits with error. The faucet is not reliable and sometimes fails to fund the requestor, thus the retry.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/examples-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
uses: actions/checkout@v3

- name: Use random string for subnet
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: echo "YAGNA_SUBNET=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '')" >> $GITHUB_ENV

- name: Build the docker containers
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: docker compose -f tests/docker/docker-compose.yml build

- name: Start the docker containers
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: docker compose -f tests/docker/docker-compose.yml down && docker compose -f tests/docker/docker-compose.yml up -d
# Restart docker to avoid issues with the docker compose down due to improper cleanup of the previous run.
run: sudo service docker restart && docker compose -f tests/docker/docker-compose.yml down && docker compose -f tests/docker/docker-compose.yml up -d

- name: Fund the requestor
# Use a funding script which will retry funding the requestor 3 times, else it exits with error. The faucet is not reliable and sometimes fails to fund the requestor, thus the retry.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/goth-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
uses: actions/checkout@v3

- name: Use random string for subnet
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: echo "YAGNA_SUBNET=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '')" >> $GITHUB_ENV

- name: Build the docker containers
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: docker compose -f tests/docker/docker-compose.yml build

- name: Start the docker containers
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: docker compose -f tests/docker/docker-compose.yml down && docker compose -f tests/docker/docker-compose.yml up -d
# Restart docker to avoid issues with the docker compose down due to improper cleanup of the previous run.
run: sudo service docker restart && docker compose -f tests/docker/docker-compose.yml down && docker compose -f tests/docker/docker-compose.yml up -d

- name: Fund the requestor
# Use a funding script which will retry funding the requestor 3 times, else it exits with error. The faucet is not reliable and sometimes fails to fund the requestor, thus the retry.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ jobs:
uses: actions/checkout@v3

- name: Use random string for subnet
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: echo "YAGNA_SUBNET=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '')" >> $GITHUB_ENV

- name: Build the docker containers
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: docker compose -f tests/docker/docker-compose.yml build

- name: Start the docker containers
# Use a random string to avoid other providers on the same subnet which might cause tests to fail because it expects only providers named provider-1 and provider-2
run: docker compose -f tests/docker/docker-compose.yml down && docker compose -f tests/docker/docker-compose.yml up -d
# Restart docker to avoid issues with the docker compose down due to improper cleanup of the previous run.
run: sudo service docker restart && docker compose -f tests/docker/docker-compose.yml down && docker compose -f tests/docker/docker-compose.yml up -d

- name: Fund the requestor
# Use a funding script which will retry funding the requestor 3 times, else it exits with error. The faucet is not reliable and sometimes fails to fund the requestor, thus the retry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const myFilter = async (proposal) => {
let counterIdx = usageVector.findIndex((ele) => ele === "golem.usage.duration_sec");
let proposedCost = proposal.properties["golem.com.pricing.model.linear.coeffs"][counterIdx];
costData.push(proposedCost);
if (costData.length < 11) return false;
if (costData.length < 6) return false;
else {
costData.shift();
let averageProposedCost = costData.reduce((part, x) => part + x, 0) / 10;
let averageProposedCost = costData.reduce((part, x) => part + x, 0) / 5;
if (proposedCost <= 1.2 * averageProposedCost) decision = true;
if (decision) {
console.log(proposedCost, averageProposedCost);
Expand Down
Loading