@@ -16,4 +16,4 @@ jobs: | |||||
- uses: actions/setup-python@v2 | - uses: actions/setup-python@v2 | ||||
with: | with: | ||||
python-version: 3.9 | python-version: 3.9 | ||||
- uses: psf/black@stable | |||||
- uses: psf/black@20.8b1 |
@@ -1,3 +1,6 @@ | |||||
__pycache__ | __pycache__ | ||||
.coverage | .coverage | ||||
Pipfile.lock | Pipfile.lock | ||||
/build | |||||
/dist | |||||
/kosmorrolib.egg-info |
@@ -1,7 +1,7 @@ | |||||
black: | black: | ||||
pipenv run black kosmorrolib tests | |||||
pipenv run black kosmorrolib tests setup.py | |||||
.PHONY: test | |||||
.PHONY: tests | |||||
tests: legacy-tests doctests | tests: legacy-tests doctests | ||||
doctests: | doctests: | ||||
@@ -24,25 +24,12 @@ env: | |||||
exit 1; \ | exit 1; \ | ||||
fi | fi | ||||
release: env | |||||
@echo -e "\e[1mCreating release with version number \e[36m$$RELEASE_NUMBER\e[0m" | |||||
@echo | |||||
sed "s/^VERSION =.*/VERSION = '$$RELEASE_NUMBER'/g" kosmorrolib/version.py > version.py | |||||
mv version.py kosmorrolib/version.py | |||||
pipenv run python setup.py extract_messages --output-file=kosmorrolib/locales/messages.pot > /dev/null | |||||
changelog: | |||||
conventional-changelog -p angular -i CHANGELOG.md -s | conventional-changelog -p angular -i CHANGELOG.md -s | ||||
sed "0,/\\[\\]/s/\\[\\]/[v$$RELEASE_NUMBER]/g" CHANGELOG.md > /tmp/CHANGELOG.md | |||||
sed -e "s/...v)/...v$$RELEASE_NUMBER)/" /tmp/CHANGELOG.md > CHANGELOG.md | |||||
rm /tmp/CHANGELOG.md | |||||
@echo | |||||
@echo -e "\e[1mRelease \e[36m$$RELEASE_NUMBER\e[39m is ready to commit." | |||||
@echo -e "Please review the changes, then invoke \e[33mmake finish-release\e[39m." | |||||
@echo -e "\e[32m✔\e[33m Changelog generated. Don't forget to update the version number before committing.\e[0m" | |||||
@echo -e " When everything is good, finish the release with 'make tag'." | |||||
finish-release: env | |||||
tag: env | |||||
git add CHANGELOG.md kosmorrolib/version.py kosmorrolib/locales/messages.pot | git add CHANGELOG.md kosmorrolib/version.py kosmorrolib/locales/messages.pot | ||||
git commit -m "build: bump version $$RELEASE_NUMBER" | git commit -m "build: bump version $$RELEASE_NUMBER" | ||||
git tag "v$$RELEASE_NUMBER" | git tag "v$$RELEASE_NUMBER" | ||||
@@ -0,0 +1,40 @@ | |||||
#!/usr/bin/env python3 | |||||
import pathlib | |||||
from setuptools import setup, find_packages | |||||
from kosmorrolib.__version__ import __version__ | |||||
HERE = pathlib.Path(__file__).parent | |||||
README = (HERE / "README.md").read_text() | |||||
setup( | |||||
name="kosmorrolib", | |||||
version=__version__, | |||||
author="Jérôme Deuchnord", | |||||
author_email="jerome@deuchnord.fr", | |||||
url="http://kosmorro.space", | |||||
license="CECILL-C", | |||||
description="A library to computes the ephemerides.", | |||||
long_description=README, | |||||
long_description_content_type="text/markdown", | |||||
keywords=["kosmorro", "astronomy", "ephemerides", "ephemeris"], | |||||
packages=["kosmorrolib"], | |||||
install_requires=[ | |||||
"skyfield>=1.21.0,<2.0.0", | |||||
"numpy>=1.17.0,<2.0.0", | |||||
"python-dateutil", | |||||
], | |||||
classifiers=[ | |||||
"Development Status :: 4 - Beta", | |||||
"Intended Audience :: Developers", | |||||
"Intended Audience :: Education", | |||||
"License :: CeCILL-C Free Software License Agreement (CECILL-C)", | |||||
"Topic :: Software Development :: Libraries :: Python Modules", | |||||
"Programming Language :: Python :: 3.7", | |||||
"Programming Language :: Python :: 3.8", | |||||
"Programming Language :: Python :: 3.9", | |||||
"Topic :: Scientific/Engineering :: Astronomy", | |||||
], | |||||
python_requires=">=3.7", | |||||
) |
@@ -16,3 +16,5 @@ if __name__ == "__main__": | |||||
if failures == 0: | if failures == 0: | ||||
print("✔ All %d tests successfully passed." % tests) | print("✔ All %d tests successfully passed." % tests) | ||||
else: | |||||
exit(1) |