-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from Bot-detector/develop
Release
- Loading branch information
Showing
36 changed files
with
1,617 additions
and
1,517 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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,10 +1,10 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.10.1 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.10.1 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] |
This file contains 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,72 +1,72 @@ | ||
# api documentation | ||
```sh | ||
http://127.0.0.1:5000/docs | ||
http://127.0.0.1:5000/redoc | ||
``` | ||
# extra info | ||
```sh | ||
POST: to create data. | ||
GET: to read data. | ||
PUT: to update data. | ||
DELETE: to delete data. | ||
``` | ||
# keeping fork up to date | ||
```sh | ||
git checkout develop | ||
git pull --rebase upstream develop | ||
git push | ||
``` | ||
# setup | ||
## linux | ||
```sh | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
python3 -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
``` | ||
## windows | ||
creating a python venv to work in and install the project requirements | ||
```sh | ||
python -m venv .venv | ||
.venv\Scripts\activate | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
``` | ||
# for admin purposes saving & upgrading | ||
## linux | ||
```sh | ||
#!/bin/bash | ||
|
||
# Replace '==' with '>=' in requirements.txt | ||
sed -i 's/==/>=/g' requirements.txt | ||
|
||
# Install or upgrade packages | ||
pip install -r requirements.txt --upgrade | ||
|
||
# Save the installed package versions to requirements.txt | ||
pip freeze > requirements.txt | ||
|
||
# Replace '>=' with '==' in requirements.txt | ||
sed -i 's/>=/==/g' requirements.txt | ||
``` | ||
## windows | ||
when you added some dependancies update the requirements | ||
```sh | ||
venv\Scripts\activate | ||
call pip freeze > requirements.txt | ||
``` | ||
when you want to upgrade the dependancies | ||
```sh | ||
venv\Scripts\activate | ||
powershell "(Get-Content requirements.txt) | ForEach-Object { $_ -replace '==', '>=' } | Set-Content requirements.txt" | ||
call pip install -r requirements.txt --upgrade | ||
call pip freeze > requirements.txt | ||
powershell "(Get-Content requirements.txt) | ForEach-Object { $_ -replace '>=', '==' } | Set-Content requirements.txt" | ||
``` | ||
# branch cleanup | ||
if your branch gets out of sync and for some reason you have many pushes and pulls, to become insync without pushing some random changes do this | ||
```sh | ||
git fetch origin | ||
git reset --hard origin/{branchname} | ||
git clean -f -d | ||
# api documentation | ||
```sh | ||
http://127.0.0.1:5000/docs | ||
http://127.0.0.1:5000/redoc | ||
``` | ||
# extra info | ||
```sh | ||
POST: to create data. | ||
GET: to read data. | ||
PUT: to update data. | ||
DELETE: to delete data. | ||
``` | ||
# keeping fork up to date | ||
```sh | ||
git checkout develop | ||
git pull --rebase upstream develop | ||
git push | ||
``` | ||
# setup | ||
## linux | ||
```sh | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
python3 -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
``` | ||
## windows | ||
creating a python venv to work in and install the project requirements | ||
```sh | ||
python -m venv .venv | ||
.venv\Scripts\activate | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
``` | ||
# for admin purposes saving & upgrading | ||
## linux | ||
```sh | ||
#!/bin/bash | ||
|
||
# Replace '==' with '>=' in requirements.txt | ||
sed -i 's/==/>=/g' requirements.txt | ||
|
||
# Install or upgrade packages | ||
pip install -r requirements.txt --upgrade | ||
|
||
# Save the installed package versions to requirements.txt | ||
pip freeze > requirements.txt | ||
|
||
# Replace '>=' with '==' in requirements.txt | ||
sed -i 's/>=/==/g' requirements.txt | ||
``` | ||
## windows | ||
when you added some dependancies update the requirements | ||
```sh | ||
venv\Scripts\activate | ||
call pip freeze > requirements.txt | ||
``` | ||
when you want to upgrade the dependancies | ||
```sh | ||
venv\Scripts\activate | ||
powershell "(Get-Content requirements.txt) | ForEach-Object { $_ -replace '==', '>=' } | Set-Content requirements.txt" | ||
call pip install -r requirements.txt --upgrade | ||
call pip freeze > requirements.txt | ||
powershell "(Get-Content requirements.txt) | ForEach-Object { $_ -replace '>=', '==' } | Set-Content requirements.txt" | ||
``` | ||
# branch cleanup | ||
if your branch gets out of sync and for some reason you have many pushes and pulls, to become insync without pushing some random changes do this | ||
```sh | ||
git fetch origin | ||
git reset --hard origin/{branchname} | ||
git clean -f -d | ||
``` |
Oops, something went wrong.