Skip to content

Commit db7e147

Browse files
committed
Refresh the development enviroment
When using Python 3.9, setting up the development environment croaked. Because "bootstrap.py" was a workaround in pre-pip times, this patch completely gets rid of it. At the same time, it modernizes some more dependency definitions and improves the developer guide.
1 parent 3fa42ca commit db7e147

File tree

9 files changed

+69
-333
lines changed

9 files changed

+69
-333
lines changed

.github/workflows/main.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
os: [ubuntu-latest]
2424
sqla-version: ['1.1.18', '1.2.19', '1.3.23']
2525
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
26+
fail-fast: false
2627

2728
steps:
2829
- uses: actions/checkout@master
@@ -34,7 +35,11 @@ jobs:
3435
- name: Install dependencies
3536
run: |
3637
python -m pip install --upgrade pip
37-
python bootstrap.py
38+
39+
# Workaround needed for Python 3.5
40+
python -m pip install --upgrade "setuptools>=31,<51"
41+
42+
pip install zc.buildout==2.13.4
3843
3944
# replace SQLAlchemy version
4045
sed -ir 's/SQLAlchemy.*/SQLAlchemy = ${{ matrix.sqla-version }}/g' versions.cfg
@@ -48,7 +53,7 @@ jobs:
4853
sed -ir 's/crate_server.*/crate_server = ${{ matrix.crate-version }}/g' versions.cfg
4954
fi
5055
51-
bin/buildout -n -c base.cfg
56+
buildout -n -c base.cfg
5257
5358
- name: Test
5459
run: |

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
.coverage/
1+
.venv*
2+
.coverage
23
.idea/
34
.installed.cfg
45
.tox/

DEVELOP.rst

+32-21
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,57 @@
11
===============
2-
Developer Guide
2+
Developer guide
33
===============
44

55
Setup
66
=====
77

88
This project uses buildout_ to set up the development environment.
99

10-
To start things off, run::
10+
To start things off, create a Python virtualenv and install buildout::
1111

12-
$ python bootstrap.py
12+
python3 -m venv .venv
13+
source .venv/bin/activate
14+
15+
# Workaround for Python 3.9
16+
python -m pip install --upgrade "setuptools>=31,<51"
17+
18+
pip install zc.buildout==2.13.4
1319

1420
Then, run::
1521

16-
$ ./bin/buildout -N
22+
buildout -N
1723

18-
Running Tests
24+
Running tests
1925
=============
2026

21-
The tests are run using the zope.testrunner_::
27+
All tests will be invoked using the Python interpreter that was used when
28+
creating the Python virtualenv. The test runner is zope.testrunner_.
29+
30+
Run all tests::
31+
32+
./bin/test
2233

23-
$ ./bin/test
34+
Run specific tests::
2435

25-
This will run all tests using the Python interpreter that was used to
26-
bootstrap buildout.
36+
# Ignore all tests below src/crate/testing
37+
./bin/test -vvvv --ignore_dir=testing
2738

2839
You can run the tests against multiple Python interpreters with tox_::
2940

30-
$ ./bin/tox
41+
./bin/tox
3142

32-
To do this, you will need ``python2.7``, ``python3.3``, and ``pypy`` on your
33-
``$PATH``.
43+
To do this, you will need the respective Python interpreter versions available
44+
on your ``$PATH``.
3445

35-
To run against a single interpreter, you can also do::
46+
To run against a single interpreter, you can also invoke::
3647

37-
$ ./bin/tox -e py33
48+
./bin/tox -e py37
3849

39-
*Note*: before running tests make sure to stop all CrateDB instances which
40-
listening on the default CrateDB transport port to avoid side effects with the
41-
test layer.
50+
*Note*: before running the tests, make sure to stop all CrateDB instances which
51+
are listening on the default CrateDB transport port to avoid side effects with
52+
the test layer.
4253

43-
Preparing a Release
54+
Preparing a release
4455
===================
4556

4657
To create a new release, you must:
@@ -70,7 +81,7 @@ Next:
7081

7182
- Archive docs for old releases (see section below)
7283

73-
Archiving Docs Versions
84+
Archiving docs versions
7485
-----------------------
7586

7687
Check the `versions hosted on ReadTheDocs`_.
@@ -81,7 +92,7 @@ patch versions for the last two minor releases.
8192
To make changes to the RTD configuration (e.g., to activate or deactivate a
8293
release version), please contact the `@crate/docs`_ team.
8394

84-
Writing Documentation
95+
Writing documentation
8596
=====================
8697

8798
The docs live under the ``docs`` directory.
@@ -90,7 +101,7 @@ The docs are written written with ReStructuredText_ and processed with Sphinx_.
90101

91102
Build the docs by running::
92103

93-
$ bin/sphinx
104+
./bin/sphinx
94105

95106
The output can then be found in the ``out/html`` directory.
96107

LICENSE

-55
Original file line numberDiff line numberDiff line change
@@ -203,61 +203,6 @@
203203
limitations under the License.
204204

205205

206-
===============================================================================
207-
208-
For the `bootstrap.py` file:
209-
210-
Buildout <http://www.buildout.org/>
211-
212-
Copyright (c) 2006 Zope Foundation and Contributors.
213-
All Rights Reserved.
214-
215-
Zope Public License (ZPL) Version 2.1
216-
217-
A copyright notice accompanies this license document that identifies the
218-
copyright holders.
219-
220-
This license has been certified as open source. It has also been designated as
221-
GPL compatible by the Free Software Foundation (FSF).
222-
223-
Redistribution and use in source and binary forms, with or without
224-
modification, are permitted provided that the following conditions are met:
225-
226-
1. Redistributions in source code must retain the accompanying copyright
227-
notice, this list of conditions, and the following disclaimer.
228-
229-
2. Redistributions in binary form must reproduce the accompanying copyright
230-
notice, this list of conditions, and the following disclaimer in the
231-
documentation and/or other materials provided with the distribution.
232-
233-
3. Names of the copyright holders must not be used to endorse or promote
234-
products derived from this software without prior written permission from the
235-
copyright holders.
236-
237-
4. The right to distribute this software or to use it for any purpose does not
238-
give you the right to use Servicemarks (sm) or Trademarks (tm) of the
239-
copyright
240-
holders. Use of them is covered by separate agreement with the copyright
241-
holders.
242-
243-
5. If any files are modified, you must cause the modified files to carry
244-
prominent notices stating that you changed the files and the date of any
245-
change.
246-
247-
Disclaimer
248-
249-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
250-
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251-
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
252-
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
253-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
254-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
255-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
256-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
257-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
258-
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
259-
260-
261206
===============================================================================
262207

263208
For the `docs` directory:

base.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ url = https://cdn.crate.io/downloads/releases/crate-${versions:crate_server}.tar
2525
strip-top-level-dir = true
2626

2727
[test]
28-
relative-paths=true
28+
relative-paths = true
2929
recipe = zc.recipe.testrunner
3030
defaults = ['--auto-color']
3131
eggs = crate [test,sqlalchemy]

0 commit comments

Comments
 (0)