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

Move package metadata into pyproject.toml and all other python code into separate file #4970

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a6f02b7
Move package metadata into pyproject.toml and all other python code i…
marthacryan Jan 14, 2025
7be470b
Cleanup extra changes
marthacryan Jan 14, 2025
7170a51
Revert changes to command names
marthacryan Jan 14, 2025
6a2d9bc
Add version attr
marthacryan Jan 14, 2025
37807da
Add correct output directory for artifacts
marthacryan Jan 14, 2025
41cd025
Move version into separate file
marthacryan Jan 15, 2025
7fd6870
Attempt to fix version issues
marthacryan Jan 16, 2025
cdd0204
Attempt to fix version issues
marthacryan Jan 16, 2025
48cc36a
Merge with master
marthacryan Jan 30, 2025
9795406
Add pip install editable to CI config
marthacryan Jan 30, 2025
39750d5
Add version attribute
marthacryan Jan 30, 2025
937ad46
Remove extra reference to version.py
marthacryan Jan 30, 2025
0d06ded
Code format
marthacryan Jan 30, 2025
ca9aa0a
Explicitly import importlib.metadata
marthacryan Jan 30, 2025
ec7c557
Add __name__ == main wrapper around command line arg parsing
marthacryan Jan 30, 2025
6ea167d
update to python 3.9 for dev build to fix importlib error
marthacryan Jan 30, 2025
6f40cdc
Remove unnecessary widget version
marthacryan Jan 30, 2025
2ef2559
Update version of python for dev build CI
marthacryan Jan 30, 2025
634c787
Add pip install editable
marthacryan Jan 30, 2025
8abdeaf
Add pyproject.toml to conda recipe
marthacryan Jan 30, 2025
dafa57f
Fix filepath in conda recipe
marthacryan Jan 30, 2025
370efcd
Fix accessing of pyproject.toml version in conda recipe
marthacryan Feb 3, 2025
dc1b55b
Merge with master
marthacryan Feb 4, 2025
011d410
Remove setup.py from root
marthacryan Feb 4, 2025
48e7de3
Fix filepath in commands.py
marthacryan Feb 4, 2025
d1905cb
Use new variable name for project root in commands.py
marthacryan Feb 4, 2025
f68d997
Remove conda from CI and release
marthacryan Feb 4, 2025
2a366ef
Add license file and pytest to pyproject.toml
marthacryan Feb 4, 2025
69897ae
Fix syntax issues with pyproject.toml
marthacryan Feb 4, 2025
bcfa6a7
Update release instructions
marthacryan Feb 4, 2025
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
65 changes: 15 additions & 50 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ commands:
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -e .
pip install -r ./test_requirements/requirements_<<parameters.py>>_core.txt
- run:
name: Test core
Expand All @@ -42,6 +43,7 @@ commands:
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -e .
pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt
cd js
npm ci
Expand Down Expand Up @@ -299,7 +301,7 @@ jobs:

plotlyjs_dev_build:
docker:
- image: cimg/python:3.8-node
- image: cimg/python:3.11-node
marthacryan marked this conversation as resolved.
Show resolved Hide resolved
environment:
LANG: en_US.UTF-8
resource_class: large
Expand All @@ -312,18 +314,14 @@ jobs:
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -r ./test_requirements/requirements_38_core.txt black inflect
pip install -e .
pip install -r ./test_requirements/requirements_311_core.txt black inflect
pip install jupyterlab
- run:
name: Update jupyter widget plotly.js version
command: |
. venv/bin/activate
python setup.py updateplotlywidgetversion
- run:
name: Update plotly.js to dev
command: |
. venv/bin/activate
python setup.py updateplotlyjsdev
python commands.py updateplotlyjsdev
- run:
name: Test core
command: |
Expand All @@ -343,36 +341,27 @@ jobs:
name: Build source distribution packages
command: |
. venv/bin/activate
python setup.py sdist
pip install build
python -m build --sdist --wheel -o dist
when: always
- store_artifacts:
path: dist/

full_build:
docker:
- image: continuumio/miniconda3:24.3.0-0
- image: cimg/python:3.11-node
environment:
LANG: en_US.UTF-8
resource_class: large

steps:
- checkout

- run:
name: Create conda environment
command: |
conda config --remove channels defaults
conda config --add channels conda-forge
conda create -n env --yes python=3.9 conda-build=3.28.4 conda-verify
conda install -n env -c conda-forge jupyterlab nodejs=16
conda init bash
mkdir output

- run:
name: initial NPM Build
command: |
eval "$(conda shell.bash hook)"
conda activate env
python -m venv venv
. venv/bin/activate
cd js
npm ci
npm run build
Expand All @@ -381,41 +370,17 @@ jobs:
- run:
name: PyPI Build
command: |
eval "$(conda shell.bash hook)"
conda activate env
python setup.py sdist bdist_wheel
cp -R dist output/dist
git status

- run:
name: Conda Build
command: |
eval "$(conda shell.bash hook)"
conda activate env
conda build recipe/
mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 output/
. venv/bin/activate
pip install build
python -m build --sdist --wheel -o dist
cp -R dist output
git status

- run:
name: Build Widget javascript bundle
command: |
eval "$(conda shell.bash hook)"
conda activate env
cd js
npm ci
npm run build

- run:
name: Zip output
command: |
tar czf output.tgz output

- run:
name: Git Diff
command: |
git status
git diff

- store_artifacts:
path: output.tgz

Expand Down
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include LICENSE.txt
include README.md
include versioneer.py
Copy link
Contributor

Choose a reason for hiding this comment

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

@marthacryan 🔪 versioneer.py !

include plotly/_version.py
include requires-install.txt
include requires-express.txt
include plotly/package_data/widgetbundle.js
Loading