Skip to content

Commit

Permalink
Feature/improve factories and docs (#6)
Browse files Browse the repository at this point in the history
* Add file registry
* Add shell command to Makefile
* Improve Django factories
* Improve tests
* Add to documentation
  • Loading branch information
barseghyanartur authored Dec 3, 2023
1 parent a7dedf8 commit ade5068
Show file tree
Hide file tree
Showing 37 changed files with 1,942 additions and 731 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ local_settings.py
examples/pydantic/media/
examples/tortoise/media/
examples/django/media/
examples/dataclasses/media/
6 changes: 3 additions & 3 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@
"filename": "Makefile",
"hashed_secret": "ee783f2421477b5483c23f47eca1f69a1f2bf4fb",
"is_verified": true,
"line_number": 44
"line_number": 59
},
{
"type": "Secret Keyword",
"filename": "Makefile",
"hashed_secret": "1457a35245051927fac6fa556074300f4162ed66",
"is_verified": true,
"line_number": 47
"line_number": 62
}
]
},
"generated_at": "2023-11-25T00:02:19Z"
"generated_at": "2023-12-02T22:21:04Z"
}
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.

0.3
---
2023-12-03

- Added factories.
- Added mechanism to clean-up (remove) the created test files.
- Improved documentation.

0.2
---
2023-12-01
Expand Down
27 changes: 21 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Update version ONLY here
VERSION := 0.2
VERSION := 0.3
SHELL := /bin/bash
# Makefile for project
VENV := ~/.virtualenvs/fake.py/bin/activate
Expand Down Expand Up @@ -40,6 +40,21 @@ install:
test:
source $(VENV) && pytest -vrx -s

shell:
source $(VENV) && ipython

django-shell:
source $(VENV) && python examples/django/manage.py shell

pydantic-shell:
source $(VENV) && python examples/pydantic/shell.py

dataclasses-shell:
source $(VENV) && python examples/dataclasses/shell.py

tortoise-shell:
source $(VENV) && python examples/tortoise/shell.py

create-secrets:
source $(VENV) && detect-secrets scan > .secrets.baseline

Expand All @@ -48,11 +63,11 @@ detect-secrets:

# Clean up generated files
clean:
find . -name "*.pyc" -exec rm -rf {} \;
find . -name "builddocs.zip" -exec rm -rf {} \;
find . -name "*.py,cover" -exec rm -rf {} \;
find . -name "*.orig" -exec rm -rf {} \;
find . -name "__pycache__" -exec rm -rf {} \;
find . -type f -name "*.pyc" -exec rm -f {} \;
find . -type f -name "builddocs.zip" -exec rm -f {} \;
find . -type f -name "*.py,cover" -exec rm -f {} \;
find . -type f -name "*.orig" -exec rm -f {} \;
find . -type d -name "__pycache__" -exec rm -rf {} \; -prune
rm -rf build/
rm -rf dist/
rm -rf .cache/
Expand Down
Loading

0 comments on commit ade5068

Please sign in to comment.