From 6a2f25b2c76bd89f2f68979a8ebb92efb8b52b0d Mon Sep 17 00:00:00 2001 From: Ryan Sheftel Date: Mon, 21 Aug 2023 10:29:12 -0400 Subject: [PATCH 1/4] remove vestiges of setup.py --- .github/workflows/releaser.yml | 5 ++--- .github/workflows/test_release.yml | 3 +-- .travis.yml | 4 +++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index bfbced9..8106ef7 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -27,7 +27,7 @@ jobs: - name: get_new_current_version run: | echo "NEWV=${{ steps.new_version.outputs.data }}" >> $GITHUB_ENV - echo "OLDV=$(grep "VERSION" -m1 setup.py | cut -d"=" -f2 | sed "s/['\" ]//g")" >> $GITHUB_ENV + echo "OLDV=$(grep "VERSION" -m1 pyproject.toml | cut -d"=" -f2 | sed "s/['\" ]//g")" >> $GITHUB_ENV - name: verify ${{env.NEWV}} > ${{env.OLDV}} if: ${{ env.NEWV <= env.OLDV }} @@ -59,7 +59,6 @@ jobs: - name: set up new version run: | - sed -i "s/$OLDV/$NEWV/" setup.py sed -i "s/$OLDV/$NEWV/" pyproject.toml - name: Set up Python @@ -100,7 +99,7 @@ jobs: - uses: stefanzweifel/git-auto-commit-action@v4 with: - file_pattern: setup.py pyproject.toml docs/change_log.rst docs/usage.rst + file_pattern: pyproject.toml docs/change_log.rst docs/usage.rst commit_message: '[GH-Actions] v${{ env.NEWV }} -- updated configuration and documentation files.' - name: Create Release diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml index d25ddce..393182f 100644 --- a/.github/workflows/test_release.yml +++ b/.github/workflows/test_release.yml @@ -37,7 +37,7 @@ - name: get_new_current_version run: | echo "NEWV=${{ steps.new_version.outputs.data }}" >> $GITHUB_ENV - echo "OLDV=$(grep "VERSION" -m1 setup.py | cut -d"=" -f2 | sed "s/['\" ]//g")" >> $GITHUB_ENV + echo "OLDV=$(grep "VERSION" -m1 pyproject.toml | cut -d"=" -f2 | sed "s/['\" ]//g")" >> $GITHUB_ENV - name: warn_no_version if: ${{ env.NEWV <= env.OLDV }} @@ -56,7 +56,6 @@ - name: set version run: | echo release candidate: $NEWV - sed -i "s/$OLDV/$NEWV/" setup.py sed -i "s/$OLDV/$NEWV/" pyproject.toml - name: Set up Python diff --git a/.travis.yml b/.travis.yml index 3ecbe19..a919ef9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,14 @@ language: python python: - "3.8" - "3.9" + - "3.10" + - "3.11" install: - "pip install pandas" - "pip install coveralls" - "pip install coverage" - - "python setup.py install" + - "python -m build" script: # - py.test --cov=pandas_market_calendars From e2d45f96c02408d0271adf59941afd9a565f4e91 Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Mon, 21 Aug 2023 11:03:49 -0400 Subject: [PATCH 2/4] Fix pyproject to detect python package, fixes #267 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c93014..917d8b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools] -py-modules = ["pandas_market_calendars"] +packages = ["pandas_market_calendars"] [project.urls] "Homepage" = "https://github.com/rsheftel/pandas_market_calendars" From 4f55b03289266dc9818425bad4a5b6a017281aa0 Mon Sep 17 00:00:00 2001 From: Ryan Sheftel Date: Tue, 22 Aug 2023 09:07:47 -0400 Subject: [PATCH 3/4] (1) remove travis.yml config iile as travisCI is no longer used (2) move the coverage settings from .coveragerc to pyproject.toml --- .coveragerc | 23 ----------------------- .travis.yml | 20 -------------------- pyproject.toml | 23 +++++++++++++++++++++++ 3 files changed, 23 insertions(+), 43 deletions(-) delete mode 100644 .coveragerc delete mode 100644 .travis.yml diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index bcf38d0..0000000 --- a/.coveragerc +++ /dev/null @@ -1,23 +0,0 @@ -# .coveragerc to control coverage.py -[run] -branch = True - -[report] -# Regexes for lines to exclude from consideration -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - - # Don't complain about missing debug-only code: - def __repr__ - if self\.debug - - # Don't complain if tests don't hit defensive assertion code: - raise AssertionError - raise NotImplementedError - - # Don't complain if non-runnable code isn't run: - if 0: - if __name__ == .__main__.: - -ignore_errors = True diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a919ef9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: python -python: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - -install: - - "pip install pandas" - - "pip install coveralls" - - "pip install coverage" - - "python -m build" - -script: -# - py.test --cov=pandas_market_calendars - - coverage run --source pandas_market_calendars -m py.test - - coverage report -m - -after_success: - - coveralls diff --git a/pyproject.toml b/pyproject.toml index 917d8b7..23d733b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,3 +43,26 @@ packages = ["pandas_market_calendars"] "Documentation" = "https://pandas-market-calendars.readthedocs.io/en/latest/" "Changelog" = "https://pandas-market-calendars.readthedocs.io/en/latest/change_log.html" "Bug Tracker" = "https://github.com/rsheftel/pandas_market_calendars/issues" + +[tool.coverage.run] +branch = true + +[tool.coverage.report] +exclude_also = [ + # Don't complain about missing debug-only code: + "def __repr__", + "if self\\.debug", + + # Don't complain if tests don't hit defensive assertion code: + "raise AssertionError", + "raise NotImplementedError", + + # Don't complain if non-runnable code isn't run: + "if 0:", + "if __name__ == .__main__.:", + + # Don't complain about abstract methods, they aren't run: + "@(abc\\.)?abstractmethod", + ] + +ignore_errors = true From 9eec6b5f2ea9f729c6e3150703649f99277f80f1 Mon Sep 17 00:00:00 2001 From: Ryan Sheftel Date: Tue, 22 Aug 2023 09:20:20 -0400 Subject: [PATCH 4/4] New version 4.2.1 --- docs/change_log.rst | 8 +++++++- pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/change_log.rst b/docs/change_log.rst index b567e8e..94a8671 100644 --- a/docs/change_log.rst +++ b/docs/change_log.rst @@ -3,8 +3,14 @@ Updates ------- +4.2.1 (08/21/2023) +~~~~~~~~~~~~~~~~~~ +- Fix the pyproject.toml to properly generate sdist PR #267 +- Remove .travis.yml file as Travis-CI is no longer used +- Merge .coveragerc into pyproject.toml + 4.2.0 (08/20/2023) -~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~ - CBOE GoodFriday special close is broken, reverted back to standard GoodFriday logic PR #265 - Fixed BSE Holiday PR #248 Issue #245 - Updated TASE Holidays 2022-2025 PR #263 diff --git a/pyproject.toml b/pyproject.toml index 23d733b..ec38103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pandas_market_calendars" -version = "4.2.0" +version = "4.2.1" authors = [ { name="Ryan Sheftel", email="rsheftel@alumni.upenn.edu" }, ]