Skip to content

Commit

Permalink
release 3.0a1
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfalcao committed Jan 21, 2024
1 parent 7c244a4 commit 3087dab
Show file tree
Hide file tree
Showing 44 changed files with 1,549 additions and 839 deletions.
55 changes: 1 addition & 54 deletions COPYING
@@ -1,4 +1,4 @@
Copyright (C) <2010-2022> Gabriel Falcão <gabriel@nacaolivre.org>
Copyright (C) <2010-2024> Gabriel Falcão <gabriel@nacaolivre.org>

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Expand Down Expand Up @@ -621,56 +621,3 @@ Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
3 changes: 1 addition & 2 deletions MANIFEST.in
@@ -1,4 +1,3 @@
include requirements.txt tox.ini
include requirements.txt
include COPYING
include README.rst
recursive-include tests *.py
3 changes: 1 addition & 2 deletions Makefile
Expand Up @@ -60,8 +60,7 @@ test tests:
# runs main command-line tool
run: | $(LIBEXEC_PATH)
$(LIBEXEC_PATH) --reap-warnings tests/crashes
$(LIBEXEC_PATH) --reap-warnings --special-syntax --with-coverage --cover-branches --cover-module=sure.core --cover-module=sure tests/runner
$(LIBEXEC_PATH) --reap-warnings --special-syntax --with-coverage --cover-branches --cover-module=sure --immediate --cover-module=sure --ignore tests/crashes tests
$(LIBEXEC_PATH) --reap-warnings --special-syntax --with-coverage --cover-branches --cover-erase --cover-module=sure --immediate --cover-module=sure --ignore tests/crashes tests

push-release: dist # pushes distribution tarballs of the current version
$(VENV)/bin/twine upload dist/*.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -66,7 +66,7 @@ For More Information:
Documentation
-------------

Available on the `website <https://sure.readthedocs.io/en/latest/>`_.
Available on `sure.readthedocs.io <https://sure.readthedocs.io>`_.

To build locally run:

Expand Down
1 change: 1 addition & 0 deletions development.txt
Expand Up @@ -7,3 +7,4 @@ tox==4.1.1
twine==3.4.1
pytest==7.4.3
pytest-cov==4.1.0
mock
3 changes: 3 additions & 0 deletions docs/source/api-reference.rst
Expand Up @@ -95,7 +95,10 @@ API Reference
------------------------

.. autoclass:: sure.doubles.dummies.Anything
.. autoclass:: sure.doubles.dummies.AnythingOfType
.. autoattribute:: sure.doubles.dummies.anything
.. autofunction:: sure.doubles.dummies.anything_of_type


``sure.doubles.fakes``
----------------------
Expand Down
11 changes: 11 additions & 0 deletions docs/source/assertion-reference.rst
Expand Up @@ -3,6 +3,17 @@
Assertion Builder Reference
===========================

Aliases
-------

.. code:: python
from sure import expects
expects("text").to.equal("text")
expects.that("text").equals("text")
Numerical Equality
------------------

Expand Down
17 changes: 13 additions & 4 deletions docs/source/changelog.rst
Expand Up @@ -4,10 +4,11 @@ Change Log
All notable changes to this project will be documented in this file.
This project adheres to `Semantic Versioning <http://semver.org/>`__.

[v3.0.0]
--------
v3.0.0
------

- Presents better documentation
- Pervasive test-coverage
- Presents better documentation, refactoring and bugfixes
- Drops support to Python 2 obliterates the ``sure.compat`` module
- Introduces the modules:
- :mod:`sure.doubles`
Expand All @@ -34,6 +35,14 @@ This project adheres to `Semantic Versioning <http://semver.org/>`__.
decorator no longer receive a :class:`datetime.datetime` object as
first argument.

- Removes methods from :class:`sure.original.AssertionHelper`:
- :meth:`sure.original.AssertionHelper.differs`
- :meth:`sure.original.AssertionHelper.has`
- :meth:`sure.original.AssertionHelper.is_a`
- :meth:`sure.original.AssertionHelper.every_item_is`
- :meth:`sure.original.AssertionHelper.at`
- :meth:`sure.original.AssertionHelper.like`
- Feel free to open an issue requesting any of those methods to be added back to Sure's codebase.

[v2.0.0]
--------
Expand All @@ -52,7 +61,7 @@ Fixed
Fixed
~~~~~

- Reading the version dinamically was causing import errors that caused
- Reading the version dynamically was causing import errors that caused
error when installing package. Refs #144

`v1.4.7 <https://github.com/gabrielfalcao/sure/compare/1.4.6...v1.4.7>`__
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Expand Up @@ -31,6 +31,7 @@
except ImportError:
sys.path.insert(0, Path(__file__).parent.parent.parent)

from sure import version
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
Expand All @@ -47,8 +48,7 @@
project = "sure"
copyright = "2010-2024, Gabriel Falcão"
author = "Gabriel Falcão"
version = "3.0a0"
release = "3.0a0"
release = version
language = 'en'
exclude_patterns = []
pygments_style = "sphinx"
Expand Down Expand Up @@ -84,6 +84,6 @@
"python": ("https://docs.python.org/3/", None),
"mock": ("https://mock.readthedocs.io/en/latest/", None),
"psycopg2": ("https://www.psycopg.org/docs/", None),
"coverage": ("https://coverage.readthedocs.io/en/7.3.3/", None),
"coverage": ("https://coverage.readthedocs.io/en/7.4.0/", None),
}
pygments_style = 'xcode'
32 changes: 12 additions & 20 deletions setup.py
Expand Up @@ -46,24 +46,13 @@
PROJECT_ROOT = os.path.dirname(__file__)


class VersionFinder(ast.NodeVisitor):
VARIABLE_NAME = "version"

def __init__(self):
self.version = None

def visit_Assign(self, node):
try:
if node.targets[0].id == self.VARIABLE_NAME:
self.version = node.value.s
except Exception:
pass


def read_version():
finder = VersionFinder()
finder.visit(ast.parse(local_text_file("sure", "version.py")))
return finder.version
mod = ast.parse(local_text_file("sure", "version.py"))
exp = mod.body[0]
tgt = exp.targets[0]
cst = exp.value
assert tgt.id == "version"
return cst.value


def local_text_file(*f):
Expand All @@ -86,9 +75,10 @@ def read_readme():
return __doc__


install_requires = ["mock", "coverage==7.4.0", "click==8.1.7", "couleur==0.7.4"]
tests_require = []
install_requires = ["coverage==7.4.0", "click==8.1.7", "couleur==0.7.4"]
tests_require = ["mock"]
version = read_version()
packages = find_packages(exclude=["*tests*", "*examples*"])

if __name__ == "__main__":
setup(
Expand All @@ -102,7 +92,7 @@ def read_readme():
maintainer="Gabriel Falcao",
maintainer_email="gabrielteratos@gmail.com",
include_package_data=True,
packages=find_packages(exclude=["*tests*"]),
packages=packages,
install_requires=install_requires,
long_description_content_type='text/x-rst',
entry_points={
Expand All @@ -118,11 +108,13 @@ def read_readme():
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
Expand Down

0 comments on commit 3087dab

Please sign in to comment.