Integration with existing projects¶
Make sure you went over features section before diving right in!
While py-template
is best suited as a base for new projects, you can also integrate with existing ones (unfortunately not as easily).
General guidelines¶
Steps below should be performed in addition to setup steps!
You might want to initialize an empty "dummy" repo to have initialized elements to choose from
While the steps are not as straightforward, a rough guideline could be summarized as:
- Move your code to
/src/<project_name>
(keep_version.py
and import it in a similar fashion to__init__.py
) - Move your
tests
totests
folder (given they usepytest
) - Copy whole
.github
folder as-is (keep in mind you might have to perform a few manual adjustments depending on your project) - Copy
pyproject.toml
and specify your dependencies/optional dependencies in appropriate sections under[tool.poetry.dependencies]
and commitpoetry.lock
after you do that! - Copy
gen_ref_pages.py
to/docs
folder (automated documentation creation) - Copy
renovate.json
and enable renovate bot (unless you have one already setup) - Copy
.yamllint.yml
(unless you have one already setup) - Copy
.gitignore
(unless you have one already setup) - Copy
.editorconfig
(unless you have one already setup)
Feel free to open an Issue with your repository and a short description of desired effect and we will try to help you with the adjustment process!