diff --git a/.github/workflows/publish_package.yml b/.github/workflows/publish_package.yml index e0e6d7d..2b8c8f4 100644 --- a/.github/workflows/publish_package.yml +++ b/.github/workflows/publish_package.yml @@ -5,7 +5,7 @@ name: Upload Python Package on: release: - types: [publish, created] + types: [published, created] jobs: deploy: @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: "3.x" + python-version: '3.x' - name: Install dependencies run: | diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7db320d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,304 @@ +# Changelog + +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.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Changed + +- This file and CONTRIBUTING.rst to markdown + +### Fixed + +- Github action publish package release trigger value + +## [1.12.1] - 2025-05-13 + +### Fixed + +- Inference examples docs generation + +### Changed + +- Inference status enum from numerical to meaningful string values + +## [1.12.0] - 2025-05-12 + +### Added + +- Support for fileset secrets + +## [1.11.0] - 2025-04-28 + +### Added + +- Example for calling the inference endpoint with a minimal client +- Missing doc generation for inference examples + +### Changed + +- Refactored instances.py to use dataclasses and google docstring style + +## [1.10.0] - 2025-04-17 + +### Changed + +- Updated version for release + +## [1.9.1] - 2025-04-17 + +### Added + +- Inference client to run inference requests and get status and results +- Support for asynchronous inference + +## [1.9.0] - 2025-04-04 + +### Added + +- Environment variables to container deployment example +- `size_in_mb` parameter to `VolumeMount` class +- Memory volume mount type + +### Changed + +- Updated examples image from `fastai` to `ubuntu-24.04-cuda-12.8-open-docker` +- Consistent naming and load of credentials from env variables in examples + +## [1.8.4] - 2025-03-25 + +### Added + +- Readthedocs configuration file + +## [1.8.3] - 2025-03-25 + +### Changed + +- Updated documentation + +## [1.8.2] - 2025-03-25 + +### Added + +- Missing packages to setup requirements + +## [1.8.1] - 2025-03-24 [YANKED] + +### Removed + +- Container name from deployment creation + +## [1.8.0] - 2025-03-24 [YANKED] + +### Added + +- Support for containers + +## [1.7.3] - 2025-03-07 + +### Fixed + +- Type for contract and pricing parameters + +## [1.7.1] - 2025-03-06 + +### Added + +- Contract and pricing parameters in `datacrunch.instances.create()` + +## [1.7.0] - 2024-11-21 + +### Fixed + +- Methods `volumes.increase_size()` and `volumes.get()` + +## [1.6.1] - 2023-10-02 + +### Added + +- Spot price to instance types + +## [1.6.0] - 2023-09-15 + +### Added + +- Locations endpoint and location code parameter to the availability endpoints + +## [1.5.0] - 2023-06-28 + +### Added + +- Location constants + +### Changed + +- Refactored the code to send `location_code` instead of `location` when creating an instance or a volume + +## [1.4.1] - 2023-06-20 + +### Fixed + +- Bug where token refresh failed + +## [1.4.0] - 2023-06-14 + +### Added + +- Support for permanent deletion of volumes +- Volume class method that inits a new Volume instance from a dict +- Integration tests for permanent deletion of volumes + +## [1.3.0] - 2023-05-25 + +### Added + +- Support for volume cloning + +## [1.2.0] - 2023-04-24 + +### Added + +- Support for deploying a new instance with existing volumes + +## [1.1.2] - 2023-03-02 + +### Fixed + +- Bug where the wrong property name was used + +## [1.1.1] - 2023-02-23 + +### Fixed + +- Bug where the authentication refresh token flow did not update the token values + +## [1.1.0] - 2023-01-20 + +### Added + +- Support for checking availability for a spot instance + +### Changed + +- Updated two github actions to run on fixed version of ubuntu because the latest one is missing python 3.6 +- Added more versions of python to be used on two github actions + +## [1.0.10] - 2022-10-18 + +### Added + +- Support for adding a coupon code when deploying a new instance + +## [1.0.9] - 2022-09-16 + +### Added + +- `is_spot` property to the `Instance` class, now possible to deploy a spot instance +- Implemented `__str__` method for `Instance`, `Volume` and `Image` Classes, now possible to print instances + +## [1.0.8] - 2021-12-20 + +### Added + +- `ssh_key_ids` property for Volume entity +- Test coverage for `ssh_key_ids` + +## [1.0.7] - 2021-10-13 + +### Fixed + +- The previous bug in a different method + +## [1.0.6] - 2021-10-12 + +### Fixed + +- Bug where initializing an instance without ssh keys raises an exception + +## [1.0.5] - 2021-09-27 + +### Added + +- Option to set OS volume size and name on instance creation + +## [1.0.4] - 2021-07-01 + +### Added + +- Constants documentation + +## [1.0.3] - 2021-07-01 + +### Added + +- Missing volumes documentation + +## [1.0.2] - 2021-06-16 + +### Added + +- Examples to documentation + +## [1.0.1] - 2021-06-16 + +### Changed + +- Updated version + +## [1.0.0] - 2021-06-16 + +### Added + +- Support for storage volumes + +### Changed + +- Breaking change: moved all constants under DataCrunchClient to DataCrunchClient.constants + +## [0.1.0] - 2021-01-05 + +### Added + +- First release, still in beta. + +[unreleased]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.12.1...HEAD +[1.12.1]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.12.0...v1.12.1 +[1.12.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.11.0...v1.12.0 +[1.11.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.10.0...v1.11.0 +[1.10.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.9.1...v1.10.0 +[1.9.1]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.9.0...v1.9.1 +[1.9.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.8.4...v1.9.0 +[1.8.4]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.8.3...v1.8.4 +[1.8.3]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.8.2...v1.8.3 +[1.8.2]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.8.1...v1.8.2 +[1.8.1]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.8.0...v1.8.1 +[1.8.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.7.3...v1.8.0 +[1.7.3]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.7.1...v1.7.3 +[1.7.1]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.7.0...v1.7.1 +[1.7.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.6.1...v1.7.0 +[1.6.1]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.6.0...v1.6.1 +[1.6.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.5.0...v1.6.0 +[1.5.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.4.1...v1.5.0 +[1.4.1]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.4.0...v1.4.1 +[1.4.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.3.0...v1.4.0 +[1.3.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.2.0...v1.3.0 +[1.2.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.1.2...v1.2.0 +[1.1.2]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.1.1...v1.1.2 +[1.1.1]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.1.0...v1.1.1 +[1.1.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.10...v1.1.0 +[1.0.10]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.9...v1.0.10 +[1.0.9]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.8...v1.0.9 +[1.0.8]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.7...v1.0.8 +[1.0.7]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.6...v1.0.7 +[1.0.6]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.5...v1.0.6 +[1.0.5]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.4...v1.0.5 +[1.0.4]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.3...v1.0.4 +[1.0.3]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.2...v1.0.3 +[1.0.2]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.1...v1.0.2 +[1.0.1]: https://github.com/DataCrunch-io/datacrunch-python/compare/v1.0.0...v1.0.1 +[1.0.0]: https://github.com/DataCrunch-io/datacrunch-python/compare/v0.1.0...v1.0.0 +[0.1.0]: https://github.com/DataCrunch-io/datacrunch-python/releases/tag/v0.1.0 diff --git a/CHANGELOG.rst b/CHANGELOG.rst deleted file mode 100644 index c1f1a8a..0000000 --- a/CHANGELOG.rst +++ /dev/null @@ -1,198 +0,0 @@ -Changelog -========= - -v1.12.1 (2025-05-13) --------------------- - -* Fixed inference examples docs generation - -v1.12.0 (2025-05-12) --------------------- - -* Added support for fileset secrets - -v1.11.0 (2025-04-28) --------------------- - -* Added example for calling the inference endpoint with a minimal client -* Added missing doc generation for inference examples -* Refactor: use dataclasses and google docstring style in instances.py - -v1.10.0 (2025-04-17) --------------------- - -* Updated version for release - -v1.9.1 (2025-04-17) -------------------- - -* Added inference client to run inference requests and get status and results -* Added support for asynchronous inference - -v1.9.0 (2025-04-04) -------------------- - -* Added environment variables to container deployment example -* Updated examples image from 'fastai' to 'ubuntu-24.04-cuda-12.8-open-docker' -* Consistent naming and load of credentials from env variables in examples -* Added size_in_mb parameter to VolumeMount class -* Added memory volume mount type - -v1.8.4 (2025-03-25) -------------------- - -* Added readthedocs configuration file - -v1.8.3 (2025-03-25) -------------------- - -* Updated documentation - -v1.8.2 (2025-03-25) -------------------- - -* Added missing packages to setup requirements - -v1.8.1 (2025-03-24) [YANKED] ----------------------------- - -* Remove container name from deployment creation - -v1.8.0 (2025-03-24) [YANKED] ----------------------------- - -* Added support for containers - -v1.7.3 (2025-03-07) -------------------- - -* Fix type for contract and pricing parameters - -v1.7.1 (2025-03-06) -------------------- - -* Add contract and pricing parameters in datacrunch.instances.create() - -v1.7.0 (2024-11-21) -------------------- - -* Fix volume.increase_size() -* Fix volumes.get() - -v1.6.1 (2023-10-02) -------------------- - -* Added spot price to instance types - -v1.6.0 (2023-09-15) -------------------- - -* Added locations endpoint and location code parameter to the availability endpoints - -v1.5.0 (2023-06-28) -------------------- - -* Added location constants -* Refactored the code to send `location_code` instead of `location` when creating an instance or a volume - -v1.4.1 (2023-06-20) -------------------- - -* Fixed a bug where token refresh failed - -v1.4.0 (2023-06-14) -------------------- - -* Added support for permanent deletion of volumes -* Added a Volume class method that inits a new Volume instance from a dict -* Added a few integration tests for permanent deletion of volumes - -v1.3.0 (2023-05-25) -------------------- - -* Added support for volume cloning - -v1.2.0 (2023-04-24) -------------------- - -* Added support for deploying a new instance with existing volumes - -v1.1.2 (2023-03-02) -------------------- - -* Fixed bug where the wrong property name was used - -v1.1.1 (2023-02-23) -------------------- - -* Fixed a bug where the authentication refresh token flow did not update the token values - -v1.1.0 (2023-01-20) -------------------- - -* Added support for checking availability for a spot instance -* Updated two github actions to run on fixed version of ubuntu because the latest one is missing python 3.6 -* Added more version of python to be used on two github actions - -v1.0.10 (2022-10-18) -------------------- - -* Added support for adding a coupon code when deploying a new instance - -v1.0.9 (2022-09-16) -------------------- - -* Added is_spot property to the Instance class, now possible to deploy a spot instance -* Implemented __str__ method for Instance, Volume and Image Classes, now possible to print instances - -v1.0.8 (2021-12-20) -------------------- - -* Added ssh_key_ids property for Volume entity -* Added test coverage for ssh_key_ids - -v1.0.7 (2021-10-13) -------------------- - -* Fixed the previous bug in a different method - -v1.0.6 (2021-10-12) -------------------- - -* Fixed a bug where initializing an instance without ssh keys raises an exception - -v1.0.5 (2021-09-27) -------------------- - -* Added an option to set OS volume size and name on instance creation - -v1.0.4 (2021-07-01) -------------------- - -* Added constants documentation - -v1.0.3 (2021-07-01) -------------------- - -* Added missing volumes documentation - -v1.0.2 (2021-06-16) -------------------- - -* Added examples to documentation - -v1.0.1 (2021-06-16) -------------------- - -* Update version - -v1.0.0 (2021-06-16) -------------------- - -* Added support for storage volumes -* Breaking change: moved all constants under DataCrunchClient to DataCrunchClient.constants - -v0.1.0 (2021-01-05) -------------------- - -* First release, still in beta. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f0faf62 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,80 @@ +# Contributing + +Any contributions are welcome! + +Open new issues at https://github.com/DataCrunch-io/datacrunch-python/issues. + +You can open pull requests by following the steps: + +## Code Contribution + +1. Fork the `datacrunch-python` repo on GitHub. + +2. Clone your fork locally: + + ```bash + git clone git@github.com:{your_username}/datacrunch-python.git + cd datacrunch-python + ``` + +3. Create virtual environment & install this local copy into the virtual environment: + + ```bash + python3 -m venv datacrunch_env && source ./datacrunch_env/bin/activate + python3 setup.py develop + ``` + +4. Create a new branch: + + if it's a feature: + + ```bash + git checkout -b feature/new-feature-name + ``` + + or a bugfix: + + ```bash + git checkout -b fix/some-bugfix + ``` + +5. Make your local changes + +6. Install dependencies for test: + + ```bash + pip3 install -e .[test] + pip3 install -U pytest + ``` + +7. Run tests: + + ```bash + pytest + ``` + +8. Commit and push: + + ```bash + git commit .am "Detailed commit message" + git push origin {branch-name} + ``` + +9. Submit a pull request in GitHub. + +## Pull Request Guidelines + +1. The pull request should include tests. +2. Please add documentation docstrings and type hinting to any new feature. + +## Release Guidelines + +Some steps for releasing a new version: + +1. Update the version in `__version__.py` +2. Add an entry to the CHANGELOG.md file +3. `git tag v{major}.{minor}.{patch}` +4. `git push master` +5. `git push --tags` +6. [Draft and publish](https://github.com/DataCrunch-io/datacrunch-python/releases) a new release. +7. Check that package is automatically published to [PyPI](https://pypi.org/project/datacrunch/) via [GitHub action](https://github.com/DataCrunch-io/datacrunch-python/actions/workflows/publish_package.yml). diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index 8622059..0000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,77 +0,0 @@ -============ -Contributing -============ -Any contributions are welcome! - -Open new issues at https://github.com/DataCrunch-io/datacrunch-python/issues. - -You can open pull requests by following the steps: - -Code Contribution: ------------------- - -1. Fork the `datacrunch-python` repo on GitHub. - -2. Clone your fork locally:: - - git clone git@github.com:{your_username}/datacrunch-python.git - - cd datacrunch-python - -3. Create virtual environment & install this local copy into the virtual environment:: - - python3 -m venv datacrunch_env && source ./datacrunch_env/bin/activate - - python3 setup.py develop - -4. Create a new branch: - - if it's a feature:: - - git checkout -b feature/new-feature-name - - or a bugfix:: - - git checkout -b hotfix/some-bugfix - -5. Make your local changes - -6. Install dependencies for test:: - - pip3 install -e .[test] - - pip3 install -U pytest - -7. Run tests:: - - pytest - -8. Commit and push:: - - git commit .am "Detailed commit message" - - git push origin {branch-name} - -9. Submit a pull request in GitHub. - -Pull Request Guidelines ------------------------- - -1. The pull request should include tests. -2. Please add documentation docstrings and type hinting to any new feature. - -Release Guidelines ------------------------- -Some steps for releasing a new version: - -1. Update the version in ``__version__.py`` -2. Add an entry to the CHANGELOG.rst file -3. ``git tag vX.Y.Z`` -4. ``git push master`` -5. ``git push --tags`` -6. `Draft and publish`_ a new release. -7. Check that package is automatically published to `PyPI`_ via `GitHub action`_. - -.. _Draft and publish: https://github.com/DataCrunch-io/datacrunch-python/releases -.. _PyPI: https://pypi.org/project/datacrunch/ -.. _GitHub action: https://github.com/DataCrunch-io/datacrunch-python/actions/workflows/publish_package.yml