Preparing to publish (#2)

* wip: reformatting for pypi

* wip: missing setup fields, meta

* wip: fix classifiers
This commit is contained in:
Marc Cataford 2020-01-05 15:34:41 -05:00 committed by GitHub
parent 02a7b2d5d8
commit a0a2db7c32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 6 deletions

View file

@ -2,7 +2,7 @@
Keep your repositories up-to-date with their templates in a few keystrokes.
## :question: Why `carboncopy`?
## Why `carboncopy`?
[Github Template Repositories](https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/) made it really easy to skip project boilerplate setup steps and to produce "new project kits" that ensure that all your (or your organization's) new projects have all the must-haves. Problem is, templates aren't set in stone and it's likely that templates get updated after some projects have been spawned from it.
@ -10,14 +10,14 @@ Because template repositories are different than forks, you can't simply rebase
With `carboncopy`, you are one command away from pulling in the latest changes from your template repositories as if it were a regular base branch. You can configure it via its RC file to ignore certain files from the template, and more!
## :package: Installation
## 📦 Installation
As it is not yet published on `PyPi`, you can simply clone this repository and use `pip install <path>` to install it in your local environment.
## :hammer: Usage
## 🔨 Usage
From your repository, simply type `carboncopy` in your terminal to bring up a prompt asking you what to pull from your template repository. __Any change made is left as an unstaged change so you can commit and merge it however you want.__
## :wrench: Configuration
## Configuration
You can configure the way `carboncopy` handles your template's contents by creating a `.carboncopyrc` file at the root of your repository. Documentation TBD. See `src/carboncopy/config_defaults.py` for general layout.

View file

@ -1,32 +1,47 @@
appdirs==1.4.3
attrs==19.3.0
black==19.10b0
bleach==3.1.0
blessings==1.7
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
Click==7.0
cryptography==2.8
docutils==0.15.2
idna==2.8
importlib-metadata==1.3.0
inquirer==2.6.3
invoke==1.4.0
jeepney==0.4.2
keyring==21.0.0
more-itertools==8.0.2
mypy==0.761
mypy-extensions==0.4.3
packaging==19.2
pathspec==0.7.0
pkginfo==1.5.0.1
pluggy==0.13.1
py==1.8.1
pycparser==2.19
Pygments==2.5.2
pyparsing==2.4.6
pytest==5.3.2
python-editor==1.0.4
readchar==2.0.1
readme-renderer==24.0
regex==2019.12.20
requests==2.22.0
requests-toolbelt==0.9.1
SecretStorage==3.1.1
six==1.13.0
syrupy==0.0.12
toml==0.10.0
tqdm==4.41.1
twine==3.1.1
typed-ast==1.4.0
typing-extensions==3.7.4.1
urllib3==1.25.7
wcwidth==0.1.8
webencodings==0.5.1
zipp==0.6.0

View file

@ -7,13 +7,24 @@ setuptools.setup(
entry_points={"console_scripts": ["carboncopy = src.carboncopy.main:run"]},
name="carboncopy",
version="0.0.1",
license="MIT",
author="Marc Cataford",
author_email="c.marcandre@gmail.com",
description="A small CLI utility to keep your repositories up-to-date with their templates",
long_description=long_description,
url="",
long_description_content_type="text/markdown",
url="https://pypi.org/project/carboncopy/",
packages=setuptools.find_packages(),
classifiers=[],
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Version Control :: Git",
],
install_requires=["requests>=2.22.0", "inquirer==2.6.3"],
python_requires=">=3.6",
project_urls={
"Source": "https://github.com/mcataford/carboncopy",
"Bug Reports": "https://github.com/mcataford/carboncopy/issues",
},
)

View file

@ -11,6 +11,23 @@ def typecheck(ctx):
ctx.run("mypy src")
@task
def package(ctx):
ctx.run("rm -rf dist && python setup.py sdist bdist_wheel")
@task(optional=["test"])
def publish(ctx, test=False):
if test:
ctx.run(
"twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*"
)
else:
ctx.run("twine upload dist/*")
ns = Collection()
ns.add_task(format_all, name="format")
ns.add_task(typecheck)
ns.add_task(package)
ns.add_task(publish)