Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
771ecc9
update PR template to remove the tests section
nh916 Sep 12, 2023
c4fa547
added more sections to FAQ and fixed some spelling errors
nh916 Sep 12, 2023
19605f2
Merge pull request #338 from C-Accel-CRIPT/update-pr
nh916 Sep 12, 2023
70ace5e
upgraded GitHub action version `checkout` and `setup-python` to v4
nh916 Sep 12, 2023
b81230b
added wiki documentation to the documentation section of the README
nh916 Sep 13, 2023
2b57ad0
Merge pull request #343 from C-Accel-CRIPT/update-readme-with-wiki-docs
nh916 Sep 13, 2023
8e63023
Merge pull request #342 from C-Accel-CRIPT/upgrade-gh-action-version
nh916 Sep 13, 2023
9c3bf03
Merge pull request #340 from C-Accel-CRIPT/add-to-faq-docs
nh916 Sep 13, 2023
6b0a4d5
renamed `integrate_nodes_helper` to `save_integration_node_helper`
nh916 Sep 15, 2023
f42f31f
reorganizing utility functions into `test/utils/`
nh916 Sep 15, 2023
d8b4fa7
formatted with trunk
nh916 Sep 15, 2023
020502e
upgraded trunk
nh916 Sep 15, 2023
a974050
Merge pull request #349 from C-Accel-CRIPT/upgrade-trunk
nh916 Sep 15, 2023
e9e8b1f
Merge branch 'develop' into refactor-integration-tests
nh916 Sep 15, 2023
bd0ec37
upgrade `requirements_docs.txt` (#350)
nh916 Sep 15, 2023
b2ccf74
Merge branch 'develop' into refactor-integration-tests
nh916 Sep 15, 2023
ba4eb99
Merge pull request #348 from C-Accel-CRIPT/refactor-integration-tests
nh916 Sep 18, 2023
f0088ef
SDK Requires Python 3.8+ (#341)
nh916 Sep 18, 2023
97a6363
clean up `APIError` so it is uniform everywhere and clean
nh916 Sep 18, 2023
9815fd3
Merge pull request #352 from C-Accel-CRIPT/refactor-apierror
nh916 Sep 19, 2023
619939b
upgraded APIError docs
nh916 Sep 19, 2023
137a822
using MKDocs native `watch` feature and upgraded `requirements_docs.t…
nh916 Sep 19, 2023
917126c
Feature: created `API.delete_node_by_uuid(node_type, node_uuid)` (#353)
nh916 Sep 19, 2023
da11e72
Feature: `cript.API.get_node_by_uuid(uuid)` (#355)
nh916 Sep 19, 2023
5ca89ed
Upgraded test_api.py UUID tests to be DRY
nh916 Sep 19, 2023
4b4c3ff
Merge pull request #357 from C-Accel-CRIPT/upgrade-APIError-docs
nh916 Sep 19, 2023
7620b61
Merge pull request #358 from C-Accel-CRIPT/upgrade-api-uuid-fixture-t…
nh916 Sep 21, 2023
8126393
refactored `get_s3_client` into a function in a aws_s3_utils.py file …
nh916 Sep 21, 2023
b1f1be3
renamed variable to be more self documenting and correct
nh916 Sep 26, 2023
62e440c
Merge pull request #368 from C-Accel-CRIPT/rename-api-variable
nh916 Sep 26, 2023
f8e7c53
Upgrade node unit tests (#363)
nh916 Sep 27, 2023
55988bc
made error documentation headings more standard (#367)
nh916 Sep 27, 2023
2b53335
Fixed software configuration commented out test (#366)
nh916 Sep 27, 2023
f6f9a4e
Require file extension for `cript.File` node (#370)
nh916 Sep 28, 2023
11a535c
Added controlled vocab links to documentation for each node attribute…
nh916 Sep 28, 2023
2a97af8
Update tests.yml
nh916 Oct 3, 2023
6d5ceec
added python 3.12 to mypy.yaml workflow
nh916 Oct 3, 2023
cf0ed18
Update test_coverage.yaml to use python 3.12
nh916 Oct 3, 2023
b397abe
Update test_examples.yml from python 3.11 to 3.12
nh916 Oct 3, 2023
c9fd954
wrote docs for `_prepare_host` so it is clearer for future maintenance
nh916 Oct 11, 2023
4360716
improve paginator error message
nh916 Oct 16, 2023
6a35ada
Merge pull request #376 from C-Accel-CRIPT/updated-ci-from-3.11-to-3.12
nh916 Oct 25, 2023
279735c
added `BaseNode`, `PrimaryBaseNode`, and `UUIDBase` to docs (#393)
nh916 Oct 25, 2023
661342b
fixed reference docs formatting (#387)
nh916 Oct 25, 2023
67ec191
Merge pull request #392 from C-Accel-CRIPT/improve-pagiantor-error
nh916 Oct 25, 2023
de3aae2
Merge pull request #384 from C-Accel-CRIPT/add-docs-to-prepare-host
nh916 Oct 25, 2023
7321510
Added pytest doctest to documentation code examples (#371)
nh916 Oct 30, 2023
07ba2a7
upgraded requirements (#381)
nh916 Oct 30, 2023
7d3f82f
updated docs: added notes that `pathlib` is recommended to work with …
nh916 Oct 30, 2023
6aec6f8
Finished and Removed TODO (#377)
nh916 Oct 30, 2023
3f82b2f
cleaned up doctest.yaml CI file
nh916 Oct 30, 2023
c40d389
Merge pull request #399 from C-Accel-CRIPT/cleanup-doctest-ci
nh916 Oct 31, 2023
34363e4
removed redundant Material name getter and setter (#396)
nh916 Oct 31, 2023
452bab4
`load_nodes_from_json` works with both JSON str and dict args (#398)
nh916 Oct 31, 2023
b6a59fe
added a checklist item to PR template to remind developers to write a…
nh916 Nov 2, 2023
babce24
fixed docs heading `Create API Client with Environment Variables`
nh916 Nov 3, 2023
c1b4817
fixed bad host example in docs
nh916 Nov 3, 2023
4ea1ce7
wrote documentation for `CRIPTDuplicateNameError` exception & improve…
nh916 Nov 13, 2023
fc9fa15
Merge pull request #407 from C-Accel-CRIPT/fix-docs-heading
nh916 Nov 13, 2023
0791f5a
Merge pull request #402 from C-Accel-CRIPT/add-checklist-item-to-pr-t…
nh916 Nov 13, 2023
a9fabab
removed `get_node_by_uuid` cript.API feature (#409)
nh916 Nov 13, 2023
d97eb4f
Skip validation (#411)
Nov 15, 2023
8cc2ae0
Self-Contained JSON file format (#412)
Nov 15, 2023
a8d9805
fix overloaded validate
Nov 15, 2023
6339445
fixed some small errors and mostly improved the code and docs
nh916 Nov 15, 2023
8b8c02a
Merge pull request #415 from C-Accel-CRIPT/small-upgrades
nh916 Nov 15, 2023
d42ab8f
Merge pull request #414 from C-Accel-CRIPT/hot-fix-validate
nh916 Nov 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

## Changes

## Tests

## Known Issues

## Notes
Expand All @@ -12,3 +10,4 @@

- [ ] My name is on the list of contributors (`CONTRIBUTORS.md`) in the pull request source branch.
- [ ] I have updated the documentation to reflect my changes.
- [ ] My code changes have been verified by automated tests and pass all relevant test scenarios.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_deploy_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: pip install -r requirements_docs.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set Up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.11

Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/doctest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# check documentation code example with pytest doctest and gives an error if a code example is wrong

name: Doctest
permissions: read-all

on:
push:
branches:
- main
- develop
- trunk-merge/**
pull_request:
branches:
- main
- develop

jobs:
doctest:
strategy:
matrix:
python-version: [3.12]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

env:
CRIPT_HOST: https://lb-stage.mycriptapp.org/
CRIPT_TOKEN: 123456789
CRIPT_STORAGE_TOKEN: 987654321
CRIPT_TESTS: False

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Check out code
uses: actions/checkout@v4

- name: Install dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip
pip install -r requirements_dev.txt

- name: pip install CRIPT Python SDK local package
run: python${{ matrix.python-version }} -m pip install -e .

- name: Run Doctests
run: python${{ matrix.python-version }} -m pytest --doctest-modules src/cript/
6 changes: 3 additions & 3 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ jobs:
mypy-test:
strategy:
matrix:
python-version: [3.11]
python-version: [3.12]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.11]
python-version: [3.12]

env:
CRIPT_HOST: https://lb-stage.mycriptapp.org/
Expand All @@ -30,10 +30,10 @@ jobs:
CRIPT_TESTS: False

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.11

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.11]
python-version: [3.12]

env:
CRIPT_HOST: https://lb-stage.mycriptapp.org/
Expand All @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.7, 3.11]
python-version: [3.8, 3.12]

env:
CRIPT_HOST: https://lb-stage.mycriptapp.org/
Expand All @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Trunk Check
uses: trunk-io/trunk-action@v1
6 changes: 5 additions & 1 deletion .trunk/configs/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"setuptools",
"miniconda",
"pymdown",
"BCDB"
"BCDB",
"doctest",
"Doctest",
"Doctests",
"linenums"
]
}
22 changes: 11 additions & 11 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
version: 0.1
cli:
version: 1.14.2
version: 1.15.0
plugins:
sources:
- id: trunk
ref: v1.2.2
ref: v1.2.3
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- [email protected]
- [email protected]
- osv-scanner@1.3.6
- trivy@0.44.1
- trufflehog@3.54.0
- osv-scanner@1.4.0
- trivy@0.45.0
- trufflehog@3.56.0
- [email protected]
- cspell@7.1.1
- cspell@7.3.6
- [email protected]
- black@23.7.0
- black@23.9.1
- git-diff-check
- [email protected]
- [email protected]
- markdownlint@0.35.0
- markdownlint@0.36.0
- [email protected]
- [email protected].2
- [email protected].286
- [email protected].3
- [email protected].289
- [email protected]
- [email protected]
ignore:
Expand All @@ -40,7 +40,7 @@ lint:

runtimes:
enabled:
- go@1.19.5
- go@1.21.0
- [email protected]
- [email protected]
actions:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![License](./CRIPT_full_logo_colored_transparent.png)](https://github.com/C-Accel-CRIPT/Python-SDK/blob/develop/LICENSE.md)

[![License](https://img.shields.io/github/license/C-Accel-CRIPT/cript?style=flat-square)](https://github.com/C-Accel-CRIPT/Python-SDK/blob/develop/LICENSE.md)
[![Python](https://img.shields.io/badge/Language-Python%203.7+-blue?style=flat-square&logo=python)](https://www.python.org/)
[![Python](https://img.shields.io/badge/Language-Python%203.8+-blue?style=flat-square&logo=python)](https://www.python.org/)
[![Code style is black](https://img.shields.io/badge/Code%20Style-black-000000.svg?style=flat-square&logo=python)](https://github.com/psf/black)
[![Link to CRIPT website](https://img.shields.io/badge/platform-criptapp.org-blueviolet?style=flat-square)](https://criptapp.org/)
[![Using Pytest](https://img.shields.io/badge/Dependencies-pytest-green?style=flat-square&logo=Pytest)](https://docs.pytest.org/en/7.2.x/)
Expand Down Expand Up @@ -36,7 +36,7 @@ The CRIPT Python SDK allows programmatic access to the [CRIPT platform](https://

## Installation

CRIPT Python SDK requires Python 3.7+
CRIPT Python SDK requires Python 3.8+

The latest released of CRIPT Python SDK is available on [Python Package Index (PyPI)](https://pypi.org/project/cript/)

Expand All @@ -48,7 +48,9 @@ pip install cript

## Documentation

To learn more about the CRIPT Python SDK please check the [CRIPT-SDK documentation](https://c-accel-cript.github.io/Python-SDK/)
To learn more about the CRIPT Python SDK please check the [CRIPT Python SDK user documentation](https://c-accel-cript.github.io/Python-SDK/)

To learn more about the internal workings of the CRIPT Python SDK please check the [CRIPT Python SDK internal documentation](https://github.com/C-Accel-CRIPT/Python-SDK/wiki)

---

Expand Down
14 changes: 8 additions & 6 deletions tests/conftest.py → conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
import os

import pytest
from fixtures.primary_nodes import *
from fixtures.subobjects import *
from fixtures.supporting_nodes import *

import cript
from tests.fixtures.api_fixtures import *
from tests.fixtures.primary_nodes import *
from tests.fixtures.subobjects import *
from tests.fixtures.supporting_nodes import *


def _get_cript_tests_env() -> bool:
Expand Down Expand Up @@ -48,8 +49,6 @@ def cript_api():
"""
storage_token = os.getenv("CRIPT_STORAGE_TOKEN")

assert cript.api.api._global_cached_api is None

with cript.API(host=None, api_token=None, storage_token=storage_token) as api:
# overriding AWS S3 cognito variables to be sure we do not upload test data to production storage
# staging AWS S3 cognito storage variables
Expand All @@ -61,4 +60,7 @@ def cript_api():

yield api

assert cript.api.api._global_cached_api is None

@pytest.fixture(autouse=True)
def inject_doctest_namespace(doctest_namespace, cript_api):
doctest_namespace["api"] = cript_api
Loading