python-musicbrainz3: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
No edit summary
(link pymbngs)
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The python-musicbrainz3 package is the successor of [[python-musicbrainz2]].
The python-musicbrainz3 package was planned to be the successor of [[python-musicbrainz2]].
For an active project try [https://github.com/alastair/python-musicbrainz-ngs python-musicbrainz-ngs].


NGS is coming, so a rewrite is in order to keep up with MB development. This wiki page collects information, plans, and ideas for this project.
NGS is coming, so a rewrite is in order to keep up with MB development. This wiki page collects information, plans, and ideas for this project.
Line 11: Line 12:
* Despite NGS's complexity: Simple things should be simple
* Despite NGS's complexity: Simple things should be simple
* Turn today's modules into packages (source files are much too large)
* Turn today's modules into packages (source files are much too large)
* Make it more pythonic where possible (naming conventions?)
* Make it more pythonic where possible (spaces instead of tabs; naming conventions?)
* Remove rarely used cruft (what would that be?)
* Remove rarely used cruft (what would that be?)
* Keep the amount and quality of documentation
* Keep the amount and quality of documentation
Line 19: Line 20:


* This wiki page is the central source of information
* This wiki page is the central source of information
* Discussion can take place on the development mailing list
* Discussion can take place on the [http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel development mailing list]
* Source code is hosted at git://git.musicbrainz.org/python-musicbrainz3.git ([http://git.musicbrainz.org/gitweb/?p=python-musicbrainz3.git;a=summary web interface])
* Soon: git repository
* Submit bug reports and feature requests via [http://jira.musicbrainz.org/browse/PYMB PYMB Jira]
* Review board?
* TODO: Jira?
** Do we want to use Jira just for bug reports, or as a dumping ground for upcoming tasks too (e.g. 'Do author search') --alastair
** Do we want to use Jira just for bug reports, or as a dumping ground for upcoming tasks too (e.g. 'Do author search') --alastair
** I don't know. Using it for tasks sounds like a good idea, too. --matt
* Upload patches to Review Board in [http://codereview.musicbrainz.org/groups/python-musicbrainz/ group python-musicbrainz]


== Project Plan ==
== Project Plan ==
Line 29: Line 31:
# Set up project infrastructure
# Set up project infrastructure
## Wiki page ('''done''')
## Wiki page ('''done''')
## Git repository (Rob/Oliver, '''in progress''')
## Git repository ('''done''')
## Jira project?
## Jira project ('''done''')
## Reviewboard ('''done''' - python-musicbrainz group created)
## Group in Review Board ('''done''')
# Evaluate tools
# Evaluate tools
## XML mapping tool (Matt, '''in progress''')
## XML mapping tool (Matt, '''in progress''')
Line 38: Line 40:
## Look at ETree or similar for XML (also consider json libraries?) (Alastair, '''in progress''')
## Look at ETree or similar for XML (also consider json libraries?) (Alastair, '''in progress''')
# Create UML diagrams for
# Create UML diagrams for
## the core entities
## the core entities ('''done''')
## pymb3's classes
## pymb3's classes
# Set up project structure in the repository
# Set up project structure in the repository (Matt, '''in progress''')
# Gather data for the parser
# Gather data for the parser
## Update MMD Relax NG schema if necessary
## Update MMD Relax NG schema if necessary ('''done''')
## Prepare comprehensive set of example documents for the test suite
## Prepare initial set of example documents for the test suite ('''done''')
### I wouldn't worry too much about getting this comprehensive list upfront. Especially since there are parts of the webservice still not completed we should be able to create this as we go --alastair
# Start hacking!
# Start hacking!



== Model ==
== Model ==
Line 52: Line 52:
This is a simplified model showing only the core entities.
This is a simplified model showing only the core entities.


[[Image:core.png]]
[[Image:pymb3-model-core.png|800px|Core Model]]

The m:n associations displayed with bold lines (Artist to anything, Release to Label) are attributed and will be modeled using association classes (ArtistCredit and ReleaseEvent respectively). We implement 1:n associations using lists.

TODO: Are Work to Recording, ReleaseGroup to Release ordered?

TODO: The URL class is only used for ARs?


== Links ==
== Links ==
Line 59: Line 65:


* [http://unmaintainable.wordpress.com/2010/03/13/future-of-python-musicbrainz2/ Matt's original blog announcement] and [http://lists.musicbrainz.org/pipermail/musicbrainz-devel/2010-March/003797.html mailing list archive]
* [http://unmaintainable.wordpress.com/2010/03/13/future-of-python-musicbrainz2/ Matt's original blog announcement] and [http://lists.musicbrainz.org/pipermail/musicbrainz-devel/2010-March/003797.html mailing list archive]
* [[NextGenerationSchema|Next Generation Schema Overview]]
* [[MusicBrainz Database/Schema|Schema Overview]]
* [[Next_Generation_Schema/SearchServerXML|Web Service Interface]]
* [[Next_Generation_Schema/SearchServerXML|NGS Web Service Interface]]
* [[Next_Generation_Schema/XML|Web Service XML Format]]
* [[Next_Generation_Schema/XML|NGS Web Service XML Format]]
* [http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=tree;f=lib/MusicBrainz/Server/Entity;hb=HEAD MusicBrainz Server Entities]


== Ideas and Open Questions ==
== Ideas and Open Questions ==


* Use an XML mapping package (xml.etree?)
* Use an XML mapping package (xml.etree?)
* Use distutils or setuptools? With setuptools we'd get test commands.
* Import version history into git?
* Is [[Server_Release_Notes/NGS_Beta_1#Tracklist|Tracklist]] a top-level entity? Is it in the web service? Should it be in pymb3?

[[Category:To Be Reviewed]]

Latest revision as of 00:03, 16 January 2013

The python-musicbrainz3 package was planned to be the successor of python-musicbrainz2. For an active project try python-musicbrainz-ngs.

NGS is coming, so a rewrite is in order to keep up with MB development. This wiki page collects information, plans, and ideas for this project.

Feel free to edit!

Goals

  • Fully support the NGS data model and web service
  • Require Python 2.6 and aim to be as close to Python 3 as possible
  • Despite NGS's complexity: Simple things should be simple
  • Turn today's modules into packages (source files are much too large)
  • Make it more pythonic where possible (spaces instead of tabs; naming conventions?)
  • Remove rarely used cruft (what would that be?)
  • Keep the amount and quality of documentation
  • Write more test cases

Project Infrastructure

Project Plan

  1. Set up project infrastructure
    1. Wiki page (done)
    2. Git repository (done)
    3. Jira project (done)
    4. Group in Review Board (done)
  2. Evaluate tools
    1. XML mapping tool (Matt, in progress)
    2. Unit test runner (nose?)
      1. What's the advantage of something like nose over just using the unittest package? I don't have much experience in unit testing python stuff. --alastair
    3. Look at ETree or similar for XML (also consider json libraries?) (Alastair, in progress)
  3. Create UML diagrams for
    1. the core entities (done)
    2. pymb3's classes
  4. Set up project structure in the repository (Matt, in progress)
  5. Gather data for the parser
    1. Update MMD Relax NG schema if necessary (done)
    2. Prepare initial set of example documents for the test suite (done)
  6. Start hacking!

Model

This is a simplified model showing only the core entities.

Core Model

The m:n associations displayed with bold lines (Artist to anything, Release to Label) are attributed and will be modeled using association classes (ArtistCredit and ReleaseEvent respectively). We implement 1:n associations using lists.

TODO: Are Work to Recording, ReleaseGroup to Release ordered?

TODO: The URL class is only used for ARs?

Links

Links with documentation and other relevant information.

Ideas and Open Questions

  • Use an XML mapping package (xml.etree?)
  • Use distutils or setuptools? With setuptools we'd get test commands.
  • Is Tracklist a top-level entity? Is it in the web service? Should it be in pymb3?