diff --git a/contributing/pull_request/index.html b/contributing/pull_request/index.html index baf2935..f01b603 100644 --- a/contributing/pull_request/index.html +++ b/contributing/pull_request/index.html @@ -1047,17 +1047,40 @@

PR Description Template

Note: To submit a PR:

    -
  1. Fork and branch: +
  2. +

    Fork and branch:

    git checkout -b feature/your-feature-name  # Use descriptive branch names
    -
  3. -
  4. Make changes and commit: -
    git commit -m "[TYPE] Brief description"  # Be clear and concise
    -
  5. -
  6. Push and set upstream: +

    +
  7. +
  8. +

    Stage changes and commit: +

    git add .
    +git commit -m "[TYPE] Brief description"  # Be clear and concise
    +

    +
  9. +
  10. +

    Push and set upstream:

    git push -u origin feature/your-feature-name  # -u links local and remote branches
    -
  11. -
  12. Open PR on Coho repository
  13. -
  14. Add title, description, and related issues
  15. +

    + +
  16. +

    Open PR on Coho repository

    +
  17. +
  18. +

    Add title, description, and related issues

    +
  19. +
  20. +

    (optional) Clean up branches after merge: +

    # Delete local branch
    +git branch -d feature/your-feature-name
    +
    +# Delete remote branch
    +git push origin --delete feature/your-feature-name
    +
    +# Clean up stale remote references
    +git fetch --prune
    +

    +

Review Process

diff --git a/search/search_index.json b/search/search_index.json index ff2f020..f06bc36 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome to Coho Documentation","text":"

Coho is a Python-based platform designed for simulating coded holography experiments. It provides a comprehensive set of tools for modeling, simulating, and analyzing holographic imaging systems that use coded apertures and coherent light sources.

"},{"location":"#key-features","title":"Key Features","text":""},{"location":"#getting-started-guide","title":"Getting Started Guide","text":""},{"location":"#getting-help","title":"Getting Help","text":""},{"location":"#future-development","title":"Future Development","text":"

Coho is under active development. Planned features include:

Want to contribute? Check out our contribution guidelines and roadmap on GitHub.

"},{"location":"installation/","title":"Installation","text":"

Here are the step-by-step instructions for installing Coho.

"},{"location":"installation/#requirements","title":"Requirements","text":""},{"location":"installation/#installing-from-pypi","title":"Installing from PyPI","text":"

You can install Coho directly from PyPI using pip:

pip install coho\n

For an isolated environment (recommended), use:

# Create a new virtual environment named 'mycoho'\npython -m venv mycoho\n\n# Activate the virtual environment\nsource venv/bin/activate\n\n# Install Coho in the virtual environment\npip install coho\n
"},{"location":"installation/#installing-from-source","title":"Installing from Source","text":"

To install Coho from the source code:

# Clone the repository\ngit clone https://github.com/yourusername/coho.git\ncd coho\n\n# Install Poetry if you haven't already\npip install poetry\n\n# Or using the official installer script\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# Or using Homebrew\nbrew install poetry\n\n# Install Coho and its dependencies \npoetry install\n
"},{"location":"installation/#verifying-installation","title":"Verifying Installation","text":"

To verify that Coho was installed correctly:

coho --version\n
"},{"location":"installation/#troubleshooting","title":"Troubleshooting","text":"

If you encounter any issues during installation:

  1. Ensure you have the correct Python version installed
  2. Update pip to the latest version: pip install --upgrade pip
  3. Check our GitHub Issues for known problems
  4. For Poetry-related issues, refer to the Poetry documentation
"},{"location":"license/","title":"License","text":"

Coho is licensed under the BSD 3-Clause License.

This permissive license allows you to freely use, modify, and distribute this software in both private and commercial projects, provided you include the original copyright notice and disclaimer.

While we strive to make Coho reliable and robust, the software is provided \"as is\" without warranty, but don't worry... That's a feature, not a bug.

"},{"location":"quickstart/","title":"Quick Start","text":"

This guide will help you get started with Coho quickly.

"},{"location":"quickstart/#prerequisites","title":"Prerequisites","text":""},{"location":"quickstart/#basic-usage","title":"Basic Usage","text":"

Coho enables users to design custom imaging setups through configuration files. Users can define wavefronts, optical elements like coded apertures, objects in the beam path, and detectors. Each component can be customized with specific properties, including wave characteristics, material details, and geometry, allowing for tailored imaging simulations.

