datatrail-cli 0.12.0__tar.gz → 1.0.0__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 (70) hide show
  1. datatrail_cli-1.0.0/.github/workflows/codeql.yml +101 -0
  2. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.github/workflows/continuous-deployment.yml +7 -6
  3. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.github/workflows/continuous-integration.yml +32 -17
  4. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.github/workflows/docs.yml +3 -0
  5. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.github/workflows/stale.yml +5 -0
  6. datatrail_cli-1.0.0/.release-please-manifest.json +3 -0
  7. datatrail_cli-1.0.0/CHANGELOG.md +543 -0
  8. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/PKG-INFO +10 -3
  9. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/README.md +2 -0
  10. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/commands.md +3 -0
  11. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/install.md +2 -0
  12. datatrail_cli-1.0.0/docs/inventory.md +80 -0
  13. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/list.md +105 -0
  14. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/ps.md +24 -0
  15. datatrail_cli-1.0.0/docs/pull-manifest.md +69 -0
  16. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/clear.py +2 -2
  17. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/cli.py +26 -5
  18. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/config.py +48 -8
  19. datatrail_cli-1.0.0/dtcli/doctor.py +169 -0
  20. datatrail_cli-1.0.0/dtcli/inventory.py +423 -0
  21. datatrail_cli-1.0.0/dtcli/locking.py +42 -0
  22. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/ls.py +135 -1
  23. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/ps.py +40 -10
  24. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/pull.py +14 -3
  25. datatrail_cli-1.0.0/dtcli/pull_manifest.py +445 -0
  26. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/scout.py +21 -4
  27. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/src/functions.py +231 -27
  28. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/unregistered.py +2 -2
  29. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/utilities/cadcclient.py +194 -64
  30. datatrail_cli-1.0.0/dtcli/utilities/results.py +12 -0
  31. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/utilities/utilities.py +46 -2
  32. datatrail_cli-1.0.0/dtcli/verify.py +326 -0
  33. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/mkdocs.yml +2 -0
  34. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/pyproject.toml +22 -4
  35. datatrail_cli-1.0.0/release-please-config.json +15 -0
  36. datatrail_cli-1.0.0/tests/conftest.py +105 -0
  37. datatrail_cli-1.0.0/tests/test_cadc_summary.py +41 -0
  38. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/tests/test_cli.py +212 -1
  39. datatrail_cli-1.0.0/tests/test_config.py +159 -0
  40. datatrail_cli-1.0.0/tests/test_doctor.py +336 -0
  41. datatrail_cli-1.0.0/tests/test_functions.py +443 -0
  42. datatrail_cli-1.0.0/tests/test_inventory.py +406 -0
  43. datatrail_cli-1.0.0/tests/test_locking.py +62 -0
  44. datatrail_cli-1.0.0/tests/test_pull_manifest.py +462 -0
  45. datatrail_cli-1.0.0/tests/test_pull_reliability.py +355 -0
  46. datatrail_cli-1.0.0/tests/test_utils.py +96 -0
  47. datatrail_cli-1.0.0/tests/test_verify.py +223 -0
  48. datatrail_cli-1.0.0/uv.lock +1702 -0
  49. datatrail_cli-0.12.0/CHANGELOG.md +0 -361
  50. datatrail_cli-0.12.0/tests/test_functions.py +0 -90
  51. datatrail_cli-0.12.0/tests/test_utils.py +0 -43
  52. datatrail_cli-0.12.0/uv.lock +0 -3431
  53. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  54. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  55. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  56. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.gitignore +0 -0
  57. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/.pre-commit-config.yaml +0 -0
  58. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/LICENSE +0 -0
  59. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/clear.md +0 -0
  60. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/cli.md +0 -0
  61. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/images/Datatrail-logo.png +0 -0
  62. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/index.md +0 -0
  63. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/initialising.md +0 -0
  64. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/pull.md +0 -0
  65. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/scout.md +0 -0
  66. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/unregistered.md +0 -0
  67. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/docs/user_guide.md +0 -0
  68. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/__init__.py +0 -0
  69. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/dtcli/config.yaml +0 -0
  70. {datatrail_cli-0.12.0 → datatrail_cli-1.0.0}/tox.ini +0 -0
