diff --git a/README.md b/README.md index c677248..57db4b3 100644 --- a/README.md +++ b/README.md @@ -12,20 +12,19 @@ ## How to run the project -1. Install `Docker` and `Docker Compose` -To get started with Melnichanka, you will need to have Docker and Docker Compose installed on your system. You can follow the instructions for your operating system here and here. +1. Install [`Docker`](https://www.docker.com/) and [`Docker Compose`](https://docs.docker.com/compose/) +To get started with Melnichanka, you will need to have [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) installed on your system. You can follow the instructions for your operating system here and here. -Once you have Docker and Docker Compose installed, follow these steps to start the project: +Once you have [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) installed, follow these steps to start the project: - Clone the repository: -``` +```sh git clone https://github.com/KroshkaByte/Melnichanka.git +cd Melnichanka ``` - - Start the project from root directory: - -``` +```sh docker-compose up -d --build ``` - Open your web browser and navigate to http://localhost:80 to access the application. @@ -63,18 +62,16 @@ Please follow the steps below to run the script: - Run the following command: -``` +```sh python3 manage.py runscript faker_script ``` +Make sure `django-extensions` is installed and added to `INSTALLED_APPS` in your Django settings. This command will execute the `faker_script` script, which will then populate the database with the generated data. Please note that the data generated by the Faker library is random and does not represent any real information. -## Additional Information - -- Ensure that your `virtual environment` is activated before running the commands, if you're using one. -- The `runscript` command is a part of `django-extensions`. If it's not working, make sure you have `django-extensions` installed and added to your `INSTALLED_APPS` in your Django settings. +Ensure that your `virtual environment` is activated before running the commands, if you're using one. ## Documentation @@ -83,20 +80,22 @@ API documentation is available through Swagger UI and ReDoc. - [Swagger UI](https://dev-lymar.github.io/Melnichanka/melnichanka_swager_ui) - [ReDoc](https://dev-lymar.github.io/Melnichanka/melnichanka_redoc) +For local access, navigate to [`Swagger UI`](http://localhost:8000/api/schema/swagger-ui/) and [`ReDoc`](http://localhost:8000/api/schema/redoc/) in your browser after starting the project. + ## Testing To run the tests, navigate to the root directory of the project (where the manage.py file is located) and run the following command: -``` +```sh pytest . ``` or -``` +```sh python3 -m pytest . ``` - To run tests for a specific application (such as goods, logistics, users, etc.) use the following command: -``` +```sh pytest goods pytest logistics pytest users @@ -105,14 +104,18 @@ pytest makedoc ``` ## Contributing -We welcome contributions to Melnichanka. To contribute, follow these steps: +We welcome contributions to Melnichanka. To contribute: - - Fork the repository. - - Create a new branch for your changes. - - Make your changes and commit them to your branch. - - Submit a pull request. +1. Fork the repository. +2. Create a new branch for your changes. +3. Make your changes and commit them to your branch. +4. Update your branch from the main repository: + ```sh + git fetch upstream + git merge upstream/main + ``` -We will review your pull request and provide feedback as needed. +5. Submit a pull request. ## License