diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 820afc3f..41ce2611 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: - name: Setup dependencies run: | - uv pip install --system --break-system-packages -r ./.requirements/${{ matrix.python-version }}-${{ runner.os }}.txt - uv pip install --system --break-system-packages pytest pytest-md pytest-emoji + uv export --resolution ${{ matrix.resolution }} > requirements.txt + uv pip install --system --break-system-packages -r requirements.txt - name: Run pytest uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507 # v2.2.0 @@ -32,3 +32,4 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] python-version: [3.12] + resolution: [highest, lowest-direct] diff --git a/.requirements/3.12-Linux.txt b/.requirements/3.12-Linux.txt deleted file mode 100644 index 21d8888f..00000000 --- a/.requirements/3.12-Linux.txt +++ /dev/null @@ -1,2 +0,0 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile pyproject.toml --generate-hashes --python-version 3.12 --python-platform linux --output-file .requirements/3.12-Linux.txt diff --git a/.requirements/3.12-Windows.txt b/.requirements/3.12-Windows.txt deleted file mode 100644 index b913d37d..00000000 --- a/.requirements/3.12-Windows.txt +++ /dev/null @@ -1,2 +0,0 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile pyproject.toml --generate-hashes --python-version 3.12 --python-platform windows --output-file .requirements/3.12-Windows.txt diff --git a/.requirements/3.12-macOS.txt b/.requirements/3.12-macOS.txt deleted file mode 100644 index bbf5adb8..00000000 --- a/.requirements/3.12-macOS.txt +++ /dev/null @@ -1,2 +0,0 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile pyproject.toml --generate-hashes --python-version 3.12 --python-platform macos --output-file .requirements/3.12-macOS.txt diff --git a/Makefile b/Makefile deleted file mode 100644 index e411a935..00000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY requirements: -requirements: - uv pip compile "pyproject.toml" --quiet --generate-hashes --python-version 3.12 --python-platform linux --output-file .requirements/3.12-Linux.txt - uv pip compile "pyproject.toml" --quiet --generate-hashes --python-version 3.12 --python-platform macos --output-file .requirements/3.12-macOS.txt - uv pip compile "pyproject.toml" --quiet --generate-hashes --python-version 3.12 --python-platform windows --output-file .requirements/3.12-Windows.txt \ No newline at end of file diff --git a/doc/philosophy/introspection.md b/doc/philosophy/introspection.md index 0ba391bb..efcabb60 100644 --- a/doc/philosophy/introspection.md +++ b/doc/philosophy/introspection.md @@ -26,11 +26,8 @@ necessarily listed chronologically): - Created a develop branch. - Set up sensible rulesets for branches. - Created a template for GitHub issues that are development tasks. -- Created a Makefile. -- Created a `make requirements` command to make platform-specific requirements files. - Ran `uv init --name usethis`. - Ran `uv python pin 3.12.4`. -- Created a `.requirements` directory with Python version and OS specific files. ## Add GitHub Actions CI @@ -64,8 +61,7 @@ on: - Created a tests folder. - Added a trivial test module `test_nothing.py`. - Add a trivial test `test_pass` to the test module. -- Add step to CI to install pytest -- Add step to CI to install pytest-md and pytest-emoji (used by Action). +- Add pytest, pytest-md and pytest-emoji as dev deependencies. - Confirm pytest is working with `pytest tests` in the CLI. - Add to set up pytest in CI, using the correct CLI args to pytest. diff --git a/pyproject.toml b/pyproject.toml index 4428059d..bdd2b0bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,4 +11,8 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.uv] -dev-dependencies = ["pytest>=8.3.2"] +dev-dependencies = [ + "pytest>=8.3.2", + "pytest-md>=0.2.0", + "pytest-emoji>=0.2.0", +] diff --git a/uv.lock b/uv.lock index 4187c477..74a71a4e 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,8 @@ version = 1 -requires-python = ">=3.11" +requires-python = ">=3.12" + +[options] +resolution-mode = "lowest-direct" [[package]] name = "colorama" @@ -53,14 +56,46 @@ wheels = [ ] [[package]] -name = "usethis" -version = "0.1.0" -source = { editable = "." } +name = "pytest-emoji" +version = "0.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/88/4d/d489f939f0717a034cea7955d36bc2a7a5ba1b263871e63ad8cb16d47555/pytest-emoji-0.2.0.tar.gz", hash = "sha256:e1bd4790d87649c2d09c272c88bdfc4d37c1cc7c7a46583087d7c510944571e8", size = 6171 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/51/80af966c0aded877da7577d21c4601ca98c6f603c6e6073ddea071af01ec/pytest_emoji-0.2.0-py3-none-any.whl", hash = "sha256:6e34ed21970fa4b80a56ad11417456bd873eb066c02315fe9df0fafe6d4d4436", size = 5664 }, +] + +[[package]] +name = "pytest-md" +version = "0.2.0" +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pytest" }, ] +sdist = { url = "https://files.pythonhosted.org/packages/0e/55/1d4248f08a97255abb23b05d8ba07586333194fadb17beda96b707aebecd/pytest-md-0.2.0.tar.gz", hash = "sha256:3b248d5b360ea5198e05b4f49c7442234812809a63137ec6cdd3643a40cf0112", size = 5985 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/80/71/23d03f57c18116c6770141478e33b3500c4e92500cf4b49a396e9226733f/pytest_md-0.2.0-py3-none-any.whl", hash = "sha256:4c4cd16fea6d1485e87ee254558712c804a96d2aa9674b780e7eb8fb6526e1d1", size = 6117 }, +] + +[[package]] +name = "usethis" +version = "0.1.0" +source = { editable = "." } [package.dev-dependencies] dev = [ { name = "pytest" }, + { name = "pytest-emoji" }, + { name = "pytest-md" }, +] + +[package.metadata] + +[package.metadata.requires-dev] +dev = [ + { name = "pytest", specifier = ">=8.3.2" }, + { name = "pytest-emoji", specifier = ">=0.2.0" }, + { name = "pytest-md", specifier = ">=0.2.0" }, ]