Add InterUSS DSS aux API#38
Conversation
| lint: | ||
| uv run --index https://pypi.org/simple ruff format --check | ||
| uv run --index https://pypi.org/simple ruff check | ||
| uv run --index https://pypi.org/simple --all-groups basedpyright |
There was a problem hiding this comment.
I'm not sure enforcing the index used is a good idea, as people may have different default based on their context.
Can't it let to default values and people use env variable UV_INDEX or things set in their default config file ? (e.g. ~/.config/uv/uv.toml )
There was a problem hiding this comment.
Fair enough; removed
| mkdir -p $(pwd)/src/uas_standards/astm/f3411/v19 | ||
| docker container run -it \ | ||
| -v "$(pwd)/../..:/resources" \ | ||
| -u ${USER_GROUP} -v "$(pwd):/resources" -v "$(pwd)/.cache:/.cache" \ |
There was a problem hiding this comment.
Since it's repeated a lot, maybe it's worth an alias no?
|
|
||
| docker image build --build-context root=. -t openapi-python-converter ./tools/openapi_conversion | ||
|
|
||
| mkdir -p .cache |
There was a problem hiding this comment.
Why mounting the cache is needed? If it's for uv, I would expect the docker image to be 'stable' in term of dependencies, they may be something wrong in the dockerfile.
There was a problem hiding this comment.
Running with the -u option is necessary to avoid creating root-owned files on the host system, but when that option is added, it produces this error:
error: failed to create directory `/.cache/uv`: Permission denied (os error 13)
This is resolved by creating and mounting the user-owned .cache folder.
There was a problem hiding this comment.
Ok, then I would suggest to add that in the docker file instead:
# Ensure the cache folder is present and writable by anyone
# (Some command run with limited privileges)
RUN mkdir -p /.cache/uv/ && chmod 777 /.cache/uv/
# Also fix the root folder where python is downloaded
RUN find /root/ -type d -exec chmod a+rx {} +
(That what is on the monitoring side)
That would reuse the builded cache that should be fix and prevent errors with python's version should they shift around.
the-glu
left a comment
There was a problem hiding this comment.
LGTM.
The scd_lock_mode interface will change very soon to add 401/403, do you want to already include it ? interuss/dss@8a59aa6#diff-b3ba8801313060c12acdf92023f4572d84cadb13e54bf173ea5d972422c3a1de
mickmis
left a comment
There was a problem hiding this comment.
LGTM, if the only comment makes sense, TBD in a follow-up PR.
| @@ -0,0 +1,3 @@ | |||
| This folder contains the `aux` interface definition from [the InterUSS DSS repository](https://github.com/interuss/dss), but the contents must be manually populated and updated. | |||
There was a problem hiding this comment.
Have you considered a small script pulling the file from github (https://github.com/interuss/dss/blob/interuss/dss/v0.21.1/interfaces/aux_/aux_.yaml)? Or is it important that the yaml itself is in the repo?
This PR adds Python object support for the aux interface defined and implemented by the InterUSS DSS implementation.
Instead of referencing the API definition via submodule like most other interfaces in this repo, the content is manually copied directly from the repo as subrepo or subtree maintenance for a link to the canonical
dssrepo would be prohibitive. The README.md in the folder documents the provenance of the content.Some improvements to the autogeneration procedure are made to address various small issues.
A user-accessible make target is added that allows the user to perform the lint actions that would otherwise not be visible until a PR is created.
The autogeneration logic is adjusted slightly to resolve a basedpyright finding.
The no-longer-supported macos-13 target is removed from the test matrix.