isabelizimm / cookiecutter-custompy Goto Github PK
View Code? Open in Web Editor NEWCustom cookiecutter for python packages
License: MIT License
Custom cookiecutter for python packages
License: MIT License
Is there a need for automatic versioning? If so--bump-version and versioneer are 2 common approaches. It is also possible to use GitHub Actions to package the latest tag (ge
What is tox.ini
?
tldr;
setup.cfg
/setup.py
are for setuptools
, and tox.ini
is for tox
, but uses setuptools
to build the distribution.
Tox, the Python project (not the file), is made to "automate and standardize testing in Python." It creates virtual environments, and installs the configured dependencies for those environments, for the purpose of testing a Python package. A tox.ini
, pyproject.toml
, and setup.cfg
are all ini files.
Questions
Why tox over GitHub Actions? Do we need both? Is everything in tox.ini
covered by setup.cfg
?
Other resources
[1] https://www.integralist.co.uk/posts/toxini/
[2] https://stackoverflow.com/questions/67098213/is-there-a-reason-to-have-both-tox-ini-and-setup-cfg-in-a-python-project
Considerations:
In general, we would like a flexible way to track dependencies that can be used for a multitude of python versions. This system also needs to ensure that all dependencies are compatible and able to be installed seamlessly.
Options
Pipfile
+ Pipfile.lock
A Pipfile can be used with no particular python version. A Pipfile.lock must have a python version specified. Pipfile.lock ensures dependency compatibility and reproducibility. This is generally used in a single project, but not necessarily used in packaging. For this reason, Pipfiles will NOT be used.
requirements.txt
Can have multiple Python versions. Does not guarantee dependency compatibility and reproducibility.
Pandas uses an environment.yml
file that autogenerates a requirements-dev.txt
Scikit-learn uses a _min_dependencies.py
.
Depending on how the package is built and installed, Python will use setup.py or setup.cfg. I found that I was able to move everything into setup.cfg and then just have setup.py use it, via setuptools. This made behavior of the installed package more consistent.
For example, see: posit-dev/py-htmltools@7c9fffb
Most of the packages we create will be released under MIT, so it would be good to use that as the default.
Also, the current LICENSE file has someone's name in it -- probably best to make it so that name is filled in automatically:
Line 1 in f712e4b
TO ADD:
Considerations
In general, we would like a modern but flexible way to set up packages that complies with current PEPs.
Options
setup.py
setup.cfg
Can include most all of what was previously within a setup.py
file.
pyproject.toml PEP 517
This file is needed when using setuptools. The file will expect a [build-system] to store build-related information.
References
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.