@@ -0,0 +1,101 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL Advanced"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "main" ]
17
+ pull_request:
18
+ branches: [ "main" ]
19
+ schedule:
20
+ - cron: '24 11 * * 2'
21
+
22
+ jobs:
23
+ analyze:
24
+ name: Analyze (${{ matrix.language }})
25
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
26
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
27
+ # - https://gh.io/supported-runners-and-hardware-resources
28
+ # - https://gh.io/using-larger-runners (GitHub.com only)
29
+ # Consider using larger runners or machines with greater resources for possible analysis time improvements.
30
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31
+ permissions:
32
+ # required for all workflows
33
+ security-events: write
34
+
35
+ # required to fetch internal or private CodeQL packs
36
+ packages: read
37
+
38
+ # only required for workflows in private repositories
39
+ actions: read
40
+ contents: read
41
+
42
+ strategy:
43
+ fail-fast: false
44
+ matrix:
45
+ include:
46
+ - language: actions
47
+ build-mode: none
48
+ - language: python
49
+ build-mode: none
50
+ # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
51
+ # Use `c-cpp` to analyze code written in C, C++ or both
52
+ # Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53
+ # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54
+ # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55
+ # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56
+ # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57
+ # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
58
+ steps:
59
+ - name: Checkout repository
60
+ uses: actions/checkout@v7
61
+
62
+ # Add any setup steps before running the `github/codeql-action/init` action.
63
+ # This includes steps like installing compilers or runtimes (`actions/setup-node`
64
+ # or others). This is typically only required for manual builds.
65
+ # - name: Setup runtime (example)
66
+ # uses: actions/setup-example@v1
67
+
68
+ # Initializes the CodeQL tools for scanning.
69
+ - name: Initialize CodeQL
70
+ uses: github/codeql-action/init@v4
71
+ with:
72
+ languages: ${{ matrix.language }}
73
+ build-mode: ${{ matrix.build-mode }}
74
+ # If you wish to specify custom queries, you can do so here or in a config file.
75
+ # By default, queries listed here will override any specified in a config file.
76
+ # Prefix the list here with "+" to use these queries and those in the config file.
77
+
78
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
79
+ # queries: security-extended,security-and-quality
80
+
81
+ # If the analyze step fails for one of the languages you are analyzing with
82
+ # "We were unable to automatically build your code", modify the matrix above
83
+ # to set the build mode to "manual" for that language. Then modify this step
84
+ # to build your code.
85
+ # ℹ️ Command-line programs to run using the OS shell.
86
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
87
+ - name: Run manual build steps
88
+ if: matrix.build-mode == 'manual'
89
+ shell: bash
90
+ run: |
91
+ echo 'If you are using a "manual" build mode for one or more of the' \
92
+ 'languages you are analyzing, replace this with the commands to build' \
93
+ 'your code, for example:'
94
+ echo ' make bootstrap'
95
+ echo ' make release'
96
+ exit 1
97
+
98
+ - name: Perform CodeQL Analysis
99
+ uses: github/codeql-action/analyze@v4
100
+ with:
101
+ category: "/language:${{matrix.language}}"
@@ -3,26 +3,27 @@ on:
3
3
  branches:
4
4
  - main
5
5
  name: Continuous Deployment
6
+ permissions:
7
+ contents: write
8
+ issues: write
9
+ pull-requests: write
6
10
  jobs:
7
11
  release-please:
8
12
  runs-on: ubuntu-latest
9
13
  steps:
10
14
  - name: Create release
11
15
  id: release-please
12
- uses: google-github-actions/release-please-action@v3
13
- with:
14
- release-type: python
15
- package-name: datatrail-cli
16
+ uses: googleapis/release-please-action@v5
16
17
 
17
18
  - name: Checkout code
18
19
  if: ${{ steps.release-please.outputs.release_created }}
19
- uses: actions/checkout@v6
20
+ uses: actions/checkout@v7
20
21
  with:
21
22
  fetch-depth: 1
22
23
 
23
24
  - name: Install uv
24
25
  if: ${{ steps.release-please.outputs.release_created }}
25
- uses: astral-sh/setup-uv@v8.3.2
26
+ uses: astral-sh/setup-uv@v10.0.1
26
27
  with:
27
28
  enable-cache: false
28
29
  python-version: "3.13"
@@ -1,5 +1,8 @@
1
1
  name: Continuous Integration
2
2
 
3
+ permissions:
4
+ contents: read
5
+
3
6
  on:
4
7
  push:
5
8
  paths-ignore:
@@ -15,10 +18,10 @@ jobs:
15
18
  Pre-commit-checks:
16
19
  runs-on: ubuntu-latest
17
20
  steps:
18
- - uses: actions/checkout@v6
21
+ - uses: actions/checkout@v7
19
22
 
20
23
  - name: Set up Python 3.13
21
- uses: actions/setup-python@v6
24
+ uses: actions/setup-python@v7
22
25
  with:
23
26
  python-version: 3.13
24
27
 
@@ -30,21 +33,23 @@ jobs:
30
33
  Testing:
31
34
  needs: pre-commit-checks
32
35
  runs-on: ubuntu-latest