"},{"location":"quickstart/#create-a-configuration-file","title":"Create a Configuration File","text":"

Here's an example configuration file that demonstrates a typical Coho simulation. It models a wavefront as it propagates through a system containing a coded aperture and a thin object, before being captured by a detector. The configuration includes descriptions of all necessary components, their positions, and physical properties. For detailed information about configuration options and parameters, see the Configuration Guide.

Create a file named myconfig.yaml with the following content:

# myconfig.yaml - Example configuration for wavefront simulation\n\nworkflow:\n  - { component_id: \"mywavefront\", geometry: { position: 0.0 } }\n  - { component_id: \"myaperture\", geometry: { position: 1.0 } }\n  - { component_id: \"mysample\", geometry: { position: 2.0 } }\n  - { component_id: \"mydetector\", geometry: { position: 100.0 } }\n\npropagator: { type: \"fresnel\" }\ninteractor: { type: \"thin_object\" }\n\nwavefront:\n  id: \"mywavefront\"\n  type: \"constant\"\n  properties:\n    amplitude: 1.0\n    phase: 0.0\n    energy: 10.0\n    shape: 512\n    spacing: 0.0001\n\nelements:\n  - id: \"myaperture\"\n    type: \"coded_aperture\"\n    properties:\n      material: \"Au\"\n      density: 19.3\n      thickness: 0.0001\n      bit_size: 64\n\n  - id: \"mysample\"\n    type: \"custom_profile\"\n    properties:\n      material: \"C5H8O2\"\n      density: 1.18\n      thickness: 0.001\n      custom_profile: \"coho/resources/samples/lena.npy\"\n\ndetector: \n  id: \"mydetector\"\n  type: \"integrating\"\n

You can download the example configuration file here.

"},{"location":"quickstart/#create-a-python-script","title":"Create a Python Script","text":"

Create a file named myscript.py with the following code to run the simulation and visualize the intensity of the wavefront at the detector after it passes through the system defined in myconfig.yaml:

import coho\nimport matplotlib.pyplot as plt\n\n# Build and initialize the Simulation instance from configuration\nsimulation = coho.build_simulation_from_config(\"myconfig.yaml\")\n\n# Run and get results\nsimulation.run()\nresults = simulation.get_results()\n\n# Plot results (first and only image)\nplt.figure(figsize=(8, 6))\nplt.imshow(results[0], cmap='gray')\nplt.title(\"Simulated Wavefront Intensity at Detector\")\nplt.colorbar(label=\"Intensity\")\nplt.show()\n

You can download the example script here.

"},{"location":"quickstart/#run-the-simulation","title":"Run the Simulation","text":"

Run the simulation using Python by executing the following command in your terminal:

python myscript.py myconfig.yaml\n

Voila! You've just run your first Coho simulation.

For more detailed examples and advanced usage, check out the Examples section.

"},{"location":"contributing/","title":"Contributing to Coho","text":"

Thank you for considering contributing to Coho! We welcome contributions of all kinds, including bug reports, feature requests, documentation improvements, and code contributions. Happy contributing!

"},{"location":"contributing/#how-to-get-started","title":"How to Get Started","text":"
  1. Read the Documentation: Review the Quick Start and Usage sections.
  2. Install the Development Environment: Follow the Developer Setup Guide.
  3. Understand the Code: See the API Reference for project architecture.
"},{"location":"contributing/#types-of-contributions","title":"Types of Contributions","text":"

Check out the Developer Setup Guide to get started.

"},{"location":"contributing/api_reference/","title":"API Reference","text":"

Not yet available online. Check out the source code for now.

"},{"location":"contributing/code_of_conduct/","title":"Code of Conduct","text":"

We adhere to the Contributor Covenant code of conduct.

"},{"location":"contributing/code_style/","title":"Code Style and Conventions","text":"

This guide outlines the coding standards and conventions for Coho. Take it with a grain of salt.

"},{"location":"contributing/code_style/#general-guidelines","title":"General Guidelines","text":""},{"location":"contributing/code_style/#example-style","title":"Example Style","text":"

Here's an example of how to format your code:

