Fix/update the codebase to support the latest versions of Typer and Pydantic.
Update several major aspects of the developer experience.
v0.7.2 (2025-01-06)
Fix/update the codebase to support the latest versions of Typer and Pydantic.
Update several major aspects of the developer experience.
Fixed bugs:
- The list functionality seems to be broken #211
Merged pull requests:
- [pre-commit.ci] pre-commit autoupdate #215 (pre-commit-ci[bot])
- Update deployment CD and CLI docs build #212 (CasperWA)
- [pre-commit.ci] pre-commit autoupdate #210 (pre-commit-ci[bot])
- [pre-commit.ci] pre-commit autoupdate #207 (pre-commit-ci[bot])
- [pre-commit.ci] pre-commit autoupdate #202 (pre-commit-ci[bot])
- [pre-commit.ci] pre-commit autoupdate #200 (pre-commit-ci[bot])
- [pre-commit.ci] pre-commit autoupdate #197 (pre-commit-ci[bot])
- [pre-commit.ci] pre-commit autoupdate #195 (pre-commit-ci[bot])
v0.7.1 (2024-10-02)
Dependencies have been updated as well as CI tests to support and test the latest MongoDB version, 8. This is important because the production server on onto-ns.com will be using this version in the backend.
Update all dependencies and dev tools, updating and keeping the code base modern, readable and relevant.
Fixed bugs:
Closed issues:
- Run CI workflows using MongoDB v8 #191
Merged pull requests:
v0.7.0 (2024-07-03)
Two new commands are introduced to the CLI:
This returns a table overview of all fully qualified URL namespaces that contain entities from the service located at the value given by the environment variable ENTITIES_SERVICE_BASE_URL
.
Takes as many NAMESPACE
arguments as desired - even zero. And will list all the entities found in those given namespaces.
If no namespace is given, the value given by the environment variable ENTITIES_SERVICE_BASE_URL
will be used.
One can also use the option --all-namespaces/-a
to return all entities for the core and all specific namespaces at ENTITIES_SERVICE_BASE_URL
.
Several DX and dependency updates have been introduced, for a full overview, please see the full changelog.
Implemented enhancements:
- ✨ List and report on entities in (specific) namespace #107
- Separate entity URI/identity from hosting URL #76
Fixed bugs:
- 🔧 Cap DLite version #161
- 🔧 Fix lines in table output from upload summary #149
- 🔧 Ensure the service is deployed if the dependencies are updated #139
- 🔧
dimensions
should always be returned #102
Closed issues:
- 📄 Document the CLI API #148
Merged pull requests:
- Support latest DLite version (v0.5.16) #162 (CasperWA)
- Ensure
last_namespace
is updated iteratively #151 (CasperWA) - Add pyproject.toml to service changes file checklist #150 (CasperWA)
- Add CLI documentation #114 (CasperWA)
- List entities in namespace(s) #111 (CasperWA)
v0.6.0 (2024-05-08)
identity
is now allowed as an alias for uri
. This is in accord with regular SOFT schemas.
The dimensions
key is now always returned when retrieving an entity, even if empty. This is done mainly to support DLite usage, since DLite cannot handle entities that do not explicitly define the dimensions
key, even though it may be empty.
The DX has been optimized by using pre-commit.ci for running pre-commit hooks on a PR as well as autoupgrading the hooks weekly as part of the repository's CI/CD.
Merged pull requests:
v0.5.0 (2024-04-26)
With the latest updates to the entities-service
CLI it can be used as intended in CI/CD workflows.
To make this happen, this release further upgrades the CLI, mainly by deprecating the --file/-f
and --dir/-d
inputs for the upload
and validate
commands in favor of a SOURCE...
argument, i.e., one can supply (relative or absolute) paths to files and directories multiple times to the commands, separating them by a space (or wrapping them in quotation marks (either "
or '
will work).
In addition, this new SOURCE...
argument is utilized in two cases:
- One can supply the arguments via
stdin
. - The
validate
command has been wrapped as a pre-commit hook.
The stdin
possibility allows one to do something like:
git diff --name-only | entities-service validate -
This will supply the validate
command with a list of files that are different between the current git
working directory and the previous commit.
When using the hook, one should focus in the files it runs on via the files
hook argument. One must also supply the argument additional_dependencies
with the value '.[cli]'
(note, this argument expects a list, so this value should be one of the values in that list).
The hook will automatically run on all implemented formats (currently JSON and YAML/YML).
The hook will automatically use the --verbose
flag, should there be any content differences between the local and externally existing counterparts.
Implemented enhancements:
- ✨ Support piping in SOURCE's (filepaths and directories) #130
- ✨ New option
--strict
for thevalidate
command #129 - ✨ Run some CLI commands as pre-commit hooks #122
Closed issues:
- Only deploy service if changes in service is detected #92
Merged pull requests:
- Update README with pre-commit and CLI info #134 (CasperWA)
- Add
--strict
option to CLI #132 (CasperWA) - Support using stdin as input for CLI #131 (CasperWA)
- Only deploy service to onto-ns.com if relevant changes detected #124 (CasperWA)
v0.4.0 (2024-04-23)
A new CLI command (validate
) has been added to make it possible to validate entities.
This is convenient both as a split of the bloated upload
command implementation, but also as a separate functionality for data documentation repositories to ensure any changes to entities will still result in valid entities.
Furthermore, a new --auto-confirm/-y
option has been added to the upload
command as an extension on the --quiet/-q
option. It will still ensure print statements occur, but will use defaults and "Yes" responses whenever it is needed.
Implemented enhancements:
- ✨ Add an option to the
upload
command to auto-confirm the summary #119 - ✨ Add a new
validate
command #118
Merged pull requests:
- New
--auto-confirm/-y
option forupload
cmd #121 (CasperWA) - Add a new 'validate' CLI command #120 (CasperWA)
v0.3.0 (2024-04-09)
The CLI now supports setting an access token to upload entities - this avoids the need for manual interaction when authenticating using GitLab. The access token should preferably be case-specific and created as a group access token (see the GitLab documentation for more information about group access tokens).
Note, the minimum access level for the token should still be
Developer
for it to be allowed to create entities. Beware that this minimum access level may change in the future.
Support specific namespaced URIs according to #7. If one has write rights for the entity backend, by setting the namespace
and/or uri
value in the entity files, they will use the relevant namespace, either the core namespace or a specific namespace.
Otherwise, the code has had some clean up related to entity model definitions, separating out the SOFT flavorings. Some fixes have been implemented after first tests have been run "in production".
Implemented enhancements:
- 🔐 Support supplying access token to upload #108
Fixed bugs:
- An access token is not tested properly in the service #112
Merged pull requests:
v0.2.0 (2024-03-22)
Support specific namespaced URIs according to #7. If one has write rights for the entity backend, by setting the namespace
and/or uri
value in the entity files, they will use the relevant namespace, either the core namespace or a specific namespace.
Otherwise, the code has had some clean up related to entity model definitions, separating out the SOFT flavorings. Some fixes have been implemented after first tests have been run "in production".
Fixed bugs:
- The pydantic model for
GitLabUserInfo
is too strict #83 - The cache dir is not being created automatically #82
Closed issues:
- Loosen name regex for retrieving entities #90
- Minimize code repeats in SOFT models #64
- Test with different "versions" of entity schemas #5
Merged pull requests:
- Support specific namespaces #101 (CasperWA)
- Unify entity version and name validation #91 (CasperWA)
- Clean up authorization models #88 (CasperWA)
- Try to create cache directory on each CLI call #87 (CasperWA)
- Separate out entity models in SOFT and DLite #74 (CasperWA)
v0.1.0 (2024-01-31)
This is the first "proper" release (after v0.0.1).
It introduces several steps up compared to a bare-bones REST API service that started as a way to return the entities from the URI/URL they have defined. Specifically on the onto-ns.com domain under the /meta
path.
The main upgrade revolves around the CLI, implemented to facilitate uploading entities. It does so by connecting to the REST API service, authenticating via SINTEF's GitLab OAuth2 flow.
A PyPI release is not planned yet. To install this package run (in a virtual environment):
pip install "entities-service[cli] @ git+https://github.com/SINTEF/entities-service.git"
Then run:
entities-service --help
To learn more about the CLI.
Implemented enhancements:
- Add a release workflow #68
- Change target for the CLI upload #63
- Integrate current docker tests into a local pytest runnable environment #53
- Update to ruff #51
- Add dependency CI workflows #13
- Help script for uploading entities #12
Fixed bugs:
- Onto-ns expects entity in the "wrong" format #38
- Deployment to onto-ns failing due to mishandling URL to MongoDB #31
Closed issues:
- Minimize repo name #62
- Move repository to SINTEF organization #10
- Implement CD workflow for deploying updates on onto-ns.com #6
- Be reasonable regarding version and name regex #4
Merged pull requests:
- Use the more concise 'Entities Service' name throughout #70 (CasperWA)
- Add a release workflow #69 (CasperWA)
- New
POST
create entity endpoint - also authentication #67 (CasperWA) - Minimal CLI for uploading functionality #55 (CasperWA)
- Setup unit tests using
pytest
#54 (CasperWA) - Update dev tools #52 (CasperWA)
- Split pydantic models to include SOFT5 as well #40 (CasperWA)
- Use custom MongoDsn pydantic URL type #32 (CasperWA)
- Add CI/CD workflows #14 (CasperWA)
- Add deployment workflow #11 (CasperWA)
- Enable custom port and user for mongodb + fixed typo in readme #9 (jesper-friis)
- Be more specific about the regex for version and name #8 (CasperWA)
- Include a bit of logging #3 (CasperWA)
- Add uvicorn worker #2 (CasperWA)
- Fix new Docker CI test #1 (CasperWA)
v0.0.1 (2023-03-30)
* This Changelog was automatically generated by github_changelog_generator