-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 09fbfdf
Showing
7 changed files
with
259 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020 Digismoothie s.r.o. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
public-test | ||
=========== | ||
|
||
Sample public project setup. | ||
|
||
Usage | ||
----- | ||
|
||
Add the package to your dependencies. If you're working on a project managed by `poetry <https://python-poetry.org/>`_, use the following:: | ||
|
||
$ poetry add public-test | ||
|
||
If you're working on a project managed by `pipenv <https://pipenv.kennethreitz.org/>`_, use the following:: | ||
|
||
$ pipenv install public-test | ||
|
||
After that, you should be able to import the library in your Python code:: | ||
|
||
from public_test import answer | ||
print(answer) | ||
|
||
Development | ||
----------- | ||
|
||
This library itself is managed by `poetry <https://python-poetry.org/>`_. Read the docs for basic usage. You can run tests like this:: | ||
|
||
$ poetry run pytest | ||
|
||
To release a new version of the library, follow these steps: | ||
|
||
#. Be sure to be on the ``master`` Git branch. | ||
#. Decide whether your changes are `breaking, improvement, or a bug fix <https://semver.org/>`_. Use the poetry's `version command <https://python-poetry.org/docs/cli/#version>`_ to raise the version number. | ||
#. Read the new number from the poetry's output and commit the change with ``git commit -am "release vX.Y.Z"``. | ||
#. Tag the commit with ``git tag vX.Y.Z`` | ||
#. Release a new version by pushing it all to GitHub: ``git push origin master --tags`` | ||
#. The CI builds the package and publishes it to the `PyPI <https://pypi.org/project/public-test/>`_. | ||
|
||
New releases get listed at `tags <https://github.com/digismoothie/django-toolbox/tags>`_. If you like your colleagues, for each release click on *Edit tag* and write a title and description (changelog). |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
__version__ = '0.1.0' | ||
|
||
|
||
answer = 42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[tool.poetry] | ||
name = "public-test" | ||
version = "0.1.0" | ||
description = "Sample public project setup" | ||
authors = [ | ||
"Digismoothie s.r.o. <[email protected]>", | ||
] | ||
license = "MIT" | ||
readme = "README.rst" | ||
repository = "https://github.com/digismoothie/public-test" | ||
include = [ | ||
"LICENSE.txt", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^4.6" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from public_test import __version__, answer | ||
|
||
|
||
def test_version(): | ||
assert __version__ == '0.1.0' | ||
|
||
|
||
def test_answer(): | ||
assert answer == 42 |