You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Set env variables for development](#set-env-variables-for-development)
14
+
-[Configure and run the application](#configure-and-run-the-application)
15
+
-[Updating dependencies](#updating-dependencies)
16
+
-[Running tests, linters, and code checks](#running-tests-linters-and-code-checks)
14
17
15
18
## Things to know prior to submitting code
16
19
@@ -19,15 +22,17 @@ Hi there! We're excited to have you as a contributor.
19
22
- If collaborating with someone else on the same branch, consider using `--force-with-lease` instead of `--force`. This will prevent you from accidentally overwriting commits pushed by someone else. For more information, see [git push docs](https://git-scm.com/docs/git-push#git-push---force-with-leaseltrefnamegt).
20
23
- We ask all of our community members and contributors to adhere to the [Ansible code of conduct](http://docs.ansible.com/ansible/latest/community/code_of_conduct.html). If you have questions, or need assistance, please reach out to our community team at [[email protected]](mailto:[email protected])
21
24
22
-
###Build and Run the Development Environment
25
+
## Build and Run the Development Environment
23
26
24
-
####Clone the repo
27
+
### Clone the repo
25
28
26
29
If you have not already done so, you will need to clone, or create a local copy, of the [pattern-service repository](https://github.com/ansible/pattern-service).
27
30
For more on how to clone the repo, view [git clone help](https://git-scm.com/docs/git-clone).
28
31
Once you have a local copy, run the commands in the following sections from the root of the project tree.
29
32
30
-
#### Configure python environment
33
+
### Configure Python environment
34
+
35
+
Ensure you are using a supported Python version, defined in the [pyproject.toml file](./pyproject.toml).
31
36
32
37
Create python virtual environment using one of the below commands:
The application can be reached in your browser at `https://localhost:8000/`
61
+
The application can be reached in your browser at `https://localhost:8000/`. The Django admin UI is accessible at `https://localhost:8000/admin` and the available API endpoints will be listed in the 404 information at `http://localhost:8000/api/pattern-service/v1/`.
62
+
63
+
## Updating dependencies
64
+
65
+
Project dependencies for all environments are specified in the [pyproject.toml file](./pyproject.toml). A requirements.txt file is generated for each environment using pip-compile, to simplify dependency installation with pip.
66
+
67
+
To add a new dependency:
68
+
69
+
1. Add the package to the appropriate project or optional dependencies section of the pyproject.toml file, using dependency specifiers to constrain versions.
70
+
2. Update the requirements files with the command `make requirements`. This should update the relevant requirements.txt files in the project's requirements directory.
71
+
72
+
## Running tests, linters, and code checks
73
+
74
+
Unit tests, linters, type checks, and other checks can all be run via `tox`. To see the available `tox` commands for this project, run `tox list`.
75
+
76
+
To run an individual tox command use the `-e` flag to specify the environment, for example: `tox -e test` to run tests with all supported python versions.
77
+
s
78
+
To run all tests and checks, simply run `tox` with no options.
0 commit comments