@@ -12,19 +12,19 @@ Make the changes and create the commits in your local machine. Then push those
1212changes to your fork. Then click on the pull request icon on github and create
1313a new pull request. Add a description about the change and send it along. I
1414promise to review the pull request in a reasonable window of time and get back
15- to you.
15+ to you.
1616
1717In order to keep your fork up to date with any changes from mainline, add a new
1818git remote to your local copy called 'upstream' and point it to the main
1919``pgspecial `` repo.
2020
21- ::
21+ ::
2222
2323 $ git remote add upstream git@github.com:dbcli/pgspecial.git
2424
2525Once the 'upstream' end point is added you can then periodically do a ``git
2626pull upstream master `` to update your local copy and then do a ``git push
27- origin master `` to keep your own fork up to date.
27+ origin master `` to keep your own fork up to date.
2828
2929Local Setup
3030-----------
@@ -34,28 +34,24 @@ The installation instructions in the README file are intended for users of
3434a slightly different way so you can see the effects of your changes right away
3535without having to go through the install cycle every time you change the code.
3636
37- It is highly recommended to use virtualenv for development. If you don't know
38- what a virtualenv is, this `guide
39- <http://docs.python-guide.org/en/latest/dev/virtualenvs/#virtual-environments> `_
40- will help you get started.
41-
42- Create a virtualenv (let's call it ``pgspecial-dev ``). Activate it:
37+ Set up [uv](https://docs.astral.sh/uv/getting-started/installation/) for development:
4338
4439::
4540
46- virtualenv ./pgspecial-dev
41+ cd pgspecial
42+ uv venv
4743 source ./pgspecial-dev/bin/activate
4844
4945Once the virtualenv is activated, `cd ` into the local clone of pgspecial folder
5046and install pgspecial using pip as follows:
5147
5248::
5349
54- $ pip install --editable .
50+ $ uv pip install --editable .[dev]
5551
5652 or
5753
58- $ pip install -e .
54+ $ pip install -e .[dev]
5955
6056This will install the necessary dependencies as well as install pgspecial from
6157the working folder into the virtualenv. By installing it using `pip install -e `
@@ -111,41 +107,32 @@ First, install the requirements for testing:
111107
112108::
113109
114- $ pip install -r requirements-dev.txt
110+ uv pip install -e .[dev]
115111
116112After that, tests can be run with:
117113
118114::
119115
120- $ py.test
116+ pytest
121117
122118Pytest configuration can be found in the ``tool.pytest.ini_options `` table of the ``pyproject.toml `` file.
123119
124120Enforcing the code style (linting)
125- ------------------------------
121+ ----------------------------------
126122
127123When you submit a PR, the changeset is checked for pep8 compliance using
128- `black <https://github.com/psf/black >`_. If you see a build failing because
129- of these checks, install ``black `` and apply style fixes:
124+ `ruff <https://docs.astral.sh/ruff/ >`_. You can run the linter and formatter locally:
130125
131126::
132127
133- $ pip install black
134- $ black .
128+ $ tox -e style
135129
136130Then commit and push the fixes.
137131
138- To enforce ``black `` applied on every commit, we also suggest installing ``pre-commit `` and
132+ To enforce ``ruff `` applied on every commit, we also suggest installing ``pre-commit `` and
139133using the ``pre-commit `` hooks available in this repo:
140134
141135::
142136
143137 $ pip install pre-commit
144138 $ pre-commit install
145-
146- Git blame
147- ---------
148-
149- Use ``git blame my_file.py --ignore-revs-file .git-blame-ignore-revs `` to exclude irrelevant commits
150- (specifically Black) from ``git blame ``. For more information,
151- see `here <https://github.com/psf/black#migrating-your-code-style-without-ruining-git-blame >`_.
0 commit comments