-
Notifications
You must be signed in to change notification settings - Fork 9
Feature/improve docs #449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature/improve docs #449
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9626cc0
Improve docs
FBumann 2427e6d
Improve docs
FBumann bf9fa0a
Improve docs and fix links
FBumann 70fcea4
Update contribute.md
FBumann 9d9be87
Update contribute.md
FBumann 0859cc4
Improve CONTRIBUTE.md
FBumann efe456f
Update CHANGELOG.md
FBumann 707031b
Merge remote-tracking branch 'origin/main' into feature/improve-docs
FBumann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| # Contributing to FlixOpt | ||
|
|
||
| We warmly welcome contributions from the community! Whether you're fixing bugs, adding features, improving documentation, or sharing examples, your contributions are valuable. | ||
|
|
||
| ## Ways to Contribute | ||
|
|
||
| ### 🐛 Report Issues | ||
| Found a bug or have a feature request? Please [open an issue](https://github.com/flixOpt/flixopt/issues) on GitHub. | ||
|
|
||
| When reporting issues, please include: | ||
| - A clear description of the problem | ||
| - Steps to reproduce the issue | ||
| - Expected vs. actual behavior | ||
| - Your environment (OS, Python version, FlixOpt version) | ||
| - Minimal code example if applicable | ||
|
|
||
| ### 💡 Share Examples | ||
| Help others learn FlixOpt by contributing examples: | ||
| - Real-world use cases | ||
| - Tutorial notebooks | ||
| - Integration examples with other tools | ||
| - Add them to the `examples/` directory | ||
|
|
||
| ### 📖 Improve Documentation | ||
| Documentation improvements are always welcome: | ||
| - Fix typos or clarify existing docs | ||
| - Add missing documentation | ||
| - Translate documentation | ||
| - Improve code comments | ||
|
|
||
| ### 🔧 Submit Code Contributions | ||
| Ready to contribute code? Great! See the sections below for setup and guidelines. | ||
|
|
||
| --- | ||
|
|
||
| ## Development Setup | ||
|
|
||
| ### Getting Started | ||
| 1. Fork and clone the repository: | ||
| ```bash | ||
| git clone https://github.com/flixOpt/flixopt.git | ||
| cd flixopt | ||
| ``` | ||
|
|
||
| 2. Install development dependencies: | ||
| ```bash | ||
| pip install -e ".[full, dev]" | ||
| ``` | ||
|
|
||
| 3. Set up pre-commit hooks (one-time setup): | ||
| ```bash | ||
| pre-commit install | ||
| ``` | ||
|
|
||
| 4. Verify your setup: | ||
| ```bash | ||
| pytest | ||
| ``` | ||
|
|
||
| ### Working with Documentation | ||
| FlixOpt uses [mkdocs](https://www.mkdocs.org/) to generate documentation. | ||
|
|
||
| To work on documentation: | ||
| ```bash | ||
| pip install -e ".[docs]" | ||
| mkdocs serve | ||
| ``` | ||
| Then navigate to http://127.0.0.1:8000/ | ||
|
|
||
| --- | ||
|
|
||
| ## Code Quality Standards | ||
|
|
||
| ### Automated Checks | ||
| We use [Ruff](https://github.com/astral-sh/ruff) for linting and formatting. After the one-time setup above, **code quality checks run automatically on every commit**. | ||
|
|
||
| ### Manual Checks | ||
| To run checks manually: | ||
| - `ruff check --fix .` - Check and fix linting issues | ||
| - `ruff format .` - Format code | ||
| - `pre-commit run --all-files` - Run all pre-commit checks | ||
|
|
||
| ### Testing | ||
| - `pytest` - Run the test suite | ||
| - Ensure all tests pass before submitting a PR | ||
|
|
||
| ### Coding Guidelines | ||
| - Follow [PEP 8](https://pep8.org/) style guidelines | ||
| - Write clear, self-documenting code with helpful comments | ||
| - Include type hints for function signatures | ||
| - Create or update tests for new functionality | ||
| - Aim for 100% test coverage for new code | ||
|
|
||
| --- | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### Branches & Pull Requests | ||
| 1. Create a feature branch from `main`: | ||
| ```bash | ||
| git checkout -b feature/your-feature-name | ||
| ``` | ||
|
|
||
| 2. Make your changes and commit them with clear messages | ||
|
|
||
| 3. Push your branch and open a Pull Request | ||
|
|
||
| 4. Ensure all CI checks pass | ||
|
|
||
| ### Branch Naming | ||
| - Features: `feature/feature-name` | ||
| - Bug fixes: `fix/bug-description` | ||
| - Documentation: `docs/what-changed` | ||
|
|
||
| ### Commit Messages | ||
| - Use clear, descriptive commit messages | ||
| - Start with a verb (Add, Fix, Update, Remove, etc.) | ||
| - Keep the first line under 72 characters | ||
|
|
||
| --- | ||
|
|
||
| ## Releases | ||
|
|
||
| We follow **Semantic Versioning** (MAJOR.MINOR.PATCH). Releases are created manually from the `main` branch by maintainers. | ||
|
|
||
| --- | ||
|
|
||
| ## Questions? | ||
|
|
||
| If you have questions or need help, feel free to: | ||
| - Open a discussion on GitHub | ||
| - Ask in an issue | ||
| - Reach out to the maintainers | ||
|
|
||
| Thank you for contributing to FlixOpt! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1 @@ | ||
| # Contributing to the Project | ||
|
|
||
| We warmly welcome contributions from the community! This guide will help you get started with contributing to our project. | ||
|
|
||
| ## Development Setup | ||
| 1. Clone the repository `git clone https://github.com/flixOpt/flixopt.git` | ||
| 2. Install the development dependencies `pip install -e ".[dev]"` | ||
| 3. Install pre-commit hooks `pre-commit install` (one-time setup) | ||
| 4. Run `pytest` to ensure your code passes all tests | ||
|
|
||
| ## Code Quality | ||
| We use [Ruff](https://github.com/astral-sh/ruff) for linting and formatting. After the one-time setup above, **code quality checks run automatically on every commit**. | ||
|
|
||
| To run manually: | ||
| - `ruff check --fix .` to check and fix linting issues | ||
| - `ruff format .` to format code or | ||
| - `pre-commit run` or `pre-commit run --all-files` to trigger all checks | ||
|
|
||
| ## Documentation (Optional) | ||
| FlixOpt uses [mkdocs](https://www.mkdocs.org/) to generate documentation. | ||
| To work on documentation: | ||
| ```bash | ||
| pip install -e ".[docs]" | ||
| mkdocs serve | ||
| ``` | ||
| Then navigate to http://127.0.0.1:8000/ | ||
|
|
||
| ## Testing | ||
| - `pytest` to run the test suite | ||
| - You can also run the provided python script `run_all_test.py` | ||
|
|
||
| --- | ||
| # Best practices | ||
|
|
||
| ## Coding Guidelines | ||
|
|
||
| - Follow PEP 8 style guidelines | ||
| - Write clear, commented code | ||
| - Include type hints | ||
| - Create or update tests for new functionality | ||
| - Ensure 100% test coverage for new code | ||
|
|
||
| ## Branches & Releases | ||
| New features should be branched from `main` into `feature/*` | ||
| As stated, we follow **Semantic Versioning**. Releases are created manually from the `main` branch. | ||
| {! ../CONTRIBUTE.md !} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in line 126.
There is a spelling error: "systeand" should be "system and".
Apply this diff:
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~126-~126: Ensure spelling is correct
Context: ...ments.Bus] as connection points in your systeand [
Sinks][flixopt.components.Sink] & [`...(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents