Yanting Lin
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Test Automation of CKAN Customize Extension 目前,已經自行建立了一個 `ckanext-ytdataservice` extension 接著,我們以下兩篇的官方教學與範例程式碼為基底 實做客製化套件 (e.g., `ytdataservice`) 的自動化測試,結果不含CKAN核心測試 * [CKAN核心的自動化測試](http://docs.ckan.org/en/latest/contributing/test.html) * [Extension 的自動化測試](http://docs.ckan.org/en/latest/extensions/testing-extensions.html) * [example_iauthfunctions source code](https://github.com/ckan/ckan/tree/master/ckanext/example_iauthfunctions) #### 相關檔案列表 以下是要使用到的檔案列表,我們假設所在目錄為 `~/ckan/lib/default/src/` 新增: * `./ckanext-ytdataservice/ckanext/ytdataservice/tests/test_ytdataservice.py` * `./ckanext-ytdataservice/ckanext/ytdataservice/plugin_v4.py` * `./ckanext-ytdataservice/ckanext/ytdataservice/plugin_v5_custom_config_setting.py` * `./ckanext-ytdataservice/ckanext/ytdataservice/plugin_v6_parent_auth_functions.py` 修改: * `./ckan/test-core.ini` * `./ckan/setup.py` 參考: * `./ckanext-ytdataservice/ckanext/ytdataservice/plugin.py` * **特別注意,這個跟假設所在目錄不同** `~/ckan/etc/default/development.ini` * [Installing CKAN from source](http://docs.ckan.org/en/latest/maintaining/installing/install-from-source.html) ### 前置準備 1. 架設好CKAN 2.7.2的 Development 環境 2. 已經自行創建名為 `ytdataservice` 的extension,做到 [We're done!](http://docs.ckan.org/en/latest/extensions/tutorial.html#we-re-done),確認完成`plugin.py` 3. Extension的所在目錄為 **~/ckan/lib/default/src/ckanext-ytdataservice**,就不用改路徑 4. 確認在python虛擬環境(Virtualenv),再執行指令 5. 進入虛擬環境後在 `~/ckan/lib/default/src/ckan/` 與 ` ~/ckan/lib/default/src/ckanext-ytdataservice/` 目錄下 執行以下指令,初始設定開發環境 ``` python setup.py develop ``` ### 初始化測試環境 1. 基於`development.ini`修改 test-core.ini #### ~/ckan/lib/default/src/ckan/test-core.ini 只列出要修改的部分 ``` # Specify the Postgres database for SQLAlchemy to use sqlalchemy.url = postgresql://ckan_default:<YOUR_PASSWORD>@localhost/ckan_test ## Datastore ckan.datastore.write_url = postgresql://ckan_default:<YOUR_PASSWORD>@localhost/datastore_test ckan.datastore.read_url = postgresql://datastore_default:<YOUR_PASSWORD>@localhost/datastore_test ``` 官網有特別提醒,測試用的Redis的設定要與Production分離 但其實預設設定不管Development還是Production都沒開啟,所以還不用擔心,之後注意就好 2. 完成到[Configure Solr Multi-core 這一步](http://docs.ckan.org/en/latest/contributing/test.html#configure-solr-multi-core) * Set the permissions 這裡是在`~/ckan/lib/default/src/ckan/`下執行 3. 初始化測試用資料庫,在 `~/ckan/lib/default/src/ckan`目錄下,執行以下指令 ``` paster db init -c test-core.ini ``` ### 撰寫測試檔 :::info 若是完全按照官網新增`ckanext-iauthfunctions`的 extension 可能就不用置換名詞與修改`Setup.py` 在 `~/ckan/lib/default/src/ckan/ckanext/example_iauthfunctions` 也已經有自動化測試程式碼 本文件是希望切割已有的範例檔,獨自跑過一遍 ::: 4. 基於[這篇](http://docs.ckan.org/en/latest/extensions/testing-extensions.html)官方文件的`test_iauthfunctions.py` 置換example_iauthfunctions成ytdataservice,新增並改寫成 `test_ytdataservice.py` 其他程式碼都不變,都貼上只是希望方便參考,因為要改的地方不少 #### ./ckanext-ytdataservice/ckanext/ytdataservice/tests/test_ytdataservice.py ```python= # encoding: utf-8 '''Tests for the ckanext.ytdataservice extension. ''' from nose.tools import assert_raises from nose.tools import assert_equal import ckan.model as model import ckan.plugins from ckan.plugins.toolkit import NotAuthorized, ObjectNotFound import ckan.tests.factories as factories import ckan.logic as logic import ckan.tests.helpers as helpers class TestytdataservicePluginV6ParentAuthFunctions(object): '''Tests for the ckanext.ytdataservice.plugin module. Specifically tests that overriding parent auth functions will cause child auth functions to use the overridden version. ''' @classmethod def setup_class(cls): '''Nose runs this method once to setup our test class.''' # Test code should use CKAN's plugins.load() function to load plugins # to be tested. ckan.plugins.load('ytdataservice_v6_parent_auth_functions') def teardown(self): '''Nose runs this method after each test method in our test class.''' # Rebuild CKAN's database after each test method, so that each test # method runs with a clean slate. model.repo.rebuild_db() @classmethod def teardown_class(cls): '''Nose runs this method once after all the test methods in our class have been run. ''' # We have to unload the plugin we loaded, so it doesn't affect any # tests that run after ours. ckan.plugins.unload('ytdataservice_v6_parent_auth_functions') def test_resource_delete_editor(self): '''Normally organization admins can delete resources Our plugin prevents this by blocking delete organization. Ensure the delete button is not displayed (as only resource delete is checked for showing this) ''' user = factories.User() owner_org = factories.Organization( users=[{'name': user['id'], 'capacity': 'admin'}] ) dataset = factories.Dataset(owner_org=owner_org['id']) resource = factories.Resource(package_id=dataset['id']) with assert_raises(logic.NotAuthorized) as e: logic.check_access('resource_delete', {'user': user['name']}, {'id': resource['id']}) assert_equal(e.exception.message, 'User %s not authorized to delete resource %s' % (user['name'], resource['id'])) def test_resource_delete_sysadmin(self): '''Normally organization admins can delete resources Our plugin prevents this by blocking delete organization. Ensure the delete button is not displayed (as only resource delete is checked for showing this) ''' user = factories.Sysadmin() owner_org = factories.Organization( users=[{'name': user['id'], 'capacity': 'admin'}] ) dataset = factories.Dataset(owner_org=owner_org['id']) resource = factories.Resource(package_id=dataset['id']) assert_equal(logic.check_access('resource_delete', {'user': user['name']}, {'id': resource['id']}), True) class TestytdataserviceCustomConfigSetting(object): '''Tests for the plugin_v5_custom_config_setting module. ''' @classmethod def setup_class(cls): if not ckan.plugins.plugin_loaded('ytdataservice_v5_custom_config_setting'): ckan.plugins.load('ytdataservice_v5_custom_config_setting') @classmethod def teardown_class(cls): ckan.plugins.unload('ytdataservice_v5_custom_config_setting') def teardown(self): # Delete any stuff that's been created in the db, so it doesn't # interfere with the next test. model.repo.rebuild_db() @helpers.change_config('ckan.ytdataservice.users_can_create_groups', False) def test_sysadmin_can_create_group_when_config_is_False(self): sysadmin = factories.Sysadmin() context = { 'ignore_auth': False, 'user': sysadmin['name'] } helpers.call_action('group_create', context, name='test-group') @helpers.change_config('ckan.ytdataservice.users_can_create_groups', False) def test_user_cannot_create_group_when_config_is_False(self): user = factories.User() context = { 'ignore_auth': False, 'user': user['name'] } assert_raises( NotAuthorized, helpers.call_action, 'group_create', context, name='test-group') @helpers.change_config('ckan.ytdataservice.users_can_create_groups', False) def test_visitor_cannot_create_group_when_config_is_False(self): context = { 'ignore_auth': False, 'user': None } assert_raises( NotAuthorized, helpers.call_action, 'group_create', context, name='test-group') @helpers.change_config('ckan.ytdataservice.users_can_create_groups', True) def test_sysadmin_can_create_group_when_config_is_True(self): sysadmin = factories.Sysadmin() context = { 'ignore_auth': False, 'user': sysadmin['name'] } helpers.call_action('group_create', context, name='test-group') @helpers.change_config('ckan.ytdataservice.users_can_create_groups', True) def test_user_can_create_group_when_config_is_True(self): user = factories.User() context = { 'ignore_auth': False, 'user': user['name'] } helpers.call_action('group_create', context, name='test-group') @helpers.change_config('ckan.ytdataservice.users_can_create_groups', True) def test_visitor_cannot_create_group_when_config_is_True(self): context = { 'ignore_auth': False, 'user': None } assert_raises( NotAuthorized, helpers.call_action, 'group_create', context, name='test-group') class BaseTest(object): def teardown(self): # Rebuild CKAN's database after each test method, so that each test # method runs with a clean slate. model.repo.rebuild_db() def _make_curators_group(self): '''This is a helper method for test methods to call when they want the 'curators' group to be created. ''' sysadmin = factories.Sysadmin() # Create a user who will *not* be a member of the curators group. noncurator = factories.User() # Create a user who will be a member of the curators group. curator = factories.User() # Create the curators group, with the 'curator' user as a member. users = [{'name': curator['name'], 'capacity': 'member'}] context = { 'ignore_auth': False, 'user': sysadmin['name'] } curators_group = helpers.call_action( 'group_create', context, name='curators', users=users) return (noncurator, curator, curators_group) class TestytdataservicePluginV4(BaseTest): '''Tests for the ckanext.ytdataservice.plugin module. ''' @classmethod def setup_class(cls): '''Nose runs this method once to setup our test class.''' # Test code should use CKAN's plugins.load() function to load plugins # to be tested. if not ckan.plugins.plugin_loaded('ytdataservice_v4'): ckan.plugins.load('ytdataservice_v4') @classmethod def teardown_class(cls): '''Nose runs this method once after all the test methods in our class have been run. ''' # We have to unload the plugin we loaded, so it doesn't affect anyexample_iauthfunctions # tests that run after ours. ckan.plugins.unload('ytdataservice_v4') def test_group_create_with_no_curators_group(self): '''Test that group_create doesn't crash when there's no curators group. ''' sysadmin = factories.Sysadmin() # Make sure there's no curators group. assert 'curators' not in helpers.call_action('group_list', {}) # Make our sysadmin user create a group. CKAN should not crash. context = { 'ignore_auth': False, 'user': sysadmin['name'] } helpers.call_action('group_create', context, name='test-group') def test_group_create_with_visitor(self): '''A visitor (not logged in) should not be able to create a group. Note: this also tests that the group_create auth function doesn't crash when the user isn't logged in. ''' noncurator, curator, curators_group = self._make_curators_group() context = { 'ignore_auth': False, 'user': None } assert_raises( NotAuthorized, helpers.call_action, 'group_create', context, name='this_group_should_not_be_created') def test_group_create_with_non_curator(self): '''A user who isn't a member of the curators group should not be able to create a group. ''' noncurator, curator, curators_group = self._make_curators_group() context = { 'ignore_auth': False, 'user': noncurator['name'] } assert_raises( NotAuthorized, helpers.call_action, 'group_create', context, name='this_group_should_not_be_created') def test_group_create_with_curator(self): '''A member of the curators group should be able to create a group. ''' noncurator, curator, curators_group = self._make_curators_group() name = 'my-new-group' context = { 'ignore_auth': False, 'user': curator['name'] } result = helpers.call_action( 'group_create', context, name=name) assert result['name'] == name ``` 5. 參考[這裡](https://github.com/ckan/ckan/tree/master/ckanext/example_iauthfunctions)的程式碼,修改並於對應目錄新增以下檔案: plugin_v4.py、plugin_v5_custom_config_setting.py 與 plugin_v6_parent_auth_functions.py #### ./ckanext-ytdataservice/ckanext/ytdataservice/plugin_v4.py ```python= # encoding: utf-8 import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit def group_create(context, data_dict=None): # Get the user name of the logged-in user. user_name = context['user'] # Get a list of the members of the 'curators' group. try: members = toolkit.get_action('member_list')( data_dict={'id': 'curators', 'object_type': 'user'}) except toolkit.ObjectNotFound: # The curators group doesn't exist. return {'success': False, 'msg': "The curators groups doesn't exist, so only sysadmins " "are authorized to create groups."} # 'members' is a list of (user_id, object_type, capacity) tuples, we're # only interested in the user_ids. member_ids = [member_tuple[0] for member_tuple in members] # We have the logged-in user's user name, get their user id. convert_user_name_or_id_to_id = toolkit.get_converter( 'convert_user_name_or_id_to_id') try: user_id = convert_user_name_or_id_to_id(user_name, context) except toolkit.Invalid: # The user doesn't exist (e.g. they're not logged-in). return {'success': False, 'msg': 'You must be logged-in as a member of the curators ' 'group to create new groups.'} # Finally, we can test whether the user is a member of the curators group. if user_id in member_ids: return {'success': True} else: return {'success': False, 'msg': 'Only curators are allowed to create groups'} class YtdataservicePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IAuthFunctions) def get_auth_functions(self): return {'group_create': group_create} ``` #### ./ckanext-ytdataservice/ckanext/ytdataservice/plugin_v5_custom_config_setting.py ```python= # encoding: utf-8 from ckan.common import config import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit def group_create(context, data_dict=None): # Get the value of the ckan.iauthfunctions.users_can_create_groups # setting from the CKAN config file as a string, or False if the setting # isn't in the config file. users_can_create_groups = config.get( 'ckan.ytdataservice.users_can_create_groups', False) # Convert the value from a string to a boolean. users_can_create_groups = toolkit.asbool(users_can_create_groups) if users_can_create_groups: return {'success': True} else: return {'success': False, 'msg': 'Only sysadmins can create groups'} class YtdataservicePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IAuthFunctions) def get_auth_functions(self): return {'group_create': group_create} ``` #### ./ckanext-ytdataservice/ckanext/ytdataservice/plugin_v6_parent_auth_functions.py ```python= # encoding: utf-8 from ckan.common import config import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit def package_delete(context, data_dict=None): return {'success': False, 'msg': 'Only sysadmins can delete packages'} class YtdataservicePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IAuthFunctions) def get_auth_functions(self): return {'package_delete': package_delete} ``` 6. 設定 `setup.py` 以準備載入對應的plugin #### ./ckan/setup.py 在 `'ckan.plugins': [ ` 區塊內的最下方新增三個測試用的plugin ``` 'ckan.plugins': [ 'synchronous_search = ckan.lib.search:SynchronousSearchPlugin', 'stats = ckanext.stats.plugin:StatsPlugin', 'publisher_form = ckanext.publisher_form.forms:PublisherForm', ... ... ... 'ytdataservice_v4 = ckanext.ytdataservice.plugin_v4:YtdataservicePlugin', 'ytdataservice_v5_custom_config_setting = ckanext.ytdataservice.plugin_v5_custom_config_setting:YtdataservicePlugin', 'ytdataservice_v6_parent_auth_functions = ckanext.ytdataservice.plugin_v6_parent_auth_functions:YtdataservicePlugin', ], ``` 7. 於 `~/ckan/lib/default/src/ckan` 下,執行以下指令 ``` python setup.py develop ``` 8. 於 `~/ckan/lib/default/src/ckanext-ytdataservice` 下,執行以下指令 ``` nosetests --ckan --with-pylons=test.ini ckanext/ytdataservice/tests ``` 如果順利測試完成,結果應該如下 ![](https://i.imgur.com/UBMNimj.png) 至於要怎麼寫自己要用的測試案例,之後有機會再研究 以上是如何撰寫客製化套件之自動化測試,提供參考 --- 參考用程式碼,裡面有包含之前製作tab的 routing rule,只要看 4-38, 40, 43, 63, 64行即可 `./src/ckanext-ytdataservice/ckanext/ytdataservice/plugin.py` ```python= import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit def group_create(context, data_dict=None): # Get the user name of the logged-in user. user_name = context['user'] # Get a list of the members of the 'curators' group. try: members = toolkit.get_action('member_list')( data_dict={'id': 'curators', 'object_type': 'user'}) except toolkit.ObjectNotFound: # The curators group doesn't exist. return {'success': False, 'msg': "The curators groups doesn't exist, so only sysadmins " "are authorized to create groups."} # 'members' is a list of (user_id, object_type, capacity) tuples, we're # only interested in the user_ids. member_ids = [member_tuple[0] for member_tuple in members] # We have the logged-in user's user name, get their user id. convert_user_name_or_id_to_id = toolkit.get_converter( 'convert_user_name_or_id_to_id') try: user_id = convert_user_name_or_id_to_id(user_name, context) except toolkit.Invalid: # The user doesn't exist (e.g. they're not logged-in). return {'success': False, 'msg': 'You must be logged-in as a member of the curators ' 'group to create new groups.'} # Finally, we can test whether the user is a member of the curators group. if user_id in member_ids: return {'success': True} else: return {'success': False, 'msg': 'Only curators are allowed to create groups'} class YtdataservicePlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) plugins.implements(plugins.IRoutes) plugins.implements(plugins.IAuthFunctions) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') toolkit.add_resource('fanstatic', 'ytdataservice') # IRoutes def before_map(self, map): map.connect('cookData','/cookingData', controller='ckanext.ytdataservice.controllers:cookDataController', action='firstPage') map.connect('browseData','/cookingData/browseData', controller='ckanext.ytdataservice.controllers:cookDataController', action='browseData') map.connect('addData','/cookingData/addData', controller='ckanext.ytdataservice.controllers:cookDataController', action='addData') map.connect('cleanData','/cookingData/cleanData', controller='ckanext.ytdataservice.controllers:cookDataController', action='cleanData') map.connect('mergeData','/cookingData/mergeData', controller='ckanext.ytdataservice.controllers:cookDataController', action='mergeData') return map def after_map(self, map): return map def get_auth_functions(self): return {'group_create': group_create} ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully