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

Dependency pins #1041

Merged
merged 12 commits into from
Jan 11, 2023
Merged
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
- uses: actions/setup-python@v4.4.0
with:
python-version: ${{ env.python_version }}
- run: pip install tox~=4.0
# We don't actually want to install briefcase; we just want the test extras
- run: pip install -e .[dev]
- run: tox -e towncrier-check

package:
Expand All @@ -54,7 +55,8 @@ jobs:
- uses: actions/setup-python@v4.4.0
with:
python-version: ${{ env.python_version }}
- run: pip install tox~=4.0
# We don't actually want to install briefcase; we just want the test extras
- run: pip install -e .[dev]
- run: tox -e package
- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -93,7 +95,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
pip install setuptools_scm[toml]~=7.0 tox~=4.0 coverage[toml]~=7.0
pip install $(ls dist/briefcase-*.whl)[dev,test]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be another "We don't actually want..." comment here.

Also, the difference between briefcase-*.whl here and *.whl below implies there might be some other wheels in dist, which is not actually the case. So I suggest we use briefcase-*.whl in both places.

- name: Test
run: |
tox -e py --installpkg dist/*.whl
Expand Down Expand Up @@ -125,7 +127,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
pip install coverage[toml]~=7.0
# We don't actually want to install briefcase; we just want the test extras
pip install -e .[test]
- name: Retrieve coverage data
uses: actions/download-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions changes/1041.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The way dependency versions are specified has been modified to make Briefcase as accomodating as possible with end-user environments, but as stable as possible for development environments.
21 changes: 1 addition & 20 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,6 @@

# -- Options for HTML output ---------------------------------------------------

# on_rtd: whether we are on readthedocs.org
on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd: # only import and set the theme if we're building docs locally
try:
import sphinx_rtd_theme
except ImportError:
html_theme = "default"
else:
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
Expand Down Expand Up @@ -175,14 +163,7 @@
# Output file base name for HTML help builder.
htmlhelp_basename = "briefcasedoc"

try:
import sphinx_rtd_theme

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
# The sphinx-rtd-theme package is not installed, so to the default
pass
html_theme = "furo"

# -- Options for LaTeX output --------------------------------------------------

Expand Down
59 changes: 7 additions & 52 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
.. raw:: html

<style>
.row {clear: both}

.column img {border: 1px solid black;}

@media only screen and (min-width: 1000px),
only screen and (min-width: 500px) and (max-width: 768px){

.column {
padding-left: 5px;
padding-right: 5px;
float: left;
}

.column3 {
width: 33.3%;
}

.column2 {
width: 50%;
}
}
</style>


=========
Briefcase
=========
Expand All @@ -42,57 +15,39 @@ native application. It supports producing binaries for:
It is also extensible, allowing for additional platforms and installation
formats to be produced.

.. rst-class:: row

Table of contents
=================

.. rst-class:: clearfix row

.. rst-class:: column column2

:ref:`Tutorial <tutorial>`
--------------------------

Get started with a hands-on introduction for beginners


.. rst-class:: column column2
Get started with a hands-on introduction for beginners.

:ref:`How-to guides <how-to>`
-----------------------------

Guides and recipes for common problems and tasks, including how to contribute


.. rst-class:: column column2
Guides and recipes for common problems and tasks, including how to contribute.

:ref:`Background <background>`
------------------------------

Explanation and discussion of key topics and concepts


.. rst-class:: column column2
Explanation and discussion of key topics and concepts.

:ref:`Reference <reference>`
----------------------------

Technical reference - commands, modules, classes, methods


.. rst-class:: clearfix row
Technical reference - commands, modules, classes, methods.

Community
=========

Briefcase is part of the `BeeWare suite`_. You can talk to the community through:

* `@pybeeware on Twitter <https://twitter.com/pybeeware>`__
* `@pybeeware on Twitter <https://twitter.com/pybeeware>`__

* `Discord <https://beeware.org/bee/chat/>`__
* `Discord <https://beeware.org/bee/chat/>`__

* The Briefcase `Github Discussions forum <https://github.com/beeware/briefcase/discussions>`__
* The Briefcase `Github Discussions forum <https://github.com/beeware/briefcase/discussions>`__

.. _BeeWare suite: http://beeware.org
.. _Read The Docs: https://briefcase.readthedocs.io
Expand Down
47 changes: 23 additions & 24 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,36 +58,35 @@ package_dir =
install_requires =
pip >= 22
setuptools >= 60
wheel ~= 0.37
cookiecutter ~= 2.1
tomli ~= 2.0; python_version <= "3.10"
wheel >= 0.37
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should leave a comment here explaining our pinning strategy: essentially the same text as the first post in this PR.

cookiecutter >= 2.1, < 3.0
tomli >= 2.0, < 3.0; python_version <= "3.10"
importlib_metadata >= 4.4; python_version <= "3.9"
requests ~= 2.28
GitPython ~= 3.1
dmgbuild ~= 1.6; sys_platform == "darwin"
psutil ~= 5.9
rich ~= 12.6
platformdirs ~= 2.6
packaging ~= 22.0
tomli_w ~= 1.0
requests >= 2.28, < 3.0
GitPython >= 3.1, < 4.0
dmgbuild >= 1.6, < 2.0; sys_platform == "darwin"
psutil >= 5.9, < 6.0
rich >= 12.6, < 14.0
platformdirs >= 2.6, < 3.0
packaging >= 22.0
tomli_w >= 1.0, < 2.0

[options.extras_require]
dev =
pre-commit~=2.20
setuptools_scm[toml] ~= 7.0
tox ~= 4.0
coverage[toml] ~= 7.0
pre-commit == 2.21.0
setuptools_scm[toml] == 7.0.5
tox == 4.0.1
test =
pytest~=7.2
pytest-tldr~=0.2
pytest-cov~=4.0
pytest == 7.2.0
pytest-tldr == 0.2.5
coverage[toml] == 7.0.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A development environment should probably have all the test tools installed, so Toga will merge[test] into [dev]as soon as the setuptools-scm PR is merged (beeware/toga#1675 (review)). Would it make sense to do the same for Briefcase?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - the distinction is pretty narrow, so I guess that makes sense, if only for simplicity.

docs =
sphinx~=5.3
sphinxcontrib-spelling~=7.7
pyenchant~=3.2
sphinx-autobuild~=2021.3
sphinx_rtd_theme~=1.1
sphinx_tabs~=3.3
sphinx == 6.1.2
sphinxcontrib-spelling == 7.7.0
pyenchant == 3.2.2
sphinx-autobuild == 2021.3.14
furo == 2022.12.7
sphinx_tabs == 3.4.1

[options.packages.find]
where = src
Expand Down