Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to entrypoint plugin style + modernize #25

Merged
merged 6 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .bumpversion.cfg

This file was deleted.

4 changes: 1 addition & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
include NEWS
include COPYING
include README.rst
include *requirements.txt
include README.md

recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
57 changes: 28 additions & 29 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Changelog
=========
## Changelog

Ticket numbers in changelog entries can be looked up by visiting
``https://github.com/dgw/sopel-wolfram/issue/<number>``
`https://github.com/dgw/sopel-wolfram/issue/<number>`

sopel-wolfram v0.5.0 "ALIVE"
----------------------------

### 0.5.0 "ALIVE"

That's "ALIVE" as in "This project isn't DEAD" (despite the last release being over two years old).

Expand All @@ -20,59 +19,59 @@ Meta:

* No more ZIP releases; PyPI only allows one file type now (#22)

sopel-wolfram v0.4.1 "Kibou ni tsuite"
--------------------------------------

### 0.4.1 "Kibou ni tsuite"

This release named in memory of LuckyNumber78, who changed lives every day simply
by being her excitable, fun-loving self. She is missed by many.

Fixed:

* ``max_public`` setting could cause errors because it was treated as a string (#21)
* `max_public` setting could cause errors because it was treated as a string (#21)


sopel-wolfram v0.4.0 "Mirai no kajitsu"
---------------------------------------
### 0.4.0 "Mirai no kajitsu"

Added:

* Support for wolframalpha 3.0 with transitional fallback to 2.4 (#11, #19; see README notes)
* New configuration option ``max_public``, a number defining the maximum number of lines
* New configuration option `max_public`, a number defining the maximum number of lines
that can be sent without using NOTICEs. Default: 5 (#13)
* New configuration option ``units``, to specify whether the API should return
``metric`` (default) or ``nonmetric`` measurements (#18; see #16)
* New configuration option `units`, to specify whether the API should return
`metric` (default) or `nonmetric` measurements (#18; see #16)

Updated:

* Threshold for using NOTICEs is now 5 lines, up from the previous default of 3

Fixed:

* Non-ASCII text in output is no longer ``\:encoded`` (#15)
* Non-ASCII text in output is no longer `\:encoded` (#15)

sopel-wolfram v0.3.1 "Nusumareta kuchibiru"
-------------------------------------------

### 0.3.1 "Nusumareta kuchibiru"

Updates:

* Unicode-encode query to avoid UnicodeEncodeError on non-ASCII characters (#10)

sopel-wolfram v0.3.0 "So long!"
-------------------------------

### 0.3.0 "So long!"

Updates:

* Results longer than 3 lines will be sent via NOTICE instead of flooding channels (#8)

sopel-wolfram v0.2.1 "Mae shika mukanee"
----------------------------------------

### 0.2.1 "Mae shika mukanee"

Updates:

* Output now split into multiple messages when line breaks are present (#4)
* Tell pip we do not want wolframalpha 3.0 yet (#6)

sopel-wolfram v0.2.0 "Miraibashi"
---------------------------------

### 0.2.0 "Miraibashi"

Updates:

Expand All @@ -84,8 +83,8 @@ Meta:
* Cleanup: PEP8 & unused imports
* Refactor to make future addition of integration tests easier

sopel-wolfram v0.1.2 "Switch"
-----------------------------

### 0.1.2 "Switch"

Updates:

Expand All @@ -98,20 +97,20 @@ Meta:

* README now includes installation instructions and where to get help/report bugs

sopel-wolfram v0.1.1 "Already"
------------------------------

### 0.1.1 "Already"

Updates:

* Now outputs error if app_id is missing (#1)
* Now outputs error if `app_id` is missing (#1)

Meta:

* README reformatted (thanks @\ `maxpowa <https://github.com/maxpowa>`_)
* README reformatted (thanks @[maxpowa](https://github.com/maxpowa))
* Begin maintaining version history in NEWS file


sopel-wolfram v0.1.0 "Beginner"
### 0.1.0 "Beginner"
-------------------------------

* Initial release
Expand Down
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# sopel-wolfram

Wolfram|Alpha plugin for the Sopel IRC bot framework

## Installing

Releases are hosted on PyPI, so after installing Sopel, all you need is `pip`:

```shell
$ pip install sopel-wolfram
```

### Requirements

* Sopel 8.x
* wolframalpha 5.x

You will also need a Wolfram|Alpha App ID; see details below in the
"Configuring" section.


## Configuring

The easiest way to configure `sopel-wolfram` is via Sopel's
configuration wizard—simply run `sopel-plugins configure wolfram`
and enter the values for which it prompts you.

However, you can manually add the following section to your Sopel bot's
configuration file if desired:

```ini
[wolfram]
app_id = yourappidgoeshere
```

The `app_id` setting is required, and you will need to get your own App ID from
Wolfram|Alpha at https://developer.wolframalpha.com/

Optional settings:

* `max_public`: the number of lines over which results will be sent in NOTICE
instead of to the channel (default: 5)
* `units`: measurement system displayed in results, either `metric` (the
default) or `nonmetric`


## Example usage

```
<User> .wa 2+2
<Sopel> [W|A] 2+2 = 4

<User> .wa python language release date
<Sopel> [W|A] Python | date introduced = 1991

<User> .wa airspeed velocity of an unladen swallow
<Sopel> [W|A] estimated average cruising airspeed of an unladen European
swallow = 25 mph (miles per hour)(asked, but not answered, about a
general swallow in the 1975 film Monty Python and the Holy Grail)
```
95 changes: 0 additions & 95 deletions README.rst

This file was deleted.

55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[build-system]
requires = ["setuptools>=63.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
platforms = ["Linux x86, x86-64"]

[tool.setuptools.packages.find]
include = ["sopel_wolfram", "sopel_wolfram.*"]
namespaces = false

[tool.setuptools.dynamic]
readme = { file=["README.md", "NEWS"], content-type="text/markdown" }

[project]
name = "sopel-wolfram"
version = "0.6.0.dev0"
description = "Wolfram|Alpha plugin for the Sopel IRC bot framework"

authors = [
{ name="Max Gurela", email="maxpowa1@gmail.com" },
]
maintainers = [
{ name="dgw", email="dgw@technobabbl.es" },
]

license = { text="EFL-2.0" }
dynamic = ["readme"]

classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: Eiffel Forum License (EFL)",
"License :: OSI Approved :: Eiffel Forum License",
"Topic :: Communications :: Chat :: Internet Relay Chat",
]
keywords = [
"sopel",
"plugin",
"bot",
"irc",
]

requires-python = ">=3.8, <4"
dependencies = [
"sopel~=8.0",
"wolframalpha~=5.0",
]

[project.urls]
"Homepage" = "https://github.com/dgw/sopel-wolfram"
"Bug Tracker" = "https://github.com/dgw/sopel-wolfram/issues"

[project.entry-points."sopel.plugins"]
"wolfram" = "sopel_wolfram.plugin"
Loading