ckanext-csvwmapandtransform 0.0.1__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.
- ckanext_csvwmapandtransform-0.0.1/.github/workflows/pypi.yml +105 -0
- ckanext_csvwmapandtransform-0.0.1/.github/workflows/test.yml +76 -0
- ckanext_csvwmapandtransform-0.0.1/.gitignore +157 -0
- ckanext_csvwmapandtransform-0.0.1/LICENSE +661 -0
- ckanext_csvwmapandtransform-0.0.1/MANIFEST.in +5 -0
- ckanext_csvwmapandtransform-0.0.1/PKG-INFO +121 -0
- ckanext_csvwmapandtransform-0.0.1/README.md +95 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/__init__.py +11 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/__init__.py +22 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/action.py +405 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/assets/.gitignore +0 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/assets/script.js +81 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/assets/style.css +124 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/assets/webassets.yml +13 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/auth.py +23 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/cli.py +18 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/db.py +397 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/helpers.py +67 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/i18n/.gitignore +0 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/i18n/ckanext-csvwmapandtransform.pot +108 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/i18n/de/LC_MESSAGES/ckanext-csvwmapandtransform.mo +0 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/i18n/de/LC_MESSAGES/ckanext-csvwmapandtransform.po +113 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/mapper.py +133 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/plugin.py +140 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/public/.gitignore +0 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/public/dotted.png +0 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/tasks.py +262 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/templates/.gitignore +0 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/templates/csvwmapandtransform/create_mapping.html +56 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/templates/csvwmapandtransform/transform.html +108 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/templates/package/resource_read.html +8 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/templates/package/snippets/resource_item.html +23 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/tests/__init__.py +0 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext/csvwmapandtransform/views.py +205 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext_csvwmapandtransform.egg-info/PKG-INFO +121 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext_csvwmapandtransform.egg-info/SOURCES.txt +46 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext_csvwmapandtransform.egg-info/dependency_links.txt +1 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext_csvwmapandtransform.egg-info/entry_points.txt +5 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext_csvwmapandtransform.egg-info/namespace_packages.txt +1 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext_csvwmapandtransform.egg-info/requires.txt +6 -0
- ckanext_csvwmapandtransform-0.0.1/ckanext_csvwmapandtransform.egg-info/top_level.txt +1 -0
- ckanext_csvwmapandtransform-0.0.1/dev-requirements.txt +1 -0
- ckanext_csvwmapandtransform-0.0.1/pyproject.toml +98 -0
- ckanext_csvwmapandtransform-0.0.1/requirements.txt +4 -0
- ckanext_csvwmapandtransform-0.0.1/setup.cfg +66 -0
- ckanext_csvwmapandtransform-0.0.1/setup.py +13 -0
- ckanext_csvwmapandtransform-0.0.1/test.ini +45 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
name: upload-pypi
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Set version from release tag
|
|
18
|
+
run: echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.x"
|
|
24
|
+
|
|
25
|
+
- name: Build release distributions
|
|
26
|
+
run: |
|
|
27
|
+
# NOTE: put your own distribution build steps here.
|
|
28
|
+
python -m pip install build
|
|
29
|
+
python -m build
|
|
30
|
+
|
|
31
|
+
- name: Upload distributions
|
|
32
|
+
uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: release-dists
|
|
35
|
+
path: dist/
|
|
36
|
+
|
|
37
|
+
pypi-publish:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
needs:
|
|
40
|
+
- release-build
|
|
41
|
+
permissions:
|
|
42
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
43
|
+
id-token: write
|
|
44
|
+
|
|
45
|
+
# Dedicated environments with protections for publishing are strongly recommended.
|
|
46
|
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
|
|
47
|
+
environment:
|
|
48
|
+
name: pypi
|
|
49
|
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
|
|
50
|
+
#url: https://pypi.org/p/${GITHUB_REPOSITORY#*/}
|
|
51
|
+
#
|
|
52
|
+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
|
|
53
|
+
# ALTERNATIVE: exactly, uncomment the following line instead:
|
|
54
|
+
url: https://pypi.org/project/${GITHUB_REPOSITORY#*/}/${{ github.event.release.name }}
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- name: Retrieve release distributions
|
|
58
|
+
uses: actions/download-artifact@v4
|
|
59
|
+
with:
|
|
60
|
+
name: release-dists
|
|
61
|
+
path: dist/
|
|
62
|
+
|
|
63
|
+
- name: Publish release distributions to PyPI
|
|
64
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
65
|
+
with:
|
|
66
|
+
packages-dir: dist/
|
|
67
|
+
sign-package:
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
needs:
|
|
70
|
+
- release-build
|
|
71
|
+
steps:
|
|
72
|
+
- name: Download all the dists
|
|
73
|
+
uses: actions/download-artifact@v4
|
|
74
|
+
with:
|
|
75
|
+
name: release-dists
|
|
76
|
+
path: dist/
|
|
77
|
+
- name: Sign the dists with Sigstore
|
|
78
|
+
uses: sigstore/gh-action-sigstore-python@v3.0.0
|
|
79
|
+
with:
|
|
80
|
+
inputs: >-
|
|
81
|
+
./dist/*.tar.gz
|
|
82
|
+
./dist/*.whl
|
|
83
|
+
publish-to-testpypi:
|
|
84
|
+
name: Publish Python 🐍 distribution 📦 to TestPyPI
|
|
85
|
+
needs:
|
|
86
|
+
- release-build
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
|
|
89
|
+
environment:
|
|
90
|
+
name: testpypi
|
|
91
|
+
url: https://test.pypi.org/p/${GITHUB_REPOSITORY#*/}
|
|
92
|
+
|
|
93
|
+
permissions:
|
|
94
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
95
|
+
|
|
96
|
+
steps:
|
|
97
|
+
- name: Download all the dists
|
|
98
|
+
uses: actions/download-artifact@v4
|
|
99
|
+
with:
|
|
100
|
+
name: release-dists
|
|
101
|
+
path: dist/
|
|
102
|
+
- name: Publish distribution 📦 to TestPyPI
|
|
103
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
104
|
+
with:
|
|
105
|
+
repository-url: https://test.pypi.org/legacy/
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
jobs:
|
|
4
|
+
lint:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
steps:
|
|
7
|
+
- uses: actions/checkout@v3
|
|
8
|
+
- uses: actions/setup-python@v4
|
|
9
|
+
with:
|
|
10
|
+
python-version: '3.11'
|
|
11
|
+
- name: Install requirements
|
|
12
|
+
run: pip install flake8 pycodestyle
|
|
13
|
+
- name: Check syntax
|
|
14
|
+
run: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude ckan
|
|
15
|
+
|
|
16
|
+
test:
|
|
17
|
+
needs: lint
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
include:
|
|
21
|
+
- ckan-version: "2.11"
|
|
22
|
+
ckan-image: "ckan/ckan-dev:2.11-py3.10"
|
|
23
|
+
solr-image: "2.11-solr9-spatial"
|
|
24
|
+
harvester-version: 'master'
|
|
25
|
+
- ckan-version: "2.10"
|
|
26
|
+
ckan-image: "ckan/ckan-dev:2.10-py3.10"
|
|
27
|
+
solr-image: "2.10-solr9-spatial"
|
|
28
|
+
harvester-version: 'master'
|
|
29
|
+
fail-fast: false
|
|
30
|
+
|
|
31
|
+
name: CKAN ${{ matrix.ckan-version }}, Solr ${{ matrix.solr-image }}
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
container:
|
|
34
|
+
image: ${{ matrix.ckan-image }}
|
|
35
|
+
options: --user root
|
|
36
|
+
services:
|
|
37
|
+
solr:
|
|
38
|
+
image: ckan/ckan-solr:${{ matrix.solr-image }}
|
|
39
|
+
postgres:
|
|
40
|
+
image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
|
|
41
|
+
env:
|
|
42
|
+
POSTGRES_USER: postgres
|
|
43
|
+
POSTGRES_PASSWORD: postgres
|
|
44
|
+
POSTGRES_DB: postgres
|
|
45
|
+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
46
|
+
redis:
|
|
47
|
+
image: redis:7
|
|
48
|
+
env:
|
|
49
|
+
CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test
|
|
50
|
+
CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test
|
|
51
|
+
CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test
|
|
52
|
+
CKAN_SOLR_URL: http://solr:8983/solr/ckan
|
|
53
|
+
CKAN_REDIS_URL: redis://redis:6379/1
|
|
54
|
+
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v3
|
|
57
|
+
- name: Install requirements
|
|
58
|
+
run: |
|
|
59
|
+
pip install -r requirements.txt
|
|
60
|
+
pip install -r dev-requirements.txt
|
|
61
|
+
- name: Install requirements (common)
|
|
62
|
+
run: |
|
|
63
|
+
pip install -e .
|
|
64
|
+
# Replace default path to CKAN core config file with the one on the container
|
|
65
|
+
sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
|
|
66
|
+
- name: Setup extension
|
|
67
|
+
run: |
|
|
68
|
+
ckan -c test.ini db init
|
|
69
|
+
- name: Run tests
|
|
70
|
+
run: pytest --ckan-ini=test.ini --cov=ckanext.csvwmapandtransform --disable-warnings ckanext/csvwmapandtransform || ([ $? = 5 ] && exit 0 || exit $?)
|
|
71
|
+
- name: Upload coverage report to codecov
|
|
72
|
+
uses: codecov/codecov-action@v1
|
|
73
|
+
with:
|
|
74
|
+
file: ./coverage.xml
|
|
75
|
+
|
|
76
|
+
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
ckanect/csvwmapandtransform/__pycache__/
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*$py.class
|
|
6
|
+
|
|
7
|
+
# C extensions
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# Distribution / packaging
|
|
11
|
+
.Python
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
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
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Django stuff:
|
|
56
|
+
*.log
|
|
57
|
+
local_settings.py
|
|
58
|
+
db.sqlite3
|
|
59
|
+
db.sqlite3-journal
|
|
60
|
+
|
|
61
|
+
# Flask stuff:
|
|
62
|
+
instance/
|
|
63
|
+
.webassets-cache
|
|
64
|
+
|
|
65
|
+
# Scrapy stuff:
|
|
66
|
+
.scrapy
|
|
67
|
+
|
|
68
|
+
# Sphinx documentation
|
|
69
|
+
docs/_build/
|
|
70
|
+
|
|
71
|
+
# PyBuilder
|
|
72
|
+
.pybuilder/
|
|
73
|
+
target/
|
|
74
|
+
|
|
75
|
+
# Jupyter Notebook
|
|
76
|
+
.ipynb_checkpoints
|
|
77
|
+
|
|
78
|
+
# IPython
|
|
79
|
+
profile_default/
|
|
80
|
+
ipython_config.py
|
|
81
|
+
|
|
82
|
+
# pyenv
|
|
83
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
84
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
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
|
+
# poetry
|
|
95
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
96
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
97
|
+
# commonly ignored for libraries.
|
|
98
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
99
|
+
#poetry.lock
|
|
100
|
+
|
|
101
|
+
# pdm
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
103
|
+
#pdm.lock
|
|
104
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
105
|
+
# in version control.
|
|
106
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
107
|
+
.pdm.toml
|
|
108
|
+
|
|
109
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
110
|
+
__pypackages__/
|
|
111
|
+
|
|
112
|
+
# Celery stuff
|
|
113
|
+
celerybeat-schedule
|
|
114
|
+
celerybeat.pid
|
|
115
|
+
|
|
116
|
+
# SageMath parsed files
|
|
117
|
+
*.sage.py
|
|
118
|
+
|
|
119
|
+
# Environments
|
|
120
|
+
.env
|
|
121
|
+
.venv
|
|
122
|
+
env/
|
|
123
|
+
venv/
|
|
124
|
+
ENV/
|
|
125
|
+
env.bak/
|
|
126
|
+
venv.bak/
|
|
127
|
+
|
|
128
|
+
# Spyder project settings
|
|
129
|
+
.spyderproject
|
|
130
|
+
.spyproject
|
|
131
|
+
|
|
132
|
+
# Rope project settings
|
|
133
|
+
.ropeproject
|
|
134
|
+
|
|
135
|
+
# mkdocs documentation
|
|
136
|
+
/site
|
|
137
|
+
|
|
138
|
+
# mypy
|
|
139
|
+
.mypy_cache/
|
|
140
|
+
.dmypy.json
|
|
141
|
+
dmypy.json
|
|
142
|
+
|
|
143
|
+
# Pyre type checker
|
|
144
|
+
.pyre/
|
|
145
|
+
|
|
146
|
+
# pytype static type analyzer
|
|
147
|
+
.pytype/
|
|
148
|
+
|
|
149
|
+
# Cython debug symbols
|
|
150
|
+
cython_debug/
|
|
151
|
+
|
|
152
|
+
# PyCharm
|
|
153
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
154
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
155
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
156
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
157
|
+
#.idea/
|