Skip to content

Commit

Permalink
Merge commit 'a96ce28c589dfe6b1b850d8eeeb14f1e1dfe9759'
Browse files Browse the repository at this point in the history
* commit 'a96ce28c589dfe6b1b850d8eeeb14f1e1dfe9759': (80 commits)
  Add note about 2.11 support
  Update images and actions, test 2.11
  feat(tests): added tyoe guess on mixed integers;
  add more ignorable blank lines to test sample, ckan#206
  add more options for maintainers to expedite XLoader runs, GitHub ckan#202
  strip extra space for column name
  In plugin.py, there is an fix of resource format key error
  fix list syntax for combining range and dict
  skip blank rows in source files, ckan#206
  add unit test for handling empty lines, ckan#206
  add sample file with extra blank line at end, ckan#206
  fix(tests): less complicated;
  further cleanup
  fix(tests): finalized test method;
  fix(tests): subrequest params;
  fix(tests): module path;
  feat(tests): added new test;
  fix(syntax): flake8;
  fix(helpers): comments and better syntax;
  fix(templates): set in block;
  ...

# Resolved conflicts:
#	.github/workflows/test.yml
#	ckanext/xloader/controllers.py
#	ckanext/xloader/plugin.py
#	ckanext/xloader/templates-bs2/package/resource_edit_base.html
#	ckanext/xloader/templates/package/resource_edit_base.html
#	ckanext/xloader/utils.py
#	ckanext/xloader/views.py
  • Loading branch information
peterVorman committed Aug 5, 2024
1 parent bcb2b07 commit 4f6047a
Show file tree
Hide file tree
Showing 47 changed files with 1,816 additions and 1,863 deletions.
4 changes: 0 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,4 @@ max-line-length=127

# List ignore rules one per line.
ignore =
E501
C901
W503
F401
F403
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
registries:
python-index-pypi-org:
type: python-index
url: https://pypi.org/
replaces-base: true
username: "${{secrets.PYTHON_INDEX_PYPI_ORG_USERNAME}}"
password: "${{secrets.PYTHON_INDEX_PYPI_ORG_PASSWORD}}"

updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "19:00"
open-pull-requests-limit: 10
registries:
- python-index-pypi-org
26 changes: 7 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,29 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
run: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --extend-exclude ckan
#- name: Run flake8
# run: flake8 . --count --max-line-length=127 --statistics --exclude ckan

test:
needs: lint
strategy:
matrix:
ckan-version: ["2.10", 2.9, 2.9-py2, 2.8, 2.7]
ckan-version: ["2.11", "2.10", 2.9]
fail-fast: false

name: CKAN ${{ matrix.ckan-version }}
runs-on: ubuntu-latest
container:
image: openknowledge/ckan-dev:${{ matrix.ckan-version }}
image: ckan/ckan-dev:${{ matrix.ckan-version }}
services:
solr:
image: ckan/ckan-solr:${{ matrix.ckan-version }}
image: ckan/ckan-solr:${{ matrix.ckan-version }}-solr9
postgres:
image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
env:
Expand All @@ -54,7 +52,7 @@ jobs:
CKAN_REDIS_URL: redis://redis:6379/1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install requirements
run: |
pip install -r requirements.txt
Expand All @@ -64,17 +62,7 @@ jobs:
# Replace default path to CKAN core config file with the one on the container
sed -i -e 's/use = config:.*/use = config:\/srv\/app\/src\/ckan\/test-core.ini/' test.ini
- name: Setup extension (CKAN >= 2.9)
if: ${{ matrix.ckan-version != '2.7' && matrix.ckan-version != '2.8' }}
run: |
ckan -c test.ini db init
- name: Setup extension (CKAN 2.8)
if: ${{ matrix.ckan-version == '2.8' }}
run: |
paster --plugin=ckan db init -c test.ini
- name: Setup extension (CKAN 2.7)
if: ${{ matrix.ckan-version == '2.7' }}
run: |
psql -d "postgresql://datastore_write:pass@postgres/datastore_test" -f full_text_function.sql
paster --plugin=ckan db init -c test.ini
- name: Run tests
run: pytest --ckan-ini=test.ini --cov=ckanext.xloader --disable-warnings ckanext/xloader/tests
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include full_text_function.sql
include *requirements*.txt
include CHANGELOG
include LICENSE
include README.rst
include ckanext/xloader/config_declaration.yaml
recursive-include ckanext/xloader/templates *.html
recursive-include ckanext/xloader/templates-bs2 *.html
Loading

0 comments on commit 4f6047a

Please sign in to comment.