Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
696 changes: 328 additions & 368 deletions .flox/env/manifest.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

> Working on the project 💡

The **Code of Conduct** for **pocketsizefund** is to work collaboratively and publicly. Contact the project maintainers via [Discord](https://discord.com/channels/1230911601704435752/1230911601704435755) with questions or concerns.
The **Code of Conduct** for **pocketsizefund** is to follow the [project principles](https://github.com/pocketsizefund/pocketsizefund?tab=readme-ov-file#principles). [Contact the project maintainers](https://x.com/pocketsizefund) with questions or concerns.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

> Working on the code 💻

The **Contributing** guidelines for **pocketsizefund** are to write tested and self-documenting code adhering to language guidelines. Contact the project maintainer via [Discord](https://discord.com/channels/1230911601704435752/1230911601704435755) with any questions.
The **Contributing** guidelines for **pocketsizefund** are to write code that passes all project checks. [Contact the project maintainers](https://x.com/pocketsizefund) with questions or concerns.
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

> Securing the platform 🔒

The **Security** guidelines for **pocketsizefund** are to contact the project maintainers via [Discord](https://discord.com/channels/1230911601704435752/1230911601704435755) with any vulnerabilities or issues.
The **Security** guidelines for **pocketsizefund** are to [contact the project maintainers](https://x.com/pocketsizefund) with questions or concerns.
11 changes: 2 additions & 9 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ uvx vulture \
[tasks."python:lint"]
depends = ["python:dead-code"]
description = "Run Python code quality checks"
# temporarily commented out ty check due to hanging failure
run = """
ruff check \
--output-format=github \
.
uvx ty check
# uvx ty check
"""

[tasks."python:test"]
Expand Down Expand Up @@ -83,11 +84,3 @@ run = """
nu linter.nu
yamllint -d "{extends: relaxed, rules: {line-length: {max: 110}}}" .
"""

[tasks."infrastructure:up"]
description = "launch cloud infrastructure"
run = """
cd infrastructure
uv run pulumi up --yes
nu ping.nu
"""
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,4 @@ An unordered and non-exhaustive list we work towards:

### Links

Here are some places to get started:

1. [Our tasks](https://github.com/orgs/pocketsizefund/projects/11) that we're currently working on
2. [Open a discussion](https://discord.com/channels/1230911601704435752/1230911601704435755) to ask questions or share ideas
3. [Send a direct message](https://twitter.com/pocketsizefund) on everything else
Check out [our tasks](https://github.com/orgs/pocketsizefund/projects/11) to see what we're working on or ping [either](https://x.com/forstmeier) of [us](https://x.com/hyperpriorai) for anything else.
Empty file removed infrastructure/.gitkeep
Empty file.
18 changes: 17 additions & 1 deletion infrastructure/buckets.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,26 @@


storage.BucketIAMMember(
"platform-object-admin-access",
"platform-object-administrator-access",
bucket=production_data_bucket.name,
role="roles/storage.objectAdmin",
member=project.platform_service_account.email.apply(
lambda e: f"serviceAccount:{e}"
),
)
Comment thread
forstmeier marked this conversation as resolved.

grafana_dashboards_bucket = storage.Bucket(
"grafana-dashboards-bucket",
name=config.require_secret("grafana_dashboards_bucket_name"),
location=project.REGION,
uniform_bucket_level_access=True,
)

storage.BucketIAMMember(
"grafana-dashboards-bucket-object-administrator-access",
bucket=grafana_dashboards_bucket.name,
role="roles/storage.objectAdmin",
member=project.platform_service_account.email.apply(
lambda e: f"serviceAccount:{e}"
),
)
17 changes: 9 additions & 8 deletions infrastructure/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from pulumi.config import Config
from pulumi_gcp import cloudrun, secretmanager, storage

config = Config()
configuration = Config()

grafana_administrator_password = config.require_secret("GRAFANA_ADMIN_PASSWORD")
grafana_administrator_password = configuration.require_secret("GRAFANA_ADMIN_PASSWORD")

grafana_administrator_password_secret = secretmanager.Secret(
"grafana-administrator-password",
Expand All @@ -28,7 +28,7 @@
secret_data=grafana_administrator_password,
)

prometheus_config = """
prometheus_configuration = """
global:
scrape_interval: 30s

Expand All @@ -42,9 +42,9 @@
"""

prometheus_config_object = storage.BucketObject(
"prometheus-config",
"prometheus-configuration",
Comment thread
forstmeier marked this conversation as resolved.
bucket=buckets.grafana_dashboards_bucket.name,
content=prometheus_config,
content=prometheus_configuration,
content_type="text/yaml",
name="prometheus.yaml",
)
Expand All @@ -67,7 +67,7 @@
),
volume_mounts=[
cloudrun.ServiceTemplateSpecContainerVolumeMountArgs(
name="prometheus-config-volume",
name="prometheus-configuration-volume",
mount_path="/etc/prometheus",
),
],
Expand All @@ -80,7 +80,7 @@
],
volumes=[
cloudrun.ServiceTemplateSpecVolumeArgs(
name="prometheus-config-volume",
name="prometheus-configuration-volume",
csi=cloudrun.ServiceTemplateSpecVolumeCsiArgs(
driver="gcsfuse.run.app",
read_only=True,
Expand All @@ -91,7 +91,8 @@
),
),
cloudrun.ServiceTemplateSpecVolumeArgs(
name="prometheus-data", empty_dir={}
name="prometheus-data",
empty_dir=cloudrun.ServiceTemplateSpecVolumeEmptyDirArgs(),
),
],
),
Expand Down
Loading