-
Notifications
You must be signed in to change notification settings - Fork 0
Dashboard2.0 #5
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
Dashboard2.0 #5
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9ed723a
Restructure repository for flask app
fedem-p 3fdcd3c
ignore data files and folders
fedem-p e86b240
Implement initial version of the app
fedem-p 48a3e35
Add docker file
fedem-p 25aae1f
added pipelines
fedem-p d13c965
pipelines
fedem-p e0388c1
fixed linting
fedem-p 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,46 @@ | ||
|
|
||
| name: "🎉 SISmanager CI Carnival 🎉" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
| - name: Install Poetry | ||
| uses: abatilo/actions-poetry@v2 | ||
| - name: Install dependencies | ||
| run: poetry install | ||
| - name: 🚦 Linting Time! 🚦 | ||
| run: | | ||
| echo -e "\033[1;35mLet's get linty!\033[0m" | ||
| bash lint.sh check | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| needs: lint | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
| - name: Install Poetry | ||
| uses: abatilo/actions-poetry@v2 | ||
| - name: Install dependencies | ||
| run: poetry install | ||
| - name: 🧪 Test Parade! 🧪 | ||
| run: | | ||
| echo -e "\033[1;36mRunning the test parade!\033[0m" | ||
| bash test.sh | ||
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 |
|---|---|---|
|
|
@@ -66,4 +66,5 @@ venv.bak/ | |
| *.log | ||
|
|
||
| # Data | ||
| /data/results/ | ||
| /data | ||
|
|
||
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,22 @@ | ||
| # syntax=docker/dockerfile:1 | ||
| FROM python:3.10-slim | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install Poetry | ||
| RUN pip install poetry | ||
|
|
||
| # Copy only the dependency files first for caching | ||
| COPY pyproject.toml poetry.lock ./ | ||
|
|
||
| # Install dependencies | ||
| RUN poetry install --no-interaction --no-ansi --no-root | ||
|
|
||
| # Copy the rest of the code | ||
| COPY . . | ||
|
|
||
| # Expose Flask port | ||
| EXPOSE 5000 | ||
|
|
||
| # Run the app | ||
| CMD ["poetry", "run", "python3", "run.py"] |
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,12 @@ | ||
| services: | ||
| sismanager: | ||
| build: . | ||
| container_name: sismanager | ||
| ports: | ||
| - "5000:5000" | ||
| environment: | ||
| - FLASK_ENV=development | ||
| - PYTHONUNBUFFERED=1 | ||
| volumes: | ||
| - .:/app | ||
| command: poetry run python run.py |
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,6 @@ | ||
| from sismanager import create_app | ||
|
|
||
| app = create_app() | ||
|
|
||
| if __name__ == "__main__": | ||
| app.run(debug=True,host="0.0.0.0") | ||
|
fedem-p marked this conversation as resolved.
|
||
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,25 @@ | ||
| """ | ||
| SISmanager Flask application factory. | ||
| """ | ||
|
|
||
| from flask import Flask | ||
|
|
||
| # Import and register blueprints | ||
| from sismanager.blueprints.main.routes import main_bp | ||
| from sismanager.blueprints.importer.routes import importer_bp | ||
| from sismanager.blueprints.calendar.routes import calendar_bp | ||
| from sismanager.blueprints.materials.routes import materials_bp | ||
| from sismanager.blueprints.money.routes import money_bp | ||
|
|
||
|
|
||
| def create_app(): | ||
| """Create and configure the Flask application.""" | ||
| app = Flask(__name__) | ||
|
|
||
| app.register_blueprint(main_bp) | ||
| app.register_blueprint(importer_bp) | ||
| app.register_blueprint(calendar_bp) | ||
| app.register_blueprint(materials_bp) | ||
| app.register_blueprint(money_bp) | ||
|
|
||
| return app |
File renamed without changes.
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 @@ | ||
| # Calendar blueprint package |
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,15 @@ | ||
| """ | ||
| Routes for calendar blueprint in SISmanager. | ||
| """ | ||
|
|
||
| from flask import Blueprint, render_template | ||
|
|
||
| calendar_bp = Blueprint( | ||
| "calendar", __name__, template_folder="../../templates/calendar" | ||
| ) | ||
|
|
||
|
|
||
| @calendar_bp.route("/calendar") | ||
| def calendar(): | ||
| """Render the calendar page.""" | ||
| return render_template("calendar/calendar.html") |
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 @@ | ||
| # Importer blueprint package |
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,15 @@ | ||
| """ | ||
| Routes for importer blueprint in SISmanager. | ||
| """ | ||
|
|
||
| from flask import Blueprint, render_template | ||
|
|
||
| importer_bp = Blueprint( | ||
| "importer", __name__, template_folder="../../templates/importer" | ||
| ) | ||
|
|
||
|
|
||
| @importer_bp.route("/importer") | ||
| def importer(): | ||
| """Render the importer page.""" | ||
| return render_template("importer/importer.html") |
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 @@ | ||
| # Main blueprint package for dashboard home and navbar |
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,13 @@ | ||
| """ | ||
| Routes for main blueprint in SISmanager. | ||
| """ | ||
|
|
||
| from flask import Blueprint, render_template | ||
|
|
||
| main_bp = Blueprint("main", __name__, template_folder="../../templates/main") | ||
|
|
||
|
|
||
| @main_bp.route("/") | ||
| def home(): | ||
| """Render the home page.""" | ||
| return render_template("main/home.html") |
Empty file.
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 @@ | ||
| # Parts organizer blueprint package |
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,15 @@ | ||
| """ | ||
| Routes for materials blueprint in SISmanager. | ||
| """ | ||
|
|
||
| from flask import Blueprint, render_template | ||
|
|
||
| materials_bp = Blueprint( | ||
| "materials", __name__, template_folder="../../templates/materials" | ||
| ) | ||
|
|
||
|
|
||
| @materials_bp.route("/materials") | ||
| def materials(): | ||
| """Render the materials page.""" | ||
| return render_template("materials/materials.html") |
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 @@ | ||
| # Money management blueprint package |
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,13 @@ | ||
| """ | ||
| Routes for money blueprint in SISmanager. | ||
| """ | ||
|
|
||
| from flask import Blueprint, render_template | ||
|
|
||
| money_bp = Blueprint("money", __name__, template_folder="../../templates/money") | ||
|
|
||
|
|
||
| @money_bp.route("/money") | ||
| def money(): | ||
| """Render the money page.""" | ||
| return render_template("money/money.html") |
File renamed without changes.
Empty file.
9 changes: 6 additions & 3 deletions
9
src/run_xlsx_to_centraldb.py → sismanager/scripts/run_xlsx_to_centraldb.py
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
Empty file.
Empty file.
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
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.
Uh oh!
There was an error while loading. Please reload this page.