Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #21 from C-Accel-CRIPT/develop
Browse files Browse the repository at this point in the history
Release v0.4.6
  • Loading branch information
rjmello authored Sep 8, 2022
2 parents 0aef65c + 0502d55 commit e90eb19
Show file tree
Hide file tree
Showing 14 changed files with 372 additions and 137 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ dmypy.json
# Cython debug symbols
cython_debug/

.idea/

# PyCharm
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

9 changes: 2 additions & 7 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@ api = cript.API(host, token)
# Example Tasks

## Create a node
For example, create a Group:
For example, create a Project:
``` py
group = cript.Group(name="MyGroup")
api.save(group)
```
... then a Project:
``` py
project = cript.Project(group=group, name="MyProject")
project = cript.Project(name="MyProject")
api.save(project)
```
... then a Collection:
Expand Down
11 changes: 1 addition & 10 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@ api = cript.API(host, token)
Your API token can be found in the UI under [Account Settings](https://criptapp.org/settings/).


### Create a Group node
``` py
group = cript.Group(name="MyGroup")
api.save(group)
```
!!! note
Group names are globally unique.


### Create a Project node
``` py
proj = cript.Project(group=group, name="MyProject")
proj = cript.Project(name="MyProject")
api.save(project)
```
!!! note
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = [
"setuptools>=60",
"wheel"
]
build-backend = "setuptools.build_meta"

[tool.black]
Expand Down
4 changes: 4 additions & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements_dev.txt
pytest==7.1.2
pytest-docker==1.0.0
psycopg2==2.9.3
32 changes: 32 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[metadata]
name = cript
version = 0.4.6
description = CRIPT Python SDK
long_description = file: README.md
long_description_content_type = text/markdown
author = CRIPT Development Team
url = https://github.com/C-Accel-CRIPT/cript
license = MIT
license_files = LICENSE.txt
platforms = any
classifiers =
Development Status :: 3 - Alpha
Topic :: Scientific/Engineering
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.9

[options]
package_dir=
=src
packages = find:
python_requires = >=3.9
include_package_data = True
install_requires =
beartype>=0.10.4
globus-sdk>=3.7.0
pint>=0.19.2
requests>=2.27.1

[options.packages.find]
where=src
35 changes: 2 additions & 33 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
import pathlib
from setuptools import setup
from setuptools import find_packages


here = pathlib.Path(__file__).parent.resolve()
# single-source of version in the package
version = (here / "src" / "cript" / "VERSION.txt").read_text(encoding="utf-8")
# TODO: fill out README with installation guide, smallest working example, etc.
long_description = (here / "README.md").read_text(encoding="utf-8")


setup(
name="cript",
version=version,
description="CRIPT Python SDK",
url="https://github.com/C-Accel-CRIPT/cript",
author="CRIPT Development Team",
packages=find_packages(where="src"),
package_dir={"": "src"},
include_package_data=True,
python_requires=">=3.9",
install_requires=[
"beartype >= 0.10.4",
"globus-sdk >= 3.7.0",
"pint >= 0.19.2",
"requests >= 2.27.1",
],
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Scientific/Engineering",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
],
)
if __name__ == "__main__":
setup()
1 change: 0 additions & 1 deletion src/cript/VERSION.txt

This file was deleted.

9 changes: 3 additions & 6 deletions src/cript/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
import pkg_resources
import importlib.metadata

import pint

Expand All @@ -9,12 +9,9 @@
logging.captureWarnings(True)
pint.util.logger.setLevel(logging.ERROR) # Mute Pint warnings

# Single-sourcing the package version
version_file = pkg_resources.resource_filename("cript", "VERSION.txt")
with open(version_file, "r") as fr:
__version__ = fr.read().strip()

VERSION = __version__
# Single-sourcing the package version
__version__ = importlib.metadata.version("cript")
__short_version__ = __version__.rpartition(".")[0]


Expand Down
Empty file added tests/conftest.py
Empty file.
41 changes: 41 additions & 0 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: "3.9"

services:
db:
image: postgres
volumes:
- postgres:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5433:5432"
web:
image: brilant/criptapp:latest
command: sh -c "python manage.py migrate && python manage.py loaddata ./seed/test_data.yaml && python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
environment:
- DB_TYPE=postgresql
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_HOST=db
- DB_PORT=5432
- ENV=${ENV}
- DEBUG=${DEBUG}
- ALLOWED_HOSTS=*
- SECRET_KEY=${SECRET_KEY}
- GLOBUS_AUTH_CLIENT_ID=${GLOBUS_AUTH_CLIENT_ID}
- GLOBUS_AUTH_SECRET=${GLOBUS_AUTH_SECRET}
- GLOBUS_ACCESS_MANAGER_CLIENT_ID=${GLOBUS_ACCESS_MANAGER_CLIENT_ID}
- GLOBUS_ACCESS_MANAGER_SECRET=${GLOBUS_ACCESS_MANAGER_SECRET}
- GLOBUS_NATIVE_CLIENT_ID=${GLOBUS_NATIVE_CLIENT_ID}
- GLOBUS_ENDPOINT_ID=${GLOBUS_ENDPOINT_ID}
- STORAGE_PROVIDER=${STORAGE_PROVIDER}
- STORAGE_PATH=${STORAGE_PATH}
depends_on:
- db
volumes:
postgres:
Loading

0 comments on commit e90eb19

Please sign in to comment.