from typing import List, Optional\n\nclass WavePropagator:\n    \"\"\"Class for wave propagation calculations.\n\n    Attributes:\n        wavelength: The wavelength in meters\n        grid_size: Size of the computation grid\n    \"\"\"\n\n    def __init__(self, wavelength: float, grid_size: int = 512):\n        self.wavelength = wavelength\n        self.grid_size = grid_size\n\n    def propagate(self, field: np.ndarray, distance: float) -> np.ndarray:\n        \"\"\"Propagates the wave field.\n\n        Args:\n            field: Input complex field\n            distance: Propagation distance in meters\n\n        Returns:\n            Propagated complex field\n        \"\"\"\n        # Implementation\n        pass\n

Now that you've developed your code, check out how to submit a pull request.

"},{"location":"contributing/pull_request/","title":"Pull Request Guidelines","text":"

Pull requests are the primary way to contribute code changes to Coho. Here are our guidelines for submitting PRs.

"},{"location":"contributing/pull_request/#creating-a-pull-request","title":"Creating a Pull Request","text":"

Try to follow the PR title and description format below.

"},{"location":"contributing/pull_request/#pr-title-format","title":"PR Title Format","text":"

[TYPE] Brief description\n
Where TYPE is one of: FEATURE, FIX, DOCS, STYLE, REFACTOR, TEST

"},{"location":"contributing/pull_request/#pr-description-template","title":"PR Description Template","text":"
## Description\nBrief description of changes\n\n## Related Issue\nFixes #(issue)\n\n## Type of Change\n- [ ] Bug fix\n- [ ] New feature\n- [ ] Documentation update\n- [ ] Performance improvement\n- [ ] Code style update\n\n## Testing\nDescribe testing done\n\n## Screenshots\nIf applicable\n\n## Checklist\n- [ ] Code follows style guidelines\n- [ ] Tests added/updated\n- [ ] Documentation updated\n- [ ] All tests passing\n

Submit your PR and wait for it to be reviewed.

Note: To submit a PR:

  1. Fork and branch:
    git checkout -b feature/your-feature-name  # Use descriptive branch names\n
  2. Make changes and commit:
    git commit -m \"[TYPE] Brief description\"  # Be clear and concise\n
  3. Push and set upstream:
    git push -u origin feature/your-feature-name  # -u links local and remote branches\n
  4. Open PR on Coho repository
  5. Add title, description, and related issues
"},{"location":"contributing/pull_request/#review-process","title":"Review Process","text":"

We (plan to) use GitHub Actions to run tests and linting. We also have a code of conduct that contributors must adhere to.

"},{"location":"contributing/setup_guide/","title":"Developer Setup Guide","text":"

This guide provides a step-by-step setup process for developing Coho.

"},{"location":"contributing/setup_guide/#prerequisites","title":"Prerequisites","text":""},{"location":"contributing/setup_guide/#environment-setup","title":"Environment Setup","text":"

This section guides you through setting up your local development environment.

"},{"location":"contributing/setup_guide/#clone-the-repository","title":"Clone the Repository","text":"

Coho is hosted on GitHub. Use the following commands to clone the repository and install the project dependencies:

# Clone the repository\ngit clone https://github.com/dgursoy/coho.git\ncd coho\n\n# Install project dependencies using Poetry\npoetry install\n\n# Create and activate the virtual environment\npoetry shell\n\n# Verify the installation\npoetry run python -c \"import coho; print(coho.__version__)\"\n
"},{"location":"contributing/setup_guide/#managing-dependencies","title":"Managing Dependencies","text":"

Coho uses Poetry for dependency management. Here's how to manage project dependencies:

# Add a production dependency\npoetry add numpy\n\n# Add a development-only dependency\npoetry add --group dev black\n\n# Add a documentation-related dependency\npoetry add --group docs mkdocs-material\n\n# Install pre-commit as a dev dependency\npoetry add --group dev pre-commit\n

Note: You can also manually edit dependencies in pyproject.toml in the project root.

Coho uses a lock file to manage dependencies. To update the lock file after any changes to dependencies:

poetry lock  # Update the lock file\npoetry install  # Apply the changes\n

Note: If you want to update all dependencies to their latest compatible versions:

poetry update\n

See, much easier than others!

"},{"location":"contributing/setup_guide/#testing-environment","title":"Testing Environment","text":"

To verify your environment setup is correct:

poetry run pytest tests/\n

Note: Always use poetry run to ensure tests run within the project's virtual environment. Running pytest tests directly will either use your global Python environment (which may have different package versions) or fail if pytest isn't installed globally.

