From Wikipedia, the free encyclopedia

If you are an interface administrator and you would like to update AFCH's code on Wikipedia to match the code located at the official GitHub repository (basically deploying approved patches to production), follow this work instruction.

To update AFCH to its latest version onwiki, you need to do the following.

First time

AFCH Permission required by bot
  • Special:BotPasswords
    • Provide the permissions shown in the image to the right.
    • Note down the password and save it in a text file.
    • This is important especially if you have 2FA enabled (which you will need if you are a intadmin) since pywikibot cannot bypass 2FA and will be unable to login via non-BotPassword means.
    • Note: BotPasswords are global, not specific to a wiki. For example, you only need to create one BotPassword, even if you want to deploy to both enwiki and testwiki.

Every time

  • Create a python environment using the following command: python -m venv venv
  • Activate the Python environment.
    • Windows: ./venv/Scripts/activate
    • Linux: source ./venv/bin/activate
  • Install python packages using pip install GitPython pywikibot
  • Navigate (using cd) into the directory containing the git repository.

First time

  • Run pwb generate_user_files
    • select 18: wikipedia
    • select en
    • username (for example: Novem Linguae)
    • do you want to add other projects? yes
    • select 18: wikipedia
    • select test
    • username (for example: Novem Linguae)
    • do you want to provide a bot password? yes
    • bot name: (for example: AFCH_deploy_script)
    • password
    • no
    • no

Every time

  • Sync your GitHub forked repo to the AFCH repo.
  • git checkout master
  • git pull
  • Close Dropbox, so you don't get "failed to remove some directories/files" warnings due to file locks.
  • Run npm install -g grunt-cli
  • Run npm install
  • Run pwb login to login, verify that the last line says Logged in on wikipedia:test as <your username>.
  • If any files were created since the last time you deployed, create them with empty content. Else the deploy script will not be able to edit them.
  • Depending on your wiki...
    • testwiki: python ./scripts/upload.py test MediaWiki:Gadget-afchelper
    • enwiki: python ./scripts/upload.py en MediaWiki:Gadget-afchelper
  • Double check all diffs carefully by visiting Special:MyContributions and looking for problems. There have been bugs in the past.

Editors familiar with the deploy script

Have deployed to enwiki before:

Knowledgeable of some of the process:

From Wikipedia, the free encyclopedia

If you are an interface administrator and you would like to update AFCH's code on Wikipedia to match the code located at the official GitHub repository (basically deploying approved patches to production), follow this work instruction.

To update AFCH to its latest version onwiki, you need to do the following.

First time

AFCH Permission required by bot
  • Special:BotPasswords
    • Provide the permissions shown in the image to the right.
    • Note down the password and save it in a text file.
    • This is important especially if you have 2FA enabled (which you will need if you are a intadmin) since pywikibot cannot bypass 2FA and will be unable to login via non-BotPassword means.
    • Note: BotPasswords are global, not specific to a wiki. For example, you only need to create one BotPassword, even if you want to deploy to both enwiki and testwiki.

Every time

  • Create a python environment using the following command: python -m venv venv
  • Activate the Python environment.
    • Windows: ./venv/Scripts/activate
    • Linux: source ./venv/bin/activate
  • Install python packages using pip install GitPython pywikibot
  • Navigate (using cd) into the directory containing the git repository.

First time

  • Run pwb generate_user_files
    • select 18: wikipedia
    • select en
    • username (for example: Novem Linguae)
    • do you want to add other projects? yes
    • select 18: wikipedia
    • select test
    • username (for example: Novem Linguae)
    • do you want to provide a bot password? yes
    • bot name: (for example: AFCH_deploy_script)
    • password
    • no
    • no

Every time

  • Sync your GitHub forked repo to the AFCH repo.
  • git checkout master
  • git pull
  • Close Dropbox, so you don't get "failed to remove some directories/files" warnings due to file locks.
  • Run npm install -g grunt-cli
  • Run npm install
  • Run pwb login to login, verify that the last line says Logged in on wikipedia:test as <your username>.
  • If any files were created since the last time you deployed, create them with empty content. Else the deploy script will not be able to edit them.
  • Depending on your wiki...
    • testwiki: python ./scripts/upload.py test MediaWiki:Gadget-afchelper
    • enwiki: python ./scripts/upload.py en MediaWiki:Gadget-afchelper
  • Double check all diffs carefully by visiting Special:MyContributions and looking for problems. There have been bugs in the past.

Editors familiar with the deploy script

Have deployed to enwiki before:

Knowledgeable of some of the process:


Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook