Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove paster cli #5264

Merged
merged 16 commits into from Mar 17, 2020
Merged

Remove paster cli #5264

merged 16 commits into from Mar 17, 2020

Conversation

davidread
Copy link
Contributor

@davidread davidread commented Mar 6, 2020

Fixes #5110

Proposed fixes:

  • CLI commands which used paster are deleted (they were recently replaced with the 'ckan' commands, using click, compatible with python 2 and 3)
  • CkanCommand and other helpers in ckan/lib/cli.py are marked as deprecated, to alert extensions that use it. Also noted in the changelog.
  • CLI tests (test_jobs.py and test_user.py) have been converted from testing paster CLI to the new CLI. It looks like @smotornyuk did a similar job 9c1e2877780bd3b6f56 independently around the same time. Some of @EvgeniiaVak's work in this PR are improvements on @smotornyuk 's work. Other sections merely express the same thing slightly differently, but it was easier to leave these bits in - I don't think that makes any difference.

This is mostly @EvgeniiaVak's work (from #5129). I simply marked the deprecations and deleted the superfluous test_cli.py.

Extension paster commands still work (python2):

$ paster --plugin=ckanext-harvest harvester sources
2020-03-02 03:45:22,574 INFO  [ckan.cli] Using configuration file /etc/ckan/default/ckan.ini
2020-03-02 03:45:22,580 INFO  [ckan.config.environment] Loading static files from public
2020-03-02 03:45:22,643 INFO  [ckan.config.environment] Loading templates from /vagrant/src/ckan/ckan/templates
2020-03-02 03:45:26,000 INFO  [ckan.config.environment] Loading templates from /vagrant/src/ckan/ckan/templates
2020-03-02 03:45:26,022 DEBUG [ckanext.harvest.model] Harvest tables defined in memory
2020-03-02 03:45:26,035 DEBUG [ckanext.harvest.model] Harvest tables already exist
2020-03-02 03:45:30,410 INFO  [ckan.config.environment] Loading static files from public
2020-03-02 03:45:30,460 INFO  [ckan.config.environment] Loading templates from /vagrant/src/ckan/ckan/templates
2020-03-02 03:45:31,495 INFO  [ckan.config.environment] Loading templates from /vagrant/src/ckan/ckan/templates
2020-03-02 03:45:31,511 DEBUG [ckanext.harvest.model] Harvest tables already exist
2020-03-02 03:45:31,956 CRITI [ckan.lib.uploader] Please specify a ckan.storage_path in your config
                         for your uploads

There are 0 active harvest sources

Features:

  • includes tests covering changes
  • includes updated documentation
  • includes user-visible changes
  • includes API changes
  • includes bugfix for possible backport

Please [X] all the boxes above that apply

@davidread davidread force-pushed the EvgeniiaVak-fix/remove-paster-cli branch 2 times, most recently from df01602 to 42585e6 Compare March 6, 2020 16:44
Copy link
Member

@amercader amercader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smotornyuk this looks good to me. If you are happy with the tests we can merge

@EvgeniiaVak thanks for your work on this!

Comment on lines +33 to 34
@maintain.deprecated('Use @maintain.deprecated instead')
def deprecation_warning(message=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So meta :)

@smotornyuk
Copy link
Member

Yes, I've finally some time fo review. Looks nice - I'm merging it

@smotornyuk smotornyuk merged commit 304d453 into master Mar 17, 2020
@davidread
Copy link
Contributor Author

Thanks @smotornyuk

@davidread davidread deleted the EvgeniiaVak-fix/remove-paster-cli branch March 17, 2020 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove old paster CLI commands
4 participants