36
+ env:
37
+ RUN_CADC_TESTS: ${{ github.repository == 'CHIMEFRB/datatrail-cli' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
33
38
  strategy:
34
39
  fail-fast: false
35
40
  matrix:
36
41
  os: [ubuntu-latest]
37
42
  python-version:
38
- - "3.9"
43
+ - "3.10"
39
44
  - "3.11"
40
45
  - "3.12"
41
46
  - "3.13"
42
47
  - "3.14"
43
48
  steps:
44
- - uses: actions/checkout@v6
49
+ - uses: actions/checkout@v7
45
50
 
46
51
  - name: Install uv
47
- uses: astral-sh/setup-uv@v8.3.2
52
+ uses: astral-sh/setup-uv@v10.0.1
48
53
  with:
49
54
  enable-cache: true
50
55
  cache-dependency-glob: "uv.lock"
@@ -52,30 +57,40 @@ jobs:
52
57
  python-version: ${{ matrix.python-version }}
53
58
 
54
59
  - name: Installation
55
- run: uv sync
60
+ run: uv sync --locked
56
61
 
57
62
  - name: Create NETRC file
63
+ if: env.RUN_CADC_TESTS == 'true'
64
+ env:
65
+ CANFAR_NETRC: ${{ secrets.CANFAR_NETRC }}
58
66
  run: |
59
- export CANFAR_NETRC_FILE=$RUNNER_TEMP"/CANFAR_NETRC"
60
- echo ${{ secrets.CANFAR_NETRC }} > $CANFAR_NETRC_FILE
61
- echo CANFAR_NETRC_FILE=$CANFAR_NETRC_FILE >> "$GITHUB_ENV"
67
+ umask 077
68
+ test -n "$CANFAR_NETRC"
69
+ printf '%s\n' "$CANFAR_NETRC" > "$RUNNER_TEMP/CANFAR_NETRC"
62
70
 
63
71
  - name: Obtain CADC certificate
72
+ if: env.RUN_CADC_TESTS == 'true'
64
73
  run: |
65
- export CADC_CERT=$HOME"/.ssl/cadcproxy.pem"
66
- uv run --no-sync cadc-get-cert --netrc-file ${{ env.CANFAR_NETRC_FILE }} --days-valid 1 --cert-filename $CADC_CERT
67
- echo CADC_CERT=$CADC_CERT >> "$GITHUB_ENV"
74
+ umask 077
75
+ mkdir -p "$HOME/.ssl"
76
+ uv run --no-sync cadc-get-cert --netrc-file "$RUNNER_TEMP/CANFAR_NETRC" --days-valid 1 --cert-filename "$HOME/.ssl/cadcproxy.pem"
77
+ test -s "$HOME/.ssl/cadcproxy.pem"
78
+ openssl x509 -in "$HOME/.ssl/cadcproxy.pem" -noout -checkend 0
68
79
 
69
- - name: Run Tests
80
+ - name: Run tests
81
+ if: env.RUN_CADC_TESTS == 'true'
70
82
  run: |
71
83
  uv run --no-sync pytest tests/ --cov . --cov-report=lcov --cov-report=xml
72
84
 
85
+ - name: Run tests without CADC credentials
86
+ if: env.RUN_CADC_TESTS != 'true'
87
+ run: |
88
+ uv run --no-sync pytest tests/ -m "not cadc" --cov . --cov-report=lcov --cov-report=xml
89
+
73
90
  - name: Remove NETRC file and CADC certificate
91
+ if: ${{ always() && env.RUN_CADC_TESTS == 'true' }}
74
92
  run: |
75
- echo "Removing file: "$CANFAR_NETRC_FILE
76
- rm $CANFAR_NETRC_FILE
77
- echo "Removing file: "$CADC_CERT
78
- rm $CADC_CERT
93
+ rm -f -- "$RUNNER_TEMP/CANFAR_NETRC" "$HOME/.ssl/cadcproxy.pem"
79
94
 
80
95
  - name: Upload coverage to Coveralls
81
96
  uses: coverallsapp/github-action@v2
@@ -7,6 +7,9 @@ on:
7
7
  - "docs/**"
8
8
  - ".github/workflows/docs.yml"
9
9
 
10
+ permissions:
11
+ contents: read
12
+
10
13
  jobs:
11
14
  mkdocs:
12
15
  runs-on: ubuntu-latest
@@ -4,6 +4,11 @@ on:
4
4
  schedule:
5
5
  - cron: "0 0 * * *" # Run every day at midnight
6
6
 
7
+ permissions:
8
+ contents: read
9
+ issues: write
10
+ pull-requests: write
11
+
7
12
  jobs:
8
13
  close_stale_prs:
9
14
  runs-on: ubuntu-latest
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.0.0"
3
+ }