Skip to content

docs: overhaul READMEs for new monorepo architecture#10

Merged
astro-fusion merged 2 commits intomainfrom
dev
Jan 3, 2026
Merged

docs: overhaul READMEs for new monorepo architecture#10
astro-fusion merged 2 commits intomainfrom
dev

Conversation

@astro-fusion
Copy link
Copy Markdown
Owner

  • Update root README.md with unified multi-platform overview
  • Create package-specific READMEs for core, node, wasm, and react-native
  • Include usage examples for each package
  • Refine implementation plan and walkthrough

- Update root README.md with unified multi-platform overview
- Create package-specific READMEs for core, node, wasm, and react-native
- Include usage examples for each package
- Refine implementation plan and walkthrough
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @astro-fusion, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly updates the project's documentation to align with its new monorepo structure. The main goal is to provide clear, platform-specific guidance for users of the @af/sweph library, which now offers optimized implementations for Node.js, browsers (WASM), and React Native, all while maintaining a unified API. This overhaul enhances developer experience by making it easier to understand and integrate the library across various environments.

Highlights

  • Monorepo Documentation Overhaul: The primary README.md has been completely rewritten to reflect the new monorepo architecture, providing a unified overview of the multi-platform library.
  • Package-Specific READMEs: New README.md files have been added for each sub-package (@af/sweph-core, @af/sweph-node, @af/sweph-wasm, @af/sweph-react-native), detailing their specific features, installation, and usage.
  • Unified API Emphasis: The documentation now highlights the consistent ISwephInstance API across all platforms, simplifying development.
  • Improved Error Messaging: A minor but notable change in packages/node/dist/utils.js refines an error message for swe_azalt call failures.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the @AstroFusion/sweph library into a monorepo, introducing new packages: @af/sweph-core for shared logic, @af/sweph-node for Node.js/serverless environments, @af/sweph-wasm for browser-based WebAssembly, and @af/sweph-react-native for React Native using Turbo Modules and JSI. The main README.md was completely rewritten to reflect this new architecture, providing a high-level overview and a unified API quick start, while new README.md files were added for each sub-package detailing their specific features and installation. A minor code change in packages/node/dist/utils.js updated an error message for swe_azalt calls. Review comments primarily focused on improving the clarity and runnability of code examples in the README.md files by suggesting that example functions be explicitly invoked and adding a descriptive comment for the normalizeLongitude utility function.

Comment thread README.md
const planets = calculatePlanets(new Date());
return Response.json({ planets });
console.log(planets);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The run function in the example is defined but never called. To make the code snippet fully runnable and easier for users to test, it's a good practice to invoke the function.

Suggested change
}
}
run();

Comment thread packages/core/README.md
Comment on lines +22 to +24
console.log(PLANETS.SUN.id); // 0
console.log(normalizeLongitude(370)); // 10
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example code is great for showing what the package provides. To make it even more illustrative for a user copying and pasting, you could add a comment explaining the output of normalizeLongitude(370).

Suggested change
console.log(PLANETS.SUN.id); // 0
console.log(normalizeLongitude(370)); // 10
```
console.log(PLANETS.SUN.id); // 0
console.log(normalizeLongitude(370)); // 10 (370 degrees is normalized to 10 degrees)

Comment thread packages/node/README.md
Comment on lines +22 to +26
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The calculate function in the example is defined but never called. To make the code snippet fully runnable and easier for users to test, it's a good practice to invoke the function.

Suggested change
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
calculate();

Comment on lines +22 to +26
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The calculate function in the example is defined but never called. To make the code snippet fully runnable and easier for users to test, it's a good practice to invoke the function.

Suggested change
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
calculate();

Comment thread packages/wasm/README.md
Comment on lines +22 to +26
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The calculate function in the example is defined but never called. To make the code snippet fully runnable and easier for users to test, it's a good practice to invoke the function.

Suggested change
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
async function calculate() {
const sweph = await createSweph();
const planets = sweph.calculatePlanets(new Date());
console.log(planets);
}
calculate();

@astro-fusion astro-fusion merged commit 655668e into main Jan 3, 2026
4 checks passed
@astro-fusion astro-fusion deleted the dev branch January 3, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants