Skip to content
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

Update Configuration, Static Files Location, and Add Receipt Feature #8

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 36 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.3.0
hooks:
- id: trailing-whitespace
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-added-large-files
- id: detect-private-key
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-case-conflict
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-merge-conflict
exclude: (migrations/|tests/|docs/|static/|media/).*
- id: check-docstring-first
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
Expand All @@ -22,9 +34,26 @@ repos:
args: ["--config=pyproject.toml"]
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.5
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
hooks:
- id: commitizen
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: ["-c", "pyproject.toml", "-r", "."]
additional_dependencies: [ "bandit[toml]" ]
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in .codespellrc
rev: v2.2.6
hooks:
- id: codespell
exclude: locale|kickstarter-announcement.md|coreapi-0.1.1.js
- id: ruff
args: ["--config=pyproject.toml"]
exclude: (migrations/|tests/|docs/|static/|media/).*
Expand All @@ -43,8 +72,7 @@ repos:
additional_dependencies: [ "bandit[toml]" ]
exclude: (migrations/|tests/|docs/|static/|media/).*

- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
- repo: local
hooks:
- id: docformatter
args: ["--in-place", "--recursive", "--blank"]
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: packages/requirements-dev.txt
- requirements: packages/requirements-dev.txt
35 changes: 20 additions & 15 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,24 @@ Thank you for your interest in contributing to our package! This document outlin
cd django-sage-invoice
```

2. **Create a Branch**: Create a new branch for your feature or bugfix.
2. **Setting Up Git Flow and Creating a Branch**: Create a new branch for your feature or bugfix.

Before using git flow, you need to initialize it in your repository
```bash
git checkout -b feature/your-feature-name
git flow init
```

3. **Install Dependencies**: Use Poetry to install dependencies.
Once git flow is initialized, you can create a new branch for your feature or bugfix using the following command:
```bash
git flow feature start your-feature-name
```
4. **Install Dependencies**: Use Poetry to install dependencies.
```bash
poetry install
```

4. **Write Code and Tests**: Make your changes and write tests for your new code.
5. **Write Code and Tests**: Make your changes and write tests for your new code.

5. **Run Code Quality Checks**: Ensure code quality with pre-commit, Ruff, and Pylint.
6. **Run Code Quality Checks**: Ensure code quality with pre-commit, Ruff, and Pylint.
```bash
pre-commit run --all-files
ruff check sage_invoice --fix
Expand All @@ -31,32 +36,32 @@ Thank you for your interest in contributing to our package! This document outlin
pylint sage_invoice
```

6. **Run Tests**: Ensure all tests pass using Poetry.
7. **Run Tests**: Ensure all tests pass using Poetry.
```bash
poetry run pytest
```

7. **Commit Changes**: Use Commitizen to commit your changes.
8. **Commit Changes**: Use Commitizen to commit your changes.
```bash
cz commit
```

8. **Push and Create a PR**: Push your changes and create a pull request.
9. **Push and Create a PR**: Push your changes and create a pull request.
```bash
git push origin feature/your-feature-name
```

9. **Bump Version**: Use Commitizen to bump the version.
10. **Bump Version**: Use Commitizen to bump the version.
```bash
cz bump
```

10. **Generate Changelog**: Use Commitizen to generate the changelog.
11. **Generate Changelog**: Use Commitizen to generate the changelog.
```bash
cz changelog
```

11. **Export Dependencies**: Export dependencies for development and production.
12. **Export Dependencies**: Export dependencies for development and production.
```bash
poetry export -f requirements.txt --output packages/requirements.txt --without-hashes
poetry export -f requirements.txt --dev --output packages/requirements-dev.txt --without-hashes
Expand Down Expand Up @@ -87,7 +92,7 @@ feat(core): initialize the core module

### 2. Release with build and tag version
```
chore(release): build and tag version 1.0.0
build(release): build and tag version 1.0.0

- Built the project for production
- Created a new tag for version 1.0.0
Expand Down Expand Up @@ -123,7 +128,7 @@ docs(sphinx): update API documentation

### 6. Update dependencies (packages)
```
chore(deps): update project dependencies
build(deps): update project dependencies

- Updated all outdated npm packages
- Resolved compatibility issues with new package versions
Expand All @@ -132,7 +137,7 @@ chore(deps): update project dependencies

### 7. Update version for build and publish
```
chore(version): update version to 2.1.0 for build and publish
build(version): update version to 2.1.0 for build and publish

- Incremented version number to 2.1.0
- Updated package.json with the new version
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ INSTALLED_APPS = [
]
MODEL_PREFIX = "invoice"
MODEL_TEMPLATE = "sage_invoice"
```
```
2 changes: 2 additions & 0 deletions codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[codespell]
ignore-words-list = astroid,
2 changes: 1 addition & 1 deletion packages/poetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ If you want to export the main dependencies to `requirements.txt` and the combin
poetry export -f requirements.txt --output requirements-dev.txt --with dev
```

This way, you'll have two separate files: `requirements.txt` for the main dependencies and `requirements-dev.txt` for both the main and development dependencies.
This way, you'll have two separate files: `requirements.txt` for the main dependencies and `requirements-dev.txt` for both the main and development dependencies.
Loading
Loading