From 1de9cca9f0c317d9d176045f289bef79d1d21913 Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Mon, 6 Jul 2020 07:16:59 -0400 Subject: [PATCH] docs clean up --- .github/CODE_OF_CONDUCT.md | 60 +++++++++++++++++++++++++++++ .github/workflows/pythonpublish.yml | 31 +++++++++++++++ CHANGELOG.md | 3 ++ docs/conf.py | 9 ++--- docs/index.rst | 2 +- docs/lifetimes.datasets.rst | 5 +-- docs/lifetimes.fitters.rst | 15 +------- docs/lifetimes.rst | 28 +------------- lifetimes/version.py | 2 +- 9 files changed, 103 insertions(+), 52 deletions(-) create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/workflows/pythonpublish.yml diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..7bd9eac9 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,60 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, and in the interest of +fostering an open and welcoming community, we pledge to respect all people who +contribute through reporting issues, posting feature requests, updating +documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free +experience for everyone, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic + addresses, without explicit permission +* Other unethical or unprofessional conduct + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +By adopting this Code of Conduct, project maintainers commit themselves to +fairly and consistently applying these principles to every aspect of managing +this project. Project maintainers who do not follow or enforce the Code of +Conduct may be permanently removed from the project team. + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +A working group of community members is committed to promptly addressing any +reported issues. The working group is made up of pandas contributors and users. +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the working group by e-mail (lifelines-coc@googlegroups.com). +Messages sent to this e-mail address will not be publicly visible but only to +the working group members. The working group currently includes + +- Cameron Davidson-Pilon +- Stefanie Gibson +- Paul Zivich + +All complaints will be reviewed and investigated and will result in a response +that is deemed necessary and appropriate to the circumstances. Maintainers are +obligated to maintain confidentiality with regard to the reporter of an +incident. + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.3.0, available at +[http://contributor-covenant.org/version/1/3/0/][version], +and the [Swift Code of Conduct][swift]. + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/3/0/ +[swift]: https://swift.org/community/#code-of-conduct diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml new file mode 100644 index 00000000..d5f3859d --- /dev/null +++ b/.github/workflows/pythonpublish.yml @@ -0,0 +1,31 @@ +# This workflows will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/CHANGELOG.md b/CHANGELOG.md index 5065a892..569acd2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 0.11.2 + - some convergence improvements + ### 0.11.1 - bump the Pandas requirements to >= 0.24.0. This should have been done in 0.11.0 - suppress some warnings from autograd. diff --git a/docs/conf.py b/docs/conf.py index ba8846d6..70cf3857 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,18 +50,15 @@ "sphinx.ext.coverage", "sphinx.ext.mathjax", "sphinx.ext.napoleon", + "recommonmark", ] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # for parsing markdown files -source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} +source_suffix = {".rst": "restructuredtext", ".txt": "markdown", ".md": "markdown"} -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -source_suffix = [".rst", ".md"] # The master toctree document. master_doc = "index" @@ -76,7 +73,7 @@ # built documents. # # The short X.Y version. -version = "0.11.1" +version = "0.11.2" # The full version, including alpha/beta/rc tags. release = version diff --git a/docs/index.rst b/docs/index.rst index cf41c4bb..bd3dc956 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,11 +10,11 @@ :caption: Contents: Quickstart + High Level Overview Saving and loading model More examples and recipes lifetimes Changelog - High Level Overview Indices and tables diff --git a/docs/lifetimes.datasets.rst b/docs/lifetimes.datasets.rst index aa1e7c54..62373ed9 100644 --- a/docs/lifetimes.datasets.rst +++ b/docs/lifetimes.datasets.rst @@ -1,9 +1,6 @@ -lifetimes.datasets package +lifetimes.datasets ========================== -Module contents ---------------- - .. automodule:: lifetimes.datasets :members: :undoc-members: diff --git a/docs/lifetimes.fitters.rst b/docs/lifetimes.fitters.rst index 25b10754..7978397d 100644 --- a/docs/lifetimes.fitters.rst +++ b/docs/lifetimes.fitters.rst @@ -1,16 +1,6 @@ -lifetimes.fitters package +lifetimes.fitters ========================= -Submodules ----------- - -lifetimes.fitters.base\_fitter module -------------------------------------- - -.. automodule:: lifetimes.fitters.base_fitter - :members: - :undoc-members: - :show-inheritance: lifetimes.fitters.beta\_geo\_beta\_binom\_fitter module ------------------------------------------------------- @@ -53,9 +43,6 @@ lifetimes.fitters.pareto\_nbd\_fitter module :show-inheritance: -Module contents ---------------- - .. automodule:: lifetimes.fitters :members: :undoc-members: diff --git a/docs/lifetimes.rst b/docs/lifetimes.rst index 36c42f49..b02231c0 100644 --- a/docs/lifetimes.rst +++ b/docs/lifetimes.rst @@ -1,24 +1,12 @@ lifetimes package ================= -Subpackages ------------ - .. toctree:: - lifetimes.datasets lifetimes.fitters + lifetimes.utils + lifetimes.datasets -Submodules ----------- - -lifetimes.estimation module ---------------------------- - -.. automodule:: lifetimes.estimation - :members: - :undoc-members: - :show-inheritance: lifetimes.generate\_data module ------------------------------- @@ -44,18 +32,6 @@ lifetimes.utils module :undoc-members: :show-inheritance: -lifetimes.version module ------------------------- - -.. automodule:: lifetimes.version - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - .. automodule:: lifetimes :members: :undoc-members: diff --git a/lifetimes/version.py b/lifetimes/version.py index 2f52a6d4..4151e130 100644 --- a/lifetimes/version.py +++ b/lifetimes/version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -__version__ = "0.11.1" +__version__ = "0.11.2"