Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #11

Merged
merged 7 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.1] - 2025-01-17
## [0.4.2] - 2025-01-20

### Fixed
- fix wheel distribution

## [0.4.1] - 2025-01-20

### Fixed
- core.QAlyx: fixed handling of authentication issues during rest query
Expand Down Expand Up @@ -86,6 +91,7 @@ _First release._
providing color-mapped numerical data.
- widgets.StatefulButton: A QPushButton that maintains an active/inactive state.

[0.4.2]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.4.2
[0.4.1]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.4.1
[0.4.0]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.4.0
[0.3.2]: https://github.com/int-brain-lab/iblqt/releases/tag/v0.3.2
Expand Down
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False
'titles_only': False,
'display_version': True,
}

# -- Settings for automatic API generation -----------------------------------
Expand Down
56 changes: 50 additions & 6 deletions docs/source/dev_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ Developer Guide
PDM
---

This project is utilizing `PDM <https://pdm-project.org/>`_ as its package manager for managing dependencies and ensuring consistent and reproducible environments.
See `PDM's documentation <https://pdm-project.org/en/latest/#recommended-installation-method>`_ for details on installing PDM.
This project is utilizing `PDM <https://pdm-project.org/>`_ as its package
manager for managing dependencies and ensuring consistent and reproducible
environments. See `PDM's documentation
<https://pdm-project.org/en/latest/#recommended-installation-method>`_ for
details on installing PDM.


Installing developer dependencies
---------------------------------

To set up your development environment, you need to install the necessary
dependencies. The following command will synchronize your environment with the
dependencies specified in the ``pyproject.toml`` file, including development
dependencies:

.. code-block:: bash

pdm sync -d
Expand All @@ -19,40 +27,76 @@ Installing developer dependencies
Running the unit-tests
----------------------

We use `tox <https://tox.wiki/>`_ to automate our unit-tests. This allows us to
verify that our code works with various versions of Qt for Python. To run the
unit tests, execute the following command:

.. code-block:: bash

pdm run pytest
pdm run tox

Tox which will create isolated environments for each specified version of Qt
and run the tests in those environments. You can find the results of the tests
in the terminal output, which will indicate whether the tests passed or failed.

Coverage report
---------------

After running tox (see above), you can generate a coverage report to assess how
much of the code is covered by the tests:

.. code-block:: bash

pdm run coverage report

You'll find the HTML report in the folder ``htmlcov``, where you can open
``index.html`` in a web browser to view detailed coverage statistics.


Checking and formatting of code
-------------------------------

We use `ruff <https://docs.astral.sh/ruff/formatter/>`_ to ensure our code
adheres to style guidelines and is free of common issues. To format your code
automatically, run:

.. code-block:: bash

pdm run ruff format
pdm run ruff check --fix
pdm run mypy --package iblqt $(qtpy mypy-args)

This command will apply formatting changes to your codebase according to the
specified style rules. To check your code for issues, use:

.. code-block:: bash

pdm run ruff check

This command will analyze your code and report any issues it finds. If you want
ruff to attempt to fix any issues it identifies, you can add the ``--fix``
flag, which will automatically correct fixable problems.

Building the documentation
--------------------------

We use `Sphinx <https://www.sphinx-doc.org/>`_ to build our documentation and
API reference. To build the documentation, run the following command:

.. code-block:: bash

pdm run sphinx-build ./docs/source ./docs/build
pdm run docs

After running this command, you can view the generated documentation in your
web browser by opening ``docs/build/index.html`.

Building the package
--------------------

To build the package, execute the following command:

.. code-block:: bash

pdm build

This command will create a distributable package of your project, in the form
of a source distribution (sdist) and a wheel (bdist_wheel). The generated
package files will be located in the ``dist`` directory.
2 changes: 1 addition & 1 deletion iblqt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""A collection of extensions to the Qt framework."""

__version__ = '0.4.1'
__version__ = '0.4.2'
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ Changelog = "https://github.com/int-brain-lab/iblqt/blob/main/CHANGELOG.md"
distribution = true

[tool.pdm.build]
package-dir = "iblqt"
source-includes = [ "iblqt/", "tests/", "resources/", "docs/source" ]
excludes = [ "docs/source/api" ]
source-includes = [ "tests/", "resources/", "docs/source/" ]

[tool.pdm.version]
source = "file"
path = "iblqt/__init__.py"

[tool.pdm.scripts]
docs = "sphinx-build ./docs/source ./docs/build"

[dependency-groups]
doc = [
"sphinx>=7.0.0",
Expand Down
Empty file removed tests/__init__.py
Empty file.
Loading