Opened 4 years ago

Closed 11 months ago

#4014 closed change (fixed)

Publish python-abp on PyPI

Reported by: kvas Assignee: rhowell
Priority: Unknown Milestone:
Module: Sitescripts Keywords:
Cc: fhd, mario, matze, sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29968569/

Description

Background

Having [python-abp https://hg.adblockplus.org/python-abp/file] on PyPI would simplify installation for us and for the external users. A few tweaks remain before the publishing and then we need to upload the package to PyPI.

What to change

  • Update setup.py:
    • Change version to 0.1.0.
    • Change development status to "4 - Beta".
  • Bring test coverage to 100% (it's at 98% now, which is close enough, but 100% is easier to deal with).
  • Create a source distribution and a universal wheel (see packaging guide).
  • Publish the packages (see distribution guide).

Change History (19)

comment:1 Changed 4 years ago by kvas

  • Cc mario added; mkoenig removed

comment:2 Changed 2 years ago by sebastian

  • Cc sebastian added; snoack removed

comment:3 Changed 12 months ago by rhowell

  • Owner set to rhowell

comment:4 Changed 12 months ago by rhowell

  • Ready set
  • Review URL(s) modified (diff)

comment:5 Changed 12 months ago by rhowell

  • Status changed from new to reviewing

comment:6 Changed 11 months ago by abpbot

A commit referencing this issue has landed:
Issue 4014 - Publish python-abp on PyPI

comment:7 Changed 11 months ago by rhowell

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:8 Changed 11 months ago by rhowell

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:9 Changed 11 months ago by rhowell

Hi Vasily, I was able to push the changes to python-abp. Now, working on the next steps to publish the package on PyPI and wanted to double-check something with you. The tutorial recommends creating this file structure:

/example_pkg
  /example_pkg
    __init__.py

But we have something more like this:

/python-abp
  /abp
    __init__.py

Should the abp folder be renamed to python-abp?

comment:10 follow-up: Changed 11 months ago by sebastian

Technically, there is no requirement for the repository name, module name (and package name) to be consistent. The python token makes sense in the repository name, providing a distinct context when the repository is listed along other ABP-related repositories (e.g. on hg.adblockplus.org and GitHub), but it would be awkward to import python_abp in Python code.

comment:11 in reply to: ↑ 10 Changed 11 months ago by kvas

Replying to sebastian:

Technically, there is no requirement for the repository name, module name (and package name) to be consistent. The python token makes sense in the repository name, providing a distinct context when the repository is listed along other ABP-related repositories (e.g. on hg.adblockplus.org and GitHub), but it would be awkward to import python_abp in Python code.

Yeah, this is the original reasoning for this naming. I think we don't need to rename anything.

comment:12 follow-up: Changed 11 months ago by rhowell

Ok, it's been uploaded and tested on Python 2 & 3 and everything seems to be working. I added Vasily as an owner on PyPI. Any other accounts that should be added?

https://pypi.org/project/python-abp/

comment:13 in reply to: ↑ 12 Changed 11 months ago by kvas

Replying to rhowell:

Ok, it's been uploaded and tested on Python 2 & 3 and everything seems to be working. I added Vasily as an owner on PyPI. Any other accounts that should be added?

https://pypi.org/project/python-abp/

Awesome! Thank you, Rosie.

It would be useful to create a general eyeo account that Ops would own and add it there as well. This way the maintenance of the package will not depend on the two of us.

comment:14 Changed 11 months ago by sebastian

Mind that the whole point of multi-user management (on PyPI) is that you don't need to share a password across multiple people (which is a bad security practice). So shouldn't we rather add individual users (from ops) than creating a shared account?

comment:15 Changed 11 months ago by matze

The multi-user management is indeed the way to go here. But in order to ensure access by the company it will act as a single user, meaning eyeo's account (the credentials of which are stored in a system accessible to our administrators only, and meant as a fail-safe in case all the other folks with access to the PyPI packages leave the company for some reason) should just be one among the others.

comment:16 Changed 11 months ago by kvas

Makes sense. If there's a fail-safe eyeo account, having just Rosie and me as the other owners should probably be enough.

comment:17 Changed 11 months ago by rhowell

Sounds good. Does anyone know the eyeo username that should be added? I wasn't able to find it by browsing around on PyPI.

comment:18 Changed 11 months ago by rhowell

Talked with kvas and matze. They said adding the Python developers Vasily, Jon, Tristan and myself should be fine. Closing this ticket.

comment:19 Changed 11 months ago by rhowell

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.