Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite xtdb-cli.py with "click" #2957

Merged
merged 49 commits into from
May 30, 2024

Conversation

originalsouth
Copy link
Contributor

Changes

Convert xtdb-cli.py to click (and add more features).

Issue link

Closes #2866

Demo

octopoes/tools/xtdb-cli.py --help


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue; tickets have been created for newly discovered issues.
  • I have written unit tests for the changes or fixes I made.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have performed a self-review of my code and refactored it to the best of my abilities.

Communication

  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have made corresponding changes to the documentation, if necessary.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

originalsouth and others added 30 commits April 11, 2024 12:10
…efactor

# Conflicts:
#	octopoes/octopoes/api/router.py
#	octopoes/octopoes/xtdb/client.py
#	octopoes/tools/xtdb-cli.py
…refactor' into feature/octopoes-xtdb-dump-load-refactor

# Conflicts:
#	octopoes/tools/xtdb-cli.py
…refactor' into feature/octopoes-xtdb-dump-load-refactor

# Conflicts:
#	octopoes/tools/xtdb-cli.py
@Donnype
Copy link
Contributor

Donnype commented May 16, 2024

@originalsouth Could you update the PR title? 😁

@ammar92 ammar92 changed the title Feature/octopoes xtdb dump load refactor Refactor: Enhance XTDB CLI tool and Octopoes dump/ load functionality May 16, 2024
@ammar92 ammar92 self-assigned this May 16, 2024
@dekkers dekkers changed the title Refactor: Enhance XTDB CLI tool and Octopoes dump/ load functionality Rewrite xtdb-cli.py with "click" May 21, 2024
octopoes/octopoes/api/router.py Outdated Show resolved Hide resolved
from pydantic import JsonValue


class XTDBClient:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we reuse the client we have in octopoes/xtdb? I think that would make sense at least, even if it triggers some refactoring on the module side. Perhaps there's some inspiration to be found in https://github.com/Donnype/xtdb-py/blob/main/xtdb/session.py as well, but perhaps we are tied to some Octopoes specific stuff.

@originalsouth
Copy link
Contributor Author

@originalsouth Could you update the PR title? 😁

Why? What is wrong with "Rewrite xtdb-cli.py with "click"" which is exactly what this patch achieves.

@underdarknl underdarknl merged commit 4375b6a into main May 30, 2024
20 checks passed
@underdarknl underdarknl deleted the feature/octopoes-xtdb-dump-load-refactor branch May 30, 2024 14:09
jpbruinsslot added a commit that referenced this pull request Jun 11, 2024
* main: (78 commits)
  Translations update from Hosted Weblate (#3048)
  Translations update from Hosted Weblate (#3018)
  Fix empty consumes of boefjes will trigger tasks in scheduler (#3017)
  Fixes text in secondary menu on scan profile detail page (#3035)
  chore: Resolves css-issues found by sonarcloud (#3034)
  Add raw AuthToken SQL migration (#3009)
  Translations update from Hosted Weblate (#3012)
  Rewrite xtdb-cli.py with "click" (#2957)
  Phase out the Repository model from the KATalogus (#2984)
  Fix merge conflicts in weblate (#3007)
  Translations update from Hosted Weblate (#2996)
  Reports: Fix select all OOIs (#2909)
  Adding IPv6 support to documentation for Docker setups (#2813)
  Translations update from Hosted Weblate (#2930)
  User documentation for reports (#2898)
  Fix task api status code response for malformed id in the scheduler (#2953)
  Add drill trace option in dnssec boefje (#2979)
  Updated packages (#2972)
  Update granian and remove workaround for fixed bug (#2980)
  Fix typing in boefjes/normalizers (#2933)
  ...
jpbruinsslot added a commit that referenced this pull request Jun 17, 2024
* main: (40 commits)
  Translations update from Hosted Weblate (#3091)
  feat: 📝 add API titles (#3055)
  Fixed 2 small mistakes in documentation (#3089)
  Documentation - developer and helper functionality documentation for xtdb-cli tool (#3023)
  fix: 🔧 update db normalize setting (#2777)
  Translations update from Hosted Weblate (#3048)
  Translations update from Hosted Weblate (#3018)
  Fix empty consumes of boefjes will trigger tasks in scheduler (#3017)
  Fixes text in secondary menu on scan profile detail page (#3035)
  chore: Resolves css-issues found by sonarcloud (#3034)
  Add raw AuthToken SQL migration (#3009)
  Translations update from Hosted Weblate (#3012)
  Rewrite xtdb-cli.py with "click" (#2957)
  Phase out the Repository model from the KATalogus (#2984)
  Fix merge conflicts in weblate (#3007)
  Translations update from Hosted Weblate (#2996)
  Reports: Fix select all OOIs (#2909)
  Adding IPv6 support to documentation for Docker setups (#2813)
  Translations update from Hosted Weblate (#2930)
  User documentation for reports (#2898)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tech-debt xtdb
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite xtdb-cli.py in "click" and add documentation
4 participants