Skip to content

Commit

Permalink
Converted README to MarkDown to fix badge formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed May 4, 2024
1 parent 22e1b3f commit e3a30eb
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 101 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ pytest_cov_opts := --cov $(package_name) $(coverage_report) --cov-config .covera
# Wildcards can be used directly (i.e. without wildcard function).
dist_included_files := \
LICENSE \
README.rst \
README.md \
INSTALL.md \
requirements.txt \
test-requirements.txt \
Expand Down
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# nocaselist - A case-insensitive list for Python

[![Version on Pypi](https://img.shields.io/pypi/v/nocaselist.svg)](https://pypi.python.org/pypi/nocaselist/)
[![Test status (master)](https://github.com/pywbem/nocaselist/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/pywbem/nocaselist/actions/workflows/test.yml?query=branch%3Amaster)
[![Docs status (master)](https://readthedocs.org/projects/nocaselist/badge/?version=latest)](https://readthedocs.org/projects/nocaselist/builds/)
[![Test coverage (master)](https://coveralls.io/repos/github/pywbem/nocaselist/badge.svg?branch=master)](https://coveralls.io/github/pywbem/nocaselist?branch=master)

# Overview

Class
[NocaseList](https://nocaselist.readthedocs.io/en/stable/reference.html#nocaselist.NocaseList)
is a case-insensitive list that preserves the lexical case of its items.

Example:

```bash
$ python
>>> from nocaselist import NocaseList

>>> list1 = NocaseList(['Alpha', 'Beta'])

>>> print(list1) # Any access is case-preserving
['Alpha', 'Beta']

>>> 'ALPHA' in list1 # Any lookup or comparison is case-insensitive
True
```

The
[NocaseList](https://nocaselist.readthedocs.io/en/stable/reference.html#nocaselist.NocaseList)
class supports the functionality of the built-in
[list class of Python 3.8](https://docs.python.org/3.8/library/stdtypes.html#list)
on all Python versions it supports (except for being case-insensitive, of
course).

The case-insensitivity is achieved by matching any key values as their
casefolded values. By default, the casefolding is performed with
[str.casefold()](https://docs.python.org/3/library/stdtypes.html#str.casefold)
for unicode string keys and with
[bytes.lower()](https://docs.python.org/3/library/stdtypes.html#bytes.lower)
for byte string keys. The default casefolding can be overridden with a
user-defined casefold method.

# Installation

To install the latest released version of the nocaselist package into
your active Python environment:

```bash
$ pip install nocaselist
```

The nocaselist package has no prerequisite Python packages.

For more details and alternative ways to install, see
[Installation](https://nocaselist.readthedocs.io/en/stable/intro.html#installation).

# Documentation

- [Documentation](https://nocaselist.readthedocs.io/en/stable/)

# Change History

- [Change history](https://nocaselist.readthedocs.io/en/stable/changes.html)

# Contributing

For information on how to contribute to the nocaselist project, see
[Contributing](https://nocaselist.readthedocs.io/en/stable/development.html#contributing).

# License

The nocaselist project is provided under the [Apache Software License
2.0](https://raw.githubusercontent.com/pywbem/nocaselist/master/LICENSE).
96 changes: 0 additions & 96 deletions README.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def get_version(version_file):

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["README.rst", "README_PYPI.rst",
exclude_patterns = ["README.md",
".tox", ".git", "design", "tests", "dist",
"build_doc"]

Expand Down
2 changes: 1 addition & 1 deletion docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ particular version of the package into the current directory and unpack it:
-rw-r--r-- 1 johndoe staff 26436 May 26 06:45 LICENSE.txt
-rw-r--r-- 1 johndoe staff 367 Jul 3 07:54 MANIFEST.in
-rw-r--r-- 1 johndoe staff 3451 Jul 3 07:55 PKG-INFO
-rw-r--r-- 1 johndoe staff 7665 Jul 2 23:20 README.rst
-rw-r--r-- 1 johndoe staff 7665 Jul 2 23:20 README.md
drwxr-xr-x 29 johndoe staff 928 Jul 3 07:55 nocaselist
drwxr-xr-x 8 johndoe staff 256 Jul 3 07:55 nocaselist.egg-info
-rw-r--r-- 1 johndoe staff 1067 Jun 29 22:31 requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion packaging/fedora/python-nocaselist.spec
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ BuildRequires: python%{python3_pkgversion}-six

%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE
%doc README.rst
%doc README.md
%{python3_sitelib}/%{srcname}*.egg-info/
%{python3_sitelib}/%{srcname}/

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class test(PytestCommand):
'test': test,
},
description="A case-insensitive list for Python",
long_description=read_file('README.rst'),
long_description=read_file('README.md'),
long_description_content_type='text/x-rst',
license="Apache Software License 2.0",
author="Andreas Maier",
Expand Down

0 comments on commit e3a30eb

Please sign in to comment.