{22} Trac tickets (2647 matches)

Results (2501 - 2600 of 2647)

Id Type Owner Reporter Milestone Status Resolution Summary Description Posixtime Modifiedtime
#2884 defect seanh ckan-v1.8.1 new Lock icon shown next to unknown licenses

Set the license of a dataset to blank (the first option) or to 'License Not Specified' or 'Other (Non-Commercial)' and a lock icon appears next to the license on the dataset read page. Shouldn't this be a question mark or something?

1345564873000000 1345564873000000
#2885 enhancement seanh ckan-v1.9 new Labels (editor, admin) not translated in authorization pages for datasets or groups 1345625351000000 1345625524000000
#2886 enhancement ross ckan 2.0 new Configurable related items

Related items (Apps & Ideas) have a collection of types, which are currently fixed. Some of these types are ambiguous, such as ideas in that they may not have a link - and if they do it is likely to be to a blog post - another existing type.

Whilst the URL is required, and we think this should stay required, we should also allow users to change the types found in Apps & Ideas to a shortened list that suits their requirements.

1345625718000000 1345625718000000
#2887 defect seanh ckan-v1.8.1 new "Welcome to CKAN!" on front page is untranslatable

ckan/templates/home/index.html contains:

<h1 class="page_heading">Welcome to ${g.site_title}!</h1>

which means that just "Welcome to" ends up in the ckan.po files for translation. This makes the phrase untranslatable in languages that have a different word ordering than English where the site title needs to be somewhere other than at the end of the sentence.

1345627079000000 1345627233000000
#2888 enhancement kindly new Datapreview in Iframe

Try and put datapreview in Iframe.

1345745461000000 1345745461000000
#2889 enhancement seanh ckan-v1.9 new Support JSON values in extras, when returning JSON from API

For example, edit the warandpeace dataset and add an extra with key "comments" and value "[{u'date': u'Tue Aug 21 13:01:48 GMT 2012', u'comment': u'testing ckan', u'userId': u'11702'}, {u'date': u'Wed Aug 22 13:01:48 GMT 2012', u'comment': u'testing ckan again', u'userId': u'11702'}]", now visit API URLs such as:

/api/search/dataset?sort=metadata_modified+desc&all_fields=1&limit=10

/api/rest/dataset/warandpeace

/api/action/package_show?id=warandpeace

The value of the extra comes out as a string in the dataset JSON, rather than having its contents unpacked into a list of JSON objects.

1345811737000000 1345811737000000
#2890 enhancement seanh ckan-v1.8.1 new Collect data previews and data store docs in one chapter

Currently there is this page:

http://docs.ckan.org/en/latest/data-viewer.html

which covers Recline Data Explorer and other kinds of data preview in CKAN. It is under the Publishing Datasets section in the documentation. I had to to a search for 'recline' to find it.

Separately there is this page: http://docs.ckan.org/en/ckan-1.7.1/datastore.html which covers datastore, datastorer, and the data api.

I suggest collecting this together in one chapter called 'Data Previews'. If I understand it right the general gist would be:

CKAN has builtin previews of data resources on resource pages, enabled by default.

Images, Google Documents, and web page resources will be loaded into embedded iframes for preview.

Text-like files will be displayed raw.

CSV or Excel files uploaded to CKAN will be previewed using Recline Data Explorer.

Additionally, you can enable CKAN's DataStore?, requires you to install ElasticSearch? and nginx and put datastore.enabled=1 in your ini file. Lets you use the Data API to query data.

Does having DataStore? enabled mean you get preview of more types of resources? Any resource that's available via the Data API will be previewed using Recline,

You can install ckanext-datastorer, and then CSV and Excel files _linked to_ as CKAN resources will be previewed using Recline also. Requires celeryd.

1346149236000000 1346175867000000
#2891 defect seanh ckan-v1.8.1 new Update or remove DataStore google presentation

Currently this page:

http://docs.ckan.org/en/ckan-1.8/datastore.html

has an embedded Google docs presentation about data store which contains some outdated information, e.g. links to datastoreclient which was merged into ckanclient.

Suggest moving the google presentation into the documentation proper, so it works with grep etc.

1346149423000000 1346154177000000
#2892 defect seanh ckan-v1.8.1 new IDatasetForm's form_to_db_schema() breaks API?

It looks like when an IDatasetForm plugin with a form_to_db_schema() method is active, then the posted data dict is validated against the schema even if the user is posting to an API endpoint like /api/action/package_update etc. This breaks the API, for example 'name' and 'title' are optional keys for package_update (you can supply only the 'id'), but the schema validation will fail if either are not present in the posted dict.

