diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..616add2f3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,115 @@ +# Contributing to Neural-LAM + +Thank you for your interest in contributing to Neural-LAM! πŸŽ‰ + +We welcome contributions of all kinds, including bug fixes, documentation improvements, and new features. + +--- + +## πŸ› οΈ Getting Started + +### 1. Fork the repository +Click the "Fork" button on the top right of the repository page. + +### 2. Clone your fork +```bash +git clone https://github.com/YOUR_USERNAME/neural-lam.git +cd neural-lam +3. Create a new branch +git checkout -b your-branch-name +βš™οΈ Setup the development environment + +We recommend installing in editable mode with development dependencies: + +pip install --group dev -e . + +Or using uv: + +uv pip install --group dev -e . +βœ… Before making a PR + +Run pre-commit checks: + +pre-commit run --all-files + +Make sure: + +Code is formatted correctly + +No linting errors + +Tests pass + +πŸš€ Making a Pull Request + +Commit your changes: + +git add . +git commit -m "Your message" + +Push your branch: + +git push origin your-branch-name + +Open a Pull Request on GitHub + +πŸ’‘ Guidelines + +Keep PRs small and focused + +Write clear commit messages + +Link related issues (e.g., Fixes #123) + +Be respectful and collaborative + +πŸ™Œ Need Help? + +Feel free to open an issue or ask questions in the Slack channel. + +Happy coding! πŸš€ + + +--- + +## πŸ’Ύ Step 3: Commit + +```bash +git add CONTRIBUTING.md +git commit -m "Add CONTRIBUTING.md for new contributors (Fixes #406)" +git push +πŸš€ Step 4: Create PR +Title: +Add CONTRIBUTING.md to guide new contributors +Description: +Fixes #406 + +Added a CONTRIBUTING.md file to guide new contributors on how to set up the project, run checks, and submit pull requests. + +This improves onboarding and developer experience. +πŸ”₯ After this PR + +You will have: + +βœ… Docs fix (#465) + +βœ… Docs fix (#464) + +βœ… New file contribution (#406) + +πŸ‘‰ This is VERY strong for GSoC + +πŸš€ Next level (after this) + +Then we move to: + +small bug fix OR + +type hints PR + +Say: +πŸ‘‰ β€œdone #406” +or +πŸ‘‰ β€œerror while pushing” + +I’ll help instantly πŸ‘ \ No newline at end of file diff --git a/README.md b/README.md index 46a077b79..0d0a7ef0f 100644 --- a/README.md +++ b/README.md @@ -391,7 +391,7 @@ python -m neural_lam.datastore.npyfilesmeps.compute_standardization_stats --name multiscale` @@ -530,13 +530,13 @@ The structure is shown with examples below: ``` graphs β”œβ”€β”€ graph1 - Directory with a graph definition -β”‚ β”œβ”€β”€ m2m_edge_index.pt - Edges in mesh graph (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ g2m_edge_index.pt - Edges from grid to mesh (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ m2g_edge_index.pt - Edges from mesh to grid (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ m2m_features.pt - Static features of mesh edges (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ g2m_features.pt - Static features of grid to mesh edges (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ m2g_features.pt - Static features of mesh to grid edges (neural_lam.create_mesh) -β”‚ └── mesh_features.pt - Static features of mesh nodes (neural_lam.create_mesh) +β”‚ β”œβ”€β”€ m2m_edge_index.pt - Edges in mesh graph (neural_lam.create_graph) +β”‚ β”œβ”€β”€ g2m_edge_index.pt - Edges from grid to mesh (neural_lam.create_graph) +β”‚ β”œβ”€β”€ m2g_edge_index.pt - Edges from mesh to grid (neural_lam.create_graph) +β”‚ β”œβ”€β”€ m2m_features.pt - Static features of mesh edges (neural_lam.create_graph) +β”‚ β”œβ”€β”€ g2m_features.pt - Static features of grid to mesh edges (neural_lam.create_graph) +β”‚ β”œβ”€β”€ m2g_features.pt - Static features of mesh to grid edges (neural_lam.create_graph) +β”‚ └── mesh_features.pt - Static features of mesh nodes (neural_lam.create_graph) β”œβ”€β”€ graph2 β”œβ”€β”€ ... └── graphN @@ -546,9 +546,9 @@ graphs To keep track of levels in the mesh graph, a list format is used for the files with mesh graph information. In particular, the files ``` -β”‚ β”œβ”€β”€ m2m_edge_index.pt - Edges in mesh graph (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ m2m_features.pt - Static features of mesh edges (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ mesh_features.pt - Static features of mesh nodes (neural_lam.create_mesh) +β”‚ β”œβ”€β”€ m2m_edge_index.pt - Edges in mesh graph (neural_lam.create_graph) +β”‚ β”œβ”€β”€ m2m_features.pt - Static features of mesh edges (neural_lam.create_graph) +β”‚ β”œβ”€β”€ mesh_features.pt - Static features of mesh nodes (neural_lam.create_graph) ``` all contain lists of length `L`, for a hierarchical mesh graph with `L` layers. For non-hierarchical graphs `L == 1` and these are all just singly-entry lists. @@ -559,10 +559,10 @@ In addition, hierarchical mesh graphs (`L > 1`) feature a few additional files w ``` β”œβ”€β”€ graph1 β”‚ β”œβ”€β”€ ... -β”‚ β”œβ”€β”€ mesh_down_edge_index.pt - Downward edges in mesh graph (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ mesh_up_edge_index.pt - Upward edges in mesh graph (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ mesh_down_features.pt - Static features of downward mesh edges (neural_lam.create_mesh) -β”‚ β”œβ”€β”€ mesh_up_features.pt - Static features of upward mesh edges (neural_lam.create_mesh) +β”‚ β”œβ”€β”€ mesh_down_edge_index.pt - Downward edges in mesh graph (neural_lam.create_graph) +β”‚ β”œβ”€β”€ mesh_up_edge_index.pt - Upward edges in mesh graph (neural_lam.create_graph) +β”‚ β”œβ”€β”€ mesh_down_features.pt - Static features of downward mesh edges (neural_lam.create_graph) +β”‚ β”œβ”€β”€ mesh_up_features.pt - Static features of upward mesh edges (neural_lam.create_graph) β”‚ β”œβ”€β”€ ... ``` These files have the same list format as the ones above, but each list has length `L-1` (as these edges describe connections between levels).