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
@@ -20,15 +23,17 @@ Hi there! We're excited to have you as a contributor.
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
- This repository uses a`pre-commit`, configuration, so ensure that you install pre-commit globally for your user, or by using pipx.
22
25
23
-
###Build and Run the Development Environment
26
+
## Build and Run the Development Environment
24
27
25
-
####Clone the repo
28
+
### Clone the repo
26
29
27
30
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).
28
31
For more on how to clone the repo, view [git clone help](https://git-scm.com/docs/git-clone).
29
32
Once you have a local copy, run the commands in the following sections from the root of the project tree.
30
33
31
-
#### Configure python environment
34
+
### Configure Python environment
35
+
36
+
Ensure you are using a supported Python version, defined in the [pyproject.toml file](./pyproject.toml).
32
37
33
38
Create python virtual environment using one of the below commands:
The application can be reached in your browser at `https://localhost:8000/`
62
+
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/`.
63
+
64
+
## Updating dependencies
65
+
66
+
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.
67
+
68
+
To add a new dependency:
69
+
70
+
1. Add the package to the appropriate project or optional dependencies section of the pyproject.toml file, using dependency specifiers to constrain versions.
71
+
2. Update the requirements files with the command `make requirements`. This should update the relevant requirements.txt files in the project's requirements directory.
72
+
73
+
## Running tests, linters, and code checks
74
+
75
+
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`.
76
+
77
+
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.
78
+
s
79
+
To run all tests and checks, simply run `tox` with no options.
0 commit comments