Skip to content

Prepare pytask-stata to be published on PyPI. #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .conda/bld.bat

This file was deleted.

1 change: 0 additions & 1 deletion .conda/build.sh

This file was deleted.

7 changes: 5 additions & 2 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ package:
version: {{ data.get('version') }}

source:
# git_url is nice in that it won't capture devenv stuff. However, it only captures
# git_url is nice in that it won't capture devenv stuff. However, it only captures
# committed code, so pay attention.
git_url: ../

build:
noarch: python
number: 0
script: {{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt

requirements:
host:
- python
- pip
- setuptools

run:
Expand All @@ -40,6 +42,7 @@ test:

about:
home: https://github.com/pytask-dev/pytask-stata
license: none
license: MIT
license_file: LICENSE
summary: Execute do-files with Stata.
dev_url: https://github.com/pytask-dev/pytask-stata/
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/pytask_stata/_version.py export-subst
36 changes: 36 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PyPI

on: push

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install pypa/build
run: >-
python -m
pip install
build
--user

- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.0.0
hooks:
- id: codespell
- id: codespell
args: [-L unparseable]
- repo: https://github.com/mgedmin/check-manifest
rev: "0.46"
hooks:
- id: check-manifest
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
9 changes: 8 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ Changes

This is a record of all past pytask-stata releases and what went into them in reverse
chronological order. Releases follow `semantic versioning <https://semver.org/>`_ and
all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask-stata>`_.
all releases are available on `PyPI <https://pypi.org/project/pytask-stata>`_ and
`Anaconda.org <https://anaconda.org/pytask/pytask-stata>`_.


0.0.4 - 2021-02-25
------------------

- :gh:`6` prepares pytask-stata to be published on PyPI, adds versioneer and more.


0.0.3 - 2021-01-16
Expand Down
18 changes: 18 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright 2020-2021 Tobias Raabe

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
11 changes: 11 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include LICENSE
include versioneer.py
include src/pytask_stata/_version.py

exclude *.rst
exclude *.yml
exclude *.yaml
exclude tox.ini

prune .conda
prune tests
18 changes: 17 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
.. image:: https://img.shields.io/pypi/v/pytask-stata?color=blue
:alt: PyPI
:target: https://pypi.org/project/pytask-stata

.. image:: https://img.shields.io/pypi/pyversions/pytask-stata
:alt: PyPI - Python Version
:target: https://pypi.org/project/pytask-stata

.. image:: https://anaconda.org/pytask/pytask-stata/badges/version.svg
:target: https://anaconda.org/pytask/pytask-stata

.. image:: https://anaconda.org/pytask/pytask-stata/badges/platforms.svg
:target: https://anaconda.org/pytask/pytask-stata

.. image:: https://img.shields.io/pypi/l/pytask-stata
:alt: PyPI - License

.. image:: https://github.com/pytask-dev/pytask-stata/workflows/Continuous%20Integration%20Workflow/badge.svg?branch=main
:target: https://github.com/pytask-dev/pytask-stata/actions?query=branch%3Amain

Expand All @@ -28,10 +39,15 @@ Run Stata's do-files with pytask.
Installation
------------

Install the plugin with
pytask-stata is available on `PyPI <https://pypi.org/project/pytask-stata>`_ and
`Anaconda.org <https://anaconda.org/pytask/pytask-stata>`_. Install it with

.. code-block:: console

$ pip install pytask-stata

# or

$ conda config --add channels conda-forge --add channels pytask
$ conda install pytask-stata

Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ coverage:
ignore:
- ".tox/**/*"
- "setup.py"
- "versioneer.py"
- "src/pytask_stata/_version.py"
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ dependencies:
- pytest-cov
- pytest-xdist
- tox-conda
- virtualenv=20.0.33
- versioneer
17 changes: 7 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[bumpversion]
current_version = 0.0.3
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))(\-?((dev)?(?P<dev>\d+))?)
serialize =
{major}.{minor}.{patch}dev{dev}
{major}.{minor}.{patch}

[bumpversion:file:setup.py]

[bumpversion:file:src/pytask_stata/__init__.py]
[versioneer]
VCS = git
style = pep440
versionfile_source = src/pytask_stata/_version.py
versionfile_build = pytask_stata/_version.py
tag_prefix = v
parentdir_prefix = pytask-stata-
37 changes: 36 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
from pathlib import Path

from setuptools import find_packages
from setuptools import setup

import versioneer


README = Path("README.rst").read_text()

PROJECT_URLS = {
"Documentation": "https://github.com/pytask-dev/pytask-stata",
"Github": "https://github.com/pytask-dev/pytask-stata",
"Tracker": "https://github.com/pytask-dev/pytask-stata/issues",
"Changelog": "https://github.com/pytask-dev/pytask-stata/blob/main/CHANGES.rst",
}


setup(
name="pytask-stata",
version="0.0.3",
version=versioneer.get_version(),
cmd_class=versioneer.get_cmdclass(),
description="Execute do-files with Stata and pytask.",
long_description=README,
long_description_content_type="text/x-rst",
author="Tobias Raabe",
author_email="[email protected]",
python_requires=">=3.6",
license="MIT",
classifiers=[
"Development Status :: 3 - Alpha",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
platforms="any",
packages=find_packages(where="src"),
package_dir={"": "src"},
entry_points={"pytask": ["pytask_stata = pytask_stata.plugin"]},
zip_false=False,
)
5 changes: 5 additions & 0 deletions src/pytask_stata/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
__version__ = "0.0.3"

from ._version import get_versions

__version__ = get_versions()["version"]
del get_versions
Loading