"},{"location":"contributing/setup_guide/#documentation-setup","title":"Documentation Setup","text":"

The documentation is located in the docs folder in the project root. You can build and preview the documentation locally using MkDocs:

# Start the documentation server with live preview\npoetry run mkdocs serve\n\n# Access the documentation in your browser\n# View at http://localhost:8000\n
"},{"location":"contributing/setup_guide/#pre-commit-hooks","title":"Pre-commit Hooks","text":"

We use pre-commit to run automated checks before each commit, configured via .pre-commit-config.yaml in the project root.

# Install pre-commit as a dev dependency\npoetry add --group dev pre-commit\n\n# Install pre-commit hooks into your local repository\npoetry run pre-commit install\n\n# Run all pre-commit checks on staged files (those about to be committed)\npoetry run pre-commit run\n

Note: When you make a git commit, pre-commit automatically runs on only the staged files (those being committed). The --all-files flag is useful for checking your entire codebase, including files that aren't tracked by git yet.

Common Commands:

# Update hooks to latest versions\npoetry run pre-commit autoupdate\n\n# Check all files (including untracked, respects .gitignore)\npoetry run pre-commit run --all-files\n\n# Check specific files\npoetry run pre-commit run --files path/to/file.py\n\n# Check specific file types\npoetry run pre-commit run --files \"*.py\" \"*.yaml\"\n\n# Clean up hooks to remove unused hooks\npoetry run pre-commit clean\n

Note: It's recommended to set up pre-commit hooks right after cloning the repository to ensure code quality from the start.

Now that you've set up your development environment, check out the code style guide before writing any code.

"},{"location":"examples/","title":"Examples","text":"

Not yet available. But we plan to add some examples soon. Stay tuned!

"},{"location":"usage/","title":"Using Coho","text":"

This section is to guide you through using Coho.

"},{"location":"usage/#key-topics","title":"Key Topics","text":"

Each topic is covered in detail in its respective section. Start with Basic Concepts if you're new to coded holography or the Coho package.

Also, check out the Examples section to see practical applications and analysis workflows.

Note: Some documentation sections are still under development. If you find missing or incomplete information, please check our GitHub repository for the latest updates or submit an issue to report the problem.

"},{"location":"usage/apertures/","title":"Working with Apertures","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/basics/","title":"Basic Concepts","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/configuration/","title":"Configuration Guide","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/detector/","title":"Detector Setup","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/elements/","title":"Optical Elements","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/simulation/","title":"Simulation Workflow","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome to Coho Documentation","text":"

Coho is a Python-based platform designed for simulating coded holography experiments. It provides a comprehensive set of tools for modeling, simulating, and analyzing holographic imaging systems that use coded apertures and coherent light sources.

"},{"location":"#key-features","title":"Key Features","text":""},{"location":"#getting-started-guide","title":"Getting Started Guide","text":""},{"location":"#getting-help","title":"Getting Help","text":""},{"location":"#future-development","title":"Future Development","text":"

Coho is under active development. Planned features include:

Want to contribute? Check out our contribution guidelines and roadmap on GitHub.

"},{"location":"installation/","title":"Installation","text":"

Here are the step-by-step instructions for installing Coho.

"},{"location":"installation/#requirements","title":"Requirements","text":""},{"location":"installation/#installing-from-pypi","title":"Installing from PyPI","text":"

You can install Coho directly from PyPI using pip:

pip install coho\n

For an isolated environment (recommended), use:

# Create a new virtual environment named 'mycoho'\npython -m venv mycoho\n\n# Activate the virtual environment\nsource venv/bin/activate\n\n# Install Coho in the virtual environment\npip install coho\n
"},{"location":"installation/#installing-from-source","title":"Installing from Source","text":"

To install Coho from the source code:

# Clone the repository\ngit clone https://github.com/yourusername/coho.git\ncd coho\n\n# Install Poetry if you haven't already\npip install poetry\n\n# Or using the official installer script\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# Or using Homebrew\nbrew install poetry\n\n# Install Coho and its dependencies \npoetry install\n
"},{"location":"installation/#verifying-installation","title":"Verifying Installation","text":"

To verify that Coho was installed correctly:

coho --version\n
"},{"location":"installation/#troubleshooting","title":"Troubleshooting","text":"

If you encounter any issues during installation:

  1. Ensure you have the correct Python version installed
  2. Update pip to the latest version: pip install --upgrade pip
  3. Check our GitHub Issues for known problems
  4. For Poetry-related issues, refer to the Poetry documentation
