amati 0.2__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. {amati-0.2 → amati-0.2.1}/.github/dependabot.yml +6 -2
  2. amati-0.2.1/.github/workflows/checks.yaml +90 -0
  3. amati-0.2.1/.github/workflows/publish.yaml +47 -0
  4. amati-0.2.1/.python-version +1 -0
  5. {amati-0.2 → amati-0.2.1}/PKG-INFO +26 -26
  6. {amati-0.2 → amati-0.2.1}/README.md +25 -25
  7. {amati-0.2 → amati-0.2.1}/bin/checks.sh +1 -1
  8. {amati-0.2 → amati-0.2.1}/pyproject.toml +1 -1
  9. {amati-0.2 → amati-0.2.1}/uv.lock +44 -44
  10. amati-0.2/.github/workflows/checks.yaml +0 -64
  11. amati-0.2/.github/workflows/publish.yaml +0 -29
  12. amati-0.2/.python-version +0 -1
  13. {amati-0.2 → amati-0.2.1}/.dockerignore +0 -0
  14. {amati-0.2 → amati-0.2.1}/.github/workflows/codeql.yml +0 -0
  15. {amati-0.2 → amati-0.2.1}/.github/workflows/coverage.yaml +0 -0
  16. {amati-0.2 → amati-0.2.1}/.gitignore +0 -0
  17. {amati-0.2 → amati-0.2.1}/.pre-commit-config.yaml +0 -0
  18. {amati-0.2 → amati-0.2.1}/.pylintrc +0 -0
  19. {amati-0.2 → amati-0.2.1}/Dockerfile +0 -0
  20. {amati-0.2 → amati-0.2.1}/LICENSE +0 -0
  21. {amati-0.2 → amati-0.2.1}/TEMPLATE.html +0 -0
  22. {amati-0.2 → amati-0.2.1}/amati/__init__.py +0 -0
  23. {amati-0.2 → amati-0.2.1}/amati/_error_handler.py +0 -0
  24. {amati-0.2 → amati-0.2.1}/amati/_resolve_forward_references.py +0 -0
  25. {amati-0.2 → amati-0.2.1}/amati/amati.py +0 -0
  26. {amati-0.2 → amati-0.2.1}/amati/data/http-status-codes.json +0 -0
  27. {amati-0.2 → amati-0.2.1}/amati/data/iso9110.json +0 -0
  28. {amati-0.2 → amati-0.2.1}/amati/data/media-types.json +0 -0
  29. {amati-0.2 → amati-0.2.1}/amati/data/schemes.json +0 -0
  30. {amati-0.2 → amati-0.2.1}/amati/data/spdx-licences.json +0 -0
  31. {amati-0.2 → amati-0.2.1}/amati/data/tlds.json +0 -0
  32. {amati-0.2 → amati-0.2.1}/amati/exceptions.py +0 -0
  33. {amati-0.2 → amati-0.2.1}/amati/fields/__init__.py +0 -0
  34. {amati-0.2 → amati-0.2.1}/amati/fields/_custom_types.py +0 -0
  35. {amati-0.2 → amati-0.2.1}/amati/fields/commonmark.py +0 -0
  36. {amati-0.2 → amati-0.2.1}/amati/fields/email.py +0 -0
  37. {amati-0.2 → amati-0.2.1}/amati/fields/http_status_codes.py +0 -0
  38. {amati-0.2 → amati-0.2.1}/amati/fields/iso9110.py +0 -0
  39. {amati-0.2 → amati-0.2.1}/amati/fields/json.py +0 -0
  40. {amati-0.2 → amati-0.2.1}/amati/fields/media.py +0 -0
  41. {amati-0.2 → amati-0.2.1}/amati/fields/oas.py +0 -0
  42. {amati-0.2 → amati-0.2.1}/amati/fields/spdx_licences.py +0 -0
  43. {amati-0.2 → amati-0.2.1}/amati/fields/uri.py +0 -0
  44. {amati-0.2 → amati-0.2.1}/amati/file_handler.py +0 -0
  45. {amati-0.2 → amati-0.2.1}/amati/grammars/oas.py +0 -0
  46. {amati-0.2 → amati-0.2.1}/amati/grammars/rfc6901.py +0 -0
  47. {amati-0.2 → amati-0.2.1}/amati/grammars/rfc7159.py +0 -0
  48. {amati-0.2 → amati-0.2.1}/amati/logging.py +0 -0
  49. {amati-0.2 → amati-0.2.1}/amati/model_validators.py +0 -0
  50. {amati-0.2 → amati-0.2.1}/amati/validators/__init__.py +0 -0
  51. {amati-0.2 → amati-0.2.1}/amati/validators/generic.py +0 -0
  52. {amati-0.2 → amati-0.2.1}/amati/validators/oas304.py +0 -0
  53. {amati-0.2 → amati-0.2.1}/amati/validators/oas311.py +0 -0
  54. {amati-0.2 → amati-0.2.1}/bin/startup.sh +0 -0
  55. {amati-0.2 → amati-0.2.1}/scripts/data/http_status_code.py +0 -0
  56. {amati-0.2 → amati-0.2.1}/scripts/data/iso9110.py +0 -0
  57. {amati-0.2 → amati-0.2.1}/scripts/data/media_types.py +0 -0
  58. {amati-0.2 → amati-0.2.1}/scripts/data/schemes.py +0 -0
  59. {amati-0.2 → amati-0.2.1}/scripts/data/spdx_licences.py +0 -0
  60. {amati-0.2 → amati-0.2.1}/scripts/data/tlds.py +0 -0
  61. {amati-0.2 → amati-0.2.1}/scripts/tests/setup_test_specs.py +0 -0
  62. {amati-0.2 → amati-0.2.1}/tests/__init__.py +0 -0
  63. {amati-0.2 → amati-0.2.1}/tests/data/.amati.tests.yaml +0 -0
  64. {amati-0.2 → amati-0.2.1}/tests/data/DigitalOcean-public.v2.errors.json +0 -0
  65. {amati-0.2 → amati-0.2.1}/tests/data/api.github.com.yaml.errors.json +0 -0
  66. {amati-0.2 → amati-0.2.1}/tests/data/next-api.github.com.yaml.errors.json +0 -0
  67. {amati-0.2 → amati-0.2.1}/tests/data/openapi.yaml +0 -0
  68. {amati-0.2 → amati-0.2.1}/tests/data/redocly.openapi.yaml.errors.json +0 -0
  69. {amati-0.2 → amati-0.2.1}/tests/fields/__init__.py +0 -0
  70. {amati-0.2 → amati-0.2.1}/tests/fields/test_email.py +0 -0
  71. {amati-0.2 → amati-0.2.1}/tests/fields/test_http_status_codes.py +0 -0
  72. {amati-0.2 → amati-0.2.1}/tests/fields/test_iso9110.py +0 -0
  73. {amati-0.2 → amati-0.2.1}/tests/fields/test_media.py +0 -0
  74. {amati-0.2 → amati-0.2.1}/tests/fields/test_oas.py +0 -0
  75. {amati-0.2 → amati-0.2.1}/tests/fields/test_spdx_licences.py +0 -0
  76. {amati-0.2 → amati-0.2.1}/tests/fields/test_uri.py +0 -0
  77. {amati-0.2 → amati-0.2.1}/tests/helpers.py +0 -0
  78. {amati-0.2 → amati-0.2.1}/tests/model_validators/test_all_of.py +0 -0
  79. {amati-0.2 → amati-0.2.1}/tests/model_validators/test_at_least_one.py +0 -0
  80. {amati-0.2 → amati-0.2.1}/tests/model_validators/test_if_then.py +0 -0
  81. {amati-0.2 → amati-0.2.1}/tests/model_validators/test_only_one.py +0 -0
  82. {amati-0.2 → amati-0.2.1}/tests/test_amati.py +0 -0
  83. {amati-0.2 → amati-0.2.1}/tests/test_external_specs.py +0 -0
  84. {amati-0.2 → amati-0.2.1}/tests/test_logging.py +0 -0
  85. {amati-0.2 → amati-0.2.1}/tests/validators/__init__.py +0 -0
  86. {amati-0.2 → amati-0.2.1}/tests/validators/test_generic.py +0 -0
  87. {amati-0.2 → amati-0.2.1}/tests/validators/test_licence_object.py +0 -0
  88. {amati-0.2 → amati-0.2.1}/tests/validators/test_security_scheme_object.py +0 -0
  89. {amati-0.2 → amati-0.2.1}/tests/validators/test_server_variable_object.py +0 -0
