ai-impact-accounting 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ai_impact_accounting-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +49 -0
- ai_impact_accounting-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- ai_impact_accounting-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +52 -0
- ai_impact_accounting-0.1.0/.github/dependabot.yml +17 -0
- ai_impact_accounting-0.1.0/.github/pull_request_template.md +53 -0
- ai_impact_accounting-0.1.0/.github/workflows/code_checks.yml +69 -0
- ai_impact_accounting-0.1.0/.github/workflows/crawl.yml +60 -0
- ai_impact_accounting-0.1.0/.github/workflows/docs.yml.disabled +64 -0
- ai_impact_accounting-0.1.0/.github/workflows/integration_tests.yml +72 -0
- ai_impact_accounting-0.1.0/.github/workflows/publish.yml +56 -0
- ai_impact_accounting-0.1.0/.github/workflows/unit_tests.yml +70 -0
- ai_impact_accounting-0.1.0/.gitignore +96 -0
- ai_impact_accounting-0.1.0/.pre-commit-config.yaml +88 -0
- ai_impact_accounting-0.1.0/.python-version +1 -0
- ai_impact_accounting-0.1.0/CODE_OF_CONDUCT.md +128 -0
- ai_impact_accounting-0.1.0/CONTRIBUTING.md +56 -0
- ai_impact_accounting-0.1.0/LAB.md +359 -0
- ai_impact_accounting-0.1.0/LICENSE.md +201 -0
- ai_impact_accounting-0.1.0/PKG-INFO +302 -0
- ai_impact_accounting-0.1.0/README.md +250 -0
- ai_impact_accounting-0.1.0/codecov.yml +19 -0
- ai_impact_accounting-0.1.0/docs/assets/VectorLogo_Black.png +0 -0
- ai_impact_accounting-0.1.0/docs/assets/favicon.png +0 -0
- ai_impact_accounting-0.1.0/docs/assets/fig1-ecosystem.png +0 -0
- ai_impact_accounting-0.1.0/docs/assets/fig2-dia.png +0 -0
- ai_impact_accounting-0.1.0/docs/index.html +693 -0
- ai_impact_accounting-0.1.0/docs/main.js +632 -0
- ai_impact_accounting-0.1.0/docs/style.css +1053 -0
- ai_impact_accounting-0.1.0/mkdocs.yml +83 -0
- ai_impact_accounting-0.1.0/pyproject.toml +230 -0
- ai_impact_accounting-0.1.0/scripts/crawl.py +84 -0
- ai_impact_accounting-0.1.0/scripts/deploy_space.py +114 -0
- ai_impact_accounting-0.1.0/scripts/dia_finalize.py +88 -0
- ai_impact_accounting-0.1.0/scripts/distill_sst2.py +119 -0
- ai_impact_accounting-0.1.0/scripts/generate_synthetic_state.py +164 -0
- ai_impact_accounting-0.1.0/scripts/ingest_all.py +109 -0
- ai_impact_accounting-0.1.0/scripts/ingest_local_cards.py +169 -0
- ai_impact_accounting-0.1.0/scripts/reset_lab.py +135 -0
- ai_impact_accounting-0.1.0/scripts/run_doctests.py +48 -0
- ai_impact_accounting-0.1.0/scripts/run_local.sh +32 -0
- ai_impact_accounting-0.1.0/scripts/train_bert_demo.py +111 -0
- ai_impact_accounting-0.1.0/scripts/train_ddpm_mnist.py +173 -0
- ai_impact_accounting-0.1.0/scripts/train_llama_lora.py +163 -0
- ai_impact_accounting-0.1.0/scripts/train_qwen_lora.py +153 -0
- ai_impact_accounting-0.1.0/scripts/train_resnet50_cifar.py +239 -0
- ai_impact_accounting-0.1.0/scripts/train_simclr_cifar.py +170 -0
- ai_impact_accounting-0.1.0/scripts/update_cards.py +306 -0
- ai_impact_accounting-0.1.0/scripts/view_local.py +73 -0
- ai_impact_accounting-0.1.0/space/Dockerfile +28 -0
- ai_impact_accounting-0.1.0/space/README.md +24 -0
- ai_impact_accounting-0.1.0/space/app.py +51 -0
- ai_impact_accounting-0.1.0/space/requirements.txt +8 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/__init__.py +50 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/__init__.py +6 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/api.py +694 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/app.py +75 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/atlas.py +551 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/server.py +161 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/static/app.css +963 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/static/app.js +1479 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/static/assets/VectorLogo_Black.png +0 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/dashboard/static/index.html +244 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/graph.py +196 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/hub/__init__.py +17 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/hub/crawl.py +166 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/hub/ingest.py +88 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/hub/local_store.py +48 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/hub/store.py +250 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/models.py +211 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/parse.py +486 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/producer/__init__.py +6 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/producer/cli.py +100 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/producer/tracking.py +466 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/py.typed +0 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/schema/__init__.py +1 -0
- ai_impact_accounting-0.1.0/src/ai_impact_accounting/schema/dia_schema.json +78 -0
- ai_impact_accounting-0.1.0/tests/__init__.py +1 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/__init__.py +1 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_api.py +128 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_atlas.py +156 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_cli.py +51 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_graph.py +88 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_hub_integration.py +20 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_hub_lookup.py +104 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_import.py +8 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_models.py +30 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_parse.py +153 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_producer.py +129 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_store.py +48 -0
- ai_impact_accounting-0.1.0/tests/ai_impact_accounting/test_synthetic_state.py +54 -0
- ai_impact_accounting-0.1.0/tests/conftest.py +14 -0
- ai_impact_accounting-0.1.0/tests/fixtures/synth-100-state.json +1449 -0
- ai_impact_accounting-0.1.0/tests/test_dia_finalize.py +163 -0
- ai_impact_accounting-0.1.0/uv.lock +4806 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 🐛 Bug Report
|
|
3
|
+
about: Report a bug to help us improve the project
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: 'bug'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Bug Description
|
|
11
|
+
|
|
12
|
+
<!-- A clear and concise description of what the bug is -->
|
|
13
|
+
|
|
14
|
+
## Steps to Reproduce
|
|
15
|
+
|
|
16
|
+
1.
|
|
17
|
+
2.
|
|
18
|
+
3.
|
|
19
|
+
|
|
20
|
+
**Code snippet (if applicable):**
|
|
21
|
+
```python
|
|
22
|
+
# Your code here
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Expected Behavior
|
|
26
|
+
|
|
27
|
+
<!-- A clear description of what you expected to happen -->
|
|
28
|
+
|
|
29
|
+
## Actual Behavior
|
|
30
|
+
|
|
31
|
+
<!-- A clear description of what actually happened -->
|
|
32
|
+
|
|
33
|
+
## Environment
|
|
34
|
+
|
|
35
|
+
- **Component:** [API | Core functionality | Any]
|
|
36
|
+
- **OS:** [Windows | MacOS | Linux]
|
|
37
|
+
- **Python Version:**
|
|
38
|
+
|
|
39
|
+
## Screenshots/Logs
|
|
40
|
+
|
|
41
|
+
<!-- If applicable, add screenshots or error logs -->
|
|
42
|
+
|
|
43
|
+
## Additional Context
|
|
44
|
+
|
|
45
|
+
<!-- Add any other context about the problem here -->
|
|
46
|
+
|
|
47
|
+
## Possible Solution
|
|
48
|
+
|
|
49
|
+
<!-- If you have suggestions on how to fix the bug, please describe them here -->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: 💬 Discussion
|
|
4
|
+
url: https://github.com/VectorInstitute/ai-impact-accounting/discussions
|
|
5
|
+
about: Ask questions or discuss ideas with the community
|
|
6
|
+
- name: 📖 Documentation
|
|
7
|
+
url: https://github.com/VectorInstitute/ai-impact-accounting#readme
|
|
8
|
+
about: Check the documentation for setup and usage guides
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ✨ Feature Request
|
|
3
|
+
about: Suggest a new feature or enhancement
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: 'enhancement'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Problem Statement
|
|
11
|
+
|
|
12
|
+
<!-- Is your feature request related to a problem? Describe the problem or use case -->
|
|
13
|
+
|
|
14
|
+
## Proposed Solution
|
|
15
|
+
|
|
16
|
+
<!-- A clear description of what you want to happen -->
|
|
17
|
+
|
|
18
|
+
## Alternative Solutions
|
|
19
|
+
|
|
20
|
+
<!-- Describe any alternative solutions or features you've considered -->
|
|
21
|
+
|
|
22
|
+
## Use Cases
|
|
23
|
+
|
|
24
|
+
<!-- Describe specific use cases where this feature would be valuable -->
|
|
25
|
+
-
|
|
26
|
+
-
|
|
27
|
+
-
|
|
28
|
+
|
|
29
|
+
## Implementation Ideas
|
|
30
|
+
|
|
31
|
+
<!-- If you have ideas about how this could be implemented, describe them here -->
|
|
32
|
+
|
|
33
|
+
## Component Impact
|
|
34
|
+
|
|
35
|
+
<!-- Which parts of the system would this feature affect? -->
|
|
36
|
+
- [ ] API
|
|
37
|
+
- [ ] Core functionality
|
|
38
|
+
- [ ] Docker/Infrastructure
|
|
39
|
+
- [ ] Documentation
|
|
40
|
+
- [ ] Any other part of the system
|
|
41
|
+
|
|
42
|
+
## Additional Context
|
|
43
|
+
|
|
44
|
+
<!-- Add any other context, mockups, or screenshots about the feature request here -->
|
|
45
|
+
|
|
46
|
+
## Priority
|
|
47
|
+
|
|
48
|
+
<!-- How important is this feature to you? -->
|
|
49
|
+
- [ ] Nice to have
|
|
50
|
+
- [ ] Would be helpful
|
|
51
|
+
- [ ] Important for my use case
|
|
52
|
+
- [ ] Critical/blocking
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "github-actions"
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "daily"
|
|
12
|
+
|
|
13
|
+
# Keep uv dependencies (uv.lock) up to date
|
|
14
|
+
- package-ecosystem: "uv"
|
|
15
|
+
directory: "/" # where pyproject.toml and uv.lock live
|
|
16
|
+
schedule:
|
|
17
|
+
interval: "daily"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- Provide a brief description of what this PR does -->
|
|
4
|
+
|
|
5
|
+
Clickup Ticket(s): Link(s) if applicable.
|
|
6
|
+
|
|
7
|
+
## Type of Change
|
|
8
|
+
|
|
9
|
+
- [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
|
|
10
|
+
- [ ] ✨ New feature (non-breaking change that adds functionality)
|
|
11
|
+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
12
|
+
- [ ] 📝 Documentation update
|
|
13
|
+
- [ ] 🔧 Refactoring (no functional changes)
|
|
14
|
+
- [ ] ⚡ Performance improvement
|
|
15
|
+
- [ ] 🧪 Test improvements
|
|
16
|
+
- [ ] 🔒 Security fix
|
|
17
|
+
|
|
18
|
+
## Changes Made
|
|
19
|
+
|
|
20
|
+
<!-- List the main changes made in this PR -->
|
|
21
|
+
-
|
|
22
|
+
-
|
|
23
|
+
-
|
|
24
|
+
|
|
25
|
+
## Testing
|
|
26
|
+
|
|
27
|
+
<!-- Describe how you tested these changes -->
|
|
28
|
+
- [ ] Tests pass locally (`uv run pytest tests/`)
|
|
29
|
+
- [ ] Type checking passes (`uv run mypy <src_dir>`)
|
|
30
|
+
- [ ] Linting passes (`uv run ruff check src_dir/`)
|
|
31
|
+
- [ ] Manual testing performed (describe below)
|
|
32
|
+
|
|
33
|
+
**Manual testing details:**
|
|
34
|
+
<!-- Describe any manual testing performed -->
|
|
35
|
+
|
|
36
|
+
## Screenshots/Recordings
|
|
37
|
+
|
|
38
|
+
<!-- If applicable, add screenshots or recordings to demonstrate the changes -->
|
|
39
|
+
|
|
40
|
+
## Related Issues
|
|
41
|
+
|
|
42
|
+
<!-- Link any related issues using "Closes #123" or "Relates to #123" -->
|
|
43
|
+
|
|
44
|
+
## Deployment Notes
|
|
45
|
+
|
|
46
|
+
<!-- Any special deployment considerations or migration steps -->
|
|
47
|
+
|
|
48
|
+
## Checklist
|
|
49
|
+
|
|
50
|
+
- [ ] Code follows the project's style guidelines
|
|
51
|
+
- [ ] Self-review of code completed
|
|
52
|
+
- [ ] Documentation updated (if applicable)
|
|
53
|
+
- [ ] No sensitive information (API keys, credentials) exposed
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: code checks
|
|
2
|
+
permissions:
|
|
3
|
+
contents: read
|
|
4
|
+
pull-requests: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
- dia-code
|
|
11
|
+
paths:
|
|
12
|
+
- .pre-commit-config.yaml
|
|
13
|
+
- .github/workflows/**
|
|
14
|
+
- .gitignore
|
|
15
|
+
- codecov.yml
|
|
16
|
+
- scripts/**
|
|
17
|
+
- src/**
|
|
18
|
+
- tests/**
|
|
19
|
+
- uv.lock
|
|
20
|
+
- pyproject.toml
|
|
21
|
+
- '**.ipynb'
|
|
22
|
+
pull_request:
|
|
23
|
+
branches:
|
|
24
|
+
- main
|
|
25
|
+
- dia-code
|
|
26
|
+
paths:
|
|
27
|
+
- .pre-commit-config.yaml
|
|
28
|
+
- .github/workflows/**
|
|
29
|
+
- .gitignore
|
|
30
|
+
- codecov.yml
|
|
31
|
+
- scripts/**
|
|
32
|
+
- src/**
|
|
33
|
+
- tests/**
|
|
34
|
+
- uv.lock
|
|
35
|
+
- pyproject.toml
|
|
36
|
+
- '**.ipynb'
|
|
37
|
+
workflow_dispatch:
|
|
38
|
+
|
|
39
|
+
jobs:
|
|
40
|
+
run-code-check:
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v7.0.0
|
|
44
|
+
|
|
45
|
+
- name: Install uv
|
|
46
|
+
uses: astral-sh/setup-uv@v8.2.0
|
|
47
|
+
with:
|
|
48
|
+
version: "0.9.11"
|
|
49
|
+
enable-cache: true
|
|
50
|
+
|
|
51
|
+
- name: Set up Python
|
|
52
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
|
|
53
|
+
with:
|
|
54
|
+
python-version-file: ".python-version"
|
|
55
|
+
|
|
56
|
+
- name: Install the project
|
|
57
|
+
run: uv sync --all-extras --dev
|
|
58
|
+
|
|
59
|
+
- name: Run pre-commit
|
|
60
|
+
run: |
|
|
61
|
+
source .venv/bin/activate
|
|
62
|
+
pre-commit run --all-files
|
|
63
|
+
|
|
64
|
+
- name: pip-audit (gh-action-pip-audit)
|
|
65
|
+
uses: pypa/gh-action-pip-audit@v1.1.0
|
|
66
|
+
with:
|
|
67
|
+
virtual-environment: .venv/
|
|
68
|
+
ignore-vulns: |
|
|
69
|
+
GHSA-4xh5-x5gv-qwph
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: nightly crawl
|
|
2
|
+
|
|
3
|
+
# Pull-path backfill: index everything the team's orgs publish (DIA_ORGS) and,
|
|
4
|
+
# optionally, third-party derivatives of tracked bases (DIA_BASES); ingest into
|
|
5
|
+
# the DIA dataset and restart the Space. Runs on a schedule (independent of the
|
|
6
|
+
# Space's sleep/rebuild lifecycle).
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: "0 7 * * *" # 07:00 UTC daily
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
inputs:
|
|
13
|
+
dataset:
|
|
14
|
+
description: "DIA_DATASET repo id"
|
|
15
|
+
required: false
|
|
16
|
+
orgs:
|
|
17
|
+
description: "Comma-separated orgs/users to index"
|
|
18
|
+
required: false
|
|
19
|
+
bases:
|
|
20
|
+
description: "Comma-separated base model ids (external derivatives)"
|
|
21
|
+
required: false
|
|
22
|
+
space:
|
|
23
|
+
description: "Space id to restart after crawl (optional)"
|
|
24
|
+
required: false
|
|
25
|
+
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
|
|
29
|
+
concurrency:
|
|
30
|
+
group: dia-nightly-crawl
|
|
31
|
+
cancel-in-progress: false
|
|
32
|
+
|
|
33
|
+
jobs:
|
|
34
|
+
crawl:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v7.0.0
|
|
38
|
+
|
|
39
|
+
- name: Set up Python
|
|
40
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
|
|
41
|
+
with:
|
|
42
|
+
python-version: "3.12"
|
|
43
|
+
|
|
44
|
+
# Light install: the crawl path needs only the Hub client + graph libs,
|
|
45
|
+
# not torch/transformers, so install the package without its heavy deps.
|
|
46
|
+
- name: Install light dependencies
|
|
47
|
+
run: |
|
|
48
|
+
python -m pip install --upgrade pip
|
|
49
|
+
pip install --no-deps -e .
|
|
50
|
+
pip install "huggingface_hub>=1.2,<2" "networkx>=3.0" "pyyaml>=6.0"
|
|
51
|
+
|
|
52
|
+
- name: Crawl, ingest, and refresh the Space
|
|
53
|
+
env:
|
|
54
|
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
55
|
+
DIA_DATASET: ${{ github.event.inputs.dataset || vars.DIA_DATASET || 'DIA-MVP/dia-state-lab-2026' }}
|
|
56
|
+
DIA_ORGS: ${{ github.event.inputs.orgs || vars.DIA_ORGS }}
|
|
57
|
+
DIA_BASES: ${{ github.event.inputs.bases || vars.DIA_BASES }}
|
|
58
|
+
# Optional: restart this Space after the crawl so it reloads the dataset.
|
|
59
|
+
DIA_SPACE: ${{ github.event.inputs.space || vars.DIA_SPACE }}
|
|
60
|
+
run: python scripts/crawl.py
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
permissions:
|
|
3
|
+
contents: read
|
|
4
|
+
pull-requests: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
- dia-code
|
|
11
|
+
paths:
|
|
12
|
+
- .pre-commit-config.yaml
|
|
13
|
+
- .github/workflows/docs.yml
|
|
14
|
+
- '**.py'
|
|
15
|
+
- '**.ipynb'
|
|
16
|
+
- '**.html'
|
|
17
|
+
- '**.js'
|
|
18
|
+
- '**.md'
|
|
19
|
+
- uv.lock
|
|
20
|
+
- pyproject.toml
|
|
21
|
+
- mkdocs.yml
|
|
22
|
+
- '**.png'
|
|
23
|
+
- '**.svg'
|
|
24
|
+
pull_request:
|
|
25
|
+
branches:
|
|
26
|
+
- main
|
|
27
|
+
- dia-code
|
|
28
|
+
paths:
|
|
29
|
+
- .pre-commit-config.yaml
|
|
30
|
+
- .github/workflows/docs.yml
|
|
31
|
+
- '**.py'
|
|
32
|
+
- '**.ipynb'
|
|
33
|
+
- '**.js'
|
|
34
|
+
- '**.html'
|
|
35
|
+
- uv.lock
|
|
36
|
+
- pyproject.toml
|
|
37
|
+
- '**.md'
|
|
38
|
+
- mkdocs.yml
|
|
39
|
+
- '**.png'
|
|
40
|
+
- '**.svg'
|
|
41
|
+
|
|
42
|
+
jobs:
|
|
43
|
+
build:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- name: Checkout code
|
|
47
|
+
uses: actions/checkout@v7.0.0
|
|
48
|
+
|
|
49
|
+
- name: Install uv
|
|
50
|
+
uses: astral-sh/setup-uv@v8.2.0
|
|
51
|
+
with:
|
|
52
|
+
version: "0.9.11"
|
|
53
|
+
enable-cache: true
|
|
54
|
+
|
|
55
|
+
- name: Set up Python
|
|
56
|
+
uses: actions/setup-python@v6.2.0
|
|
57
|
+
with:
|
|
58
|
+
python-version-file: ".python-version"
|
|
59
|
+
|
|
60
|
+
- name: Install the project
|
|
61
|
+
run: uv sync --all-extras --group docs
|
|
62
|
+
|
|
63
|
+
- name: Build docs
|
|
64
|
+
run: uv run mkdocs build
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: integration tests
|
|
2
|
+
permissions:
|
|
3
|
+
contents: read
|
|
4
|
+
pull-requests: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
- dia-code
|
|
11
|
+
paths:
|
|
12
|
+
- .pre-commit-config.yaml
|
|
13
|
+
- .github/workflows/**
|
|
14
|
+
- scripts/**
|
|
15
|
+
- src/**
|
|
16
|
+
- tests/**
|
|
17
|
+
- uv.lock
|
|
18
|
+
- pyproject.toml
|
|
19
|
+
- codecov.yml
|
|
20
|
+
- '**.ipynb'
|
|
21
|
+
- '**.rst'
|
|
22
|
+
- '**.md'
|
|
23
|
+
pull_request:
|
|
24
|
+
branches:
|
|
25
|
+
- main
|
|
26
|
+
- dia-code
|
|
27
|
+
paths:
|
|
28
|
+
- .pre-commit-config.yaml
|
|
29
|
+
- .github/workflows/**
|
|
30
|
+
- scripts/**
|
|
31
|
+
- src/**
|
|
32
|
+
- tests/**
|
|
33
|
+
- uv.lock
|
|
34
|
+
- pyproject.toml
|
|
35
|
+
- codecov.yml
|
|
36
|
+
- '**.ipynb'
|
|
37
|
+
- '**.rst'
|
|
38
|
+
- '**.md'
|
|
39
|
+
workflow_dispatch:
|
|
40
|
+
|
|
41
|
+
jobs:
|
|
42
|
+
integration-tests:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
env:
|
|
45
|
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v7.0.0
|
|
48
|
+
|
|
49
|
+
- name: Install uv
|
|
50
|
+
uses: astral-sh/setup-uv@v8.2.0
|
|
51
|
+
with:
|
|
52
|
+
version: "0.9.11"
|
|
53
|
+
enable-cache: true
|
|
54
|
+
|
|
55
|
+
- name: Set up Python
|
|
56
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
|
|
57
|
+
with:
|
|
58
|
+
python-version-file: ".python-version"
|
|
59
|
+
|
|
60
|
+
- name: Install the project
|
|
61
|
+
run: uv sync --all-extras --dev
|
|
62
|
+
|
|
63
|
+
- name: Run integration tests
|
|
64
|
+
run: uv run pytest -m "integration_test" --cov src/ai_impact_accounting --cov-report=xml tests
|
|
65
|
+
|
|
66
|
+
- name: Upload coverage to Codecov
|
|
67
|
+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f
|
|
68
|
+
with:
|
|
69
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
70
|
+
slug: VectorInstitute/ai-impact-accounting
|
|
71
|
+
fail_ci_if_error: false
|
|
72
|
+
verbose: true
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: publish package
|
|
2
|
+
permissions:
|
|
3
|
+
contents: read
|
|
4
|
+
pull-requests: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- "v*"
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
deploy:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment: pypi
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write
|
|
17
|
+
steps:
|
|
18
|
+
- name: Install apt dependencies
|
|
19
|
+
run: |
|
|
20
|
+
sudo apt-get update
|
|
21
|
+
sudo apt-get install libcurl4-openssl-dev libssl-dev
|
|
22
|
+
- uses: actions/checkout@v7.0.0
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v8.2.0
|
|
26
|
+
with:
|
|
27
|
+
# Install a specific version of uv.
|
|
28
|
+
version: "0.9.11"
|
|
29
|
+
enable-cache: true
|
|
30
|
+
|
|
31
|
+
- name: "Set up Python"
|
|
32
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
|
|
33
|
+
with:
|
|
34
|
+
python-version-file: ".python-version"
|
|
35
|
+
|
|
36
|
+
- name: Install the project
|
|
37
|
+
run: uv sync --all-extras --dev
|
|
38
|
+
|
|
39
|
+
- name: Build package
|
|
40
|
+
run: uv build
|
|
41
|
+
|
|
42
|
+
- name: Publish package
|
|
43
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
|
|
44
|
+
|
|
45
|
+
release_github:
|
|
46
|
+
needs: deploy
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
permissions:
|
|
49
|
+
contents: write # To create a github release
|
|
50
|
+
steps:
|
|
51
|
+
- name: Create GitHub Release
|
|
52
|
+
id: create_release
|
|
53
|
+
uses: ncipollo/release-action@v1.21.0
|
|
54
|
+
with:
|
|
55
|
+
artifacts: "dist/*"
|
|
56
|
+
generateReleaseNotes: true
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: unit tests
|
|
2
|
+
permissions:
|
|
3
|
+
contents: read
|
|
4
|
+
pull-requests: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
- dia-code
|
|
11
|
+
paths:
|
|
12
|
+
- .pre-commit-config.yaml
|
|
13
|
+
- .github/workflows/**
|
|
14
|
+
- scripts/**
|
|
15
|
+
- src/**
|
|
16
|
+
- tests/**
|
|
17
|
+
- uv.lock
|
|
18
|
+
- pyproject.toml
|
|
19
|
+
- codecov.yml
|
|
20
|
+
- '**.ipynb'
|
|
21
|
+
- '**.rst'
|
|
22
|
+
- '**.md'
|
|
23
|
+
pull_request:
|
|
24
|
+
branches:
|
|
25
|
+
- main
|
|
26
|
+
- dia-code
|
|
27
|
+
paths:
|
|
28
|
+
- .pre-commit-config.yaml
|
|
29
|
+
- .github/workflows/**
|
|
30
|
+
- scripts/**
|
|
31
|
+
- src/**
|
|
32
|
+
- tests/**
|
|
33
|
+
- uv.lock
|
|
34
|
+
- pyproject.toml
|
|
35
|
+
- codecov.yml
|
|
36
|
+
- '**.ipynb'
|
|
37
|
+
- '**.rst'
|
|
38
|
+
- '**.md'
|
|
39
|
+
workflow_dispatch:
|
|
40
|
+
|
|
41
|
+
jobs:
|
|
42
|
+
unit-tests:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v7.0.0
|
|
46
|
+
|
|
47
|
+
- name: Install uv
|
|
48
|
+
uses: astral-sh/setup-uv@v8.2.0
|
|
49
|
+
with:
|
|
50
|
+
version: "0.9.11"
|
|
51
|
+
enable-cache: true
|
|
52
|
+
|
|
53
|
+
- name: Set up Python
|
|
54
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
|
|
55
|
+
with:
|
|
56
|
+
python-version-file: ".python-version"
|
|
57
|
+
|
|
58
|
+
- name: Install the project
|
|
59
|
+
run: uv sync --all-extras --dev
|
|
60
|
+
|
|
61
|
+
- name: Run unit tests
|
|
62
|
+
run: uv run pytest -m "not integration_test" --cov src/ai_impact_accounting --cov-report=xml tests
|
|
63
|
+
|
|
64
|
+
- name: Upload coverage to Codecov
|
|
65
|
+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f
|
|
66
|
+
with:
|
|
67
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
68
|
+
slug: VectorInstitute/ai-impact-accounting
|
|
69
|
+
fail_ci_if_error: false
|
|
70
|
+
verbose: true
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
env/
|
|
13
|
+
|
|
14
|
+
# Lint, typecheck, and test artifacts
|
|
15
|
+
.mypy_cache/
|
|
16
|
+
.pytest_cache/
|
|
17
|
+
.ruff_cache/
|
|
18
|
+
.coverage
|
|
19
|
+
.coverage.*
|
|
20
|
+
coverage.xml
|
|
21
|
+
coverage.json
|
|
22
|
+
htmlcov/
|
|
23
|
+
.tox/
|
|
24
|
+
.nox/
|
|
25
|
+
|
|
26
|
+
# IDE / editor
|
|
27
|
+
.vscode/
|
|
28
|
+
.idea/
|
|
29
|
+
*.swp
|
|
30
|
+
*.swo
|
|
31
|
+
*~
|
|
32
|
+
|
|
33
|
+
# macOS
|
|
34
|
+
*.DS_Store
|
|
35
|
+
|
|
36
|
+
# Docs build
|
|
37
|
+
site/
|
|
38
|
+
|
|
39
|
+
# Training / demo artifacts (weights, checkpoints, downloaded datasets)
|
|
40
|
+
out-*/
|
|
41
|
+
checkpoint-*/
|
|
42
|
+
checkpoints/
|
|
43
|
+
runs/
|
|
44
|
+
wandb/
|
|
45
|
+
*.safetensors
|
|
46
|
+
*.bin
|
|
47
|
+
*.pt
|
|
48
|
+
*.pth
|
|
49
|
+
*.ckpt
|
|
50
|
+
*.h5
|
|
51
|
+
*.onnx
|
|
52
|
+
*.npz
|
|
53
|
+
|
|
54
|
+
# CodeCarbon / power measurement outputs
|
|
55
|
+
powermetrics_log.txt
|
|
56
|
+
emissions.csv
|
|
57
|
+
emissions/
|
|
58
|
+
codecarbon*.log
|
|
59
|
+
carbon*.csv
|
|
60
|
+
*.log
|
|
61
|
+
|
|
62
|
+
# Gradio / local dashboard temp files
|
|
63
|
+
.gradio/
|
|
64
|
+
|
|
65
|
+
# Secrets and credentials (never commit tokens, keys, or local env files)
|
|
66
|
+
.env
|
|
67
|
+
.env.*
|
|
68
|
+
!.env.example
|
|
69
|
+
.envrc
|
|
70
|
+
.netrc
|
|
71
|
+
*.pem
|
|
72
|
+
*.key
|
|
73
|
+
*.p12
|
|
74
|
+
*.pfx
|
|
75
|
+
credentials.json
|
|
76
|
+
secrets.json
|
|
77
|
+
**/secrets/
|
|
78
|
+
token
|
|
79
|
+
token.json
|
|
80
|
+
hf_token
|
|
81
|
+
hf_token.txt
|
|
82
|
+
*_token.txt
|
|
83
|
+
*.secret
|
|
84
|
+
|
|
85
|
+
# Hugging Face / model-hub local cache (login tokens live under ~/.cache too)
|
|
86
|
+
.huggingface/
|
|
87
|
+
.cache/huggingface/
|
|
88
|
+
**/.cache/huggingface/
|
|
89
|
+
|
|
90
|
+
# Jupyter
|
|
91
|
+
.ipynb_checkpoints/
|
|
92
|
+
|
|
93
|
+
# Local databases / sqlite state
|
|
94
|
+
*.sqlite
|
|
95
|
+
*.sqlite3
|
|
96
|
+
*.db
|