"},{"location":"license/","title":"License","text":"

Coho is licensed under the BSD 3-Clause License.

This permissive license allows you to freely use, modify, and distribute this software in both private and commercial projects, provided you include the original copyright notice and disclaimer.

While we strive to make Coho reliable and robust, the software is provided \"as is\" without warranty, but don't worry... That's a feature, not a bug.

"},{"location":"quickstart/","title":"Quick Start","text":"

This guide will help you get started with Coho quickly.

"},{"location":"quickstart/#prerequisites","title":"Prerequisites","text":""},{"location":"quickstart/#basic-usage","title":"Basic Usage","text":"

Coho enables users to design custom imaging setups through configuration files. Users can define wavefronts, optical elements like coded apertures, objects in the beam path, and detectors. Each component can be customized with specific properties, including wave characteristics, material details, and geometry, allowing for tailored imaging simulations.

"},{"location":"quickstart/#create-a-configuration-file","title":"Create a Configuration File","text":"

Here's an example configuration file that demonstrates a typical Coho simulation. It models a wavefront as it propagates through a system containing a coded aperture and a thin object, before being captured by a detector. The configuration includes descriptions of all necessary components, their positions, and physical properties. For detailed information about configuration options and parameters, see the Configuration Guide.

Create a file named myconfig.yaml with the following content:

# myconfig.yaml - Example configuration for wavefront simulation\n\nworkflow:\n  - { component_id: \"mywavefront\", geometry: { position: 0.0 } }\n  - { component_id: \"myaperture\", geometry: { position: 1.0 } }\n  - { component_id: \"mysample\", geometry: { position: 2.0 } }\n  - { component_id: \"mydetector\", geometry: { position: 100.0 } }\n\npropagator: { type: \"fresnel\" }\ninteractor: { type: \"thin_object\" }\n\nwavefront:\n  id: \"mywavefront\"\n  type: \"constant\"\n  properties:\n    amplitude: 1.0\n    phase: 0.0\n    energy: 10.0\n    shape: 512\n    spacing: 0.0001\n\nelements:\n  - id: \"myaperture\"\n    type: \"coded_aperture\"\n    properties:\n      material: \"Au\"\n      density: 19.3\n      thickness: 0.0001\n      bit_size: 64\n\n  - id: \"mysample\"\n    type: \"custom_profile\"\n    properties:\n      material: \"C5H8O2\"\n      density: 1.18\n      thickness: 0.001\n      custom_profile: \"coho/resources/samples/lena.npy\"\n\ndetector: \n  id: \"mydetector\"\n  type: \"integrating\"\n

You can download the example configuration file here.

"},{"location":"quickstart/#create-a-python-script","title":"Create a Python Script","text":"

Create a file named myscript.py with the following code to run the simulation and visualize the intensity of the wavefront at the detector after it passes through the system defined in myconfig.yaml:

import coho\nimport matplotlib.pyplot as plt\n\n# Build and initialize the Simulation instance from configuration\nsimulation = coho.build_simulation_from_config(\"myconfig.yaml\")\n\n# Run and get results\nsimulation.run()\nresults = simulation.get_results()\n\n# Plot results (first and only image)\nplt.figure(figsize=(8, 6))\nplt.imshow(results[0], cmap='gray')\nplt.title(\"Simulated Wavefront Intensity at Detector\")\nplt.colorbar(label=\"Intensity\")\nplt.show()\n

You can download the example script here.

"},{"location":"quickstart/#run-the-simulation","title":"Run the Simulation","text":"

Run the simulation using Python by executing the following command in your terminal:

python myscript.py myconfig.yaml\n

Voila! You've just run your first Coho simulation.

For more detailed examples and advanced usage, check out the Examples section.

"},{"location":"contributing/","title":"Contributing to Coho","text":"

Thank you for considering contributing to Coho! We welcome contributions of all kinds, including bug reports, feature requests, documentation improvements, and code contributions. Happy contributing!

"},{"location":"contributing/#how-to-get-started","title":"How to Get Started","text":"
  1. Read the Documentation: Review the Quick Start and Usage sections.
  2. Install the Development Environment: Follow the Developer Setup Guide.
  3. Understand the Code: See the API Reference for project architecture.
"},{"location":"contributing/#types-of-contributions","title":"Types of Contributions","text":"