@@ -1,6 +1,5 @@
1
1
  version: 2
2
2
  updates:
3
- # Enable version updates for npm
4
3
  - package-ecosystem: "uv"
5
4
  # Look for `uv.lock` file in the root directory.
6
5
  directory: "/"
@@ -8,7 +7,6 @@ updates:
8
7
  schedule:
9
8
  interval: "daily"
10
9
 
11
- # Enable version updates for GitHub Actions
12
10
  - package-ecosystem: "github-actions"
13
11
  # Workflow files stored in the default location of `.github/workflows`
14
12
  # You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
@@ -18,3 +16,9 @@ updates:
18
16
  allow:
19
17
  - dependency-type: "direct"
20
18
  - dependency-type: "indirect"
19
+
20
+ - package-ecosystem: "docker"
21
+ # Look for `Dockerfile` in the root directory
22
+ directory: "/"
23
+ schedule:
24
+ interval: "weekly"
@@ -0,0 +1,90 @@
1
+ name: Checks
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ "main" ]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ pull-requests: write
15
+ contents: write
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - uses: dorny/paths-filter@v3
20
+ id: check_changes
21
+ with:
22
+ filters: |
23
+ relevant:
24
+ - '**/*.py'
25
+ - '**/*.sh'
26
+ - '**/*.json'
27
+ - '**/*.html'
28
+ - '**/*.toml'
29
+ - '**/*.lock'
30
+ - 'tests/**/*.yaml'
31
+ - '.pylintrc'
32
+ - '.python-version'
33
+ - '.Dockerfile'
34
+
35
+ - name: Skip message
36
+ if: ${{ !(steps.check_changes.outputs.relevant == 'true') }}
37
+ run: echo "Skipping Python checks - no relevant changes detected"
38
+
39
+
40
+ - name: Install uv
41
+ if: steps.check_changes.outputs.relevant == 'true'
42
+ uses: astral-sh/setup-uv@v6
43
+
44
+ - name: Set up Python
45
+ if: steps.check_changes.outputs.relevant == 'true'
46
+ uses: actions/setup-python@v5
47
+ with:
48
+ python-version-file: ".python-version"
49
+
50
+ - name: Install the project
51
+ if: steps.check_changes.outputs.relevant == 'true'
52
+ run: uv sync --locked --all-extras --dev
53
+
54
+ - name: Formatting
55
+ if: steps.check_changes.outputs.relevant == 'true'
56
+ run: uv run black .
57
+
58
+ - name: Import sorting
59
+ if: steps.check_changes.outputs.relevant == 'true'
60
+ run: uv run isort .
61
+
62
+ - name: Linting
63
+ if: steps.check_changes.outputs.relevant == 'true'
64
+ run: uv run pylint amati
65
+
66
+ - name: Test Linting
67
+ if: steps.check_changes.outputs.relevant == 'true'
68
+ run: uv run pylint tests
69
+
70
+ - name: Testing
71
+ if: steps.check_changes.outputs.relevant == 'true'
72
+ run: uv run pytest -m"not external" --cov
73
+
74
+ - name: Doctests
75
+ if: steps.check_changes.outputs.relevant == 'true'
76
+ run: uv run pytest --doctest-modules amati/
77
+
78
+ - name: Coverage comment
79
+ if: steps.check_changes.outputs.relevant == 'true'
80
+ id: coverage_comment
81
+ uses: py-cov-action/python-coverage-comment-action@v3
82
+ with:
83
+ GITHUB_TOKEN: ${{ github.token }}
84
+
85
+ - name: Store Pull Request comment to be posted
86
+ if: steps.check_changes.outputs.run_python_checks == 'true'
87
+ uses: actions/upload-artifact@v4
88
+ with:
89
+ name: python-coverage-comment-action
90
+ path: python-coverage-comment-action.txt
@@ -0,0 +1,47 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+
8
+ jobs:
9
+ run:
10
+ name: "Build and publish release"
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ id-token: write # Required for OIDC authentication
14
+ contents: read
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v6
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version-file: ".python-version"
24
+ - name: Build
25
+ run: uv build
26
+ - name: Publish to PyPI test
27
+ run: uv publish --index testpypi
28
+ - name: Publish
29
+ run: uv publish
30
+
31
+ - name: Set up Docker Buildx
32
+ uses: docker/setup-buildx-action@v3
33
+
34
+ - name: Log in to Docker Hub
35
+ uses: docker/login-action@v3
36
+ with:
37
+ username: ${{ secrets.DOCKERHUB_USER }}
38
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
39
+
40
+ - name: Build and push Docker image
41
+ uses: docker/build-push-action@v6
42
+ with:
43
+ context: .
44
+ push: true
45
+ tags: |
46
+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:${{ github.event.release.tag_name }}-alpha.1
47
+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}:alpha
@@ -0,0 +1 @@
1
+ 3.13.5
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amati
3
- Version: 0.2
3
+ Version: 0.2.1
4
4
  Summary: Validates that a .yaml or .json file conforms to the OpenAPI Specifications 3.x.
5
5
  Project-URL: Homepage, https://github.com/ben-alexander/amati
6
6
  Project-URL: Issues, https://github.com/ben-alexander/amati/issues
