{ "info": { "author": "Matthias Koeppe, S\u00e9bastien Labb\u00e9, Viviane Pons, Nicolas M. Thi\u00e9ry, ... with inspiration from many", "author_email": "viviane.pons@lri.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Programming Language :: Python :: 2.7", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Build Tools" ], "description": "===================\nSage Sample Package\n===================\n\n.. image:: https://mybinder.org/badge.svg\n :target: https://mybinder.org/v2/gh/sagemath/sage_sample/master\n\nThis package is designed as a simple `SageMath `_ package\nexample to serve as a good practice reference for package developers. We follow\npython recommendations and adapt them to the SageMath community. You can find more\nadvanced documentation on python package creation on\n`How To Package Your Python Code `_.\n\nThis is still a work in progress. Once this example will have\nstabilized, the plan is to make a\n`cookie cutter `_\ntemplate out of it.\n\nInstallation\n------------\n\nTry the `demo `_ on binder\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nLocal install from source\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nDownload the source from the git repository::\n\n $ git clone https://github.com/sagemath/sage_sample.git\n\nChange to the root directory and run::\n\n $ sage -pip install --upgrade --no-index -v .\n\nFor convenience this package contains a `makefile `_ with this\nand other often used commands. Should you wish too, you can use the\nshorthand::\n\n $ make install\n\nInstall from PyPI\n^^^^^^^^^^^^^^^^^^\n\nsage_sample is distributed on PyPI. You can install it with the command:\n\n $ sage -pip install sage_sample\n\nTo distribute your own package on PyPI, you will need an account on pypi.org\n(maybe at first on test.pypi.org)\n\nYou also need to install setuptools, wheel and twine:\n\n $ sage -pip install --upgrade setuptools wheel twine\n\nMake the package:\n\n $ python setup.py sdist bdist_wheel\n\nUpload and test the package to the test PyPI repository:\n\n $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n $ sage -pip install -i https://test.pypi.org/simple sage_sample\n\nAnd later, upload your distribution to the real PyPI [optionally sign it with GPG]:\n\n $ twine upload [-s] dist/*\n\n\nUsage\n-----\n\nOnce the package is installed, you can use it in Sage with::\n\n sage: from sage_sample import answer_to_ultimate_question\n sage: answer_to_ultimate_question()\n 42\n\nSee also the `demo notebook `_.\n\nSetup\n------\n\nAll packaging setup is done through ``setup.py``. To create your own package\nfollow the strcuture of the file and change the parameters accordingly.\n\nSource code\n-----------\n\nAll source code is stored in the folder ``sage_sample`` using the same name as the\npackage. This is not mandatory but highly recommended for clarity. All source folder\nmust contain a ``__init__.py`` file with needed includes.\n\nTests\n-----\n\nThis package is configured for tests written in the documentation\nstrings, also known as ``doctests``. For examples, see this\n`source file `_. See also\n`SageMath's coding conventions and best practices document `_.\nWith additional configuration, it would be possible to include unit\ntests as well.\n\nOnce the package is installed, one can use the SageMath test system\nconfigured in ``setup.py`` to run the tests::\n\n $ sage setup.py test\n\nThis is just calling ``sage -t`` with appropriate flags.\n\nShorthand::\n\n $ make test\n\nDocumentation\n-------------\n\nThe documentation of the package can be generated using Sage's\n``Sphinx`` installation::\n\n $ cd docs\n $ sage -sh -c \"make html\"\n\nShorthand::\n\n $ make doc\n\nFor this to work on your own package, make sure you follow the same\nstructure as we do here:\n\n* Create a ``docs`` folder containing the exact same ``Makefile`` and a ``source``\n folder.\n* Copy and paste the ``docs/source/conf.py`` file from this package and update\n the few project specific variables at the beginning of the file.\n* Create an ``index.rst`` file as well as a ``.rst`` file for each\n module you want on the documentation.\n\nTravis CI integration\n---------------------\n\n.. image:: https://travis-ci.org/sagemath/sage_sample.svg?branch=master\n :target: https://travis-ci.org/sagemath/sage_sample\n\nScripts that run ``make test`` on various SageMath versions on the\nTravis CI system are included.\nhttps://docs.travis-ci.com/user/for-beginners explains how to enable\nautomatic Travis CI builds for your GitHub-hosted project.\n\nThe scripts download and install binary releases (7.1-7.4) from a\nSageMath mirror. Edit ``.travis-install.sh`` if some optional or\nexperimental SageMath packages need to be installed prior to running\nyour package. Edit ``.travis.yml`` to change the list of SageMath\nversions used.\n\nAutomatically deploying documentation to GitHub pages using Travis CI\n---------------------------------------------------------------------\n\n* First do the steps described above to enable Travis CI integration\n of your GitHub-hosted project.\n\n* If you don't already have GitHub pages for your project: Create and\n checkout a branch ``gh-pages`` in your repository and put an empty\n file ``.nojekyll`` in it (see\n https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/).\n Then commit it and push it to GitHub::\n\n $ git clone --single-branch --depth 1 https://github.com/USER/PROJECT.git gh-pages\n $ cd gh-pages\n $ git checkout --orphan gh-pages\n $ git rm -rf .\n $ touch .nojekyll\n $ git add .nojekyll\n $ git commit -m \"Initial commit\"\n $ git push -u origin gh-pages\n $ cd ..\n\n* (Back in your working copy:) Generate a new ssh key pair with an\n empty passphrase::\n\n $ ssh-keygen -t dsa -f .travis_ci_gh_pages_deploy_key\n\n* Add the public ssh key (contents of the file\n ``.travis_ci_gh_pages_deploy_key.pub``) to your GitHub repository\n as a deploy key (Settings/Deploy keys/Add deploy key).\n Title: Key for deploying documentation to GitHub pages.\n Check Allow write access.\n\n* Install the Travis CI command-line client from\n https://github.com/travis-ci/travis.rb::\n\n $ gem install travis\n\n* Log in to Travis CI using your GitHub credentials::\n\n $ travis login\n\n* Encrypt the private ssh key, add the decryption keys\n as secure environment variables to Travis CI, and\n add code to ``.travis.yml`` to decrypt it::\n\n $ travis encrypt-file .travis_ci_gh_pages_deploy_key --add before_script\n\n* Add the encrypted private ssh key to the repository::\n\n $ git add .travis_ci_gh_pages_deploy_key.enc\n\n* Have git ignore the other keys (and the gh-pages directory)::\n\n $ echo >> .gitignore\n $ echo \"/.travis_ci_gh_pages_deploy_key\" >> .gitignore\n $ echo \"/.travis_ci_gh_pages_deploy_key.pub\" >> .gitignore\n $ echo \"/gh-pages\" >> .gitignore\n $ git add .gitignore\n\n* Optionally, edit ``.travis.yml`` to adjust variables ``DEPLOY_DOC_...``\n\n* Commit all changes to GitHub. The Travis CI build should then run\n automatically and deploy it::\n\n $ git add .travis.yml\n $ git commit -m \"Deploy built documentation to GitHub\"\n $ git push\n\n* The deployed documentation will be available at:\n https://USER.github.io/PROJECT/\n This can be customized by changing ``DEPLOY_DOC_TO_DIRECTORY=/``\n to another directory in ``.travis.yml``\n For example, setting ``DEPLOY_DOC_TO_DIRECTORY=doc/html`` will make\n the deployed documentation available at:\n https://USER.github.io/PROJECT/doc/html/\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sagemath/sage_sample", "keywords": "SageMath packaging", "license": "GPLv2+", "maintainer": "", "maintainer_email": "", "name": "sage-sample", "package_url": "https://pypi.org/project/sage-sample/", "platform": "", "project_url": "https://pypi.org/project/sage-sample/", "project_urls": { "Homepage": "https://github.com/sagemath/sage_sample" }, "release_url": "https://pypi.org/project/sage-sample/0.3.0/", "requires_dist": [ "sage-package", "sphinx" ], "requires_python": "", "summary": "An example of a basic sage package", "version": "0.3.0" }, "last_serial": 4247694, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a92a6a8e6f2b88f99f4c4c25f25bc446", "sha256": "5d15e438c2e61dd2f2ae445c6cfccb496ec19e54143d8ff1f817fc0698bc4211" }, "downloads": -1, "filename": "sage_sample-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "a92a6a8e6f2b88f99f4c4c25f25bc446", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4866, "upload_time": "2018-07-26T17:02:50", "url": "https://files.pythonhosted.org/packages/52/de/5a9892239cb8e8fc3d1a0a8c12e6589ade733ede5d8daa29006b9e6a935f/sage_sample-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bbce861c24e5d1f41c0adc4eecff408d", "sha256": "9636040035706b655a2df68c8bf43f2b742fd019cc32c6546a8ac7c36aac6b2f" }, "downloads": -1, "filename": "sage_sample-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bbce861c24e5d1f41c0adc4eecff408d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25051, "upload_time": "2018-07-26T17:02:51", "url": "https://files.pythonhosted.org/packages/34/74/d780f9ddca91034eb4303f817fa9b6dd6aee2ff04bace75eaaee49888ee8/sage_sample-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "8f8dda5feffdd63be74fcb09854ee2dc", "sha256": "36b6d5ecf3a808ffbda893742d4d8d7d4d9a4458d1817ba78d07954349dfaa9d" }, "downloads": -1, "filename": "sage_sample-0.2.0.tar.gz", "has_sig": false, "md5_digest": "8f8dda5feffdd63be74fcb09854ee2dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25636, "upload_time": "2018-07-30T10:46:35", "url": "https://files.pythonhosted.org/packages/b9/5c/c76fc80fb550dd586699d676ae4a5e6cc9ce68a7b6da66b508866b10e142/sage_sample-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "1f5917e6e15c40491406c574f9f3d44e", "sha256": "1d8f7e2ac2f66a20fb6f6bbc5ec9a1009fcfa8412b7112a4d14c26e6fe6f5ea1" }, "downloads": -1, "filename": "sage_sample-0.3.0-py2-none-any.whl", "has_sig": true, "md5_digest": "1f5917e6e15c40491406c574f9f3d44e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8992, "upload_time": "2018-09-07T08:54:14", "url": "https://files.pythonhosted.org/packages/e2/c1/323c173aebb4d109c5c6104a00d20e21c5128896ba9f02c8deec9f309ed6/sage_sample-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7127fe7767e0b1456ccafa168f183a3e", "sha256": "6588ecbc9b881d95e998cc299168d7f977119e9798b19e7428a8e749d98a894d" }, "downloads": -1, "filename": "sage_sample-0.3.0.tar.gz", "has_sig": true, "md5_digest": "7127fe7767e0b1456ccafa168f183a3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25635, "upload_time": "2018-09-07T08:54:16", "url": "https://files.pythonhosted.org/packages/45/40/f8a10c191fe343e4b4b140adfde20f25742b522877219c9d2530908facd0/sage_sample-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f5917e6e15c40491406c574f9f3d44e", "sha256": "1d8f7e2ac2f66a20fb6f6bbc5ec9a1009fcfa8412b7112a4d14c26e6fe6f5ea1" }, "downloads": -1, "filename": "sage_sample-0.3.0-py2-none-any.whl", "has_sig": true, "md5_digest": "1f5917e6e15c40491406c574f9f3d44e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8992, "upload_time": "2018-09-07T08:54:14", "url": "https://files.pythonhosted.org/packages/e2/c1/323c173aebb4d109c5c6104a00d20e21c5128896ba9f02c8deec9f309ed6/sage_sample-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7127fe7767e0b1456ccafa168f183a3e", "sha256": "6588ecbc9b881d95e998cc299168d7f977119e9798b19e7428a8e749d98a894d" }, "downloads": -1, "filename": "sage_sample-0.3.0.tar.gz", "has_sig": true, "md5_digest": "7127fe7767e0b1456ccafa168f183a3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25635, "upload_time": "2018-09-07T08:54:16", "url": "https://files.pythonhosted.org/packages/45/40/f8a10c191fe343e4b4b140adfde20f25742b522877219c9d2530908facd0/sage_sample-0.3.0.tar.gz" } ] }