Skip to content

Commit c6b85f4

Browse files
author
Alex K
committed
refactor: rename project from alphaquant-core to tinyframejs
- Update package.json with new name and description - Update README.md with new project structure and examples - Update all references in documentation - Configure CI/CD for the new repository name
1 parent 79f3605 commit c6b85f4

File tree

13 files changed

+610
-52
lines changed

13 files changed

+610
-52
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"changelog": [
3+
"@changesets/changelog",
4+
{ "repo": "AlphaQuantJS/tinyframejs" }
5+
],
6+
"commit": true,
7+
"access": "public",
8+
"baseBranch": "main"
9+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
const core = require('@actions/core');
2+
const github = require('@actions/github');
3+
const { exec } = require('child_process');
4+
5+
async function run() {
6+
try {
7+
// Get input parameters
8+
const openaiApiKey = core.getInput('openai_api_key', { required: true });
9+
const githubToken = core.getInput('github_token', { required: true });
10+
11+
// Get PR context
12+
const context = github.context;
13+
if (context.payload.pull_request) {
14+
const prNumber = context.payload.pull_request.number;
15+
const repo = context.repo.repo;
16+
const owner = context.repo.owner;
17+
18+
console.log(`Analyzing PR #${prNumber} in ${owner}/${repo}`);
19+
20+
// Set environment variables
21+
process.env.OPENAI_API_KEY = openaiApiKey;
22+
process.env.GITHUB_TOKEN = githubToken;
23+
24+
// Run PR analysis with OpenAI
25+
// eslint-disable-next-line max-len
26+
const command = `npx pr-codex review --pr ${prNumber} --repo ${owner}/${repo}`;
27+
28+
exec(command, (error, stdout, stderr) => {
29+
if (error) {
30+
core.setFailed(`PR Codex execution failed: ${error.message}`);
31+
return;
32+
}
33+
34+
if (stderr) {
35+
console.error(`PR Codex stderr: ${stderr}`);
36+
}
37+
38+
console.log(`PR Codex output: ${stdout}`);
39+
core.info('PR Codex analysis completed successfully');
40+
});
41+
} else {
42+
core.info('This action only works on pull requests');
43+
}
44+
} catch (error) {
45+
core.setFailed(`Action failed: ${error.message}`);
46+
}
47+
}
48+
49+
run();
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "pr-codex-local",
3+
"version": "1.0.0",
4+
"description": "Local action for PR Codex AI review",
5+
"main": "index.js",
6+
"dependencies": {
7+
"@actions/core": "^1.10.0",
8+
"@actions/github": "^5.1.1",
9+
"pr-codex": "^1.0.0"
10+
}
11+
}

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# .github/workflows/release.yml
2+
name: Release
3+
4+
# This workflow will only run when there are changes in the .changeset/ directory on main
5+
on:
6+
push:
7+
branches: [main]
8+
paths:
9+
- '.changeset/**'
10+
11+
permissions:
12+
contents: write # required for creating tags
13+
id-token: write
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
steps:
19+
# 1) Checkout the repository
20+
- uses: actions/checkout@v4
21+
22+
# 2) Set up Node.js and pnpm
23+
- name: Setup Node & pnpm
24+
uses: pnpm/action-setup@v2
25+
with:
26+
version: 8
27+
node-version: 20
28+
29+
# 3) Install dependencies
30+
- name: Install dependencies
31+
run: pnpm install --frozen-lockfile
32+
33+
# 4) Run the Changesets Action, which:
34+
# • bumps package versions based on changesets
35+
# • generates or updates CHANGELOG.md
36+
# • commits and tags the version bump
37+
# • publishes the package to npm
38+
- name: Bump & publish
39+
uses: changesets/action@v1
40+
with:
41+
publish: pnpm publish --access public
42+
env:
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,5 @@ coverage/
4848

4949

5050
TODO.md
51-
CONTEXT*
51+
#CONTEXT*
5252
CODING_GUIDELINES.ru.md
53-
TZ.md
54-
/packages/core/benchmark/
55-
56-
/packages/core/OPTIMASATION_PLAN.md
57-
/packages/core/RELEASE_CHECKLIST.md
58-
/packages/core/__benchmarks__/

CODING_GUIDELINES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# 📏 AlphaQuant Coding Guidelines
1+
# 📏 TinyFrame Coding Guidelines
22

3-
This document outlines the **best practices** for writing high-performance, accurate, and maintainable JavaScript code in the context of **quantitative finance**. It is intended for contributors to the AlphaQuant project, which runs on **Node.js** and in the **browser** (V8 engine).
3+
This document outlines the **best practices** for writing high-performance, accurate, and maintainable JavaScript code in the context of **data processing**. It is intended for contributors to the TinyFrame project, which runs on **Node.js** and in the **browser** (V8 engine).
44

55
## ⚡ Performance Recommendations
66

@@ -438,4 +438,4 @@ Write code that is:
438438
- **Modular** — clear separation of responsibilities
439439
- **Predictable** — easy for V8 to generate optimized machine code
440440

441-
Thank you for keeping AlphaQuant fast and reliable ⚡
441+
Thank you for keeping TinyFrame fast and reliable ⚡

0 commit comments

Comments
 (0)