fundamental-client 0.2.3__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.
- fundamental_client-0.2.3/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- fundamental_client-0.2.3/.github/ISSUE_TEMPLATE/config.yml +8 -0
- fundamental_client-0.2.3/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
- fundamental_client-0.2.3/.github/dependabot.yml +10 -0
- fundamental_client-0.2.3/.github/labeler.yml +16 -0
- fundamental_client-0.2.3/.github/settings.yml +88 -0
- fundamental_client-0.2.3/.github/workflows/ci.yml +63 -0
- fundamental_client-0.2.3/.github/workflows/e2e-pr-comment.yml +24 -0
- fundamental_client-0.2.3/.github/workflows/integration-tests.yml +37 -0
- fundamental_client-0.2.3/.github/workflows/labeler.yml +19 -0
- fundamental_client-0.2.3/.github/workflows/pr-name-validation.yml +27 -0
- fundamental_client-0.2.3/.github/workflows/publish-codeartifact-dev.yml +62 -0
- fundamental_client-0.2.3/.github/workflows/publish-codeartifact.yml +51 -0
- fundamental_client-0.2.3/.github/workflows/publish-pypi.yml +37 -0
- fundamental_client-0.2.3/.github/workflows/publish-testpypi.yml +38 -0
- fundamental_client-0.2.3/.github/workflows/release-please.yml +32 -0
- fundamental_client-0.2.3/.gitignore +157 -0
- fundamental_client-0.2.3/.pre-commit-config.yaml +47 -0
- fundamental_client-0.2.3/.release-please-manifest.json +3 -0
- fundamental_client-0.2.3/.yamllint +5 -0
- fundamental_client-0.2.3/CHANGELOG.md +97 -0
- fundamental_client-0.2.3/CODEOWNERS +1 -0
- fundamental_client-0.2.3/CONTRIBUTING.md +74 -0
- fundamental_client-0.2.3/LICENSE +201 -0
- fundamental_client-0.2.3/PKG-INFO +241 -0
- fundamental_client-0.2.3/README.md +510 -0
- fundamental_client-0.2.3/noxfile.py +35 -0
- fundamental_client-0.2.3/pyproject.toml +136 -0
- fundamental_client-0.2.3/release-please-config.json +19 -0
- fundamental_client-0.2.3/scripts/bootstrap +20 -0
- fundamental_client-0.2.3/scripts/format +10 -0
- fundamental_client-0.2.3/scripts/generate-models +32 -0
- fundamental_client-0.2.3/scripts/integration-tests +8 -0
- fundamental_client-0.2.3/scripts/lint +15 -0
- fundamental_client-0.2.3/scripts/test +8 -0
- fundamental_client-0.2.3/scripts/unit-tests +8 -0
- fundamental_client-0.2.3/src/fundamental/__init__.py +34 -0
- fundamental_client-0.2.3/src/fundamental/clients/__init__.py +7 -0
- fundamental_client-0.2.3/src/fundamental/clients/base.py +37 -0
- fundamental_client-0.2.3/src/fundamental/clients/ec2.py +37 -0
- fundamental_client-0.2.3/src/fundamental/clients/fundamental.py +20 -0
- fundamental_client-0.2.3/src/fundamental/config.py +138 -0
- fundamental_client-0.2.3/src/fundamental/constants.py +41 -0
- fundamental_client-0.2.3/src/fundamental/deprecated.py +43 -0
- fundamental_client-0.2.3/src/fundamental/estimator/__init__.py +16 -0
- fundamental_client-0.2.3/src/fundamental/estimator/base.py +263 -0
- fundamental_client-0.2.3/src/fundamental/estimator/classification.py +46 -0
- fundamental_client-0.2.3/src/fundamental/estimator/nexus_estimator.py +120 -0
- fundamental_client-0.2.3/src/fundamental/estimator/regression.py +22 -0
- fundamental_client-0.2.3/src/fundamental/exceptions.py +78 -0
- fundamental_client-0.2.3/src/fundamental/models/__init__.py +4 -0
- fundamental_client-0.2.3/src/fundamental/models/generated.py +431 -0
- fundamental_client-0.2.3/src/fundamental/services/__init__.py +25 -0
- fundamental_client-0.2.3/src/fundamental/services/feature_importance.py +172 -0
- fundamental_client-0.2.3/src/fundamental/services/inference.py +283 -0
- fundamental_client-0.2.3/src/fundamental/services/models.py +186 -0
- fundamental_client-0.2.3/src/fundamental/utils/__init__.py +0 -0
- fundamental_client-0.2.3/src/fundamental/utils/data.py +437 -0
- fundamental_client-0.2.3/src/fundamental/utils/http.py +294 -0
- fundamental_client-0.2.3/src/fundamental/utils/polling.py +97 -0
- fundamental_client-0.2.3/src/fundamental/utils/safetensors_deserialize.py +98 -0
- fundamental_client-0.2.3/tests/conftest.py +137 -0
- fundamental_client-0.2.3/tests/integration/__init__.py +0 -0
- fundamental_client-0.2.3/tests/integration/test_classification.py +57 -0
- fundamental_client-0.2.3/tests/integration/test_regression.py +55 -0
- fundamental_client-0.2.3/tests/unit/__init__.py +0 -0
- fundamental_client-0.2.3/tests/unit/conftest.py +13 -0
- fundamental_client-0.2.3/tests/unit/test_backward_compatibility.py +42 -0
- fundamental_client-0.2.3/tests/unit/test_config.py +97 -0
- fundamental_client-0.2.3/tests/unit/test_data_utils.py +131 -0
- fundamental_client-0.2.3/tests/unit/test_estimators.py +396 -0
- fundamental_client-0.2.3/tests/unit/test_safetensors_deserialize.py +155 -0
- fundamental_client-0.2.3/tests/unit/test_sklearn_compliance.py +122 -0
- fundamental_client-0.2.3/uv.lock +1690 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report a bug encountered while using NEXUS client SDK
|
|
4
|
+
labels: 'bug'
|
|
5
|
+
assignees: ''
|
|
6
|
+
---
|
|
7
|
+
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
|
|
8
|
+
|
|
9
|
+
If the matter is security related, please disclose it privately via https://kubernetes.io/security/
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
**Bug Description**:
|
|
13
|
+
|
|
14
|
+
**Expected Behavior**:
|
|
15
|
+
|
|
16
|
+
**Steps to Reproduce**:
|
|
17
|
+
|
|
18
|
+
**Environment**:
|
|
19
|
+
- `fundamental-client` Version:
|
|
20
|
+
- Python Version:
|
|
21
|
+
- OS (e.g: `cat /etc/os-release`)::
|
|
22
|
+
|
|
23
|
+
**Dependencies**:
|
|
24
|
+
- pandas==
|
|
25
|
+
- numpy==
|
|
26
|
+
- scikit-learn==
|
|
27
|
+
- httpx==
|
|
28
|
+
- pydantic==
|
|
29
|
+
- pyarrow==
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: true
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Documentation
|
|
4
|
+
url: https://fundamental.tech/docs
|
|
5
|
+
about: Check our documentation for usage examples and API reference
|
|
6
|
+
- name: Security Issue
|
|
7
|
+
url: security@fundamental.tech
|
|
8
|
+
about: Please report security vulnerabilities via email
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest a new feature or enhancement for the NEXUS Client SDK
|
|
4
|
+
labels: 'enhancement'
|
|
5
|
+
assignees: ''
|
|
6
|
+
---
|
|
7
|
+
<!-- Please use this template while requesting a feature and provide as much info as possible. This helps us understand and prioritize your request. Thanks!
|
|
8
|
+
|
|
9
|
+
For questions or discussions, please use GitHub Discussions instead of creating an issue.
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
**What would you like to be added**:
|
|
13
|
+
|
|
14
|
+
**Why is this needed**:
|
|
15
|
+
|
|
16
|
+
**Completion requirements**:
|
|
17
|
+
|
|
18
|
+
This enhancement requires the following artifacts:
|
|
19
|
+
|
|
20
|
+
- [ ] Design doc
|
|
21
|
+
- [ ] API change
|
|
22
|
+
- [ ] Docs update
|
|
23
|
+
|
|
24
|
+
The artifacts should be linked in subsequent comments.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
feature:
|
|
2
|
+
- head-branch: ["^feat", "feat:", "feat/", "feature/"]
|
|
3
|
+
|
|
4
|
+
fix:
|
|
5
|
+
- head-branch: ["^fix", "fix:", "fix/", "bugfix/", "hotfix/"]
|
|
6
|
+
|
|
7
|
+
docs:
|
|
8
|
+
- head-branch: ["^docs", "docs:", "docs/"]
|
|
9
|
+
- changed-files:
|
|
10
|
+
- any-glob-to-any-file: "**/*.md"
|
|
11
|
+
|
|
12
|
+
ci:
|
|
13
|
+
- head-branch: ["^ci", "ci:", "ci/"]
|
|
14
|
+
- changed-files:
|
|
15
|
+
- any-glob-to-any-file:
|
|
16
|
+
- .github/*
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
repository:
|
|
2
|
+
# Repository settings
|
|
3
|
+
description: "Scikit-learn–compatible client SDK for NEXUS, Fundamental's large model for tabular data"
|
|
4
|
+
homepage: https://fundamental.tech
|
|
5
|
+
topics:
|
|
6
|
+
- python
|
|
7
|
+
- machine-learning
|
|
8
|
+
- scikit-learn
|
|
9
|
+
- tabular-data
|
|
10
|
+
- nexus
|
|
11
|
+
|
|
12
|
+
# Repository features
|
|
13
|
+
private: true
|
|
14
|
+
has_issues: true
|
|
15
|
+
has_projects: false
|
|
16
|
+
has_wiki: false
|
|
17
|
+
has_discussions: true
|
|
18
|
+
has_downloads: true
|
|
19
|
+
archived: false
|
|
20
|
+
is_template: false
|
|
21
|
+
|
|
22
|
+
# Security settings
|
|
23
|
+
enable_automated_security_fixes: true
|
|
24
|
+
enable_vulnerability_alerts: true
|
|
25
|
+
|
|
26
|
+
# Pages
|
|
27
|
+
enable_pages: false
|
|
28
|
+
|
|
29
|
+
# Merge settings
|
|
30
|
+
allow_squash_merge: true
|
|
31
|
+
allow_merge_commit: false
|
|
32
|
+
allow_rebase_merge: false
|
|
33
|
+
allow_auto_merge: true
|
|
34
|
+
delete_branch_on_merge: true
|
|
35
|
+
allow_update_branch: true
|
|
36
|
+
use_squash_pr_title_as_default: true
|
|
37
|
+
|
|
38
|
+
# Default branch
|
|
39
|
+
default_branch: main
|
|
40
|
+
|
|
41
|
+
# Branch protection rules
|
|
42
|
+
branches:
|
|
43
|
+
- name: main
|
|
44
|
+
protection:
|
|
45
|
+
# Require pull request reviews
|
|
46
|
+
required_pull_request_reviews:
|
|
47
|
+
required_approving_review_count: 1
|
|
48
|
+
dismiss_stale_reviews: true
|
|
49
|
+
require_code_owner_reviews: true
|
|
50
|
+
require_last_push_approval: true
|
|
51
|
+
|
|
52
|
+
# Require status checks
|
|
53
|
+
required_status_checks:
|
|
54
|
+
strict: true # Require branches to be up to date
|
|
55
|
+
contexts:
|
|
56
|
+
- "pr-linting"
|
|
57
|
+
- "lint"
|
|
58
|
+
- "build"
|
|
59
|
+
- "test"
|
|
60
|
+
|
|
61
|
+
# Restrictions
|
|
62
|
+
enforce_admins: true
|
|
63
|
+
allow_force_pushes: false
|
|
64
|
+
allow_deletions: false
|
|
65
|
+
block_creations: false
|
|
66
|
+
required_linear_history: true
|
|
67
|
+
required_conversation_resolution: true
|
|
68
|
+
required_signatures: false # Set to true if you want to require GPG signed commits
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Labels for issue and PR management
|
|
72
|
+
labels:
|
|
73
|
+
# Type labels
|
|
74
|
+
- name: "feature"
|
|
75
|
+
color: "0e8a16"
|
|
76
|
+
description: "New feature or request"
|
|
77
|
+
|
|
78
|
+
- name: "fix"
|
|
79
|
+
color: "d73a4a"
|
|
80
|
+
description: "Bug fix"
|
|
81
|
+
|
|
82
|
+
- name: "docs"
|
|
83
|
+
color: "0075ca"
|
|
84
|
+
description: "Documentation improvements"
|
|
85
|
+
|
|
86
|
+
- name: "ci"
|
|
87
|
+
color: "f9d0c4"
|
|
88
|
+
description: "CI/CD related changes"
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: CI
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
lint:
|
|
9
|
+
timeout-minutes: 10
|
|
10
|
+
name: lint
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v6
|
|
14
|
+
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v7
|
|
17
|
+
with:
|
|
18
|
+
version: "0.8.11"
|
|
19
|
+
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: uv sync --all-extras
|
|
22
|
+
|
|
23
|
+
- name: Run lints
|
|
24
|
+
run: ./scripts/lint
|
|
25
|
+
|
|
26
|
+
build:
|
|
27
|
+
timeout-minutes: 10
|
|
28
|
+
name: build
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
id-token: write
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v6
|
|
35
|
+
|
|
36
|
+
- name: Install uv
|
|
37
|
+
uses: astral-sh/setup-uv@v7
|
|
38
|
+
with:
|
|
39
|
+
version: "0.8.11"
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: uv sync --all-extras
|
|
43
|
+
|
|
44
|
+
- name: Run build
|
|
45
|
+
run: uv build
|
|
46
|
+
|
|
47
|
+
test:
|
|
48
|
+
timeout-minutes: 30
|
|
49
|
+
name: test
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v6
|
|
53
|
+
|
|
54
|
+
- name: Install uv
|
|
55
|
+
uses: astral-sh/setup-uv@v7
|
|
56
|
+
with:
|
|
57
|
+
version: "0.8.11"
|
|
58
|
+
|
|
59
|
+
- name: Install dependencies
|
|
60
|
+
run: uv sync --all-extras
|
|
61
|
+
|
|
62
|
+
- name: Run unit tests
|
|
63
|
+
run: ./scripts/unit-tests
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: E2E Tests (PR Comment Trigger)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issue_comment:
|
|
5
|
+
types: [created, edited]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
contents: read
|
|
10
|
+
pull-requests: write
|
|
11
|
+
statuses: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
e2e:
|
|
15
|
+
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/e2e')
|
|
16
|
+
uses: Fundamental-Technologies/infra-gh-workflows/.github/workflows/e2e-pr-comment-trigger.yml@main
|
|
17
|
+
with:
|
|
18
|
+
comment_body: ${{ github.event.comment.body }}
|
|
19
|
+
issue_number: ${{ github.event.issue.number }}
|
|
20
|
+
secrets:
|
|
21
|
+
FUNDAMENTAL_API_KEY: ${{ secrets.FUNDAMENTAL_API_KEY }}
|
|
22
|
+
FUNDAMENTAL_PROD_API_KEY: ${{ secrets.FUNDAMENTAL_PROD_API_KEY }}
|
|
23
|
+
GH_APP_ID: ${{ secrets.GH_APP_ID }}
|
|
24
|
+
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: Integration Tests
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
issue_comment:
|
|
10
|
+
types: [created]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
integration-tests:
|
|
14
|
+
name: Integration Tests
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
if: >
|
|
17
|
+
github.event_name == 'push' ||
|
|
18
|
+
(github.event.issue.pull_request && contains(github.event.comment.body, '/integration-tests'))
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v6
|
|
22
|
+
with:
|
|
23
|
+
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || github.ref }}
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@v7
|
|
27
|
+
with:
|
|
28
|
+
version: "0.8.11"
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: uv sync --all-extras
|
|
32
|
+
|
|
33
|
+
- name: Run integration tests
|
|
34
|
+
run: ./scripts/integration-tests
|
|
35
|
+
env:
|
|
36
|
+
FUNDAMENTAL_API_KEY: ${{ secrets.FUNDAMENTAL_API_KEY }}
|
|
37
|
+
FUNDAMENTAL_API_URL: ${{ secrets.FUNDAMENTAL_API_URL }}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: "Pull Request Labeler"
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
pull_request_target:
|
|
7
|
+
types: [opened, edited, reopened, synchronize]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
labeler:
|
|
11
|
+
name: Label Pull Requests
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
pull-requests: write
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/labeler@v5
|
|
18
|
+
with:
|
|
19
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: pr-name-validation
|
|
4
|
+
concurrency:
|
|
5
|
+
group: PR-Name-Validation-${{ github.head_ref }}
|
|
6
|
+
cancel-in-progress: true
|
|
7
|
+
on:
|
|
8
|
+
pull_request_target:
|
|
9
|
+
types:
|
|
10
|
+
- edited
|
|
11
|
+
- opened
|
|
12
|
+
- reopened
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
pr-name-validation:
|
|
16
|
+
name: PR Name Validation
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
timeout-minutes: 1
|
|
19
|
+
permissions:
|
|
20
|
+
pull-requests: read
|
|
21
|
+
steps:
|
|
22
|
+
- name: Semantic pull-request
|
|
23
|
+
uses: amannn/action-semantic-pull-request@v6.0.1
|
|
24
|
+
with:
|
|
25
|
+
requireScope: false
|
|
26
|
+
env:
|
|
27
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: Publish to CodeArtifact (Dev)
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches-ignore:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
publish:
|
|
16
|
+
name: Build & Publish Dev Version
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
|
|
22
|
+
- name: Get version info
|
|
23
|
+
id: version
|
|
24
|
+
run: |
|
|
25
|
+
# Get base version from pyproject.toml (first 'version = ' occurrence)
|
|
26
|
+
BASE_VERSION=$(grep -m1 '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
|
27
|
+
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
|
28
|
+
# Dev version format: X.Y.Z.dev0+hash
|
|
29
|
+
DEV_VERSION="${BASE_VERSION}.dev0+${SHORT_SHA}"
|
|
30
|
+
echo "dev_version=$DEV_VERSION" >> $GITHUB_OUTPUT
|
|
31
|
+
echo "Base version: $BASE_VERSION"
|
|
32
|
+
echo "Dev version: $DEV_VERSION"
|
|
33
|
+
|
|
34
|
+
- name: Update version in pyproject.toml
|
|
35
|
+
run: |
|
|
36
|
+
sed -i "s/^version = .*/version = \"${{ steps.version.outputs.dev_version }}\"/" pyproject.toml
|
|
37
|
+
|
|
38
|
+
- name: Setup Python
|
|
39
|
+
uses: actions/setup-python@v6
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.12"
|
|
42
|
+
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@v7
|
|
45
|
+
|
|
46
|
+
- name: Build package
|
|
47
|
+
run: uv build
|
|
48
|
+
|
|
49
|
+
- name: Configure AWS Credentials
|
|
50
|
+
uses: aws-actions/configure-aws-credentials@v5
|
|
51
|
+
with:
|
|
52
|
+
role-to-assume: ${{ vars.AWS_ROLE_TO_ASSUME }}
|
|
53
|
+
aws-region: ${{ vars.AWS_REGION }}
|
|
54
|
+
|
|
55
|
+
- name: Install twine
|
|
56
|
+
run: pip install twine
|
|
57
|
+
|
|
58
|
+
- name: Publish to CodeArtifact
|
|
59
|
+
run: |
|
|
60
|
+
aws codeartifact login --tool twine --repository ${{ vars.CODEARTIFACT_PYTHON_REPOSITORY }} --domain ${{ vars.CODEARTIFACT_DOMAIN }} --region ${{ vars.CODEARTIFACT_AWS_REGION }}
|
|
61
|
+
twine upload --repository codeartifact dist/*
|
|
62
|
+
echo "Published version ${{ steps.version.outputs.dev_version }} to CodeArtifact"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: Publish to CodeArtifact
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
publish:
|
|
15
|
+
name: Publish to CodeArtifact
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@v6
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v6
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: python -m pip install build twine packaging
|
|
31
|
+
|
|
32
|
+
- name: Build package
|
|
33
|
+
run: python -m build .
|
|
34
|
+
|
|
35
|
+
- name: Get package info
|
|
36
|
+
id: get_local_info
|
|
37
|
+
run: |
|
|
38
|
+
PACKAGE_FILE=$(basename dist/*.tar.gz)
|
|
39
|
+
echo "PACKAGE_VERSION=$(echo $PACKAGE_FILE | cut -d'-' -f2 | cut -d'.' -f1-3)" >> "$GITHUB_OUTPUT"
|
|
40
|
+
|
|
41
|
+
- name: Configure AWS Credentials
|
|
42
|
+
uses: aws-actions/configure-aws-credentials@v5
|
|
43
|
+
with:
|
|
44
|
+
role-to-assume: ${{ vars.AWS_ROLE_TO_ASSUME }}
|
|
45
|
+
aws-region: ${{ vars.AWS_REGION }}
|
|
46
|
+
|
|
47
|
+
- name: Publish Package to CodeArtifact
|
|
48
|
+
run: |
|
|
49
|
+
aws codeartifact login --tool twine --repository ${{ vars.CODEARTIFACT_PYTHON_REPOSITORY }} --domain ${{ vars.CODEARTIFACT_DOMAIN }} --region ${{ vars.CODEARTIFACT_AWS_REGION }}
|
|
50
|
+
twine upload --repository codeartifact dist/*
|
|
51
|
+
echo "Successfully published version ${{ steps.get_local_info.outputs.PACKAGE_VERSION }} to CodeArtifact."
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: Publish to PyPI
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish-to-pypi:
|
|
11
|
+
name: Publish to PyPI
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
id-token: write
|
|
17
|
+
environment:
|
|
18
|
+
name: pypi
|
|
19
|
+
url: https://pypi.org/p/fundamental-client
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v7
|
|
28
|
+
with:
|
|
29
|
+
version: "0.8.11"
|
|
30
|
+
|
|
31
|
+
- name: Build package
|
|
32
|
+
run: uv build
|
|
33
|
+
|
|
34
|
+
- name: Publish to PyPI
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
36
|
+
with:
|
|
37
|
+
verbose: true
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: Publish to TestPyPI
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish-to-testpypi:
|
|
11
|
+
name: Publish to TestPyPI
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
id-token: write
|
|
17
|
+
environment:
|
|
18
|
+
name: testpypi
|
|
19
|
+
url: https://test.pypi.org/p/fundamental-client
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v7
|
|
28
|
+
with:
|
|
29
|
+
version: "0.8.11"
|
|
30
|
+
|
|
31
|
+
- name: Build package
|
|
32
|
+
run: uv build
|
|
33
|
+
|
|
34
|
+
- name: Publish to TestPyPI
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
36
|
+
with:
|
|
37
|
+
repository-url: https://test.pypi.org/legacy/
|
|
38
|
+
verbose: true
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
2
|
+
|
|
3
|
+
name: Release Please
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
release:
|
|
16
|
+
name: Release Please
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Generate GitHub App Token
|
|
21
|
+
id: app-token
|
|
22
|
+
uses: actions/create-github-app-token@v2
|
|
23
|
+
with:
|
|
24
|
+
app-id: ${{ secrets.APP_ID }}
|
|
25
|
+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
26
|
+
|
|
27
|
+
- uses: googleapis/release-please-action@v4
|
|
28
|
+
id: release
|
|
29
|
+
with:
|
|
30
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
31
|
+
config-file: release-please-config.json
|
|
32
|
+
manifest-file: .release-please-manifest.json
|