-
Notifications
You must be signed in to change notification settings - Fork 11
Update readme with setup instructions #160
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
Draft
matisnape
wants to merge
1
commit into
CodeForPoznan:develop
Choose a base branch
from
matisnape:update-readme-with-setup-instructions
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
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 @@ | ||
| python 3.12.8 |
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,12 +1,124 @@ | ||
| # Alinka PySide | ||
|
|
||
| Application for Supporting Center for Children - A PySide6 desktop application for managing educational support decisions and generating documents. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - **Python 3.12** - Required Python version for the application | ||
| - Version management tool of choice for Python, e.g. asdf or pyenv | ||
| - **Poetry** - Dependency management and virtual environment handling | ||
|
|
||
| ## Quick Setup | ||
|
|
||
| ### 1. Clone and Setup Project | ||
|
|
||
| ```bash | ||
| # Install dependencies (including dev dependencies for testing and linting) | ||
| poetry install --with dev | ||
|
|
||
| # Create necessary directories (the application will create them automatically, but you can create them manually if needed) | ||
| # On macOS: | ||
| mkdir -p "$HOME/Library/Application Support/Alinka" | ||
| mkdir -p "$HOME/Documents/Alinka" | ||
|
|
||
| # On Linux: | ||
| mkdir -p "$HOME/.local/share/Alinka" | ||
| mkdir -p "$HOME/Documents/Alinka" | ||
|
|
||
| # Run migrations | ||
| poetry run alembic upgrade head | ||
|
|
||
| # Populate database with test data (WARNING: This can take a long time and may hang) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verrrry good point. It indeed might be a bit confusing 😃 |
||
| poetry run python tools/populate_database.py | ||
|
|
||
| # Generate documents | ||
| poetry run python tools/create_documents.py --type specjalne | ||
| ``` | ||
|
|
||
| ### 2. Run the Application | ||
|
|
||
| ```bash | ||
| poetry run python run.py | ||
| ``` | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| The application uses platform-specific directories managed by `platformdirs`: | ||
|
|
||
| **On macOS:** | ||
| - **Database**: `~/Library/Application Support/Alinka/alinka.sqlite` | ||
| - **Documents**: `~/Documents/Alinka/` | ||
| - **Logs**: `~/Library/Application Support/Alinka/logs/` (when running as packaged app) | ||
|
|
||
| **On Linux:** | ||
| - **Database**: `~/.local/share/Alinka/alinka.sqlite` | ||
| - **Documents**: `~/Documents/Alinka/` | ||
| - **Logs**: `~/.local/share/Alinka/logs/` (when running as packaged app) | ||
|
|
||
| The application automatically creates these directories when needed. | ||
|
|
||
| ## Development Commands | ||
|
|
||
| ```bash | ||
| # Run tests | ||
| poetry run pytest | ||
|
|
||
| # Run linting | ||
| poetry run black . | ||
| poetry run isort . | ||
| poetry run flake8 . | ||
|
|
||
| # Create database migration | ||
| poetry run alembic revision --autogenerate -m "your_message" | ||
|
|
||
| # Apply migrations | ||
| poetry run alembic upgrade head | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate? (l.29) |
||
|
|
||
|
|
||
| ``` | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| alinka-pyside/ | ||
| ├── alinka/ # Main application code | ||
| │ ├── config/ # Configuration settings | ||
| │ ├── db/ # Database models and connections | ||
| │ ├── docx/ # Document generation | ||
| │ ├── widget/ # PySide6 GUI components | ||
| │ └── ... | ||
| ├── migrations/ # Database migrations | ||
| ├── tests/ # Test files | ||
| ├── tools/ # Utility scripts | ||
| ├── pyproject.toml # Poetry configuration | ||
| ├── .tool-versions # asdf tool versions | ||
| └── run.py # Application entry point | ||
| ``` | ||
|
|
||
| ## Technology Stack | ||
|
|
||
| - **GUI Framework**: PySide6 (Qt for Python) | ||
| - **Database**: SQLite with SQLAlchemy ORM | ||
| - **Migrations**: Alembic | ||
| - **Document Generation**: Custom Word templates | ||
| - **Dependency Management**: Poetry | ||
| - **Configuration**: Pydantic Settings | ||
|
|
||
| ## Development | ||
|
|
||
| If you're using Docker Compose (or Linux in general) for development, be aware | ||
| that Waylaynd as Windows System is causing issues and it would be wise | ||
| that Wayland as Windows System is causing issues and it would be wise | ||
| to switch X11 (see procedure in https://apploye.com/help/switch-from-wayland-to-xorg-ubuntu/). | ||
|
|
||
| ## Contributing | ||
|
|
||
| 1. Follow the existing code style (Black, isort, flake8) | ||
| 2. Write tests for new features | ||
| 3. Update migrations for database changes | ||
| 4. Test before submitting PRs | ||
|
|
||
| ## Release | ||
|
|
||
| To make a release please follow instruction | ||
| 1. Go to "Actions" tab and run "Crate release" workflow (additional instructions [here](https://docs.github.com/en/actions/how-tos/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow#running-a-workflow)). | ||
| 2. When workflow is done (all checks are green), go back to the main repo and find release on the right. | ||
|
|
||
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.
Migration should run automatically on app startup