It may be we need different schema for package create and package update, currently IDatasetForm has just the one form_to_db_schema() method.

1346154125000000 1346154163000000
#2893 defect seanh ckan-v1.8.1 new Tags missing from form_to_db_package_schema()

With an IDatasetForm plugin active with a form_to_db_package_schema() method that returns a schema based on ckan/logic/schema.py:form_to_db_package_schema() I'm getting validation errors like this:

[ckan.controllers.api] Validation error: "{'type': 'Validation Error', 'junk': [u'The input field junk was not expected.']}"

They seem to be caused when a data dict with key 'tags' is passed to e.g. the package_update API, for example in ckan/tests/functional/api/model/test_vocabulary.py there are various tests that get this error when they call package_update (if you run the tests with a suitable IDatasetForm plugin active).

In ckan/logic/schema.py:form_to_db_package_schema() 'tags' is for some reason deliberately removed from the schema.

1346155864000000 1346155864000000
#2894 defect seanh ckan-v1.8.1 new Empty lists get stripped from package dicst in package_show()

If there's an IDatasetForm plugin active with a form_to_db_schema(), then packages with e.g. no extras get the 'extras' key entirely stripped by the validation in package_show, which causes some tests to crash, e.g. in ckan/tests/functional/api/test_activity.py (if the tests are run with a suitable IDatasetForm plugin active).

If a package has no extras the dict returned by package_show should still have an 'extras' key with an empty list as the value.

Suspect this also effects packages with no tags, no groups, etc.

1346157634000000 1346157634000000
#2895 enhancement rgrp new QA pages (e.g. broken resource links) are not paginated

And as a result timeout on e.g. the datahub ...

1346175485000000 1346175485000000
#2896 defect seanh ckan-v1.8.1 new resource_create crashes on ValidationErrors with KeyError: 'resources'

ckan/logic/action/create.py:resource_create():

try:

pkg_dict = _get_action('package_update')(context, pkg_dict)

except ValidationError?, e:

errors = e.error_dictresources?[-1] raise ValidationError?(errors)

This assumes that package_update always returns an error dict with 'resources' in it. This assumption doesn't hold.

1346257754000000 1346257754000000
#2897 defect seanh ckan-v1.8.1 new db_to_form_package_schema() crashes historical dataset page

If there's an IDatasetForm plugin active with a db_to_form_schema() method based on db_to_form_package_schema(), then viewing historical versions of datasets (e.g. http://127.0.0.1:5000/dataset/dasd%402012-08-30T12%3A26%3A18.524191) crashes.

Reason is that revison_id and revision_timestamp need to be added to db_to_form_package_schema(), something like:

schema.update({'revision_id': [validators.ignore_missing, unicode]}) schema.update({'revision_timestamp':

[validators.ignore_missing, unicode]})

1346330495000000 1346330495000000
#2898 defect johnmartin demo phase 5 new Looses data entered on step 1 of create dataset after login

To reproduce:

  1. Enter details for new dataset without being logged in
  1. Hit login page for just before step 2
  1. Once logged in you end up back at the empty add dataset form (instead of expected 2nd step of dataset edit)
1346332094000000 1346332120000000
#2899 enhancement johnmartin demo phase 5 new Step 2 > Save & add another bug

Goto:

  1. Add dataset
  1. Get to step 2
  1. Click "Save & add another" without adding any data
  1. Ends on step 3

Should: fail to validate and remain on step 2

1346332519000000 1346332519000000
#2900 defect seanh ckan-v1.8.1 new snippets/package_list.html template crashes on dataset that has no 'notes'

