Skip to content

Latest commit

 

History

History
281 lines (172 loc) · 17.2 KB

CHANGELOG.md

File metadata and controls

281 lines (172 loc) · 17.2 KB

Changelog

Full Changelog

New list command group

Two new commands are introduced to the CLI:

list namespaces

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.

list entities

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.

Miscellaneous

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

v0.7.0 (2024-07-02)

Full Changelog

Implemented enhancements:

  • 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:

v0.6.0 (2024-05-08)

Full Changelog

Support identity and ensure dimensions is present

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.

pre-commit.ci

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)

Full Changelog

Use the CLI in CI/CD

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.

pre-commit hook validate-entities

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 the validate 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:

v0.4.0 (2024-04-23)

Full Changelog

New validate CLI command

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:

v0.3.0 (2024-04-09)

Full Changelog

CI/CD-friendly CLI

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

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.

UX/DX updates

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)

Full Changelog

Support specific namespaced URIs

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.

UX/DX updates

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:

v0.1.0 (2024-01-31)

Full Changelog

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:

v0.0.1 (2023-03-30)

Full Changelog

* This Changelog was automatically generated by github_changelog_generator