diff --git a/.cirrus.yml b/.cirrus.yml index aa07388..220c6a2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,16 +1,19 @@ Lint_task: container: + cpu: 1 + memory: 512Mi image: python:3-slim install_script: - - pip3 install -U .[test] + - pip3 install -U .[lint] script: - - pylint --version - bork run lint Linux_task: alias: Linux tests allow_failures: $CIRRUS_TASK_NAME =~ '.*-rc-.*' container: + cpu: 1 + memory: 512Mi matrix: - image: python:3.8-slim - image: python:3.9-slim @@ -26,10 +29,23 @@ Linux_task: macOS_task: alias: macOS tests macos_instance: - image: ghcr.io/cirruslabs/macos-sonoma-base:latest - install_script: - - brew install python3 - - pip3 install -U .[test] + image: ghcr.io/cirruslabs/macos-runner:sonoma + env: + PATH: ${HOME}/.pyenv/shims:${PATH} + PYTHON: 3:latest + brew_update_script: + - brew update + brew_install_script: + # Per the pyenv homebrew recommendations. + # https://github.com/pyenv/pyenv/wiki#suggested-build-environment + - brew install openssl readline sqlite3 xz zlib pyenv git + pyenv_install_script: + - pyenv install ${PYTHON} + - pyenv global 3 + - pyenv rehash + pip_install_script: + - pip install -U --upgrade-strategy eager pip 'setuptools>61' + - pip install .[test] script: - python3 --version - pytest --verbose diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index 0a5b66d..0000000 --- a/.pylintrc +++ /dev/null @@ -1,36 +0,0 @@ -[MASTER] -# Use multiple processes to speed up Pylint. -jobs=1 - -# List of plugins (as comma separated values of python modules names) to load, -# usually to register additional checkers. -load-plugins=pylint.extensions.check_elif, - pylint.extensions.comparetozero, - pylint.extensions.emptystring, - pylint.extensions.overlapping_exceptions, - pylint.extensions.redefined_variable_type, - -# TODO: Should we ignore test? I mostly added it because of the number of errors -# when integrating it into pytest, since it seems to use . not ./emanate. -ignore=test,docs - -[MESSAGES CONTROL] - -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time (only on the command line, not in the configuration file where -# it should appear only once). -enable=all - -# Disable the message, report, category or checker with the given id(s). -disable=missing-docstring, - bad-whitespace, - bad-continuation, - - -[REPORTS] - -# Set the output format. Available formats are text, parseable, colorized, json -# and msvs (visual studio).You can also give a reporter class, eg -# mypackage.mymodule.MyReporterClass. -output-format=colorized diff --git a/CREDITS.md b/CREDITS.md index e02d3e2..06f55d7 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -20,8 +20,8 @@ Software and libraries: - [Python](https://python.org) - [pip](https://pip.pypa.io/) -- [pylint](https://www.pylint.org/) and the [pytest-pylint](https://github.com/carsongee/pytest-pylint) integration - [pytest](https://pytest.org/) +* [ruff](https://astral.sh/ruff) - [setuptools](https://github.com/pypa/setuptools) and [wheel](https://github.com/pypa/wheel) Services: diff --git a/emanate/__init__.py b/emanate/__init__.py index f52a6da..3083408 100644 --- a/emanate/__init__.py +++ b/emanate/__init__.py @@ -17,7 +17,7 @@ # Set the module-level dunders suggested in PEP8 __author__ = "Ellen Marie Dash" -from .version import __version__ +from .version import __version__ as __version__ @dataclass(frozen=True) class FilePair: diff --git a/pyproject.toml b/pyproject.toml index 29ee037..c88338f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,15 +31,14 @@ repository = "https://github.com/duckinator/emanate" documentation = "https://emanate-docs.netlify.app/cli.html" [project.optional-dependencies] -bork = [ - "bork~=7.0.1", +lint = [ + "bork", + "ruff" ] test = [ - "emanate[bork]", + "bork", "pytest~=7.4", - "pylint~=3.0", - "pytest-pylint~=0.21.0", "mypy~=1.6.1", "pytest-mypy~=0.10.3", ] @@ -70,9 +69,7 @@ github_repository = "duckinator/emanate" strip_zipapp_version = true [tool.bork.aliases] -# Runs *only* pylint. (Not the actual tests.) -lint = "python -m pytest -k 'pylint or mypy' --pylint --mypy --verbose" -# Runs tests +lint = "ruff check" test = "python -m pytest --verbose" #docs = "env PYTHONPATH=./ pdoc3 --html --output-dir ./html --force emanate" docs = "sphinx-build -b html -d build/doctrees docs/source/ docs/build/"