generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #248 from amosproj/update-readme
Update readme
- Loading branch information
Showing
2 changed files
with
21 additions
and
84 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -14,74 +14,11 @@ SPDX-FileCopyrightText: 2023 Berkay Bozkurt <[email protected]> | |
<img alt="Sum Insights Logo" src="https://github.com/amosproj/amos2023ws06-sales-lead-qualifier/assets/45459787/a7314df0-1917-4384-8f6c-2ab9f9831047"> | ||
</picture> | ||
|
||
## Creating the Environment | ||
## Documentation | ||
|
||
The repository contains the file `.env.template`. This file is a template for the environment variables that need to be set for the application to run. Copy this file into a file called `.env` at the root level of this repository and fill in all values with the corresponding secrets. | ||
For build, user, design documentations (and more) please refer to our dedicated [Documentation Page](https://amosproj.github.io/amos2023ws06-sales-lead-qualifier). | ||
|
||
To create the virtual environment in this project you must have `pipenv` installed on your machine. Then run the following commands: | ||
|
||
```bash | ||
# for development environment | ||
pipenv install --dev | ||
# for production environment | ||
pipenv install | ||
``` | ||
|
||
To work within the environment you can now run: | ||
|
||
```bash | ||
# to activate the virtual environment | ||
pipenv shell | ||
# to run a single command | ||
pipenv run <COMMAND> | ||
``` | ||
|
||
To install new packages in the environment add them to the `Pipfile`. Always pin the exact package version to avoid package conflicts and unexpected side effects from package upgrades. | ||
|
||
```bash | ||
# to add a package to the development environment | ||
[dev-packages] | ||
<PACKAGE_NAME> = "==<VERSION_NUMBER>" | ||
# to add a package to the production environment | ||
[packages] | ||
<PACKAGE_NAME> = "==<VERSION_NUMBER>" | ||
``` | ||
|
||
Note that this project runs under an MIT license and we only permit the use of non-copyleft-licensed packages. Please be aware of this when installing new packages and inform yourself before blindly installing. | ||
|
||
When you have any issues with the environment contact `felix-zailskas`. | ||
|
||
## Build Process | ||
|
||
This application is run using a Docker container. For this the `Dockerfile` at root level is used. It copies the Pipfile to the container and installs the deployment environment using pipenv. Afterwards all source code from the `src/`. As the entrypoint the main.py is chosen. Ensure that Docker is installed and that the Docker daemon is running. | ||
|
||
To build the application run | ||
|
||
```bash | ||
./build_app.sh | ||
``` | ||
|
||
To run the application interactively run | ||
|
||
```bash | ||
./run_app.sh | ||
``` | ||
|
||
## Database Connection | ||
|
||
To build the Docker containers | ||
|
||
```bash | ||
docker-compose build | ||
``` | ||
|
||
To run the Docker containers | ||
|
||
```bash | ||
docker-compose run sumup_app | ||
``` | ||
|
||
### License | ||
## License | ||
|
||
This project is operated under an MIT license. Every file must contain the REUSE-compliant license and copyright declaration: | ||
|
||
|
@@ -91,21 +28,3 @@ This project is operated under an MIT license. Every file must contain the REUSE | |
# SPDX-License-Identifier: MIT | ||
# SPDX-FileCopyrightText: 2023 | ||
``` | ||
|
||
### Pre-Commit Hooks | ||
|
||
This repository uses `pre-commit` hooks to ensure a consistent and clean file organization. Each registered hook will be executed when committing to the repository. To ensure that the hooks will be executed they need to be installed using the following command: | ||
|
||
```bash | ||
pre-commit install | ||
``` | ||
|
||
The following things are done by hooks automatically: | ||
|
||
- formatting of python files using black and isort | ||
- formatting of other files using prettier | ||
- syntax check of JSON and yaml files | ||
- adding new line at the end of files | ||
- removing trailing whitespaces | ||
- prevent commits to `dev` and `main` branch | ||
- check adherence to REUSE licensing format |