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

CAS-14475 #3

Merged
merged 7 commits into from
Dec 2, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
setuptools
--user
- name: Build a source distribution
run: python3 setup.py sdist
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Runtime data necessary for CASA operation.

## Release Instructions
1. Create a release branch with a version name (ie v1.6.2)
2. Ensure the version number in setup.py on the branch is set correctly
2. Ensure the version number in pyproject.toml on the branch is set correctly
3. Create a tag of the release branch (ie v1.6.2-1)
4. Github Action runs automatically to publish a pip package to pypi

Expand All @@ -28,6 +28,24 @@ Also see the External Data section of casadocs for additional details

## Developers Instructions
1. every push to the casaconfig repository will push a new wheel to [test pypi](https://test.pypi.org/project/casaconfig/#history)
2. the version in setup.py must be updated before each push so that the wheel has a unique name (e.g. "1.2.3dev2", where "dev?" could be incremented during development)
2. the version in pyproject.toml must be updated before each push so that the wheel has a unique name (e.g. "1.2.3dev2", where "dev?" could be incremented during development; see the [specification](https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers) for more information about valid version signifiers)
3. When testing with a casatools build, "pip install" the development casaconfig wheel before running any tests - it may be installed before casatools is installed or after since the casatools build does not depend on casasconfig (uninstall any already installed casaconfig if necessary).
4. For release, follow the above instructions.

Wheels can be built locally following the same process used by the CI actions. To install the build-system dependencies as defined in pyproject.toml and then generate a source distribution and wheel:
```
python3 -m pip install build setuptools --user
python3 -m build
```
This will create:
```
casaconfig.egg-info
├── PKG-INFO
├── SOURCES.txt
├── dependency_links.txt
├── requires.txt
└── top_level.txt
dist
├── casaconfig-[VERSION]-py3-none-any.whl
└── casaconfig-[VERSION].tar.gz
```
25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[project]
name = "casaconfig"
version = "1.0.2"
description = "CASA Operational Configuration Package"
readme = 'README.md'
authors = [
{name = "National Radio Astronomy Observatory",email = "[email protected]"},
]
dependencies = [
"certifi>=2023.5.7",
]
requires-python = ">=3.8"
license = {file = "LICENSE"}

[project.urls]
Homepage = "https://casa.nrao.edu/"
Documentation = "https://casadocs.readthedocs.io/"
Repository = "https://github.com/casangi/casaconfig.git"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages]
find = {}
19 changes: 0 additions & 19 deletions setup.py

This file was deleted.

Loading