Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
z80dev authored Dec 14, 2023
2 parents 5f248ff + 0f52eaa commit 0e56eb9
Show file tree
Hide file tree
Showing 118 changed files with 7,354 additions and 5,923 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/static-analysis.yml

This file was deleted.

48 changes: 38 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ jobs:
matrix:
name-prefix: ['']
os: [ubuntu-latest]
python: [3.7, 3.8, 3.9, '3.10', pypy-3.8]
python: [3.8, 3.9, '3.10', 3.11, 3.12, pypy-3.10, pyodide]
include:
# To keep the overall number of runs low, we test Windows
# To keep the overall number of runs low, we test Windows and MacOS
# only on the latest CPython.
- name-prefix: 'win-'
os: windows-latest
python: '3.10'
python: 3.11
- name-prefix: 'mac-'
os: macos-latest
python: 3.11

name: ${{ format('{0}{1}', matrix.name-prefix, matrix.python) }}
runs-on: ${{ matrix.os }}
Expand All @@ -28,12 +31,37 @@ jobs:

steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- if: ${{ matrix.python != 'pyodide' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- run: pip install . && rm -r hy
# We want to be sure we're testing the installed version,
# instead of running from the source tree.
- run: pip install pytest
- run: pytest
- if: ${{ matrix.python == 'pyodide' }}
uses: actions/setup-python@v4
with:
python-version: 3.11
- if: ${{ matrix.python == 'pyodide' }}
uses: actions/setup-node@v3
- name: Install
shell: bash
run: |
if [[ ${{ matrix.python }} = pyodide ]] ; then
pip install 'pydantic < 2'
# https://github.com/pyodide/pyodide/pull/3971
npm install pyodide
pip install pyodide-build
pyodide venv .venv-pyodide
source .venv-pyodide/bin/activate
fi
pip install .
rm -r hy
# We want to be sure we're testing the installed version,
# instead of running from the source tree.
pip install pytest
- name: Test
shell: bash
run: |
if [[ ${{ matrix.python }} = pyodide ]] ; then
source .venv-pyodide/bin/activate
fi
python -m pytest tests
16 changes: 0 additions & 16 deletions .pre-commit-config.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
builder: html
configuration: docs/conf.py

python:
install:
- method: pip
path: .
- requirements: requirements-dev.txt
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* Matt Fenwick <[email protected]>
* Sean B. Palmer <[email protected]>
* Thom Neale <[email protected]>
* Tuukka Turto <tuukka[email protected]>
* Tuula Turto <tuula[email protected]>
* Vasudev Kamath <[email protected]>
* Yuval Langer <[email protected]>
* Fatih Kadir Akın <[email protected]>
Expand Down Expand Up @@ -109,3 +109,4 @@
* Dmitry Ivanov <[email protected]>
* Andrey Vlasovskikh <[email protected]>
* Joseph LaFreniere <[email protected]>
* Daniel Tan <[email protected]>
21 changes: 9 additions & 12 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ helps in making Hy better. Potential contributions include:
- Requesting features.
- Adding features.
- Writing tests for outstanding bugs or untested features.

- You can mark tests that Hy can't pass yet as xfail_.

- Cleaning up the code.
- Improving the documentation.
- Answering questions on `the Github Discussions page`_ or
Expand Down Expand Up @@ -67,18 +69,10 @@ The first line of a commit message should describe the overall change in 50
characters or less. If you wish to add more information, separate it from the
first line with a blank line.

Code formatting
---------------

All Python source code (``.py``) should be formatted with ``black`` and ``isort``.
This can be accomplished by running ``black hy tests`` and ``isort hy tests`` from the root of this repository.
Formatting of Python files is checked automatically via GitHub Actions for all pull requests.
No PR may be merged if it fails that check.

Testing
-------

Tests can be run by executing `pytest` in the root of this repository.
Tests can be run by executing ``pytest`` in the root of this repository.

New features and bug fixes should be tested. If you've caused an
xfail_ test to start passing, remove the xfail mark. If you're
Expand All @@ -89,6 +83,11 @@ No PR may be merged if it causes any tests to fail.
The byte-compiled versions of the test files can be purged using ``git clean -dfx tests/``.
If you want to run the tests while skipping the slow ones in ``test_bin.py``, use ``pytest --ignore=tests/test_bin.py``.

Documentation
-------------

Generally, new features deserve coverage in the manual, either by editing the manual files directly or by changing docstrings that get included in the manual. To render the manual, install its dependencies with ``pip install -r requirements-dev.txt`` and then use the command ``cd docs; sphinx-build . _build -b html``.

NEWS and AUTHORS
----------------

Expand Down Expand Up @@ -120,9 +119,7 @@ There are two situations in which a PR is allowed to be merged:
author. Changes to the documentation, or trivial changes to code, need only
**one** approving member.
2. When the PR is at least **three days** old and **no** member of the Hy core
team has expressed disapproval of the PR in its current state. (Exception: a
PR to create a new release is not eligible to be merged under this criterion,
only the first one.)
team has expressed disapproval of the PR in its current state.

Anybody on the Hy core team may perform the merge. Merging should create a merge
commit (don't squash unnecessarily, because that would remove separation between
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2022 the authors.
Copyright 2023 the authors.
Portions of setup.py, copyright 2016 Jason R Coombs <[email protected]>.

Permission is hereby granted, free of charge, to any person obtaining a
Expand Down
Loading

0 comments on commit 0e56eb9

Please sign in to comment.