Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
173 changed files
with
12,426 additions
and
7,382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[run] | ||
branch = False | ||
source = | ||
import_export | ||
parallel = True | ||
omit = | ||
__init__.py | ||
_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
exclude = build,.git,.tox | ||
extend-ignore = E203 | ||
max-line-length = 88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
name: Build Distribution 📦 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Install pypa/build | ||
run: >- | ||
SETUPTOOLS_SCM_DEBUG=1 | ||
python -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: python -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to PyPI | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/django-import-export | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
publish-to-testpypi: | ||
name: Publish Python 🐍 distribution 📦 to TestPyPI | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/django-import-export | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,33 @@ | ||
## Release process | ||
|
||
#### Pre release | ||
#### Pre-release | ||
|
||
- Set up `.pypirc` file to reference both pypi and testpypi. | ||
|
||
#### Release | ||
|
||
- Ensure that all code has been committed and integration tests have run on Github. | ||
- If pushing directly to `main` branch, ensure this is done on the correct remote repo. | ||
- `make messages` is intended to be run now to keep the translation files up-to-date. | ||
- Run this if there have been any translations updates for the release. It is recommended to run this prior to any minor release. | ||
- This creates updates to all translation files so there is no need to commit these unless there have been any translation changes. | ||
- If 'no module named settings' error is seen, try unsetting `DJANGO_SETTINGS_MODULE` environment variable. | ||
|
||
```bash | ||
# check out clean version | ||
# all git operations will be run against this source repo | ||
git clone git@github.com:django-import-export/django-import-export.git django-import-export-rel | ||
|
||
cd django-import-export-rel | ||
|
||
# checkout any feature branch at this point | ||
# git checkout develop | ||
|
||
python3 -m venv venv | ||
source venv/bin/activate | ||
pip install -U pip setuptools wheel | ||
|
||
pip install --exists-action=w --no-cache-dir -r requirements/deploy.txt | ||
|
||
# zest.releaser pre-release | ||
# (you can set the correct version in this step) | ||
prerelease | ||
``` | ||
Ensure that ``CHANGELOG.rst`` is up-to-date with the correct version number and release date. | ||
|
||
#### Perform the release | ||
|
||
For the first pass you may choose not to upload only to testpypi (not pypi) so that you can check the release. You can check the release by manually downloading the files from testPyPI and checking the contents. | ||
|
||
Once the test file have been checked, run again to upload to PyPI. | ||
|
||
```bash | ||
release | ||
To create a new published release, follow the instructions [here](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository). | ||
Ensure you create the new tag to correspond with the release as required. | ||
|
||
# resets the version and pushes changes to origin | ||
postrelease | ||
1. Go to the [Releases](https://github.com/django-import-export/django-import-export/releases) page | ||
2. Click 'Draft a new release' | ||
3. Choose or create a new tag | ||
4. Choose the desired branch (if not `main`) | ||
5. Check 'Set as a pre-release' or 'Set as the latest release' as appropriate | ||
6. Generate release notes if desired. | ||
7. Click 'Publish release' | ||
|
||
# remove the rel copy - no longer required | ||
deactivate | ||
cd .. | ||
rm -rf django-import-export-rel | ||
``` | ||
The `release` github workflow will run and publish the release binaries to both test.pypi.org and pypi.org. | ||
|
||
#### Add Release to Github | ||
### Check readthedocs | ||
|
||
- Go to [Github releases](https://github.com/django-import-export/django-import-export/releases) | ||
- Click 'Draft a new release' | ||
- Enter the version number (e.g. 3.1.0) | ||
- Select the correct tag | ||
- Publish the release | ||
[readthedocs](https://readthedocs.org/projects/django-import-export/) integration is used to publish documentation. | ||
The webhook endpoint on readthedocs is configured using | ||
[these instructions](https://docs.readthedocs.io/en/latest/guides/setup/git-repo-manual.html). | ||
|
||
### Check readthedocs | ||
This is implemented using a Webhook defined in the Github repo (Settings / Webhooks). | ||
|
||
readthedocs should be checked after each release to ensure that the docs have built correctly. | ||
Login to [readthedocs.org](https://readthedocs.org) to check that the build ran OK (click on 'Builds' tab). | ||
|
||
For pre-releases, the release version has to be activated via the readthedocs UI before it can be built. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.