-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add Makefile for development setup and installation instructions #15
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
khvn26
merged 2 commits into
Flagsmith:main
from
kekko1212:feat/add-makefile-and-readme-instructions
Mar 19, 2025
Merged
Changes from 1 commit
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| POETRY_VERSION ?= 2.0.1 | ||
|
|
||
| .PHONY: install-pip | ||
| install-pip: | ||
| python -m pip install --upgrade pip | ||
|
|
||
| .PHONY: install-poetry | ||
| install-poetry: | ||
| curl -sSL https://install.python-poetry.org | python3 - --version ${POETRY_VERSION} | ||
|
|
||
| .PHONY: install-packages | ||
| install-packages: | ||
| poetry install --no-root $(opts) | ||
|
|
||
| .PHONY: install | ||
| install: install-pip install-poetry install-packages | ||
|
|
||
| .PHONY: lint | ||
| lint: | ||
| poetry run pre-commit run -a |
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,2 +1,48 @@ | ||
| # flagsmith-common | ||
| A repository for including code that is required in multiple flagsmith repositories | ||
|
|
||
| ### Development Setup | ||
|
|
||
| This project uses [Poetry](https://python-poetry.org/) for dependency management and includes a Makefile to simplify common development tasks. | ||
|
|
||
| #### Prerequisites | ||
|
|
||
| - Python >= 3.8 | ||
| - Make | ||
|
|
||
| #### Installation | ||
|
|
||
| You can set up your development environment using the provided Makefile: | ||
|
|
||
| ```bash | ||
| # Install everything (pip, poetry, and project dependencies) | ||
| make install | ||
|
|
||
| # Individual installation steps are also available | ||
| make install-pip # Upgrade pip | ||
| make install-poetry # Install Poetry | ||
| make install-packages # Install project dependencies | ||
| ``` | ||
|
|
||
| By default, Poetry version 2.0.1 will be installed. You can specify a different version: | ||
|
|
||
| ```bash | ||
| make install-poetry POETRY_VERSION=2.1.0 | ||
| ``` | ||
|
|
||
| #### Development | ||
|
|
||
| Run linting checks using pre-commit: | ||
|
|
||
| ```bash | ||
| make lint | ||
| ``` | ||
|
|
||
| Additional options can be passed to the `install-packages` target: | ||
|
|
||
| ```bash | ||
| # Install with development dependencies | ||
| make install-packages opts="--with dev" | ||
|
|
||
| # Install with specific extras | ||
| make install-packages opts="--extras 'feature1 feature2'" | ||
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.
Uh oh!
There was an error while loading. Please reload this page.