diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 3597ea8d1..8b9677709 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,15 +1,18 @@ - +If you're looking for help with your code, consider posting a question here: +- GitHub Discussions: https://github.com/explosion/spaCy/discussions +- Stack Overflow: http://stackoverflow.com/questions/tagged/spacy +--> ## Your Environment - -* Operating System: -* Python Version Used: -* spaCy Version Used: -* Environment Information: + +- Operating System: +- Python Version Used: +- spaCy Version Used: +- Environment Information: diff --git a/.github/ISSUE_TEMPLATE/04_docs.md b/.github/ISSUE_TEMPLATE/03_docs.md similarity index 100% rename from .github/ISSUE_TEMPLATE/04_docs.md rename to .github/ISSUE_TEMPLATE/03_docs.md diff --git a/.github/ISSUE_TEMPLATE/03_request.md b/.github/ISSUE_TEMPLATE/03_request.md deleted file mode 100644 index 0b64aadd2..000000000 --- a/.github/ISSUE_TEMPLATE/03_request.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: "\U0001F381 Feature Request" -about: Do you have an idea for an improvement, a new feature or a plugin? - ---- - -## Feature description - - -## Could the feature be a [custom component](https://spacy.io/usage/processing-pipelines#custom-components) or [spaCy plugin](https://spacy.io/universe)? -If so, we will tag it as [`project idea`](https://github.com/explosion/spaCy/labels/project%20idea) so other users can take it on. diff --git a/.github/ISSUE_TEMPLATE/04_other.md b/.github/ISSUE_TEMPLATE/04_other.md new file mode 100644 index 000000000..4c6ada4cc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/04_other.md @@ -0,0 +1,19 @@ +--- +name: "\U0001F4AC Anything else?" +about: For feature and project ideas, general usage questions or help with your code, please post on the GitHub Discussions board instead. +--- + + + +## Your Environment + + + +- Operating System: +- Python Version Used: +- spaCy Version Used: +- Environment Information: diff --git a/.github/ISSUE_TEMPLATE/05_other.md b/.github/ISSUE_TEMPLATE/05_other.md deleted file mode 100644 index 9aa04d161..000000000 --- a/.github/ISSUE_TEMPLATE/05_other.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: "\U0001F4AC Anything else?" -about: For general usage questions or help with your code, please consider - posting on Stack Overflow instead. - ---- - - - -## Your Environment - -* Operating System: -* Python Version Used: -* spaCy Version Used: -* Environment Information: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 70324d8fd..45ce9af11 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,11 +26,11 @@ also often include helpful tips and solutions to common problems. You should also check the [troubleshooting guide](https://spacy.io/usage/#troubleshooting) to see if your problem is already listed there. -If you're looking for help with your code, consider posting a question on -[Stack Overflow](http://stackoverflow.com/questions/tagged/spacy) instead. If you -tag it `spacy` and `python`, more people will see it and hopefully be able to -help. Please understand that we won't be able to provide individual support via -email. We also believe that help is much more valuable if it's **shared publicly**, +If you're looking for help with your code, consider posting a question on the +[GitHub Discussions board](https://github.com/explosion/spaCy/discussions) or +[Stack Overflow](http://stackoverflow.com/questions/tagged/spacy). Please +understand that we won't be able to provide individual support via email. We +also believe that help is much more valuable if it's **shared publicly**, so that more people can benefit from it. ### Submitting issues diff --git a/README.md b/README.md index 55e4c6512..e84d799ae 100644 --- a/README.md +++ b/README.md @@ -60,13 +60,15 @@ be able to provide individual support via email. We also believe that help is much more valuable if it's shared publicly, so that more people can benefit from it. -| Type | Platforms | -| ----------------------- | ---------------------- | -| ๐Ÿšจ **Bug Reports** | [GitHub Issue Tracker] | -| ๐ŸŽ **Feature Requests** | [GitHub Issue Tracker] | -| ๐Ÿ‘ฉโ€๐Ÿ’ป **Usage Questions** | [Stack Overflow] | +| Type | Platforms | +| ------------------------------- | --------------------------------------- | +| ๐Ÿšจ **Bug Reports** | [GitHub Issue Tracker] | +| ๐ŸŽ **Feature Requests & Ideas** | [GitHub Discussions] | +| ๐Ÿ‘ฉโ€๐Ÿ’ป **Usage Questions** | [GitHub Discussions] ยท [Stack Overflow] | +| ๐Ÿ—ฏ **General Discussion** | [GitHub Discussions] | [github issue tracker]: https://github.com/explosion/spaCy/issues +[github discussions]: https://github.com/explosion/spaCy/discussions [stack overflow]: https://stackoverflow.com/questions/tagged/spacy ## Features @@ -126,6 +128,7 @@ environment to avoid modifying system state: ```bash python -m venv .env source .env/bin/activate +pip install -U pip setuptools wheel pip install spacy ``` @@ -224,16 +227,28 @@ do that depends on your system. See notes on Ubuntu, OS X and Windows for details. ```bash -# make sure you are using the latest pip -python -m pip install -U pip git clone https://github.com/explosion/spaCy cd spaCy python -m venv .env source .env/bin/activate -export PYTHONPATH=`pwd` + +# make sure you are using the latest pip +python -m pip install -U pip setuptools wheel + +pip install . +``` + +To install with extras: + +```bash +pip install .[lookups,cuda102] +``` + +To install all dependencies required for development: + +```bash pip install -r requirements.txt -python setup.py build_ext --inplace ``` Compared to regular install via pip, [requirements.txt](requirements.txt) @@ -271,14 +286,13 @@ tests, you'll usually want to clone the repository and build spaCy from source. This will also install the required development dependencies and test utilities defined in the `requirements.txt`. -Alternatively, you can find out where spaCy is installed and run `pytest` on -that directory. Don't forget to also install the test utilities via spaCy's +Alternatively, you can run `pytest` on the tests from within the installed +`spacy` package. Don't forget to also install the test utilities via spaCy's `requirements.txt`: ```bash -python -c "import os; import spacy; print(os.path.dirname(spacy.__file__))" -pip install -r path/to/requirements.txt -python -m pytest +pip install -r requirements.txt +python -m pytest --pyargs spacy ``` See [the documentation](https://spacy.io/usage#tests) for more details and diff --git a/setup.cfg b/setup.cfg index 708af89d4..a0e942be8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -88,6 +88,8 @@ cuda102 = cupy-cuda102>=5.0.0b4,<9.0.0 cuda110 = cupy-cuda110>=5.0.0b4,<9.0.0 +cuda111 = + cupy-cuda111>=5.0.0b4,<9.0.0 # Language tokenizers with external dependencies ja = sudachipy>=0.4.9 diff --git a/website/UNIVERSE.md b/website/UNIVERSE.md index 2a83b2983..d37c4561a 100644 --- a/website/UNIVERSE.md +++ b/website/UNIVERSE.md @@ -11,8 +11,8 @@ suggest it by submitting a pull request to this repository. The Universe database is open-source and collected in a simple JSON file. Looking for inspiration for your own spaCy plugin or extension? Check out the -[`project idea`](https://github.com/explosion/spaCy/labels/project%20idea) label -on the issue tracker. +[`project ideas`](https://github.com/explosion/spaCy/discussions?discussions_q=category%3A%22New+Features+%26+Project+Ideas%22) +discussion forum. ## Checklist diff --git a/website/docs/usage/index.md b/website/docs/usage/index.md index 60d893d84..2df8cdaa0 100644 --- a/website/docs/usage/index.md +++ b/website/docs/usage/index.md @@ -129,10 +129,11 @@ grateful to use the work of Chainer's [CuPy](https://cupy.chainer.org) module, which provides a numpy-compatible interface for GPU arrays. spaCy can be installed on GPU by specifying `spacy[cuda]`, `spacy[cuda90]`, -`spacy[cuda91]`, `spacy[cuda92]`, `spacy[cuda100]`, `spacy[cuda101]` or -`spacy[cuda102]`. If you know your cuda version, using the more explicit -specifier allows cupy to be installed via wheel, saving some compilation time. -The specifiers should install [`cupy`](https://cupy.chainer.org). +`spacy[cuda91]`, `spacy[cuda92]`, `spacy[cuda100]`, `spacy[cuda101]`, +`spacy[cuda102]`, `spacy[cuda110]` or `spacy[cuda111]`. If you know your cuda +version, using the more explicit specifier allows cupy to be installed via +wheel, saving some compilation time. The specifiers should install +[`cupy`](https://cupy.chainer.org). ```bash $ pip install -U %%SPACY_PKG_NAME[cuda92]%%SPACY_PKG_FLAGS @@ -263,6 +264,36 @@ You can configure the build process with the following environment variables: | `PYVER` | The Python version to build against. This version needs to be available on your build and runtime machines. Defaults to `3.6`. | | `WHEELHOUSE` | Directory to store the wheel files during compilation. Defaults to `./wheelhouse`. | +#### Additional options for developers {#source-developers} + +Some additional options may be useful for spaCy developers who are editing the +source code and recompiling frequently. + +- Install in editable mode. Changes to `.py` files will be reflected as soon as + the files are saved, but edits to Cython files (`.pxd`, `.pyx`) will require + the `pip install` or `python setup.py build_ext` command below to be run + again. Before installing in editable mode, be sure you have removed any + previous installs with `pip uninstall spacy`, which you may need to run + multiple times to remove all traces of earlier installs. + + ```diff + pip install -U pip setuptools wheel + - pip install . + + pip install -r requirements.txt + + pip install --no-build-isolation --editable . + ``` + +- Build in parallel using `N` CPUs to speed up compilation and then install in + editable mode: + + ```diff + pip install -U pip setuptools wheel + - pip install . + + pip install -r requirements.txt + + python setup.py build_ext --inplace -j N + + python setup.py develop + ``` + ### Run tests {#run-tests} spaCy comes with an [extensive test suite](%%GITHUB_SPACY/spacy/tests). In order @@ -277,7 +308,7 @@ that directory. Don't forget to also install the test utilities via spaCy's ```bash $ python -c "import os; import spacy; print(os.path.dirname(spacy.__file__))" $ pip install -r path/to/requirements.txt -$ python -m pytest [spacy directory] +$ python -m pytest --pyargs %%SPACY_PKG_NAME ``` Calling `pytest` on the spaCy directory will run only the basic tests. The flag @@ -285,8 +316,8 @@ Calling `pytest` on the spaCy directory will run only the basic tests. The flag ```bash $ python -m pip install -U pytest # update pytest -$ python -m pytest [spacy directory] # basic tests -$ python -m pytest [spacy directory] --slow # basic and slow tests +$ python -m pytest --pyargs %%SPACY_PKG_NAME # basic tests +$ python -m pytest --pyargs %%SPACY_PKG_NAME --slow # basic and slow tests ``` ## Troubleshooting guide {#troubleshooting} diff --git a/website/docs/usage/spacy-101.md b/website/docs/usage/spacy-101.md index c315c5f76..52daf33b8 100644 --- a/website/docs/usage/spacy-101.md +++ b/website/docs/usage/spacy-101.md @@ -513,9 +513,10 @@ via the following platforms: questions** and everything related to problems with your specific code. The Stack Overflow community is much larger than ours, so if your problem can be solved by others, you'll receive help much quicker. -- [Gitter chat](https://gitter.im/explosion/spaCy): **General discussion** about - spaCy, meeting other community members and exchanging **tips, tricks and best - practices**. +- [GitHub discussions](https://github.com/explosion/spaCy/discussions): **General + discussion**, **project ideas** and **usage questions**. Meet other community + members to get help with a specific code implementation, discuss ideas for new + projects/plugins, support more languages, and share best practices. - [GitHub issue tracker](https://github.com/explosion/spaCy/issues): **Bug reports** and **improvement suggestions**, i.e. everything that's likely spaCy's fault. This also includes problems with the trained pipelines beyond diff --git a/website/meta/site.json b/website/meta/site.json index 1a96ca660..fcff96b56 100644 --- a/website/meta/site.json +++ b/website/meta/site.json @@ -56,6 +56,10 @@ "label": "Community", "items": [ { "text": "Universe", "url": "/universe" }, + { + "text": "GitHub Discussions", + "url": "https://github.com/explosion/spaCy/discussions" + }, { "text": "Issue Tracker", "url": "https://github.com/explosion/spaCy/issues" }, { "text": "Stack Overflow",