docs: overhaul READMEs for new monorepo architecture#10
Conversation
astro-fusion
commented
Jan 3, 2026
- 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
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| const planets = calculatePlanets(new Date()); | ||
| return Response.json({ planets }); | ||
| console.log(planets); | ||
| } |
| console.log(PLANETS.SUN.id); // 0 | ||
| console.log(normalizeLongitude(370)); // 10 | ||
| ``` |
There was a problem hiding this comment.
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).
| 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) |
| async function calculate() { | ||
| const sweph = await createSweph(); | ||
| const planets = sweph.calculatePlanets(new Date()); | ||
| console.log(planets); | ||
| } |
There was a problem hiding this comment.
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.
| 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(); |
| async function calculate() { | ||
| const sweph = await createSweph(); | ||
| const planets = sweph.calculatePlanets(new Date()); | ||
| console.log(planets); | ||
| } |
There was a problem hiding this comment.
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.
| 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(); |
| async function calculate() { | ||
| const sweph = await createSweph(); | ||
| const planets = sweph.calculatePlanets(new Date()); | ||
| console.log(planets); | ||
| } |
There was a problem hiding this comment.
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.
| 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(); |