dcor-shared 0.10.3__tar.gz → 0.11.2__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.
- dcor_shared-0.11.2/.github/workflows/check.yml +49 -0
- dcor_shared-0.11.2/.github/workflows/deploy_pypi.yml +31 -0
- dcor_shared-0.11.2/.gitignore +133 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/CHANGELOG +7 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/PKG-INFO +11 -11
- dcor_shared-0.11.2/Vagrantfile +72 -0
- dcor_shared-0.11.2/dcor_shared/_version.py +16 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/s3.py +5 -2
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared.egg-info/PKG-INFO +12 -12
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared.egg-info/SOURCES.txt +9 -4
- dcor_shared-0.11.2/dcor_shared.egg-info/requires.txt +2 -0
- dcor_shared-0.11.2/pyproject.toml +42 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/setup.cfg +0 -3
- dcor_shared-0.11.2/tests/data/calibration_beads_47.rtdc +0 -0
- dcor_shared-0.10.3/dcor_shared.egg-info/requires.txt → dcor_shared-0.11.2/tests/requirements.txt +2 -5
- dcor_shared-0.11.2/vagrant-run-tests.sh +22 -0
- dcor_shared-0.10.3/dcor_shared/_version.py +0 -197
- dcor_shared-0.10.3/dcor_shared/_version_save.py +0 -3
- dcor_shared-0.10.3/setup.py +0 -64
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/LICENSE +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/MANIFEST.in +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/README.rst +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/__init__.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/ckan.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/data.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/dcinst.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/mime.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/parse.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/paths.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/s3cc.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared/testing.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared.egg-info/dependency_links.txt +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/dcor_shared.egg-info/top_level.txt +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/tests/test_basic.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/tests/test_ckan.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/tests/test_data.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/tests/test_s3.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/tests/test_s3cc.py +0 -0
- {dcor_shared-0.10.3 → dcor_shared-0.11.2}/tests/test_testing.py +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
# only allow one job to run
|
|
8
|
+
concurrency: general_workflow
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
checks:
|
|
12
|
+
runs-on: macos-12
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
- name: Set up Python 3.8
|
|
16
|
+
uses: actions/setup-python@v4
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.8"
|
|
19
|
+
- name: Install flake8 dependencies
|
|
20
|
+
run: |
|
|
21
|
+
# prerequisites
|
|
22
|
+
python -m pip install --upgrade pip wheel
|
|
23
|
+
python -m pip install flake8
|
|
24
|
+
- name: Lint with flake8
|
|
25
|
+
run: |
|
|
26
|
+
flake8 --exclude _version.py .
|
|
27
|
+
- name: Cache vagrant images
|
|
28
|
+
uses: actions/cache@v3
|
|
29
|
+
env:
|
|
30
|
+
cache-name: vagrant-image
|
|
31
|
+
with:
|
|
32
|
+
path: ~/.vagrant.d
|
|
33
|
+
key: macos-build-${{ env.cache-name }}-${{ hashFiles('Vagrantfile') }}
|
|
34
|
+
restore-keys: |
|
|
35
|
+
macos-build-${{ env.cache-name }}-
|
|
36
|
+
- name: save environment variables for codecov in VM
|
|
37
|
+
run: |
|
|
38
|
+
env | grep GITHUB > environment.txt
|
|
39
|
+
cat environment.txt
|
|
40
|
+
- name: Get the latest box and remove old boxes from the GH Actions cache
|
|
41
|
+
run: |
|
|
42
|
+
vagrant box update
|
|
43
|
+
vagrant box prune
|
|
44
|
+
- name: Setup vagrant VM
|
|
45
|
+
run: |
|
|
46
|
+
vagrant up
|
|
47
|
+
- name: Run tests in vagrant VM
|
|
48
|
+
run: |
|
|
49
|
+
vagrant ssh -- sudo bash /testing/vagrant-run-tests.sh
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Release to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
deploy:
|
|
10
|
+
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v4
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.9"
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install --upgrade pip
|
|
22
|
+
pip install setuptools wheel twine
|
|
23
|
+
- name: build
|
|
24
|
+
run: pipx run build --sdist --wheel
|
|
25
|
+
- name: publish
|
|
26
|
+
env:
|
|
27
|
+
TWINE_USERNAME: __token__
|
|
28
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}
|
|
29
|
+
run: |
|
|
30
|
+
pipx install twine
|
|
31
|
+
twine upload --skip-existing dist/*
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
_version.py
|
|
131
|
+
.idea
|
|
132
|
+
.vagrant
|
|
133
|
+
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dcor_shared
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.2
|
|
4
4
|
Summary: Functionalities shared by the DCOR CKAN extensions
|
|
5
|
-
Home-page: https://github.com/DCOR-dev/dcor_shared
|
|
6
5
|
Author: Paul Müller
|
|
7
|
-
|
|
8
|
-
License: AGPLv3+
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
Maintainer-email: Paul Müller <dev@craban.de>
|
|
7
|
+
License: GNU Affero General Public License v3 or later (AGPLv3+)
|
|
8
|
+
Project-URL: source, https://github.com/DCOR-dev/dcor_shared
|
|
9
|
+
Project-URL: tracker, https://github.com/DCOR-dev/dcor_shared/issues
|
|
10
|
+
Project-URL: changelog, https://github.com/DCOR-dev/dcor_shared/blob/main/CHANGELOG
|
|
11
|
+
Keywords: DC,DCOR,deformability,cytometry
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
15
15
|
Classifier: Intended Audience :: Science/Research
|
|
16
|
-
Requires-Python:
|
|
17
|
-
|
|
16
|
+
Requires-Python: <4,>=3.8
|
|
17
|
+
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: LICENSE
|
|
19
|
+
Requires-Dist: boto3
|
|
20
|
+
Requires-Dist: dclab[s3]>=0.60.9
|
|
19
21
|
|
|
20
22
|
dcor_shared
|
|
21
23
|
===========
|
|
@@ -54,5 +56,3 @@ following commands in the root of this repository:
|
|
|
54
56
|
:target: https://travis-ci.com/DCOR-dev/dcor_shared
|
|
55
57
|
.. |Coverage Status| image:: https://img.shields.io/codecov/c/github/DCOR-dev/dcor_shared
|
|
56
58
|
:target: https://codecov.io/gh/DCOR-dev/dcor_shared
|
|
57
|
-
|
|
58
|
-
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# -*- mode: ruby -*-
|
|
2
|
+
# vi: set ft=ruby :
|
|
3
|
+
|
|
4
|
+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
|
5
|
+
# configures the configuration version (we support older styles for
|
|
6
|
+
# backwards compatibility). Please don't change it unless you know what
|
|
7
|
+
# you're doing.
|
|
8
|
+
Vagrant.configure("2") do |config|
|
|
9
|
+
# The most common configuration options are documented and commented below.
|
|
10
|
+
# For a complete reference, please see the online documentation at
|
|
11
|
+
# https://docs.vagrantup.com.
|
|
12
|
+
|
|
13
|
+
# Every Vagrant development environment requires a box. You can search for
|
|
14
|
+
# boxes at https://vagrantcloud.com/search.
|
|
15
|
+
config.vm.box = "paulmueller/dcor-test"
|
|
16
|
+
|
|
17
|
+
# Disable automatic box update checking. If you disable this, then
|
|
18
|
+
# boxes will only be checked for updates when the user runs
|
|
19
|
+
# `vagrant box outdated`. This is not recommended.
|
|
20
|
+
# config.vm.box_check_update = false
|
|
21
|
+
|
|
22
|
+
# Create a forwarded port mapping which allows access to a specific port
|
|
23
|
+
# within the machine from a port on the host machine. In the example below,
|
|
24
|
+
# accessing "localhost:8080" will access port 80 on the guest machine.
|
|
25
|
+
# NOTE: This will enable public access to the opened port
|
|
26
|
+
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
|
27
|
+
|
|
28
|
+
# Create a forwarded port mapping which allows access to a specific port
|
|
29
|
+
# within the machine from a port on the host machine and only allow access
|
|
30
|
+
# via 127.0.0.1 to disable public access
|
|
31
|
+
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
|
|
32
|
+
|
|
33
|
+
# Create a private network, which allows host-only access to the machine
|
|
34
|
+
# using a specific IP.
|
|
35
|
+
# config.vm.network "private_network", ip: "192.168.33.10"
|
|
36
|
+
|
|
37
|
+
# Create a public network, which generally matched to bridged network.
|
|
38
|
+
# Bridged networks make the machine appear as another physical device on
|
|
39
|
+
# your network.
|
|
40
|
+
# config.vm.network "public_network"
|
|
41
|
+
|
|
42
|
+
# Share an additional folder to the guest VM. The first argument is
|
|
43
|
+
# the path on the host to the actual folder. The second argument is
|
|
44
|
+
# the path on the guest to mount the folder. And the optional third
|
|
45
|
+
# argument is a set of non-required options.
|
|
46
|
+
# config.vm.synced_folder "../data", "/vagrant_data"
|
|
47
|
+
# config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
48
|
+
config.vm.synced_folder ".", "/testing", type: "rsync",
|
|
49
|
+
rsync__args: ["-vzra", "--delete"],
|
|
50
|
+
rsync__exclude: ["*.pyc", "__pycache__"],
|
|
51
|
+
owner: "www-data"
|
|
52
|
+
# Provider-specific configuration so you can fine-tune various
|
|
53
|
+
# backing providers for Vagrant. These expose provider-specific options.
|
|
54
|
+
# Reduce requirements so everythin runs on GitHub Actions
|
|
55
|
+
config.vm.provider "virtualbox" do |v|
|
|
56
|
+
v.memory = 2048
|
|
57
|
+
v.cpus = 1
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# Enable provisioning with a shell script. Additional provisioners such as
|
|
62
|
+
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
|
63
|
+
# documentation for more information about their specific syntax and use.
|
|
64
|
+
# config.vm.provision "shell", inline: <<-SHELL
|
|
65
|
+
# apt-get update
|
|
66
|
+
# apt-get install -y apache2
|
|
67
|
+
# SHELL
|
|
68
|
+
|
|
69
|
+
# Prevent reinstallation of guest additinos on every vagrant up
|
|
70
|
+
# (Uncomment the next line in your CI tests)
|
|
71
|
+
# config.vbguest.auto_update = false
|
|
72
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# file generated by setuptools_scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
TYPE_CHECKING = False
|
|
4
|
+
if TYPE_CHECKING:
|
|
5
|
+
from typing import Tuple, Union
|
|
6
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
|
+
else:
|
|
8
|
+
VERSION_TUPLE = object
|
|
9
|
+
|
|
10
|
+
version: str
|
|
11
|
+
__version__: str
|
|
12
|
+
__version_tuple__: VERSION_TUPLE
|
|
13
|
+
version_tuple: VERSION_TUPLE
|
|
14
|
+
|
|
15
|
+
__version__ = version = '0.11.2'
|
|
16
|
+
__version_tuple__ = version_tuple = (0, 11, 2)
|
|
@@ -289,6 +289,7 @@ def create_time():
|
|
|
289
289
|
@functools.lru_cache()
|
|
290
290
|
def get_s3():
|
|
291
291
|
"""Return the current S3 client as defined by ckan.ini"""
|
|
292
|
+
from ckan import common as ckan_common
|
|
292
293
|
# Create a new session (do not use the default session)
|
|
293
294
|
s3_session = boto3.Session(
|
|
294
295
|
aws_access_key_id=get_ckan_config_option(
|
|
@@ -296,8 +297,10 @@ def get_s3():
|
|
|
296
297
|
aws_secret_access_key=get_ckan_config_option(
|
|
297
298
|
"dcor_object_store.secret_access_key"),
|
|
298
299
|
)
|
|
299
|
-
ssl_verify =
|
|
300
|
-
|
|
300
|
+
ssl_verify = ckan_common.config.get("dcor_object_store.ssl_verify")
|
|
301
|
+
if isinstance(ssl_verify, str):
|
|
302
|
+
# additional check (in case CKAN did not convert to bool)
|
|
303
|
+
ssl_verify = ssl_verify.lower() == "true"
|
|
301
304
|
s3_client = s3_session.client(
|
|
302
305
|
service_name='s3',
|
|
303
306
|
use_ssl=ssl_verify,
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 0.
|
|
2
|
+
Name: dcor_shared
|
|
3
|
+
Version: 0.11.2
|
|
4
4
|
Summary: Functionalities shared by the DCOR CKAN extensions
|
|
5
|
-
Home-page: https://github.com/DCOR-dev/dcor_shared
|
|
6
5
|
Author: Paul Müller
|
|
7
|
-
|
|
8
|
-
License: AGPLv3+
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
Maintainer-email: Paul Müller <dev@craban.de>
|
|
7
|
+
License: GNU Affero General Public License v3 or later (AGPLv3+)
|
|
8
|
+
Project-URL: source, https://github.com/DCOR-dev/dcor_shared
|
|
9
|
+
Project-URL: tracker, https://github.com/DCOR-dev/dcor_shared/issues
|
|
10
|
+
Project-URL: changelog, https://github.com/DCOR-dev/dcor_shared/blob/main/CHANGELOG
|
|
11
|
+
Keywords: DC,DCOR,deformability,cytometry
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
15
15
|
Classifier: Intended Audience :: Science/Research
|
|
16
|
-
Requires-Python:
|
|
17
|
-
|
|
16
|
+
Requires-Python: <4,>=3.8
|
|
17
|
+
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: LICENSE
|
|
19
|
+
Requires-Dist: boto3
|
|
20
|
+
Requires-Dist: dclab[s3]>=0.60.9
|
|
19
21
|
|
|
20
22
|
dcor_shared
|
|
21
23
|
===========
|
|
@@ -54,5 +56,3 @@ following commands in the root of this repository:
|
|
|
54
56
|
:target: https://travis-ci.com/DCOR-dev/dcor_shared
|
|
55
57
|
.. |Coverage Status| image:: https://img.shields.io/codecov/c/github/DCOR-dev/dcor_shared
|
|
56
58
|
:target: https://codecov.io/gh/DCOR-dev/dcor_shared
|
|
57
|
-
|
|
58
|
-
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
.gitignore
|
|
1
2
|
CHANGELOG
|
|
2
3
|
LICENSE
|
|
3
4
|
MANIFEST.in
|
|
4
5
|
README.rst
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
Vagrantfile
|
|
7
|
+
pyproject.toml
|
|
8
|
+
vagrant-run-tests.sh
|
|
9
|
+
.github/workflows/check.yml
|
|
10
|
+
.github/workflows/deploy_pypi.yml
|
|
7
11
|
dcor_shared/__init__.py
|
|
8
12
|
dcor_shared/_version.py
|
|
9
|
-
dcor_shared/_version_save.py
|
|
10
13
|
dcor_shared/ckan.py
|
|
11
14
|
dcor_shared/data.py
|
|
12
15
|
dcor_shared/dcinst.py
|
|
@@ -21,9 +24,11 @@ dcor_shared.egg-info/SOURCES.txt
|
|
|
21
24
|
dcor_shared.egg-info/dependency_links.txt
|
|
22
25
|
dcor_shared.egg-info/requires.txt
|
|
23
26
|
dcor_shared.egg-info/top_level.txt
|
|
27
|
+
tests/requirements.txt
|
|
24
28
|
tests/test_basic.py
|
|
25
29
|
tests/test_ckan.py
|
|
26
30
|
tests/test_data.py
|
|
27
31
|
tests/test_s3.py
|
|
28
32
|
tests/test_s3cc.py
|
|
29
|
-
tests/test_testing.py
|
|
33
|
+
tests/test_testing.py
|
|
34
|
+
tests/data/calibration_beads_47.rtdc
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
# Defined by PEP 518:
|
|
3
|
+
requires = [
|
|
4
|
+
# for version management
|
|
5
|
+
"setuptools>=46", "setuptools_scm[toml]>=6.2"
|
|
6
|
+
]
|
|
7
|
+
build-backend = "setuptools.build_meta"
|
|
8
|
+
|
|
9
|
+
[project]
|
|
10
|
+
name = "dcor_shared"
|
|
11
|
+
authors = [
|
|
12
|
+
# In alphabetical order.
|
|
13
|
+
{name = "Paul Müller"},
|
|
14
|
+
]
|
|
15
|
+
maintainers = [
|
|
16
|
+
{name = "Paul Müller", email="dev@craban.de"},
|
|
17
|
+
]
|
|
18
|
+
description = "Functionalities shared by the DCOR CKAN extensions"
|
|
19
|
+
readme = "README.rst"
|
|
20
|
+
requires-python = ">=3.8, <4"
|
|
21
|
+
keywords = ["DC", "DCOR", "deformability", "cytometry"]
|
|
22
|
+
classifiers = [
|
|
23
|
+
'Operating System :: OS Independent',
|
|
24
|
+
'Programming Language :: Python :: 3',
|
|
25
|
+
'Topic :: Scientific/Engineering :: Visualization',
|
|
26
|
+
'Intended Audience :: Science/Research',
|
|
27
|
+
]
|
|
28
|
+
license = {text = "GNU Affero General Public License v3 or later (AGPLv3+)"}
|
|
29
|
+
dependencies = [
|
|
30
|
+
"boto3",
|
|
31
|
+
"dclab[s3]>=0.60.9",
|
|
32
|
+
]
|
|
33
|
+
dynamic = ["version"]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
source = "https://github.com/DCOR-dev/dcor_shared"
|
|
37
|
+
tracker = "https://github.com/DCOR-dev/dcor_shared/issues"
|
|
38
|
+
changelog = "https://github.com/DCOR-dev/dcor_shared/blob/main/CHANGELOG"
|
|
39
|
+
|
|
40
|
+
[tool.setuptools_scm]
|
|
41
|
+
write_to = "dcor_shared/_version.py"
|
|
42
|
+
version_scheme = "post-release"
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
set -e
|
|
2
|
+
set -x
|
|
3
|
+
# Set CKAN_INI to testing
|
|
4
|
+
export CKAN_INI=/etc/ckan/default/ckan.ini
|
|
5
|
+
# Go to the directory of this script
|
|
6
|
+
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
7
|
+
# Source the CKAN environment
|
|
8
|
+
source /usr/lib/ckan/default/bin/activate
|
|
9
|
+
# Update pip
|
|
10
|
+
pip install --upgrade pip wheel
|
|
11
|
+
# Update all DCOR extensions
|
|
12
|
+
dcor update --yes
|
|
13
|
+
# Install the current package in editable mode for testing
|
|
14
|
+
pip install -e .
|
|
15
|
+
pip install -r tests/requirements.txt
|
|
16
|
+
# run tests with coverage
|
|
17
|
+
coverage run --source=dcor_shared -m pytest -p no:warnings tests
|
|
18
|
+
# Get GitHub environment variables so codecov detects GH Actions (allow command to fail)
|
|
19
|
+
export $(grep -v '^#' environment.txt | xargs) || exit 0
|
|
20
|
+
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
|
21
|
+
chmod +x codecov
|
|
22
|
+
./codecov
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
"""Determine package version from git repository tag
|
|
3
|
-
|
|
4
|
-
Each time this file is imported it checks whether the package version
|
|
5
|
-
can be determined using `git describe`. If this fails (because either
|
|
6
|
-
this file is not located at the 1st level down the repository root or
|
|
7
|
-
it is not under version control), the version is read from the script
|
|
8
|
-
"_version_save.py" which is not versioned by git, but always included
|
|
9
|
-
in the final distribution archive (e.g. via PyPI). If the git version
|
|
10
|
-
does not match the saved version, then "_version_save.py" is updated.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Usage
|
|
14
|
-
-----
|
|
15
|
-
1. Put this file in your main module directory:
|
|
16
|
-
|
|
17
|
-
REPO_ROOT/package_name/_version.py
|
|
18
|
-
|
|
19
|
-
2. Add this line to REPO_ROOT/package_name/__init__.py
|
|
20
|
-
|
|
21
|
-
from ._version import version as __version__ # noqa: F401
|
|
22
|
-
|
|
23
|
-
3. (Optional) Add this line to REPO_ROOT/.gitignore
|
|
24
|
-
|
|
25
|
-
_version_save.py
|
|
26
|
-
|
|
27
|
-
Features
|
|
28
|
-
--------
|
|
29
|
-
- supports Python 2 and 3
|
|
30
|
-
- supports frozen applications (e.g. PyInstaller)
|
|
31
|
-
- supports installing into a virtual environment that is located in
|
|
32
|
-
a git repository
|
|
33
|
-
- saved version is located in a python file and therefore no other
|
|
34
|
-
files (e.g. MANIFEST.in) need be edited
|
|
35
|
-
- fallback version is the creation date
|
|
36
|
-
- excluded from code coverage via "pragma: no cover"
|
|
37
|
-
|
|
38
|
-
Changelog
|
|
39
|
-
---------
|
|
40
|
-
2019-11-06.2
|
|
41
|
-
- use os.path.split instead of counting os.path.sep (Windows)
|
|
42
|
-
2019-11-06
|
|
43
|
-
- remove deprecated imp dependency (replace with parser)
|
|
44
|
-
- check whether this file is versioned and its location is correct
|
|
45
|
-
- code cleanup and docs update
|
|
46
|
-
"""
|
|
47
|
-
from __future__ import print_function
|
|
48
|
-
|
|
49
|
-
# Put the entire script into a `True` statement and add the hint
|
|
50
|
-
# `pragma: no cover` to ignore code coverage here.
|
|
51
|
-
if True: # pragma: no cover
|
|
52
|
-
import os
|
|
53
|
-
from os.path import abspath, basename, dirname, join, split
|
|
54
|
-
import subprocess
|
|
55
|
-
import sys
|
|
56
|
-
import time
|
|
57
|
-
import traceback
|
|
58
|
-
import warnings
|
|
59
|
-
|
|
60
|
-
def git_describe():
|
|
61
|
-
"""
|
|
62
|
-
Return a string describing the version returned by the
|
|
63
|
-
command `git describe --tags HEAD`.
|
|
64
|
-
If it is not possible to determine the correct version,
|
|
65
|
-
then an empty string is returned.
|
|
66
|
-
"""
|
|
67
|
-
# Make sure we are in a directory that belongs to the correct
|
|
68
|
-
# repository.
|
|
69
|
-
ourdir = dirname(abspath(__file__))
|
|
70
|
-
|
|
71
|
-
def _minimal_ext_cmd(cmd):
|
|
72
|
-
# Construct minimal environment
|
|
73
|
-
env = {}
|
|
74
|
-
for k in ['SYSTEMROOT', 'PATH']:
|
|
75
|
-
v = os.environ.get(k)
|
|
76
|
-
if v is not None:
|
|
77
|
-
env[k] = v
|
|
78
|
-
# LANGUAGE is used on win32
|
|
79
|
-
env['LANGUAGE'] = 'C'
|
|
80
|
-
env['LANG'] = 'C'
|
|
81
|
-
env['LC_ALL'] = 'C'
|
|
82
|
-
pop = subprocess.Popen(cmd,
|
|
83
|
-
stdout=subprocess.PIPE,
|
|
84
|
-
stderr=subprocess.PIPE,
|
|
85
|
-
env=env)
|
|
86
|
-
out = pop.communicate()[0]
|
|
87
|
-
return out.strip().decode('ascii', errors="ignore")
|
|
88
|
-
|
|
89
|
-
# change directory
|
|
90
|
-
olddir = abspath(os.curdir)
|
|
91
|
-
os.chdir(ourdir)
|
|
92
|
-
|
|
93
|
-
# Make sure that we are getting "git describe" from our own
|
|
94
|
-
# repository (and not from a repository where we just happen
|
|
95
|
-
# to be in the directory tree).
|
|
96
|
-
git_revision = ""
|
|
97
|
-
try:
|
|
98
|
-
# If this file is not under version control, "loc" will
|
|
99
|
-
# be empty.
|
|
100
|
-
loc = _minimal_ext_cmd(['git', 'ls-files', '--full-name',
|
|
101
|
-
__file__])
|
|
102
|
-
# If it is under version control, it should be located
|
|
103
|
-
# one hierarchy down from the repository root (either
|
|
104
|
-
# __file__ is "docs/conf.py" or "package_name/_version.py".
|
|
105
|
-
if len(split(loc)) == 2:
|
|
106
|
-
try:
|
|
107
|
-
git_revision = _minimal_ext_cmd(['git', 'describe',
|
|
108
|
-
'--tags', 'HEAD'])
|
|
109
|
-
except OSError:
|
|
110
|
-
pass
|
|
111
|
-
except OSError:
|
|
112
|
-
pass
|
|
113
|
-
# Go back to original directory
|
|
114
|
-
os.chdir(olddir)
|
|
115
|
-
|
|
116
|
-
return git_revision
|
|
117
|
-
|
|
118
|
-
def load_version(versionfile):
|
|
119
|
-
"""load version from version_save.py"""
|
|
120
|
-
longversion = ""
|
|
121
|
-
try:
|
|
122
|
-
with open(versionfile, "r") as fd:
|
|
123
|
-
data = fd.readlines()
|
|
124
|
-
for line in data:
|
|
125
|
-
if line.startswith("longversion"):
|
|
126
|
-
longversion = line.split("=")[1].strip().strip("'")
|
|
127
|
-
except BaseException:
|
|
128
|
-
try:
|
|
129
|
-
from ._version_save import longversion
|
|
130
|
-
except BaseException:
|
|
131
|
-
try:
|
|
132
|
-
from _version_save import longversion
|
|
133
|
-
except BaseException:
|
|
134
|
-
pass
|
|
135
|
-
|
|
136
|
-
return longversion
|
|
137
|
-
|
|
138
|
-
def write_version(version, versionfile):
|
|
139
|
-
"""save version to version_save.py"""
|
|
140
|
-
data = "#!/usr/bin/env python\n" \
|
|
141
|
-
+ "# This file was created automatically\n" \
|
|
142
|
-
+ "longversion = '{VERSION}'\n"
|
|
143
|
-
try:
|
|
144
|
-
with open(versionfile, "w") as fd:
|
|
145
|
-
fd.write(data.format(VERSION=version))
|
|
146
|
-
except BaseException:
|
|
147
|
-
if not os.path.exists(versionfile):
|
|
148
|
-
# Only issue a warning if the file does not exist.
|
|
149
|
-
msg = "Could not write package version to {}.".format(
|
|
150
|
-
versionfile)
|
|
151
|
-
warnings.warn(msg)
|
|
152
|
-
|
|
153
|
-
hdir = dirname(abspath(__file__))
|
|
154
|
-
if basename(__file__) == "conf.py" and "name" in locals():
|
|
155
|
-
# This script is executed in conf.py from the docs directory
|
|
156
|
-
versionfile = join(join(join(hdir, ".."),
|
|
157
|
-
name), # noqa: F821
|
|
158
|
-
"_version_save.py")
|
|
159
|
-
else:
|
|
160
|
-
# This script is imported as a module
|
|
161
|
-
versionfile = join(hdir, "_version_save.py")
|
|
162
|
-
|
|
163
|
-
# Determine the accurate version
|
|
164
|
-
longversion = ""
|
|
165
|
-
|
|
166
|
-
# 1. git describe
|
|
167
|
-
try:
|
|
168
|
-
# Get the version using `git describe`
|
|
169
|
-
longversion = git_describe()
|
|
170
|
-
except BaseException:
|
|
171
|
-
pass
|
|
172
|
-
|
|
173
|
-
# 2. previously created version file
|
|
174
|
-
if longversion == "":
|
|
175
|
-
# Either this is not a git repository or we are in the
|
|
176
|
-
# wrong git repository.
|
|
177
|
-
# Get the version from the previously generated `_version_save.py`
|
|
178
|
-
longversion = load_version(versionfile)
|
|
179
|
-
|
|
180
|
-
# 3. last resort: date
|
|
181
|
-
if longversion == "":
|
|
182
|
-
print("Could not determine version. Reason:")
|
|
183
|
-
print(traceback.format_exc())
|
|
184
|
-
ctime = os.stat(__file__)[8]
|
|
185
|
-
longversion = time.strftime("%Y.%m.%d-%H-%M-%S", time.gmtime(ctime))
|
|
186
|
-
print("Using creation time as version: {}".format(longversion))
|
|
187
|
-
|
|
188
|
-
if not hasattr(sys, 'frozen'):
|
|
189
|
-
# Save the version to `_version_save.py` to allow distribution using
|
|
190
|
-
# `python setup.py sdist`.
|
|
191
|
-
# This is only done if the program is not frozen (with e.g.
|
|
192
|
-
# pyinstaller),
|
|
193
|
-
if longversion != load_version(versionfile):
|
|
194
|
-
write_version(longversion, versionfile)
|
|
195
|
-
|
|
196
|
-
# PEP 440-conform development version:
|
|
197
|
-
version = ".post".join(longversion.split("-")[:2])
|
dcor_shared-0.10.3/setup.py
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
from os.path import dirname, exists, realpath
|
|
2
|
-
from setuptools import setup, find_packages
|
|
3
|
-
import sys
|
|
4
|
-
import warnings
|
|
5
|
-
|
|
6
|
-
author = "Paul Müller"
|
|
7
|
-
authors = [author]
|
|
8
|
-
description = 'Functionalities shared by the DCOR CKAN extensions'
|
|
9
|
-
name = 'dcor_shared'
|
|
10
|
-
year = "2020"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
sys.path.insert(0, realpath(dirname(__file__))+"/"+name)
|
|
14
|
-
try:
|
|
15
|
-
from _version import version # @UnresolvedImport
|
|
16
|
-
except BaseException:
|
|
17
|
-
version = "unknown"
|
|
18
|
-
|
|
19
|
-
try:
|
|
20
|
-
# Make sure this fails for old CKAN versions
|
|
21
|
-
import ckan
|
|
22
|
-
ckan_version = [int(v) for v in ckan.__version__.split(".")]
|
|
23
|
-
if ckan_version < [2, 10, 1]:
|
|
24
|
-
raise ValueError(
|
|
25
|
-
f"Your CKAN version {ckan_version} is not supported! If you "
|
|
26
|
-
f"are still on CKAN 2.9.5, then the following package versions "
|
|
27
|
-
f"are supported:"
|
|
28
|
-
f"\n dcor_shared<=0.3.1"
|
|
29
|
-
)
|
|
30
|
-
except ImportError:
|
|
31
|
-
warnings.warn("CKAN not installed, supported version check skipped.")
|
|
32
|
-
|
|
33
|
-
setup(
|
|
34
|
-
name=name,
|
|
35
|
-
author=author,
|
|
36
|
-
author_email='dev@craban.de',
|
|
37
|
-
url='https://github.com/DCOR-dev/dcor_shared',
|
|
38
|
-
version=version,
|
|
39
|
-
packages=find_packages(),
|
|
40
|
-
package_dir={name: name},
|
|
41
|
-
include_package_data=True,
|
|
42
|
-
license="AGPLv3+",
|
|
43
|
-
description=description,
|
|
44
|
-
long_description=open('README.rst').read() if exists('README.rst') else '',
|
|
45
|
-
install_requires=[
|
|
46
|
-
"boto3",
|
|
47
|
-
"dclab[s3]>=0.58.6",
|
|
48
|
-
],
|
|
49
|
-
extras_require={
|
|
50
|
-
# Required for the `dcor_shared.testing` submodule
|
|
51
|
-
"tests": ["requests", "requests_toolbelt", "pytest"]
|
|
52
|
-
},
|
|
53
|
-
python_requires='>=3.6, <4',
|
|
54
|
-
keywords=["DCOR"],
|
|
55
|
-
classifiers=[
|
|
56
|
-
'License :: OSI Approved :: GNU Affero General Public License v3 or '
|
|
57
|
-
+ 'later (AGPLv3+)',
|
|
58
|
-
'Operating System :: OS Independent',
|
|
59
|
-
'Programming Language :: Python :: 3',
|
|
60
|
-
'Topic :: Scientific/Engineering :: Visualization',
|
|
61
|
-
'Intended Audience :: Science/Research'
|
|
62
|
-
],
|
|
63
|
-
platforms=['ALL'],
|
|
64
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|