-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
114 lines (103 loc) · 4.61 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
test:
pytest
coverage:
coverage run tests/test_all.py
coverage report
coverage_html:
# pytest-cov needs to be installed:
# $ pip install pytest-cov
pytest --cov=reademptionlib --cov-report html --cov-context=test
coverage_batch:
# install coverage-badge
# pip install coverage-badge
# run coverage
coverage run tests/test_all.py
# create the badge
coverage-badge -o coverage.svg
# add and commit the badge to GitHub
package:
rm -r build
pandoc -o README.rst README.md
python3 setup.py sdist bdist_wheel
rm -rf READemption.egg-info
ls dist/*
rm README.rst
package_to_pypi:
python3 -m twine upload --verbose dist/*
html_doc:
# install sphinx argparse extension
# pip install sphinx-argparse
# install rtd theme
# pip install sphinx-rtd-theme
cd docs && make html && cd ..
show_html_docs:
firefox docs/build/html/index.html &
pylint:
pylint bin/reademption reademptionlib/* tests/*
conda_package:
# create conda meta.yaml from pypi package
conda skeleton pypi /conda_package/reademption
new_release:
@echo "* Create/checkout a release branch"
@echo " git checkout dev"
@echo "* Change version and date in bin/reademption"
@echo "* Change version in setup.py"
@echo "* Change the version and date in .zenodo.json"
@echo "* Change requirements (install_requires) in setup.py"
@echo "* Change version, release and date in docs/source/conf.py"
@echo "* Add description to CHANGELOG.txt"
@echo "* Refresh the two reademption links in docs and docs/source."
"* this is need for building the docu on 'read the docs'. See last point of this list."
@echo "rm docs/reademption && rm docs/source/reademption && cd docs && ln -s ../bin/reademption reademption && cd source && ln -s ../../bin/reademption reademption && cd ../.."
@echo "* Create new docs"
@echo "* if making the html documentation fails, try to install the necessary programs:"
"* $ pip install sphinx sphinx_rtd_theme"
"* $ pip install sphinx-argparse"
@echo " make html_doc"
@echo "* Create package"
@echo " make package"
@echo "*delete old package"
@echo "rm dist/READemption-X.0.0-py3-none-any.whl"
@echo "rm dist/READemption-X.0.0.tar.gz"
@echo "* Upload package to pypi"
@echo "* If necessary install twine e.g.: "
@echo "* conda install -c conda-forge twine "
@echo " make package_to_pypi"
@echo "* Test doc creation"
@echo "* Update version and date in CITATION.cff"
@echo "* git add CHANGELOG.txt bin/reademption docs/source/conf.py setup.py CITATION.cff"
@echo " Also add the changed html pages of the docu e.g.: git add -u (adds all modified files to repo)"
@echo "* Commit changes e.g. 'git commit -m \"Set version to 0.4.X\"'"
@echo "* Merge release into dev and main"
@echo " git checkout main"
@echo "* delete docs/build to avoid conflicts with new binary doc files"
@echo "git rm -r docs/build"
@echo "git commit -m 'Deleted old docs build'"
@echo " git merge dev"
@echo "Solve conflicts from merging (CHANGELOG.txt bin/reademption docs/source/conf.py setup.py CITATION.cff)"
@echo "* Tag the commit e.g. 'git tag -a v0.4.X -m \"version v0.4.X\"'"
@echo "* Push it to github: git push"
@echo "* Generate a new release based on this tag at"
@echo " https://github.com/foerstner-lab/READemption/releases/new"
@echo "The documenation should update automatically after pushing to github via a .readthedocs.yml"
@echo "If the automatic update did not work go to read the docs"
" - login and hit 'build'"
@echo "*create conda package"
@echo "*remove the old yaml file in reademption/meta.yaml"
@echo "rm reademption/meta.yaml"
@echo "conda skeleton pypi reademption"
@echo "*replace yaml file from reademption with the one in folder conda_package/reademption"
@echo "mv reademption/meta.yaml conda_package/reademption/meta.yaml"
@ echo "To avoid connection error while building the package got to pypi reademption page and copy the download link under Downloaded files for READemption-2.0.4.tar.gz and paste it into conda_package/reademption/meta.yaml under url"
@echo "conda-build --python 3.9 conda_package/reademption"
@echo "if necessary install anaconda client"
@echo " conda install anaconda-client"
@echo "* login to anaconda client"
@echo " anaconda login"
@echo "*upload anaconda package"
@echo "anaconda upload /home/till/anaconda3/conda-bld/linux-64/reademption-2.0.0-py39_0.tar.bz2"
@echo "*Create Docker image with tags latest and the current version:"
@echo " docker build -f Dockerfile -t tillsauerwein/reademption:2.0.1 -t tillsauerwein/reademption:latest ."
@echo "*push all docker images to dockerhub:"
@echo " docker push -a tillsauerwein/reademption"
# @echo "* Upload new docs using 'make upload_doc'"