Check out the Developer Setup Guide to get started.

"},{"location":"contributing/api_reference/","title":"API Reference","text":"

Not yet available online. Check out the source code for now.

"},{"location":"contributing/code_of_conduct/","title":"Code of Conduct","text":"

We adhere to the Contributor Covenant code of conduct.

"},{"location":"contributing/code_style/","title":"Code Style and Conventions","text":"

This guide outlines the coding standards and conventions for Coho. Take it with a grain of salt.

"},{"location":"contributing/code_style/#general-guidelines","title":"General Guidelines","text":""},{"location":"contributing/code_style/#example-style","title":"Example Style","text":"

Here's an example of how to format your code:

from typing import List, Optional\n\nclass WavePropagator:\n    \"\"\"Class for wave propagation calculations.\n\n    Attributes:\n        wavelength: The wavelength in meters\n        grid_size: Size of the computation grid\n    \"\"\"\n\n    def __init__(self, wavelength: float, grid_size: int = 512):\n        self.wavelength = wavelength\n        self.grid_size = grid_size\n\n    def propagate(self, field: np.ndarray, distance: float) -> np.ndarray:\n        \"\"\"Propagates the wave field.\n\n        Args:\n            field: Input complex field\n            distance: Propagation distance in meters\n\n        Returns:\n            Propagated complex field\n        \"\"\"\n        # Implementation\n        pass\n

Now that you've developed your code, check out how to submit a pull request.

"},{"location":"contributing/pull_request/","title":"Pull Request Guidelines","text":"

Pull requests are the primary way to contribute code changes to Coho. Here are our guidelines for submitting PRs.

"},{"location":"contributing/pull_request/#creating-a-pull-request","title":"Creating a Pull Request","text":"

Try to follow the PR title and description format below.

"},{"location":"contributing/pull_request/#pr-title-format","title":"PR Title Format","text":"

[TYPE] Brief description\n
Where TYPE is one of: FEATURE, FIX, DOCS, STYLE, REFACTOR, TEST

"},{"location":"contributing/pull_request/#pr-description-template","title":"PR Description Template","text":"
## Description\nBrief description of changes\n\n## Related Issue\nFixes #(issue)\n\n## Type of Change\n- [ ] Bug fix\n- [ ] New feature\n- [ ] Documentation update\n- [ ] Performance improvement\n- [ ] Code style update\n\n## Testing\nDescribe testing done\n\n## Screenshots\nIf applicable\n\n## Checklist\n- [ ] Code follows style guidelines\n- [ ] Tests added/updated\n- [ ] Documentation updated\n- [ ] All tests passing\n

Submit your PR and wait for it to be reviewed.

Note: To submit a PR:

  1. Fork and branch:

    git checkout -b feature/your-feature-name  # Use descriptive branch names\n

  2. Stage changes and commit:

    git add .\ngit commit -m \"[TYPE] Brief description\"  # Be clear and concise\n

  3. Push and set upstream:

    git push -u origin feature/your-feature-name  # -u links local and remote branches\n

  4. Open PR on Coho repository

  5. Add title, description, and related issues

  6. (optional) Clean up branches after merge:

    # Delete local branch\ngit branch -d feature/your-feature-name\n\n# Delete remote branch\ngit push origin --delete feature/your-feature-name\n\n# Clean up stale remote references\ngit fetch --prune\n

"},{"location":"contributing/pull_request/#review-process","title":"Review Process","text":"

We (plan to) use GitHub Actions to run tests and linting. We also have a code of conduct that contributors must adhere to.

"},{"location":"contributing/setup_guide/","title":"Developer Setup Guide","text":"

This guide provides a step-by-step setup process for developing Coho.

"},{"location":"contributing/setup_guide/#prerequisites","title":"Prerequisites","text":""},{"location":"contributing/setup_guide/#environment-setup","title":"Environment Setup","text":"

This section guides you through setting up your local development environment.

"},{"location":"contributing/setup_guide/#clone-the-repository","title":"Clone the Repository","text":"

Coho is hosted on GitHub. Use the following commands to clone the repository and install the project dependencies:

# Clone the repository\ngit clone https://github.com/dgursoy/coho.git\ncd coho\n\n# Install project dependencies using Poetry\npoetry install\n\n# Create and activate the virtual environment\npoetry shell\n\n# Verify the installation\npoetry run python -c \"import coho; print(coho.__version__)\"\n
"},{"location":"contributing/setup_guide/#managing-dependencies","title":"Managing Dependencies","text":"