Sometimes a dataset dict comes through package_show() with 'notes': None and then the 'notes' key gets stripped from the dict when validation happens (validation only happens if there's an IDatasetForm plugin with a db_to_form_schema() method) and then package_list.html template crashes, e.g. on user profile pages.

Fix in the template? Or in the schema?

The template also crashes on packages with no tags (empty list gets stripped from dict) and probably other empty fields as well

1346335207000000 1346335788000000
#2901 enhancement johnmartin demo phase 5 new Language Dropdown bug in footer with IE7

The language dropdown in Internet Explorer 7 behaves oddly. Essentially I think the problem is with the way that the dropdown decides to go into "drop-up mode" (e.g there aint enough screen space below the initial state so it has to drop up).

1346754674000000 1346754674000000
#2902 enhancement ross ckan 2.0 new genshi is used in Group controller

The Group controller uses the genshi module where it may be better for it to use Markup() in the template.

See https://github.com/okfn/ckan/pull/117/files#r1524863

1346782230000000 1346782230000000
#2903 enhancement johnmartin johnmartin demo phase 5 closed wontfix Two search boxes

I think the architecture on the search page is a bit odd. Not sure I like that there is a doubling up of the search box (e.g. one in the header and one in the body of the search results page)

Needs some thought

1346853712000000 1352206813000000
#2904 enhancement johnmartin demo phase 5 new Show more formats/groups/tags shouldn't display if there aren't more

On the search results page when there are no more formats, groups or tags to display it should not display the show more links.

1346854444000000 1346854444000000
#2905 enhancement johnmartin demo phase 5 new Add dataset URL key behaviour

On step 1 for adding a dataset can we add a ajax ping that checks if the URL that is generated by the JS is taken? Behaviour should be as follows:

  1. User types title in box (as current)
  1. URL key is regexed by JS (as current)
  1. The JS does a ajax call to check if the generated URL key is valid. The ajax callback returns a JSON dump which contains what the URL key should be (e.g. if 'test' was taken it returns 'test-1')
  1. If the URL key returned in the ajax is different than the one generated by the JS then:

4a. If the user hasn't clicked the edit button then: it automatically updates the URL key field with the URL key supplied in the ajax

4b. If the user has clicked the edit button then: a form error next to the input appears saying that the URL key is taken and within that error is suggests the URL key returned by the ajax as alternative (the user can click said URL key within the error to automatically choose that one)

The URL key isn't reserved by the ajax and upon form submission the usual validation should still apply.

1346855283000000 1346855283000000
#2906 defect dominik demo phase 5 new Wrong flags in language dropdown

The flags in the dropdown on details pages are not right.

You can see the error on http://s031.okserver.org:2375/dataset/malawi-aid-projects/resource/b717c20e-2006-4ad4-82d2-59b57ebc1ab0.

1346861144000000 1346862889000000
#2907 enhancement johnmartin johnmartin demo phase 5 closed fixed Demo header

The user login / avatar with in the header really should be within another topbar, as it goes against convention to have the user information within the normal header.

1346930925000000 1352206307000000
#2908 enhancement johnmartin demo phase 5 new Dataset related with image should retain aspect ratio

At the moment if you have an related item with an image associated to a dataset that appears in the side column it's resized but doesn't keep it's original aspect ratio.

1346931162000000 1346931162000000
#2909 enhancement johnmartin demo phase 5 new User profile headers are a bit weird

They seem to be not exactly well thought out. Needs some thought on better display of the information that they contain.

1346931348000000 1346931348000000
#2910 enhancement johnmartin demo phase 5 new User listings are not very compelling

They are currently are just a small image / name. They should be: Larger image, Full name (username), description, edits/dataset

1346931587000000 1346931587000000
#2911 enhancement kindly new Internal documentation of Organization Groups

A summary/user story doc of how organizations and groups are expected to work.

1346941384000000 1346941384000000
#2912 defect seanh ckan-v1.8.1 new ckanext/organizations: Neither public or private initially selected when adding dataset

When adding a dataset with the organizations extension on, neither the Public or the Private radio button is initially selected. Public should be selected.

1347271076000000 1350303897000000
#2913 defect seanh ckan 2.0 new IGroupForm has package_form() method

Should be group_form() I think

1347374739000000 1350303779000000
#2914 defect seanh ckan-v1.8.1 new Add form_to_db_schema_options() to IDatasetForm and IGroupForm

This optional method is supported when creating or updating groups and packages and is used in DefaultGroupForm? and DefaultPackageForm?, but seems to be missing from the interfaces. Should be added with docstring.

1347445795000000 1350303928000000
#2915 refactor seanh ckan 2.0 new Refactor form_to_db_schema_options()

Having two methods form_to_db_schema(self) and form_to_db_schema_options(self, options) seems unnecessary, why not just have form_to_db_schema(self, options=None)?

Fixing this might break existing extensions although I don't think any are using form_to_db_schema_options() so it should be okay.

The same thing goes for db_to_form_schema_options().

Also why are we passing a dict 'options' that always contains the same three keys 'api', 'context' and 'type'? Why not three params api=None, contenxt=None, type=None?

1347446269000000 1347447588000000
#2916 enhancement johnmartin ross ckan 2.0 closed fixed User management in orgs needs autocomplete

The user management in organizations ( http://localhost:5000/organization/users/NAME ) should autocomplete names in the dropdown box so that only valid usernames are added to the table.

1347451792000000 1347970727000000
#2917 enhancement johnmartin ross ckan 2.0 new Organization admins can delete themselves

Organization administrators can delete themselves from the user management pages. We should disable this on the front-end as well as the back-end.

1347451843000000 1347455636000000
#2918 enhancement johnmartin ross ckan 2.0 closed fixed Can't remove users from organizations

When you remove someone, without adding them, the text box at the bottom (which should probably autocomplete) is empty, and this causes problems on the server.

Ideally when you add a user (select from the autocomplete) it would add another row to the table, defaulting the user to editor and setting the names to user{{X}}name and user{{X}}capacity where X is $('tr').size()

1347455572000000 1347970735000000
#2919 defect seanh ckan-v1.8 new Remove IController from docs

Still in docs but seems gone from code

1347461253000000 1347461253000000
#2920 defect seanh ckan 2.0 new Genshi text template message extractor no longer needed?

In setup.py, do we still need:

('templates/.txt', 'genshi', {

'template_class': 'genshi.template:TextTemplate'

}),

in message_extractors? Doesn't like there are any txt files in there anymore.

1347530249000000 1347530249000000
#2921 defect seanh ckan 2.0 new Add docstring to top of lib/extract.py file

I think it couldn't hurt for this module to have a docstring at the top of the file explaining what the module is for. I know from setup.py that it's there to provide the extract_ckan() string extractor function for Babel, but I think looking at the file on its own it's not so obvious.

Also a couple of other small fixes:

jinja2_cleaner looks like a helper function only meant to be used by extract_ckan(), might make things clearer if it was called _jinja2_cleaner(), just so it doesn't look like a public function the module wants to export.

jinja_extensions seems to be a module-level variable that is only used in one function, could be moved into the function, unless you think there might be more functions that want it in future.

1347530407000000 1347530407000000
#2922 defect seanh ckan 2.0 new Better docstring for CKANInternationalizationExtension

I'm unsure about what's going on here. As I understand it, when we run python setup.py extract_messages it's going to use the extract_ckan() function from ckan/lib/extract.py to process the HTML files. For the HTML files that are jinja2 templates, extract_ckan() will call jinja2_cleaner() which will call regularise_html() on the strings. So the strings are regularised when they are extracted from the source files.

But then we have the parse() method of CkanInternationalizationExtension? also calling regularise_html(). I don't get what's happening here. Why do the strings need to be regularised twice?

My guess is that CkanInternationalizationExtension? is used when the strings are extracted from the templates at runtime, and they need to be regularised at this time in order to match them against the regularised strings in the mo files to find the translations to output?

Maybe CkanInternationalizationExtension? needs a better docstring saying what it does?

1347530507000000 1347530507000000
#2923 defect seanh ckan 2.0 new Change regularise -> regularize

The function is called regularise_html(), can't remember what file it's in.

1347530582000000 1347530582000000
#2924 defect seanh ckan 2.0 new Better docs for trans js command, and add to release process

Add a better docstring to for trans js command explaining what it does and why, and how to use it.

Also add this command to the CKAN Release Process as it's needed there

1347530671000000 1347530671000000
#2925 defect seanh ckan 2.0 new Remove trans mangle paster command?
  • Is trans mangle really necessary? If you upload a pot file to Transifex, it can generate a po file for you with 100% strings translated into a fictional pseudo language where everything is really long strings of unicode characters. I found this worked well for coverage testing, and also tests handling of unicode and long strings all over the place.
1347530768000000 1347530768000000
#2926 enhancement seanh ckan 2.0 new I*Form tests for per-type templates

Finish the tests for the per-package-type custom template support in IPackageForm, IGroupForm and IOrganizationForm (i.e. the new_template(), read_template() etc. methods).

The new way that template inheritance works in jinja looks like it should allow this to be tested nicely without duplicating entire templates in the example extensions.

1347552081000000 1347552081000000
#2927 enhancement seanh ckan 2.0 new Test new package/group/organization type URLs support

IPackageForm, IGroupForm and IOrganizationForm allow you to define e.g. new package types with new top-level URLs, but the example extensions don't have tests for this yet.

1347552153000000 1347552153000000
#2928 enhancement seanh ckan 2.0 new Run CKAN tests with example_i*form extensions enabled

Before releasing CKAN 2.0 we need to run all the CKAN tests with a modified test-core.ini with the example_idatasetform, example_igroupform and example_iorganizationform plugins enabled. If any tests fail, fix the bugs. This needs to be done for each release so add it to the release process.

1347552334000000 1347552334000000
#2929 enhancement seanh ckan 2.0 new Remove is_fallback() from I*Form extension interfaces?

If a plugin wants to take over the default package type for example, it can return dataset? from its package_types() method. I don't see how there can be a package type that is not the default 'package' and is not returned by the package_types() method of a plugin, because the URLs for such a package type would not be mapped. Am I missing something or is is_fallback() not needed?

Same for IGroupForm and IOrganizationForm

1347552597000000 1347552597000000
#2930 defect seanh ckan-v1.8.1 closed fixed convert_from_extras() returns qupted strings from API

Use an IGroupForm plugin to add a custom metadata field to groups using convert_to_extras() and convert_from_extras(), when calling group show the value comes back quoted, e.g. '"my_value"'

Should add tests to example_igroupform and others that setting and getting the custom fields works through the action API.

1347639864000000 1361988592000000
#2931 enhancement seanh ckan 2.0 new Better docstring for app_globals.py

The application's Globals object is not very informative.

1347891194000000 1347891378000000
#2932 enhancement seanh ckan 2.0 new Add docstring to system_info.py

What is the system_info table for? It looks like a way to override config file settings in the database, perhaps so that admins can use a web interface to change site title etc. Could do with a docstring explaining the intended purpose of the table.

1347893429000000 1347893429000000
#2933 enhancement seanh ckan 2.0 new Update theming docs

There's quite a lot of custom stuff going on, with all the custom jinja extensions, and the use of Fanstatic plus custom fanstatic extensions. People who are new to CKAN wanting to write CKAN themes are likely to be confused. I think the whole lot could do with documentation, maybe in the Theming and Customizing chapter in the sphinx docs.

I suggest completely replacing the contents of doc/theming.rst, and putting a 'legacy theming' link at the bottom linking to a doc/legacy_theming.rst file with the old contents.

1347895272000000 1347895272000000
#2934 enhancement Dominik new Webtests for CKAN

The tests in CKAN only test single pages (functional tests) or single methods (unit tests). In order to make sure that the whole system still works as expected, we need tests that cover whole processes.

An example user story to be tested would be: "As a user with create permissions I want to be able to log in, create a new resource, save it and then make sure that it is in the system." or: "As a user I want to use the search functionality and open a resource from the search page."

These user stories require a different testing system with interaction and processes.

1347966647000000 1348060201000000
#2935 enhancement kindly kindly ckan 2.0 closed fixed Make recline work with new datastore 1348042459000000 1350578067000000
#2936 defect seanh ckan-v1.8 new Updating a group via the API clears its packages

If the group dict that you post to the API does not have any 'packages' key then all the group's packages get removed. I think it would be better if you could just update e.g. the group's description without having to also post the list of packages, and apparently this is how other update API actions work.

Might be worth checking all the update API actions for this behaviour, and making sure they're all consistent

1348048066000000 1348048066000000
#2937 defect seanh ckan-v1.8 closed fixed GroupController.history() missing extras_as_string

GroupController?'s history() method doesn't pass 'extras_as_string': True in the context when it calls group_show. This means that if you have an IGroupForm plugin that is adding a custom metadata field and using convert_to/from_extras() then a field value of 'foo' will be returned as '"foo"'

Other GroupController? and PackageController? methods do pass 'extras_as_string'

1348155730000000 1348238875000000
#2938 enhancement Toby dominik new Explain bundling in doc/resources.rst

Since it makes sense to bundle resources into one js file that are commonly used together, there should be some explanations on how separate js scripts are merged into one file for production.

Explanations could include how groups are handled or different resource files.

1348488835000000 1348488835000000
#2939 enhancement toby toby new Orgs are groups

holder for ticket number

1348564034000000 1348564034000000
#2940 enhancement johnmartin johnmartin ckan 2.0 closed fixed Edit different resources from edit dataset pag

We need a nice way to be able to get to editing the different resources that are associated to a dataset.

1348580812000000 1350560926000000
#2941 enhancement johnmartin johnmartin ckan 2.0 closed fixed Add follower support back into CKAN 2.0

Add the views and functionality of following users and groups into 2.0

1348584670000000 1350560915000000
#2942 defect dread dread closed wontfix API POST barfs on interesting Content-Type headers

When POSTing to the API, if specified, the 'Content-Type' header must be blank or 'application/x-www-form-urlencoded'. Otherwise we get an error like: "Bad request - JSON Error: Could not extract request body data: Bad content type: \'; charset=utf-8\'""

The problem is that this is a very reasonable header to send. Indeed requests 0.14 sends this particular header.

This affects all versions of CKAN.

This is due to webob/requests.py:1248 being pretty basic.

1348593156000000 1348611144000000
#2943 enhancement dominik new Chrome does not resize preview

Chrome does not resize iframe after a full refresh/ on first load

1349089686000000 1349090759000000
#2944 enhancement dominik new Recline preview does not work in Opera

Opera cannot show a recline preview. I shows 0 records.

1349090802000000 1349090802000000
#2945 enhancement dominik new Pdf preview does not load in IE

The pdf preview does not load in IE 9.

1349090869000000 1349090869000000
#2946 enhancement dominik closed duplicate Pdf preview does not load in IE

The pdf preview does not load in IE 9.

1349090873000000 1349090992000000
#2947 enhancement dominik new Redirect to the resource page from /resource/{res-id}

Use story: As a user of the datasore I want to be able to put the resource id without the dataset name in a url and see the resource page.

Proposed redirect:

/resource/{res-id} -> dataset/foo-bar/resource/{res-id}

1349097325000000 1349097325000000
#2948 enhancement dominik new Negative range breaks datastore backend

Recline allows negative ranges. The backend returns an error 500 for that which breaks the recline preview.

1349101854000000 1349101865000000
#2949 defect amercader amercader new Reenable Data API button on the new theme

The checks to show or not the button need to be updated for the latest datastore version

1349107464000000 1349107464000000
#2950 requirement icmurray ckan 2.0 closed fixed paster command to minify javascript and css

With the latest template, css and js changes in 2.0, there are a number of things that need preparation prior to a production deployment. One of these is:

  • the fanstatic_resources defined in ckan/lib/fanstatic_resources.py (bottom of module) should be prepared, and minified.

This ticket is to:

  • provide a paster command which when run will generate the minified javascript as css files.
  • stop the auto-minification of files when CKAN starts up.
  • remove reference to the minified files in the .gitignore file.
  • add instruction to the release process to run this command, and check-in the minified files to the repo.

## Background

Currently, minification works seamlessly without the need for any preparation when CKAN is started in a development setup. But on a production site, the webserver will (almost certainly) not have write-access to the directories that will contain the minified files. And so the minification will fail, and the site will end up serving the un-minified media, or even *old* minified media.

One way around this would be to allow webserver write access to the directory its serving out of. But this is not generally considered good practice.

Another method would be to distribute the minified files with CKAN. This ticket describes how to do this without causing a lot of noise in the commit history of the repo.

The auto-minifcation occurs when importing ckan/lib/fanstatic_resources.py.

## Changing the process slightly

The reason for moving away from auto-minifying files at start-up, to minifying files when running a paster command is:

  • we should be distributing the minified files when we make a release (as we do with translation files). This makes it easier to install CKAN from source.
  • if we distribute the minified files, then they need to be checked-in to the repo.
  • if they are auto-minified, whenever small changes are made, then this will create a lot of noise in the repo. It will be clearer to have the minified-files generated manually as part of the release process. (Or whever we make a deployment internally).
1349118376000000 1349189654000000
#2951 enhancement icmurray ckan 2.0 new Paster command for building css from less

With the latest template, css and js changes in 2.0, there are a number of things that need preparation prior to a production deployment. One of these is:

  • the less files should be compiled to css (main.css, not just main.debug.css)

This ticket is to provide a paster command which will compile the .less into the main.css file. The idea of the paster command is that it will be run by developers, and they will check in the resulting .css files. It will also provide a convenient mechanism for production scenarios with node.js installed on the production server, as they will be able to compile the .less there as well.

## Background

The .css files that need to be served are built using less. The css files that are generated *are* checked-in to the repo; but they are a build artifact. So the general workflow is:

  • commit changes to the less files
  • build the main.css file and commit

This paster command slots into the above workflow for convenience.

## Notes

  • doc/frontend-development.rst
  • bin/less

to run this paster command, Node will be required. So that dependency should be checked.

## The paster command

This is the proposed behaviour of the paster command:

  • ensure custom.less does not exist
  • for each colour in{fuchsia,green,maroon,red}:
    • generate a custom.less file for $colour. There's a paster command that does this already: `paster color <color name>.
    • generate the css from the less files. ie - the equivelant of running bin/less --production.
      • this will generate a main.css file, which should be renamed to $color.css.
  • ensure custom.less does not exist
  • generate the css from the less files. This will create a main.css with the default colour scheme.
  • call the paster command that minifies css and js files. (This command does not exist yet, see #2950)
1349118740000000 1349175030000000
#2952 enhancement seanh icmurray ckan 2.0 new incorporate javascriopt translations into translations workflow

There are now javascript translations. There's a paster command, trans js. This is a ticket to ensure that using trans js is documented in the normal ckan translation workflow (which is followed after a feature freeze, prior to release). And to see if there's any need for further incorporation into the current translation process.

1349118945000000 1349118945000000
#2953 defect dominik closed fixed Server error in template directories

If you go to: /{any template dir} for example /home or /related, a Server errror occurs.

IOError: [Errno 21] Is a directory: u'/../venv/src/ckan/ckan/templates/home'

1349252920000000 1349257893000000
#2954 enhancement johnmartin johnmartin ckan 2.0 closed fixed Flickering on resource view when changing between views

From the google doc: When I move between grid, graph and map view mode (or click on filters) the whole data explorer flickers (jumps up & down slightly) for a few moments before settling. This is happening on all resources for me and when you initially open launch the page: http://demo.ckan.org/dataset/afghanistan-election-data/resource/f6331f99-51f6-44d9-95b9-b20f3b74f360. Only in Chrome, working fine in Firefox.

1349268916000000 1350578030000000
#2955 defect dominik dominik ckan 2.0 closed fixed Recline should be updated 1349270534000000 1350577952000000
#2956 enhancement shevski johnmartin ckan 2.0 assigned Allow for resource editing in CKAN 2.0

On the edit dataset page... there needs to be a way for users to be able to see all the resources associated to the dataset and edit them individually.

1349277100000000 1349346442000000
#2957 task dominik new New datastore on postgres prior to 9.0

The GRANT SELECT ON ALL and ALTER DEFAULT PRIVILEGES are not available in Postgres prior to version 9.0.

1349292214000000 1349292214000000
#2958 defect seanh ckan-v1.8 new Uploading files with unicode characters in filename fails in CKAN 1.7 and 1.8

e.g. 2012_08(주요국가).xls

I tested in CKAN 2.0 and it seemed to work fine there.

1349342976000000 1349342976000000
#2959 defect icmurray icmurray ckan 2.0 new Changing a Group's name through the action api disassociates it from its datasets in the index

Repro:

  • Create a new Group, named "test-group".
  • Add a dataset to it.
  • Verify the dataset belongs to the group by visiting the Group's read-page
  • Update the Group through the action api (group_update), using the uid in the "id" field, and a new name in the "name" field.
  • Visit the group's read-page. The list of datasets will be empty.

This was an issue when editing a Group through the web interface, which was fixed in [1]. However it only fixes the issue in the group controller.

[1] https://github.com/okfn/ckan/commit/dbe25d8b8d7fabfc40c5d794a920b91cec349335

1349363935000000 1349363935000000
#2960 task dominik ckan-backlog new Private datasets are not private

At the moment everyone can read all resources. There is no support for hiding resources that are in private datasets.

1349694255000000 1349694255000000
#2961 enhancement dominik dominik ckan 2.0 assigned Preview plugin endpoint

Users could write ckan extensions that offer previews for a certain datatype.

Advantages:

  • We can say that you can add your own previews
  • Every preview would have to define it's own dependencies
  • External development (community creates new extensions?)

Questions to answer:

  • Specification of the interface
  • Precedence of previews for the same data types
  • Plugins only define the datatype that they are responsible for or do we call a function that returns whether the extension is responsible.

As far as I can see, this should be fairly easy to implement by following these instructions: http://docs.ckan.org/en/latest/writing-extensions.html#writing-a-plugin-interface

1349696367000000 1350577990000000
#2962 enhancement dominik ckan-backlog new Search across multiple ckan instances

Could be done by:

  • using the solr distributed search
    • difficult set up
  • merging result sets from apis
    • make sure that results can be merged properly (score, facets, ...)
1349736622000000 1349736622000000
#2963 defect amercader ckan-v1.8 new Timeout on tag pages with lots of datasets

e.g. http://thedatahub.org/tag/lod

Tags with less datasets work fine (e.g. http://thedatahub.org/tag/railways)

1350295999000000 1350295999000000
#2964 defect seanh ckan 2.0 new Last organization admin can remove herself

If you are the only admin of an organization you can edit the organization's members and demote yourself, then the org has no admins and no one (except sysadmins maybe) can edit it.

Last admin should not be able to remove or demote herself.

Also applies to groups.

1350296058000000 1350296058000000
#2965 defect amercader ckan-v1.8 new Stats extension broken on 1.8
  • Graphs not showing (looks like a flot related file is missing)
  • Wrong groups counts (e.g. Data Explorer Examples show 1800 datasets when it onlu has 8)
1350296141000000 1350296157000000
#2966 enhancement seanh ckan 2.0 new 'Add' button text is wrong when editing organization members

e.g. if I just changed a member's capacity I am not adding anything 'save' is better maybe

1350296149000000 1350296149000000
#2967 defect seanh ckan 2.0 new Organization members edit page reloads after demoting self

Edit an organizations members page and demote yourself from organization admin, after saving the members edit page reloads even though you are no longer an admin and should no longer be able to access this page.

1350296227000000 1350296227000000
#2968 defect seanh ckan 2.0 new Anyone can access organization members page

The button will not show if you are not authorized but browse to /organization/members/foo and you can edit the members, it does stop you when you try to save your changes, but you shouldn't be able to get to the page at all

1350296355000000 1350297070000000
#2969 defect seanh ckan 2.0 new Group members page 500s

The group members page (e.g. /group/members/roger) seems broken, IDs instead of user names are shown for the members, and clicking on a member 500s

1350296454000000 1350296454000000
#2970 defect seanh ckan 2.0 new Organization and group member links use id not name

e.g. it the 'Members' button links to /organization/members/0a44... instead of /organization/members/foobar

1350296531000000 1350296531000000
#2971 enhancement seanh ckan 2.0 new "Are ytou sure you want to delete this member?" should say which member

when deleting members from groups and orgs

1350296840000000 1350296840000000
#2972 enhancement seanh ckan 2.0 new Remove any imports of authz.py and delete file

it is no longer used

1350297442000000 1350297442000000
#2973 enhancement seanh ckan 2.0 new Move new_authz.py into logic/auth/__init__.py

Makes sense to keep all auth stuff under logic/auth.

Also decide which functions from new_authz.pu should be marked private with _.

Also decide which functions from new_authz.py are really helpers for the auth functions in get.py, update.py and delete.py, and should maybe moved to another file, e.g. logic/auth/helpers.py

1350297545000000 1350297545000000
#2974 enhancement seanh ckan 2.0 new General of all auth functions

From Toby:

A general cleanup of all auth functions (in logic/auth) to check their fitness, error messages, etc.

1350297612000000 1350297612000000
#2975 enhancement seanh ckan 2.0 new Tests for auth functions and new actions

From Toby: tests around the auth functions and new actions - probably needs an improved testing mechanism and things like test data creation on via actions

1350297660000000 1350297660000000
#2976 enhancement seanh ckan 2.0 new Polish group and organization member pages

From Toby: A little polish to the member pages and probably a little hardening of the controller and logic actions

1350297709000000 1350297709000000
#2977 enhancement seanh ckan 2.0 new Fix user autocomplete on group and organization member pages

From Toby: @johnmartin the user autocomplete on member add needs fixing it gets data but does not understand what to do with it

1350297749000000 1350297749000000
#2978 enhancement seanh ckan 2.0 new Tests for permissions for organizations and groups

From Toby: checking the logic around the who can do what from the user stories - via some tests may be a good approach

1350297806000000 1350297806000000
#2979 enhancement seanh ckan 2.0 new Requesting membership to groups and organizations

From Toby: The requesting membership user stories and implementation remain needed

1350297844000000 1350297844000000
#2980 enhancement seanh ckan 2.0 closed wontfix Add new groups and organizations functionality into legacy templates

From Toby: add the functionality to legacy templates

1350297883000000 1350560252000000
#2981 refactor seanh ckan 2.0 new Remove config from jinja templates

From Toby: remove the config from jinja2 templates get all such stuff via g. (before 2.0)

1350297960000000 1350297960000000
#2982 refactor seanh ckan 2.0 new Move functionality from controllers into template helpers

From Toby: strip more functionality from controllers and add via template helpers eg activity streams

1350298002000000 1350298002000000
#2983 refactor seanh ckan 2.0 new Refactor lib/base.py to remove circular import issues

From Toby: c) refactor lib/base.py to remove the circular import issues (render functions to lib/render.py - would fix much of that)

1350298044000000 1350298044000000
Note: See TracReports for help on using and creating reports.