[ckan-changes] [ckan/ckan] 2928d7: Storing the size and mimetypes from uploads

GitHub noreply at github.com
Fri Oct 7 15:22:28 UTC 2016


  Branch: refs/heads/1517-size-mimetype
  Home:   https://github.com/ckan/ckan
  Commit: 2928d7961c9836fb5683bacb7dd71b833e622efc
      https://github.com/ckan/ckan/commit/2928d7961c9836fb5683bacb7dd71b833e622efc
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/lib/uploader.py
    M ckan/logic/action/create.py
    M ckan/logic/action/update.py
    M requirements.in

  Log Message:
  -----------
  Storing the size and mimetypes from uploads

size is stored as bytes

there's a bit of redundancy with getting the mimetypes of files, by
default, mimetype is determined by the url, fallback is done by using
`python-magic` module


  Commit: 7daa6042a8f4b9444e5c7389f497f4637a876b7f
      https://github.com/ckan/ckan/commit/7daa6042a8f4b9444e5c7389f497f4637a876b7f
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/lib/uploader.py

  Log Message:
  -----------
  Specified which exception to catch for python-magic call failure


  Commit: 97867fb95e9fe82a4485c976c875728fa81273c8
      https://github.com/ckan/ckan/commit/97867fb95e9fe82a4485c976c875728fa81273c8
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/logic/action/update.py

  Log Message:
  -----------
  Dont override size and mimetype if specified by the user


  Commit: 9e77294980bd8b2a2b09dc337d8d8e1955af4304
      https://github.com/ckan/ckan/commit/9e77294980bd8b2a2b09dc337d8d8e1955af4304
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/lib/uploader.py
    M ckan/logic/action/create.py
    M ckan/logic/action/update.py

  Log Message:
  -----------
  Fixing code placement due to failing many tests, moved filesize and mimetype in ResourceUpload init method instead of upload method


  Commit: 5c527d08936a8401c6a2fb9df5e40f76253c52a1
      https://github.com/ckan/ckan/commit/5c527d08936a8401c6a2fb9df5e40f76253c52a1
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/tests/logic/action/test_create.py

  Log Message:
  -----------
  Added some test for mimetype and size

Testing by user specified parameters are passing,
not sure how to approach testing real uploads in the tests


  Commit: c650aee599b1e9dcce959cce43d2b6dca9d09c89
      https://github.com/ckan/ckan/commit/c650aee599b1e9dcce959cce43d2b6dca9d09c89
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/tests/logic/action/test_create.py

  Log Message:
  -----------
  Basic tests in place, need a better way to providing a file for real upload to the resource_create action


  Commit: bf292e0fc1b8a990dc2a3e0bd0b50f942d6def5e
      https://github.com/ckan/ckan/commit/bf292e0fc1b8a990dc2a3e0bd0b50f942d6def5e
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/lib/uploader.py
    M ckan/logic/action/create.py
    M ckan/logic/action/update.py
    M ckan/tests/lib/dictization/test_model_dictize.py
    M ckan/tests/logic/action/test_create.py
    M ckan/tests/logic/action/test_update.py

  Log Message:
  -----------
  Finishing test_create tests, moved mimetype logic back into uploader.py,
test_model_dictize.py had one test that now expects size to be 0, fixing
formatting for pip8


  Commit: 626d695248adecaef9bbd7fe2694c499fcb6206c
      https://github.com/ckan/ckan/commit/626d695248adecaef9bbd7fe2694c499fcb6206c
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/logic/action/update.py

  Log Message:
  -----------
  updating resources that dont have an upload will not update the size var


  Commit: f558cc7d9769edf8b68dd41f75304fdd28064285
      https://github.com/ckan/ckan/commit/f558cc7d9769edf8b68dd41f75304fdd28064285
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/tests/logic/action/test_update.py

  Log Message:
  -----------
  Added tests for updating a resource

The included tests have a similar process as the tests for creating a
resource.


  Commit: 2fa1dd150d7bf7f41fdb495edcf888d44cf49dcc
      https://github.com/ckan/ckan/commit/2fa1dd150d7bf7f41fdb495edcf888d44cf49dcc
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M requirements.in
    M requirements.txt

  Log Message:
  -----------
  Pinning python-magic to 0.4.6 and adding to requirements.txt


  Commit: d4ec8ab34a764db00555e28d36486834c6cf62c7
      https://github.com/ckan/ckan/commit/d4ec8ab34a764db00555e28d36486834c6cf62c7
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/lib/uploader.py

  Log Message:
  -----------
  Added config option for guessing mimetype


  Commit: d4be3b41e3c590c18543dc161d9707b30096762a
      https://github.com/ckan/ckan/commit/d4be3b41e3c590c18543dc161d9707b30096762a
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M test-core.ini

  Log Message:
  -----------
  Adding resource upload directory for circleci


  Commit: c22f90bef810811a6823120a9d72507174c94b40
      https://github.com/ckan/ckan/commit/c22f90bef810811a6823120a9d72507174c94b40
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/tests/logic/action/test_create.py
    M ckan/tests/logic/action/test_update.py

  Log Message:
  -----------
  Could have saved myself many hours if i knew @helpers.change_config was a thing


  Commit: 4f1e0158d48222b05789538530405e18c8d49509
      https://github.com/ckan/ckan/commit/4f1e0158d48222b05789538530405e18c8d49509
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M doc/maintaining/configuration.rst

  Log Message:
  -----------
  Added config doc info for ckan.mimetype_guess


  Commit: 8aede36699580ec0cf561c4117ef1547dc4a3bfe
      https://github.com/ckan/ckan/commit/8aede36699580ec0cf561c4117ef1547dc4a3bfe
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-09-30 (Fri, 30 Sep 2016)

  Changed paths:
    M ckan/tests/logic/action/test_update.py

  Log Message:
  -----------
  Fixing pep8

Remove whitespace


  Commit: e8397f9e212fa97db0fa57e5e1229dbc887301c2
      https://github.com/ckan/ckan/commit/e8397f9e212fa97db0fa57e5e1229dbc887301c2
  Author: Jared Smith <jared.smith.jrod at gmail.com>
  Date:   2016-10-05 (Wed, 05 Oct 2016)

  Changed paths:
    M ckan/lib/uploader.py
    M ckan/logic/action/update.py

  Log Message:
  -----------
  Reverting changes on Upload class in uploader


  Commit: a8d0d70bcf784b055efec62bdb4a2d19e869ddaf
      https://github.com/ckan/ckan/commit/a8d0d70bcf784b055efec62bdb4a2d19e869ddaf
  Author: amercader <amercadero at gmail.com>
  Date:   2016-10-07 (Fri, 07 Oct 2016)

  Changed paths:
    M ckan/lib/uploader.py
    M ckan/logic/action/create.py
    M ckan/logic/action/update.py
    M ckan/tests/lib/dictization/test_model_dictize.py
    M ckan/tests/logic/action/test_create.py
    M ckan/tests/logic/action/test_update.py
    M doc/maintaining/configuration.rst
    M requirements.in
    M requirements.txt
    M test-core.ini

  Log Message:
  -----------
  Merge branch 'issue_1517_size_mimetypes' of https://github.com/HighwayThree/ckan into HighwayThree-issue_1517_size_mimetypes


Compare: https://github.com/ckan/ckan/compare/2928d7961c98^...a8d0d70bcf78


More information about the ckan-changes mailing list