Coho uses Poetry for dependency management. Here's how to manage project dependencies:

# Add a production dependency\npoetry add numpy\n\n# Add a development-only dependency\npoetry add --group dev black\n\n# Add a documentation-related dependency\npoetry add --group docs mkdocs-material\n\n# Install pre-commit as a dev dependency\npoetry add --group dev pre-commit\n

Note: You can also manually edit dependencies in pyproject.toml in the project root.

Coho uses a lock file to manage dependencies. To update the lock file after any changes to dependencies:

poetry lock  # Update the lock file\npoetry install  # Apply the changes\n

Note: If you want to update all dependencies to their latest compatible versions:

poetry update\n

See, much easier than others!

"},{"location":"contributing/setup_guide/#testing-environment","title":"Testing Environment","text":"

To verify your environment setup is correct:

poetry run pytest tests/\n

Note: Always use poetry run to ensure tests run within the project's virtual environment. Running pytest tests directly will either use your global Python environment (which may have different package versions) or fail if pytest isn't installed globally.

"},{"location":"contributing/setup_guide/#documentation-setup","title":"Documentation Setup","text":"

The documentation is located in the docs folder in the project root. You can build and preview the documentation locally using MkDocs:

# Start the documentation server with live preview\npoetry run mkdocs serve\n\n# Access the documentation in your browser\n# View at http://localhost:8000\n
"},{"location":"contributing/setup_guide/#pre-commit-hooks","title":"Pre-commit Hooks","text":"

We use pre-commit to run automated checks before each commit, configured via .pre-commit-config.yaml in the project root.

# Install pre-commit as a dev dependency\npoetry add --group dev pre-commit\n\n# Install pre-commit hooks into your local repository\npoetry run pre-commit install\n\n# Run all pre-commit checks on staged files (those about to be committed)\npoetry run pre-commit run\n

Note: When you make a git commit, pre-commit automatically runs on only the staged files (those being committed). The --all-files flag is useful for checking your entire codebase, including files that aren't tracked by git yet.

Common Commands:

# Update hooks to latest versions\npoetry run pre-commit autoupdate\n\n# Check all files (including untracked, respects .gitignore)\npoetry run pre-commit run --all-files\n\n# Check specific files\npoetry run pre-commit run --files path/to/file.py\n\n# Check specific file types\npoetry run pre-commit run --files \"*.py\" \"*.yaml\"\n\n# Clean up hooks to remove unused hooks\npoetry run pre-commit clean\n

Note: It's recommended to set up pre-commit hooks right after cloning the repository to ensure code quality from the start.

Now that you've set up your development environment, check out the code style guide before writing any code.

"},{"location":"examples/","title":"Examples","text":"

Not yet available. But we plan to add some examples soon. Stay tuned!

"},{"location":"usage/","title":"Using Coho","text":"

This section is to guide you through using Coho.

"},{"location":"usage/#key-topics","title":"Key Topics","text":"

Each topic is covered in detail in its respective section. Start with Basic Concepts if you're new to coded holography or the Coho package.

Also, check out the Examples section to see practical applications and analysis workflows.

Note: Some documentation sections are still under development. If you find missing or incomplete information, please check our GitHub repository for the latest updates or submit an issue to report the problem.

"},{"location":"usage/apertures/","title":"Working with Apertures","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/basics/","title":"Basic Concepts","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/configuration/","title":"Configuration Guide","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/detector/","title":"Detector Setup","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/elements/","title":"Optical Elements","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"},{"location":"usage/simulation/","title":"Simulation Workflow","text":"

Not yet available. But we plan to add stuff soon. Stay tuned!

"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 2e265b4..00929c4 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,74 +2,74 @@ https://dgursoy.github.io/coho/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/installation/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/license/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/quickstart/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/contributing/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/contributing/api_reference/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/contributing/code_of_conduct/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/contributing/code_style/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/contributing/pull_request/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/contributing/setup_guide/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/examples/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/usage/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/usage/apertures/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/usage/basics/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/usage/configuration/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/usage/detector/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/usage/elements/ - 2024-11-14 + 2024-11-15 https://dgursoy.github.io/coho/usage/simulation/ - 2024-11-14 + 2024-11-15 \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 003745a..ff95335 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