@@ -28,7 +28,7 @@ amati is designed to validate that a file conforms to the [OpenAPI Specification
28
28
 
29
29
  ## Name
30
30
 
31
- amati means to observe in Malay, especially with attention to detail. It's also one of the plurals of beloved or favourite in Italian.
31
+ "amati" means to observe in Malay, especially with attention to detail. It's also one of the plurals of beloved or favourite in Italian.
32
32
 
33
33
  ## Usage
34
34
 
@@ -59,34 +59,47 @@ A Dockerfile is available on [DockerHub](https://hub.docker.com/r/benale/amati/t
59
59
  To run against a specific specification the location of the specification needs to be mounted in the container.
60
60
 
61
61
  ```sh
62
- docker run -v "<path-to-mount>:/<mount-name> amati <options>
62
+ docker run -v "<path-to-mount>:/<mount-name> amati:alpha <options>
63
63
  ```
64
64
 
65
65
  e.g.
66
66
 
67
67
  ```sh
68
- docker run -v /Users/myuser/myrepo:/data amati --spec data/myspec.yaml --hr
68
+ docker run -v /Users/myuser/myrepo:/data amati:alpha --spec data/myspec.yaml --hr
69
69
  ```
70
70
 
71
71
  ## Architecture
72
72
 
73
- This uses Pydantic, especially the validation, and Typing to construct the entire OAS as a single data type. Passing a dictionary to the top-level data type runs all the validation in the Pydantic models constructing a single set of inherited classes and datatypes that validate that the API specification is accurate.
73
+ amati uses Pydantic, especially the validation, and Typing to construct the entire OAS as a single data type. Passing a dictionary to the top-level data type runs all the validation in the Pydantic models constructing a single set of inherited classes and datatypes that validate that the API specification is accurate. To the extent that Pydantic is functional, amati has a [functional core and an imperative shell](https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell).
74
74
 
75
75
  Where the specification conforms, but relies on implementation-defined behavior (e.g. [data type formats](https://spec.openapis.org/oas/v3.1.1.html#data-type-format)), a warning will be raised.
76
76
 
77
77
  ## Contributing
78
78
 
79
- ### Requirements
79
+ ### Prerequisites
80
80
 
81
81
  * The latest version of [uv](https://docs.astral.sh/uv/)
82
82
  * [git 2.49+](https://git-scm.com/downloads/linux)
83
+ * [Docker](https://docs.docker.com/engine/install/)
84
+
85
+ ### Starting
86
+
87
+ The project uses a [`pyproject.toml` file](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml) to determine what to build.
88
+
89
+ To get started run:
90
+
91
+ ```sh
92
+ uv python install
93
+ uv venv
94
+ uv sync
95
+ ```
83
96
 
84
97
  ### Testing and formatting
85
98
 
86
99
  This project uses:
87
100
 
88
101
  * [Pytest](https://docs.pytest.org/en/stable/) as a testing framework
89
- * [PyLance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) on strict mode for type checking
102
+ * [Pyright](https://microsoft.github.io/pyright/#/) on strict mode for type checking
90
103
  * [Pylint](https://www.pylint.org/) as a linter, using a modified version from [Google's style guide](https://google.github.io/styleguide/pyguide.html)
91
104
  * [Hypothesis](https://hypothesis.readthedocs.io/en/latest/index.html) for test data generation
92
105
  * [Coverage](https://coverage.readthedocs.io/en/7.6.8/) on both the tests and code for test coverage
@@ -94,33 +107,20 @@ This project uses:
94
107
  * [isort](https://pycqa.github.io/isort/) for import sorting
95
108
 
96
109
  It's expected that there are no errors and 100% of the code is reached and executed. The strategy for test coverage is based on parsing test specifications and not unit tests.
97
-
98
- amati runs tests on external specifications, detailed in `tests/data/.amati.tests.yaml`. To be able to run these tests the appropriate GitHub repos need to be local. Specific revisions of the repos can be downloaded by running
110
+ amati runs tests on the external specifications, detailed in `tests/data/.amati.tests.yaml`. To be able to run these tests the GitHub repos containing the specifications need to be available locally. Specific revisions of the repos can be downloaded by running the following, which will clone the repos into `../amati-tests-specs/<repo-name>`.
99
111
 
100
112
  ```sh
101
113
  python scripts/tests/setup_test_specs.py
102
114
  ```
103
115
 
116
+ If there are some issues with the specification a JSON file detailing those should be placed into `tests/data/` and the name of that file noted in `tests/data/.amati.tests.yaml` for the test suite to pick it up and check that the errors are expected. Any specifications that close the coverage gap are gratefully received.
117
+
104
118
  To run everything, from linting, type checking to downloading test specs and building and testing the Docker image run:
105
119
 
106
120
  ```sh
107
121
  sh bin/checks.sh
108
122
  ```
109
123
 
110
- You will need to have Docker installed.
111
-
112
- ### Building
113
-
114
- The project uses a [`pyproject.toml` file](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml) to determine what to build.
115
-
116
- To install, assuming that [uv](https://docs.astral.sh/uv/) is already installed and initialised
117
-
118
- ```sh
119
- uv python install
120
- uv venv
121
- uv sync
122
- ```
123
-
124
124
  ### Docker
125
125
 
126
126
  A development Docker image is provided, `Dockerfile.dev`, to build:
@@ -129,7 +129,7 @@ A development Docker image is provided, `Dockerfile.dev`, to build:
129
129
  docker build -t amati -f Dockerfile .
130
130
  ```
131
131
 
132
- and to run against a specific specification the location of the specification needs to be mounted in the container.
132
+ to run against a specific specification the location of the specification needs to be mounted in the container.
133
133
 
134
134
  ```sh
135
135
  docker run -v "<path-to-mount>:/<mount-name> amati <options>
@@ -138,13 +138,13 @@ docker run -v "<path-to-mount>:/<mount-name> amati <options>
138
138
  This can be tested against a provided specification, from the root directory
139
139
 
140
140
  ```sh
141
- docker run --detach -v "$(pwd):/data" amati
141
+ docker run --detach -v "$(pwd):/data" amati <options>
142
142
  ```
143
143
 
144
144
 
145
145
  ### Data
146
146
 
147
- There are some scripts to create the data needed by the project, for example, all the possible licences. If the data needs to be refreshed this can be done by running the contents of `/scripts/data`.
147
+ There are some scripts to create the data needed by the project, for example, all the registered TLDs. To refresh the data, run the contents of `/scripts/data`.
148
148
 
149
149
 
150
150
 
@@ -4,7 +4,7 @@ amati is designed to validate that a file conforms to the [OpenAPI Specification
4
4
 
5
5
  ## Name
6
6
 
7
- amati means to observe in Malay, especially with attention to detail. It's also one of the plurals of beloved or favourite in Italian.
7
+ "amati" means to observe in Malay, especially with attention to detail. It's also one of the plurals of beloved or favourite in Italian.
8
8
 
9
9
  ## Usage
10
10
 
@@ -35,34 +35,47 @@ A Dockerfile is available on [DockerHub](https://hub.docker.com/r/benale/amati/t
35
35
  To run against a specific specification the location of the specification needs to be mounted in the container.
36
36
 
37
37
  ```sh
38
- docker run -v "<path-to-mount>:/<mount-name> amati <options>
38
+ docker run -v "<path-to-mount>:/<mount-name> amati:alpha <options>
39
39
  ```
40
40
 
41
41
  e.g.
42
42
 
43
43
  ```sh
44
- docker run -v /Users/myuser/myrepo:/data amati --spec data/myspec.yaml --hr
44
+ docker run -v /Users/myuser/myrepo:/data amati:alpha --spec data/myspec.yaml --hr
45
45
  ```
46
46
 
47
47
  ## Architecture
48
48
 
49
- This uses Pydantic, especially the validation, and Typing to construct the entire OAS as a single data type. Passing a dictionary to the top-level data type runs all the validation in the Pydantic models constructing a single set of inherited classes and datatypes that validate that the API specification is accurate.
49
+ amati uses Pydantic, especially the validation, and Typing to construct the entire OAS as a single data type. Passing a dictionary to the top-level data type runs all the validation in the Pydantic models constructing a single set of inherited classes and datatypes that validate that the API specification is accurate. To the extent that Pydantic is functional, amati has a [functional core and an imperative shell](https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell).
50
50
 
51
51
  Where the specification conforms, but relies on implementation-defined behavior (e.g. [data type formats](https://spec.openapis.org/oas/v3.1.1.html#data-type-format)), a warning will be raised.
52
52
 
53
53
  ## Contributing
54
54
 
55
- ### Requirements
55
+ ### Prerequisites
56
56
 
57
57
  * The latest version of [uv](https://docs.astral.sh/uv/)
58
58
  * [git 2.49+](https://git-scm.com/downloads/linux)
59
+ * [Docker](https://docs.docker.com/engine/install/)
60
+
61
+ ### Starting
62
+
63
+ The project uses a [`pyproject.toml` file](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml) to determine what to build.
64
+
65
+ To get started run:
66
+
67
+ ```sh
68
+ uv python install
69
+ uv venv
70
+ uv sync
71
+ ```
59
72
 
60
73
  ### Testing and formatting
61
74
 
62
75
  This project uses:
63
76
 
64
77
  * [Pytest](https://docs.pytest.org/en/stable/) as a testing framework
65
- * [PyLance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) on strict mode for type checking
78
+ * [Pyright](https://microsoft.github.io/pyright/#/) on strict mode for type checking
66
79
  * [Pylint](https://www.pylint.org/) as a linter, using a modified version from [Google's style guide](https://google.github.io/styleguide/pyguide.html)
67
80
  * [Hypothesis](https://hypothesis.readthedocs.io/en/latest/index.html) for test data generation
68
81
  * [Coverage](https://coverage.readthedocs.io/en/7.6.8/) on both the tests and code for test coverage
@@ -70,33 +83,20 @@ This project uses:
70
83
  * [isort](https://pycqa.github.io/isort/) for import sorting
71
84
 
72
85
  It's expected that there are no errors and 100% of the code is reached and executed. The strategy for test coverage is based on parsing test specifications and not unit tests.
73
-
74
- amati runs tests on external specifications, detailed in `tests/data/.amati.tests.yaml`. To be able to run these tests the appropriate GitHub repos need to be local. Specific revisions of the repos can be downloaded by running
86
+ amati runs tests on the external specifications, detailed in `tests/data/.amati.tests.yaml`. To be able to run these tests the GitHub repos containing the specifications need to be available locally. Specific revisions of the repos can be downloaded by running the following, which will clone the repos into `../amati-tests-specs/<repo-name>`.
75
87
 
76
88
  ```sh
77
89
  python scripts/tests/setup_test_specs.py
78
90
  ```
79
91
 
92
+ If there are some issues with the specification a JSON file detailing those should be placed into `tests/data/` and the name of that file noted in `tests/data/.amati.tests.yaml` for the test suite to pick it up and check that the errors are expected. Any specifications that close the coverage gap are gratefully received.
93
+
80
94
  To run everything, from linting, type checking to downloading test specs and building and testing the Docker image run:
81
95
 
82
96
  ```sh
83
97
  sh bin/checks.sh
84
98
  ```
85
99
 
86
- You will need to have Docker installed.
87
-
88
- ### Building
89
-
90
- The project uses a [`pyproject.toml` file](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml) to determine what to build.
91
-
92
- To install, assuming that [uv](https://docs.astral.sh/uv/) is already installed and initialised
93
-
94
- ```sh
95
- uv python install
96
- uv venv
97
- uv sync
98
- ```
99
-
100
100
  ### Docker
101
101
 
102
102
  A development Docker image is provided, `Dockerfile.dev`, to build:
@@ -105,7 +105,7 @@ A development Docker image is provided, `Dockerfile.dev`, to build:
105
105
  docker build -t amati -f Dockerfile .
106
106
  ```
107
107
 
108
- and to run against a specific specification the location of the specification needs to be mounted in the container.
108
+ to run against a specific specification the location of the specification needs to be mounted in the container.
109
109
 
110
110
  ```sh
111
111
  docker run -v "<path-to-mount>:/<mount-name> amati <options>
@@ -114,13 +114,13 @@ docker run -v "<path-to-mount>:/<mount-name> amati <options>
114
114
  This can be tested against a provided specification, from the root directory
115
115
 
116
116
  ```sh
117
- docker run --detach -v "$(pwd):/data" amati
117
+ docker run --detach -v "$(pwd):/data" amati <options>
118
118
  ```
119
119
 
120
120
 
121
121
  ### Data
122
122
 
123
- There are some scripts to create the data needed by the project, for example, all the possible licences. If the data needs to be refreshed this can be done by running the contents of `/scripts/data`.
123
+ There are some scripts to create the data needed by the project, for example, all the registered TLDs. To refresh the data, run the contents of `/scripts/data`.
124
124
 
125
125
 
126
126
 
@@ -5,6 +5,6 @@ python scripts/tests/setup_test_specs.py
5
5
  pytest --cov-report term-missing --cov=amati tests
6
6
  pytest --doctest-modules amati/
7
7
  docker build -t amati -f Dockerfile .
8
- cd test
8
+ cd tests/
9
9
  docker run --detach -v "$(pwd):/data" amati -d /data
10
10
  cd ../
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "amati"
3
- version = "0.2"
3
+ version = "0.2.1"
4
4
  description = "Validates that a .yaml or .json file conforms to the OpenAPI Specifications 3.x."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -5,7 +5,7 @@ requires-python = ">=3.13"
5
5
  [[package]]
6
6
  name = "abnf"
7
7
  version = "2.3.1"
8
- source = { registry = "https://pypi.org/simple/" }
8
+ source = { registry = "https://pypi.org/simple" }
9
9
  sdist = { url = "https://files.pythonhosted.org/packages/f8/3f/064e27448bb58a3a8e7df90e398a0dbf2087a058dd0219ef3426f6d2eb10/abnf-2.3.1.tar.gz", hash = "sha256:2d3ed490c64c0e285ed35384d4a588f3b1e8930620b09b76602851082784e34f", size = 308677, upload-time = "2024-12-25T18:47:20.269Z" }
10
10
  wheels = [
11
11
  { url = "https://files.pythonhosted.org/packages/b9/c1/668a33f04e0daa0cf354f3293abc2a8910498f150104c22b160bada1f4fd/abnf-2.3.1-py3-none-any.whl", hash = "sha256:ab3704639a11efe26cd64da0768b67e68a3b2c408d63252e4c475196dfb9c02a", size = 44097, upload-time = "2024-12-25T18:47:17.658Z" },
@@ -13,7 +13,7 @@ wheels = [
13
13
 
14
14
  [[package]]
15
15
  name = "amati"
16
- version = "0.2"
16
+ version = "0.2.1"
17
17
  source = { editable = "." }
18
18
  dependencies = [
19
19
  { name = "abnf" },
@@ -61,7 +61,7 @@ dev = [
61
61
  [[package]]
62
62
  name = "annotated-types"
63
63
  version = "0.7.0"
64
- source = { registry = "https://pypi.org/simple/" }
64
+ source = { registry = "https://pypi.org/simple" }
65
65
  sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" }
66
66
  wheels = [
67
67
  { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" },
@@ -70,7 +70,7 @@ wheels = [
70
70
  [[package]]
71
71
  name = "astroid"
72
72
  version = "3.3.10"
73
- source = { registry = "https://pypi.org/simple/" }
73
+ source = { registry = "https://pypi.org/simple" }
74
74
  sdist = { url = "https://files.pythonhosted.org/packages/00/c2/9b2de9ed027f9fe5734a6c0c0a601289d796b3caaf1e372e23fa88a73047/astroid-3.3.10.tar.gz", hash = "sha256:c332157953060c6deb9caa57303ae0d20b0fbdb2e59b4a4f2a6ba49d0a7961ce", size = 398941, upload-time = "2025-05-10T13:33:10.405Z" }
75
75
  wheels = [
76
76
  { url = "https://files.pythonhosted.org/packages/15/58/5260205b9968c20b6457ed82f48f9e3d6edf2f1f95103161798b73aeccf0/astroid-3.3.10-py3-none-any.whl", hash = "sha256:104fb9cb9b27ea95e847a94c003be03a9e039334a8ebca5ee27dafaf5c5711eb", size = 275388, upload-time = "2025-05-10T13:33:08.391Z" },
@@ -79,7 +79,7 @@ wheels = [
79
79
  [[package]]
80
80
  name = "attrs"
81
81
  version = "25.3.0"
82
- source = { registry = "https://pypi.org/simple/" }
82
+ source = { registry = "https://pypi.org/simple" }
83
83
  sdist = { url = "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b", size = 812032, upload-time = "2025-03-13T11:10:22.779Z" }
84
84
  wheels = [
85
85
  { url = "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3", size = 63815, upload-time = "2025-03-13T11:10:21.14Z" },
@@ -88,7 +88,7 @@ wheels = [
88
88
  [[package]]
89
89
  name = "black"
90
90
  version = "25.1.0"
91
- source = { registry = "https://pypi.org/simple/" }
91
+ source = { registry = "https://pypi.org/simple" }
92
92
  dependencies = [
93
93
  { name = "click" },
94
94
  { name = "mypy-extensions" },
@@ -108,7 +108,7 @@ wheels = [
108
108
  [[package]]
109
109
  name = "cfgv"
110
110
  version = "3.4.0"
111
- source = { registry = "https://pypi.org/simple/" }
111
+ source = { registry = "https://pypi.org/simple" }
112
112
  sdist = { url = "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560", size = 7114, upload-time = "2023-08-12T20:38:17.776Z" }
113
113
  wheels = [
114
114
  { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249, upload-time = "2023-08-12T20:38:16.269Z" },
@@ -117,7 +117,7 @@ wheels = [
117
117
  [[package]]
118
118
  name = "click"
119
119
  version = "8.2.1"
120
- source = { registry = "https://pypi.org/simple/" }
120
+ source = { registry = "https://pypi.org/simple" }
121
121
  dependencies = [
122
122
  { name = "colorama", marker = "sys_platform == 'win32'" },
123
123
  ]
@@ -129,7 +129,7 @@ wheels = [
129
129
  [[package]]
130
130
  name = "colorama"
131
131
  version = "0.4.6"
132
- source = { registry = "https://pypi.org/simple/" }
132
+ source = { registry = "https://pypi.org/simple" }
133
133
  sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
134
134
  wheels = [
135
135
  { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
@@ -138,7 +138,7 @@ wheels = [
138
138
  [[package]]
139
139
  name = "coverage"
140
140
  version = "7.8.2"
141
- source = { registry = "https://pypi.org/simple/" }
141
+ source = { registry = "https://pypi.org/simple" }
142
142
  sdist = { url = "https://files.pythonhosted.org/packages/ba/07/998afa4a0ecdf9b1981ae05415dad2d4e7716e1b1f00abbd91691ac09ac9/coverage-7.8.2.tar.gz", hash = "sha256:a886d531373a1f6ff9fad2a2ba4a045b68467b779ae729ee0b3b10ac20033b27", size = 812759, upload-time = "2025-05-23T11:39:57.856Z" }
143
143
  wheels = [
144
144
  { url = "https://files.pythonhosted.org/packages/1a/93/eb6400a745ad3b265bac36e8077fdffcf0268bdbbb6c02b7220b624c9b31/coverage-7.8.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ea561010914ec1c26ab4188aef8b1567272ef6de096312716f90e5baa79ef8ca", size = 211898, upload-time = "2025-05-23T11:38:49.066Z" },
@@ -169,7 +169,7 @@ wheels = [
169
169
  [[package]]
170
170
  name = "dill"
171
171
  version = "0.4.0"
172
- source = { registry = "https://pypi.org/simple/" }
172
+ source = { registry = "https://pypi.org/simple" }
173
173
  sdist = { url = "https://files.pythonhosted.org/packages/12/80/630b4b88364e9a8c8c5797f4602d0f76ef820909ee32f0bacb9f90654042/dill-0.4.0.tar.gz", hash = "sha256:0633f1d2df477324f53a895b02c901fb961bdbf65a17122586ea7019292cbcf0", size = 186976, upload-time = "2025-04-16T00:41:48.867Z" }
174
174
  wheels = [
175
175
  { url = "https://files.pythonhosted.org/packages/50/3d/9373ad9c56321fdab5b41197068e1d8c25883b3fea29dd361f9b55116869/dill-0.4.0-py3-none-any.whl", hash = "sha256:44f54bf6412c2c8464c14e8243eb163690a9800dbe2c367330883b19c7561049", size = 119668, upload-time = "2025-04-16T00:41:47.671Z" },
@@ -178,7 +178,7 @@ wheels = [
178
178
  [[package]]
179
179
  name = "distlib"
180
180
  version = "0.3.9"
181
- source = { registry = "https://pypi.org/simple/" }
181
+ source = { registry = "https://pypi.org/simple" }
182
182
  sdist = { url = "https://files.pythonhosted.org/packages/0d/dd/1bec4c5ddb504ca60fc29472f3d27e8d4da1257a854e1d96742f15c1d02d/distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403", size = 613923, upload-time = "2024-10-09T18:35:47.551Z" }
183
183
  wheels = [
184
184
  { url = "https://files.pythonhosted.org/packages/91/a1/cf2472db20f7ce4a6be1253a81cfdf85ad9c7885ffbed7047fb72c24cf87/distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87", size = 468973, upload-time = "2024-10-09T18:35:44.272Z" },
@@ -187,7 +187,7 @@ wheels = [
187
187
  [[package]]
188
188
  name = "filelock"
189
189
  version = "3.18.0"
190
- source = { registry = "https://pypi.org/simple/" }
190
+ source = { registry = "https://pypi.org/simple" }
191
191
  sdist = { url = "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2", size = 18075, upload-time = "2025-03-14T07:11:40.47Z" }
192
192
  wheels = [
193
193
  { url = "https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de", size = 16215, upload-time = "2025-03-14T07:11:39.145Z" },
@@ -196,7 +196,7 @@ wheels = [
196
196
  [[package]]
197
197
  name = "hypothesis"
198
198
  version = "6.131.28"
199
- source = { registry = "https://pypi.org/simple/" }
199
+ source = { registry = "https://pypi.org/simple" }
200
200
  dependencies = [
201
201
  { name = "attrs" },
202
202
  { name = "sortedcontainers" },
@@ -209,7 +209,7 @@ wheels = [
209
209
  [[package]]
210
210
  name = "identify"
211
211
  version = "2.6.12"
212
- source = { registry = "https://pypi.org/simple/" }
212
+ source = { registry = "https://pypi.org/simple" }
213
213
  sdist = { url = "https://files.pythonhosted.org/packages/a2/88/d193a27416618628a5eea64e3223acd800b40749a96ffb322a9b55a49ed1/identify-2.6.12.tar.gz", hash = "sha256:d8de45749f1efb108badef65ee8386f0f7bb19a7f26185f74de6367bffbaf0e6", size = 99254, upload-time = "2025-05-23T20:37:53.3Z" }
214
214
  wheels = [
215
215
  { url = "https://files.pythonhosted.org/packages/7a/cd/18f8da995b658420625f7ef13f037be53ae04ec5ad33f9b718240dcfd48c/identify-2.6.12-py2.py3-none-any.whl", hash = "sha256:ad9672d5a72e0d2ff7c5c8809b62dfa60458626352fb0eb7b55e69bdc45334a2", size = 99145, upload-time = "2025-05-23T20:37:51.495Z" },
@@ -218,7 +218,7 @@ wheels = [
218
218
  [[package]]
219
219
  name = "idna"
220
220
  version = "3.10"
221
- source = { registry = "https://pypi.org/simple/" }
221
+ source = { registry = "https://pypi.org/simple" }
222
222
  sdist = { url = "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", size = 190490, upload-time = "2024-09-15T18:07:39.745Z" }
223
223
  wheels = [
224
224
  { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442, upload-time = "2024-09-15T18:07:37.964Z" },
@@ -227,7 +227,7 @@ wheels = [
227
227
  [[package]]
228
228
  name = "iniconfig"
229
229
  version = "2.1.0"
230
- source = { registry = "https://pypi.org/simple/" }
230
+ source = { registry = "https://pypi.org/simple" }
231
231
  sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" }
232
232
  wheels = [
233
233
  { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" },
@@ -236,7 +236,7 @@ wheels = [
236
236
  [[package]]
237
237
  name = "isort"
238
238
  version = "6.0.1"
239
- source = { registry = "https://pypi.org/simple/" }
239
+ source = { registry = "https://pypi.org/simple" }
240
240
  sdist = { url = "https://files.pythonhosted.org/packages/b8/21/1e2a441f74a653a144224d7d21afe8f4169e6c7c20bb13aec3a2dc3815e0/isort-6.0.1.tar.gz", hash = "sha256:1cb5df28dfbc742e490c5e41bad6da41b805b0a8be7bc93cd0fb2a8a890ac450", size = 821955, upload-time = "2025-02-26T21:13:16.955Z" }
241
241
  wheels = [
242
242
  { url = "https://files.pythonhosted.org/packages/c1/11/114d0a5f4dabbdcedc1125dee0888514c3c3b16d3e9facad87ed96fad97c/isort-6.0.1-py3-none-any.whl", hash = "sha256:2dc5d7f65c9678d94c88dfc29161a320eec67328bc97aad576874cb4be1e9615", size = 94186, upload-time = "2025-02-26T21:13:14.911Z" },
@@ -245,7 +245,7 @@ wheels = [
245
245
  [[package]]
246
246
  name = "jinja2"
247
247
  version = "3.1.6"
248
- source = { registry = "https://pypi.org/simple/" }
248
+ source = { registry = "https://pypi.org/simple" }
249
249
  dependencies = [
250
250
  { name = "markupsafe" },
251
251
  ]
@@ -257,7 +257,7 @@ wheels = [
257
257
  [[package]]
258
258
  name = "jsonpickle"
259
259
  version = "4.1.1"
260
- source = { registry = "https://pypi.org/simple/" }
260
+ source = { registry = "https://pypi.org/simple" }
261
261
  sdist = { url = "https://files.pythonhosted.org/packages/e4/a6/d07afcfdef402900229bcca795f80506b207af13a838d4d99ad45abf530c/jsonpickle-4.1.1.tar.gz", hash = "sha256:f86e18f13e2b96c1c1eede0b7b90095bbb61d99fedc14813c44dc2f361dbbae1", size = 316885, upload-time = "2025-06-02T20:36:11.57Z" }
262
262
  wheels = [
263
263
  { url = "https://files.pythonhosted.org/packages/c1/73/04df8a6fa66d43a9fd45c30f283cc4afff17da671886e451d52af60bdc7e/jsonpickle-4.1.1-py3-none-any.whl", hash = "sha256:bb141da6057898aa2438ff268362b126826c812a1721e31cf08a6e142910dc91", size = 47125, upload-time = "2025-06-02T20:36:08.647Z" },
@@ -266,7 +266,7 @@ wheels = [
266
266
  [[package]]
267
267
  name = "jsonschema"
268
268
  version = "4.24.0"
269
- source = { registry = "https://pypi.org/simple/" }
269
+ source = { registry = "https://pypi.org/simple" }
270
270
  dependencies = [
271
271
  { name = "attrs" },
272
272
  { name = "jsonschema-specifications" },
@@ -281,7 +281,7 @@ wheels = [
281
281
  [[package]]
282
282
  name = "jsonschema-specifications"
283
283
  version = "2025.4.1"
284
- source = { registry = "https://pypi.org/simple/" }
284
+ source = { registry = "https://pypi.org/simple" }
285
285
  dependencies = [
286
286
  { name = "referencing" },
287
287
  ]
@@ -293,7 +293,7 @@ wheels = [
293
293
  [[package]]
294
294
  name = "markupsafe"
295
295
  version = "3.0.2"
296
- source = { registry = "https://pypi.org/simple/" }
296
+ source = { registry = "https://pypi.org/simple" }
297
297
  sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537, upload-time = "2024-10-18T15:21:54.129Z" }
298
298
  wheels = [
299
299
  { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274, upload-time = "2024-10-18T15:21:24.577Z" },
@@ -321,7 +321,7 @@ wheels = [
321
321
  [[package]]
322
322
  name = "mccabe"
323
323
  version = "0.7.0"
324
- source = { registry = "https://pypi.org/simple/" }
324
+ source = { registry = "https://pypi.org/simple" }
325
325
  sdist = { url = "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", size = 9658, upload-time = "2022-01-24T01:14:51.113Z" }
326
326
  wheels = [
327
327
  { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350, upload-time = "2022-01-24T01:14:49.62Z" },
@@ -330,7 +330,7 @@ wheels = [
330
330
  [[package]]
331
331
  name = "mypy-extensions"
332
332
  version = "1.1.0"
333
- source = { registry = "https://pypi.org/simple/" }
333
+ source = { registry = "https://pypi.org/simple" }
334
334
  sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" }
335
335
  wheels = [
336
336
  { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" },
@@ -339,7 +339,7 @@ wheels = [
339
339
  [[package]]
340
340
  name = "nodeenv"
341
341
  version = "1.9.1"
342
- source = { registry = "https://pypi.org/simple/" }
342
+ source = { registry = "https://pypi.org/simple" }
343
343
  sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437, upload-time = "2024-06-04T18:44:11.171Z" }
344
344
  wheels = [
345
345
  { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" },
@@ -348,7 +348,7 @@ wheels = [
348
348
  [[package]]
349
349
  name = "packaging"
350
350
  version = "25.0"
351
- source = { registry = "https://pypi.org/simple/" }
351
+ source = { registry = "https://pypi.org/simple" }
352
352
  sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }
353
353
  wheels = [
354
354
  { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },
@@ -357,7 +357,7 @@ wheels = [
357
357
  [[package]]
358
358
  name = "pathspec"
359
359
  version = "0.12.1"
360
- source = { registry = "https://pypi.org/simple/" }
360
+ source = { registry = "https://pypi.org/simple" }
361
361
  sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043, upload-time = "2023-12-10T22:30:45Z" }
362
362
  wheels = [
363
363
  { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191, upload-time = "2023-12-10T22:30:43.14Z" },
@@ -366,7 +366,7 @@ wheels = [
366
366
  [[package]]
367
367
  name = "platformdirs"
368
368
  version = "4.3.8"
369
- source = { registry = "https://pypi.org/simple/" }
369
+ source = { registry = "https://pypi.org/simple" }
370
370
  sdist = { url = "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz", hash = "sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc", size = 21362, upload-time = "2025-05-07T22:47:42.121Z" }
371
371
  wheels = [
372
372
  { url = "https://files.pythonhosted.org/packages/fe/39/979e8e21520d4e47a0bbe349e2713c0aac6f3d853d0e5b34d76206c439aa/platformdirs-4.3.8-py3-none-any.whl", hash = "sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4", size = 18567, upload-time = "2025-05-07T22:47:40.376Z" },
@@ -375,7 +375,7 @@ wheels = [
375
375
  [[package]]
376
376
  name = "pluggy"
377
377
  version = "1.6.0"
378
- source = { registry = "https://pypi.org/simple/" }
378
+ source = { registry = "https://pypi.org/simple" }
379
379
  sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
380
380
  wheels = [
381
381
  { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
@@ -384,7 +384,7 @@ wheels = [
384
384
  [[package]]
385
385
  name = "pre-commit"
386
386
  version = "4.2.0"
387
- source = { registry = "https://pypi.org/simple/" }
387
+ source = { registry = "https://pypi.org/simple" }
388
388
  dependencies = [
389
389
  { name = "cfgv" },
390
390
  { name = "identify" },
@@ -400,7 +400,7 @@ wheels = [
400
400
  [[package]]
401
401
  name = "pydantic"
402
402
  version = "2.11.7"
403
- source = { registry = "https://pypi.org/simple/" }
403
+ source = { registry = "https://pypi.org/simple" }
404
404
  dependencies = [
405
405
  { name = "annotated-types" },
406
406
  { name = "pydantic-core" },
@@ -415,7 +415,7 @@ wheels = [
415
415
  [[package]]
416
416
  name = "pydantic-core"
417
417
  version = "2.33.2"
418
- source = { registry = "https://pypi.org/simple/" }
418
+ source = { registry = "https://pypi.org/simple" }
419
419
  dependencies = [
420
420
  { name = "typing-extensions" },
421
421
  ]
@@ -443,7 +443,7 @@ wheels = [
443
443
  [[package]]
444
444
  name = "pylint"
445
445
  version = "3.3.7"
446
- source = { registry = "https://pypi.org/simple/" }
446
+ source = { registry = "https://pypi.org/simple" }
447
447
  dependencies = [
448
448
  { name = "astroid" },
449
449
  { name = "colorama", marker = "sys_platform == 'win32'" },
@@ -461,7 +461,7 @@ wheels = [
461
461
  [[package]]
462
462
  name = "pytest"
463
463
  version = "8.3.5"
464
- source = { registry = "https://pypi.org/simple/" }
464
+ source = { registry = "https://pypi.org/simple" }
465
465
  dependencies = [
466
466
  { name = "colorama", marker = "sys_platform == 'win32'" },
467
467
  { name = "iniconfig" },
@@ -476,7 +476,7 @@ wheels = [
476
476
  [[package]]
477
477
  name = "pytest-cov"
478
478
  version = "6.1.1"
479
- source = { registry = "https://pypi.org/simple/" }
479
+ source = { registry = "https://pypi.org/simple" }
480
480
  dependencies = [
481
481
  { name = "coverage" },
482
482
  { name = "pytest" },
@@ -489,7 +489,7 @@ wheels = [
489
489
  [[package]]
490
490
  name = "pyyaml"
491
491
  version = "6.0.2"
492
- source = { registry = "https://pypi.org/simple/" }
492
+ source = { registry = "https://pypi.org/simple" }
493
493
  sdist = { url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", size = 130631, upload-time = "2024-08-06T20:33:50.674Z" }
494
494
  wheels = [
495
495
  { url = "https://files.pythonhosted.org/packages/ef/e3/3af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f/PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", size = 181309, upload-time = "2024-08-06T20:32:43.4Z" },
@@ -506,7 +506,7 @@ wheels = [
506
506
  [[package]]
507
507
  name = "referencing"
508
508
  version = "0.36.2"
509
- source = { registry = "https://pypi.org/simple/" }
509
+ source = { registry = "https://pypi.org/simple" }
510
510
  dependencies = [
511
511
  { name = "attrs" },
512
512
  { name = "rpds-py" },
@@ -519,7 +519,7 @@ wheels = [
519
519
  [[package]]
520
520
  name = "rpds-py"
521
521
  version = "0.25.1"
522
- source = { registry = "https://pypi.org/simple/" }
522
+ source = { registry = "https://pypi.org/simple" }
523
523
  sdist = { url = "https://files.pythonhosted.org/packages/8c/a6/60184b7fc00dd3ca80ac635dd5b8577d444c57e8e8742cecabfacb829921/rpds_py-0.25.1.tar.gz", hash = "sha256:8960b6dac09b62dac26e75d7e2c4a22efb835d827a7278c34f72b2b84fa160e3", size = 27304, upload-time = "2025-05-21T12:46:12.502Z" }
524
524
  wheels = [
525
525
  { url = "https://files.pythonhosted.org/packages/2b/da/323848a2b62abe6a0fec16ebe199dc6889c5d0a332458da8985b2980dffe/rpds_py-0.25.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:659d87430a8c8c704d52d094f5ba6fa72ef13b4d385b7e542a08fc240cb4a559", size = 364498, upload-time = "2025-05-21T12:43:54.841Z" },
@@ -554,7 +554,7 @@ wheels = [
554
554
  [[package]]
555
555
  name = "sortedcontainers"
556
556
  version = "2.4.0"
557
- source = { registry = "https://pypi.org/simple/" }
557
+ source = { registry = "https://pypi.org/simple" }
558
558
  sdist = { url = "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88", size = 30594, upload-time = "2021-05-16T22:03:42.897Z" }
559
559
  wheels = [
560
560
  { url = "https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0", size = 29575, upload-time = "2021-05-16T22:03:41.177Z" },
@@ -563,7 +563,7 @@ wheels = [
563
563
  [[package]]
564
564
  name = "tomlkit"
565
565
  version = "0.13.2"
566
- source = { registry = "https://pypi.org/simple/" }
566
+ source = { registry = "https://pypi.org/simple" }
567
567
  sdist = { url = "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79", size = 192885, upload-time = "2024-08-14T08:19:41.488Z" }
568
568
  wheels = [
569
569
  { url = "https://files.pythonhosted.org/packages/f9/b6/a447b5e4ec71e13871be01ba81f5dfc9d0af7e473da256ff46bc0e24026f/tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde", size = 37955, upload-time = "2024-08-14T08:19:40.05Z" },
@@ -572,7 +572,7 @@ wheels = [
572
572
  [[package]]
573
573
  name = "typing-extensions"
574
574
  version = "4.13.2"
575
- source = { registry = "https://pypi.org/simple/" }
575
+ source = { registry = "https://pypi.org/simple" }
576
576
  sdist = { url = "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef", size = 106967, upload-time = "2025-04-10T14:19:05.416Z" }
577
577
  wheels = [
578
578
  { url = "https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", size = 45806, upload-time = "2025-04-10T14:19:03.967Z" },
@@ -581,7 +581,7 @@ wheels = [
581
581
  [[package]]
582
582
  name = "typing-inspection"
583
583
  version = "0.4.1"
584
- source = { registry = "https://pypi.org/simple/" }
584
+ source = { registry = "https://pypi.org/simple" }
585
585
  dependencies = [
586
586
  { name = "typing-extensions" },
587
587
  ]
@@ -593,7 +593,7 @@ wheels = [
593
593
  [[package]]
594
594
  name = "virtualenv"
595
595
  version = "20.31.2"
596
- source = { registry = "https://pypi.org/simple/" }
596
+ source = { registry = "https://pypi.org/simple" }
597
597
  dependencies = [
598
598
  { name = "distlib" },
599
599
  { name = "filelock" },
@@ -1,64 +0,0 @@
1
- name: Checks
2
-
3
- on:
4
- pull_request:
5
- branches: [ "main" ]
6
-
7
- permissions:
8
- contents: read
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- permissions:
14
- # Gives the action the necessary permissions for publishing new
15
- # comments in pull requests.
16
- pull-requests: write
17
- # Gives the action the necessary permissions for pushing data to the
18
- # python-coverage-comment-action branch, and for editing existing
19
- # comments (to avoid publishing multiple comments in the same PR)
20
- contents: write
21
- steps:
22
- - uses: actions/checkout@v4
23
- - name: Install uv
24
- uses: astral-sh/setup-uv@v6
25
- - name: Set up Python
26
- uses: actions/setup-python@v5
27
- with:
28
- python-version-file: ".python-version"
29
-
30
- - name: Install the project
31
- run: uv sync --locked --all-extras --dev
32
-
33
- - name: Formatting
34
- run: uv run black .
35
-
36
- - name: Import sorting
37
- run: uv run isort .
38
-
39
- - name: Linting
40
- run: uv run pylint amati
41
-
42
- - name: Test Linting
43
- run: uv run pylint tests
44
-
45
- - name: Testing
46
- run: uv run pytest -m"not external" --cov
47
-
48
- - name: Doctests
49
- run: uv run pytest --doctest-modules amati/
50
-
51
- - name: Coverage comment
52
- id: coverage_comment
53
- uses: py-cov-action/python-coverage-comment-action@v3
54
- with:
55
- GITHUB_TOKEN: ${{ github.token }}
56
-
57
- - name: Store Pull Request comment to be posted
58
- uses: actions/upload-artifact@v4
59
- if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
60
- with:
61
- # If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
62
- name: python-coverage-comment-action
63
- # If you use a different name, update COMMENT_FILENAME accordingly
64
- path: python-coverage-comment-action.txt
@@ -1,29 +0,0 @@
1
- name: Publish to PyPI
2
-
3
- on:
4
- release:
5
- types: [published]
6
-
7
-
8
- jobs:
9
- run:
10
- name: "Build and publish release"
11
- runs-on: ubuntu-latest
12
- permissions:
13
- id-token: write # Required for OIDC authentication
14
- contents: read
15
-
16
- steps:
17
- - uses: actions/checkout@v4
18
- - name: Install uv
19
- uses: astral-sh/setup-uv@v6
20
- - name: Set up Python
21
- uses: actions/setup-python@v5
22
- with:
23
- python-version-file: ".python-version"
24
- - name: Build
25
- run: uv build
26
- - name: Publish to PyPI test
27
- run: uv publish --index testpypi
28
- - name: Publish
29
- run: uv publish
amati-0.2/.python-version DELETED
@@ -1 +0,0 @@
1
- 3.13
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes