From 79b7c2fa8f21ab3bf0bd44cff3c5eec52d2efb1a Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Feb 2024 19:27:55 +0000 Subject: [PATCH 1/7] MAINT: Configure changelogs with towncrier --- CHANGELOG.md | 11 +++++++++++ changelog.d/.gitignore | 1 + changelog.d/readme.md | 26 ++++++++++++++++++++++++++ towncrier.toml | 31 +++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 changelog.d/.gitignore create mode 100644 changelog.d/readme.md create mode 100644 towncrier.toml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3be0d63 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# 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). + +This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the changes for the upcoming release can be found in . + + + + diff --git a/changelog.d/.gitignore b/changelog.d/.gitignore new file mode 100644 index 0000000..f935021 --- /dev/null +++ b/changelog.d/.gitignore @@ -0,0 +1 @@ +!.gitignore diff --git a/changelog.d/readme.md b/changelog.d/readme.md new file mode 100644 index 0000000..28d8e71 --- /dev/null +++ b/changelog.d/readme.md @@ -0,0 +1,26 @@ +# Usage + +`towncrier` is used for keeping track of the changelog. The relevant configuration aspects are: +- Each file can be formatted using markdown +- The contents are rendered in bullets +- Each file should be labeled with the corresponding **pull request**, e.g. `NUM.TYPE.md` + + Where there is no clear corresponding pull request, `+` can be used instead of `NUM` + +For mapping the types to headings, the following table can be used: + + +| **TYPE** | **Heading** | +| feat | New Features | +| api | API Changes | +| bugfix | Bug Fixes | +| misc | Other Changes and Additions | + +## Release + + +```bash +# View the changes +towncrier build --draft --version 0.1.0 --date "$(date -u +%Y-%m-%d)" +# Modify CHANGES.md +towncrier build --version 0.1.0 --date "$(date -u +%Y-%m-%d)" +``` diff --git a/towncrier.toml b/towncrier.toml new file mode 100644 index 0000000..4e35868 --- /dev/null +++ b/towncrier.toml @@ -0,0 +1,31 @@ +[tool.towncrier] +package = "asv_runner" +package_dir = "asv_runner" +all_bullets = false +wrap = true +directory = "changelog.d" +filename = "CHANGELOG.md" +start_string = "\n" +underlines = ["", "", ""] +title_format = "## [{version}](https://github.com/airspeed-velocity/asv_runner/tree/{version}) - {project_date}" +issue_format = "[#{issue}](https://github.com/airspeed-velocity/asv_runner/issues/{issue})" + +[[tool.towncrier.type]] +directory = "feat" +name = "New Features" +showcontent = true + +[[tool.towncrier.type]] +directory = "api" +name = "API Changes" +showcontent = true + +[[tool.towncrier.type]] +directory = "bugfix" +name = "Bug Fixes" +showcontent = true + +[[tool.towncrier.type]] +directory = "misc" +name = "Other Changes and Additions" +showcontent = true From d192612607ec1d525a0831bf1b6a2d28b95e9a21 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Feb 2024 19:28:35 +0000 Subject: [PATCH 2/7] DOC: Add fragments for 0.09 --- changelog.d/13.feat.md | 31 +++++++++++++++++++++++++++ changelog.d/17.feat.md | 45 ++++++++++++++++++++++++++++++++++++++++ changelog.d/18.feat.md | 40 +++++++++++++++++++++++++++++++++++ changelog.d/19.bugfix.md | 1 + changelog.d/20.feat.md | 25 ++++++++++++++++++++++ changelog.d/6.misc.md | 1 + 6 files changed, 143 insertions(+) create mode 100644 changelog.d/13.feat.md create mode 100644 changelog.d/17.feat.md create mode 100644 changelog.d/18.feat.md create mode 100644 changelog.d/19.bugfix.md create mode 100644 changelog.d/20.feat.md create mode 100644 changelog.d/6.misc.md diff --git a/changelog.d/13.feat.md b/changelog.d/13.feat.md new file mode 100644 index 0000000..79a02a3 --- /dev/null +++ b/changelog.d/13.feat.md @@ -0,0 +1,31 @@ +Adds a `skip_benchmark` decorator. + +```python +from asv_runner.benchmarks.helpers import skip_benchmark + +@skip_benchmark +class TimeSuite: + """ + An example benchmark that times the performance of various kinds + of iterating over dictionaries in Python. + """ + def setup(self): + self.d = {} + for x in range(500): + self.d[x] = None + + def time_keys(self): + for key in self.d.keys(): + pass + + def time_values(self): + for value in self.d.values(): + pass + + def time_range(self): + d = self.d + for key in range(500): + d[key] +``` + +Usage requires `asv 0.6.0`. diff --git a/changelog.d/17.feat.md b/changelog.d/17.feat.md new file mode 100644 index 0000000..efd3a40 --- /dev/null +++ b/changelog.d/17.feat.md @@ -0,0 +1,45 @@ +Finely grained `skip_benchmark_if` and `skip_params_if` have been added. + +```python +from asv_runner.benchmarks.mark import skip_benchmark_if, skip_params_if +import datetime + +class TimeSuite: + """ + An example benchmark that times the performance of various kinds + of iterating over dictionaries in Python. + """ + params = [100, 200, 300, 400, 500] + param_names = ["size"] + + def setup(self, size): + self.d = {} + for x in range(size): + self.d[x] = None + + @skip_benchmark_if(datetime.datetime.now().hour >= 12) + def time_keys(self, size): + for key in self.d.keys(): + pass + + @skip_benchmark_if(datetime.datetime.now().hour >= 12) + def time_values(self, size): + for value in self.d.values(): + pass + + @skip_benchmark_if(datetime.datetime.now().hour >= 12) + def time_range(self, size): + d = self.d + for key in range(size): + d[key] + + # Skip benchmarking when size is either 100 or 200 and the current hour is 12 or later. + @skip_params_if([(100,), (200,)], + datetime.datetime.now().hour >= 12) + def time_dict_update(self, size): + d = self.d + for i in range(size): + d[i] = i +``` + +Usage requires `asv 0.6.0`. diff --git a/changelog.d/18.feat.md b/changelog.d/18.feat.md new file mode 100644 index 0000000..a20cc8f --- /dev/null +++ b/changelog.d/18.feat.md @@ -0,0 +1,40 @@ +Benchmarks can now be parameterized using decorators. + +```python +import numpy as np +from asv_runner.benchmarks.mark import parameterize + +@parameterize({"n":[10, 100]}) +def time_sort(n): + np.sort(np.random.rand(n)) + +@parameterize({'n': [10, 100], 'func_name': ['range', 'arange']}) +def time_ranges_multi(n, func_name): + f = {'range': range, 'arange': np.arange}[func_name] + for i in f(n): + pass + +@parameterize({"size": [10, 100, 200]}) +class TimeSuiteDecoratorSingle: + def setup(self, size): + self.d = {} + for x in range(size): + self.d[x] = None + + def time_keys(self, size): + for key in self.d.keys(): + pass + + def time_values(self, size): + for value in self.d.values(): + pass + +@parameterize({'n': [10, 100], 'func_name': ['range', 'arange']}) +class TimeSuiteMultiDecorator: + def time_ranges(self, n, func_name): + f = {'range': range, 'arange': np.arange}[func_name] + for i in f(n): + pass +``` + +Usage requires `asv 0.6.0`. diff --git a/changelog.d/19.bugfix.md b/changelog.d/19.bugfix.md new file mode 100644 index 0000000..c514d4c --- /dev/null +++ b/changelog.d/19.bugfix.md @@ -0,0 +1 @@ +It is possible to set a default timeout from `asv`. diff --git a/changelog.d/20.feat.md b/changelog.d/20.feat.md new file mode 100644 index 0000000..3c4c062 --- /dev/null +++ b/changelog.d/20.feat.md @@ -0,0 +1,25 @@ +Benchmarks can now be skipped during execution. + +```python +from asv_runner.benchmarks.mark import skip_for_params, parameterize, SkipNotImplemented + +# Fast because no setup is called +class SimpleFast: + params = ([False, True]) + param_names = ["ok"] + + @skip_for_params([(False, )]) + def time_failure(self, ok): + if ok: + x = 34.2**4.2 + +@parameterize({"ok": [False, True]}) +class SimpleSlow: + def time_failure(self, ok): + if ok: + x = 34.2**4.2 + else: + raise SkipNotImplemented(f"{ok} is skipped") +``` + +Usage requires `asv 0.6.0`. diff --git a/changelog.d/6.misc.md b/changelog.d/6.misc.md new file mode 100644 index 0000000..2d18fbe --- /dev/null +++ b/changelog.d/6.misc.md @@ -0,0 +1 @@ +Documentation, both long-form and API level has been added. From 3266121002c0130e5e1eca035c4b079b57a587c6 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Feb 2024 19:29:41 +0000 Subject: [PATCH 3/7] MAINT: Release notes for 0.0.9 --- CHANGELOG.md | 161 +++++++++++++++++++++++++++++++++++++++ changelog.d/13.feat.md | 31 -------- changelog.d/17.feat.md | 45 ----------- changelog.d/18.feat.md | 40 ---------- changelog.d/19.bugfix.md | 1 - changelog.d/20.feat.md | 25 ------ changelog.d/6.misc.md | 1 - 7 files changed, 161 insertions(+), 143 deletions(-) delete mode 100644 changelog.d/13.feat.md delete mode 100644 changelog.d/17.feat.md delete mode 100644 changelog.d/18.feat.md delete mode 100644 changelog.d/19.bugfix.md delete mode 100644 changelog.d/20.feat.md delete mode 100644 changelog.d/6.misc.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 3be0d63..6c60df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,4 +8,165 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang +## [0.0.9](https://github.com/airspeed-velocity/asv_runner/tree/0.0.9) - 20-08-2023 + +### New Features + +- Adds a `skip_benchmark` decorator. + +```python +from asv_runner.benchmarks.helpers import skip_benchmark + +@skip_benchmark +class TimeSuite: + """ + An example benchmark that times the performance of various kinds + of iterating over dictionaries in Python. + """ + def setup(self): + self.d = {} + for x in range(500): + self.d[x] = None + + def time_keys(self): + for key in self.d.keys(): + pass + + def time_values(self): + for value in self.d.values(): + pass + + def time_range(self): + d = self.d + for key in range(500): + d[key] +``` + +Usage requires `asv 0.6.0`. +([#13](https://github.com/airspeed-velocity/asv_runner/issues/13)) +- Finely grained `skip_benchmark_if` and `skip_params_if` have been added. + +```python +from asv_runner.benchmarks.mark import skip_benchmark_if, skip_params_if +import datetime + +class TimeSuite: + """ + An example benchmark that times the performance of various kinds + of iterating over dictionaries in Python. + """ + params = [100, 200, 300, 400, 500] + param_names = ["size"] + + def setup(self, size): + self.d = {} + for x in range(size): + self.d[x] = None + + @skip_benchmark_if(datetime.datetime.now().hour >= 12) + def time_keys(self, size): + for key in self.d.keys(): + pass + + @skip_benchmark_if(datetime.datetime.now().hour >= 12) + def time_values(self, size): + for value in self.d.values(): + pass + + @skip_benchmark_if(datetime.datetime.now().hour >= 12) + def time_range(self, size): + d = self.d + for key in range(size): + d[key] + + # Skip benchmarking when size is either 100 or 200 and the current hour is +12 or later. + @skip_params_if([(100,), (200,)], + datetime.datetime.now().hour >= 12) + def time_dict_update(self, size): + d = self.d + for i in range(size): + d[i] = i +``` + +Usage requires `asv 0.6.0`. +([#17](https://github.com/airspeed-velocity/asv_runner/issues/17)) +- Benchmarks can now be parameterized using decorators. + +```python +import numpy as np +from asv_runner.benchmarks.mark import parameterize + +@parameterize({"n":[10, 100]}) +def time_sort(n): + np.sort(np.random.rand(n)) + +@parameterize({'n': [10, 100], 'func_name': ['range', 'arange']}) +def time_ranges_multi(n, func_name): + f = {'range': range, 'arange': np.arange}[func_name] + for i in f(n): + pass + +@parameterize({"size": [10, 100, 200]}) +class TimeSuiteDecoratorSingle: + def setup(self, size): + self.d = {} + for x in range(size): + self.d[x] = None + + def time_keys(self, size): + for key in self.d.keys(): + pass + + def time_values(self, size): + for value in self.d.values(): + pass + +@parameterize({'n': [10, 100], 'func_name': ['range', 'arange']}) +class TimeSuiteMultiDecorator: + def time_ranges(self, n, func_name): + f = {'range': range, 'arange': np.arange}[func_name] + for i in f(n): + pass +``` + +Usage requires `asv 0.6.0`. +([#18](https://github.com/airspeed-velocity/asv_runner/issues/18)) +- Benchmarks can now be skipped during execution. + +```python +from asv_runner.benchmarks.mark import skip_for_params, parameterize, +SkipNotImplemented + +# Fast because no setup is called +class SimpleFast: + params = ([False, True]) + param_names = ["ok"] + + @skip_for_params([(False, )]) + def time_failure(self, ok): + if ok: + x = 34.2**4.2 + +@parameterize({"ok": [False, True]}) +class SimpleSlow: + def time_failure(self, ok): + if ok: + x = 34.2**4.2 + else: + raise SkipNotImplemented(f"{ok} is skipped") +``` + +Usage requires `asv 0.6.0`. +([#20](https://github.com/airspeed-velocity/asv_runner/issues/20)) + +### Bug Fixes + +- It is possible to set a default timeout from `asv`. + ([#19](https://github.com/airspeed-velocity/asv_runner/issues/19)) + +### Other Changes and Additions + +- Documentation, both long-form and API level has been added. + ([#6](https://github.com/airspeed-velocity/asv_runner/issues/6)) diff --git a/changelog.d/13.feat.md b/changelog.d/13.feat.md deleted file mode 100644 index 79a02a3..0000000 --- a/changelog.d/13.feat.md +++ /dev/null @@ -1,31 +0,0 @@ -Adds a `skip_benchmark` decorator. - -```python -from asv_runner.benchmarks.helpers import skip_benchmark - -@skip_benchmark -class TimeSuite: - """ - An example benchmark that times the performance of various kinds - of iterating over dictionaries in Python. - """ - def setup(self): - self.d = {} - for x in range(500): - self.d[x] = None - - def time_keys(self): - for key in self.d.keys(): - pass - - def time_values(self): - for value in self.d.values(): - pass - - def time_range(self): - d = self.d - for key in range(500): - d[key] -``` - -Usage requires `asv 0.6.0`. diff --git a/changelog.d/17.feat.md b/changelog.d/17.feat.md deleted file mode 100644 index efd3a40..0000000 --- a/changelog.d/17.feat.md +++ /dev/null @@ -1,45 +0,0 @@ -Finely grained `skip_benchmark_if` and `skip_params_if` have been added. - -```python -from asv_runner.benchmarks.mark import skip_benchmark_if, skip_params_if -import datetime - -class TimeSuite: - """ - An example benchmark that times the performance of various kinds - of iterating over dictionaries in Python. - """ - params = [100, 200, 300, 400, 500] - param_names = ["size"] - - def setup(self, size): - self.d = {} - for x in range(size): - self.d[x] = None - - @skip_benchmark_if(datetime.datetime.now().hour >= 12) - def time_keys(self, size): - for key in self.d.keys(): - pass - - @skip_benchmark_if(datetime.datetime.now().hour >= 12) - def time_values(self, size): - for value in self.d.values(): - pass - - @skip_benchmark_if(datetime.datetime.now().hour >= 12) - def time_range(self, size): - d = self.d - for key in range(size): - d[key] - - # Skip benchmarking when size is either 100 or 200 and the current hour is 12 or later. - @skip_params_if([(100,), (200,)], - datetime.datetime.now().hour >= 12) - def time_dict_update(self, size): - d = self.d - for i in range(size): - d[i] = i -``` - -Usage requires `asv 0.6.0`. diff --git a/changelog.d/18.feat.md b/changelog.d/18.feat.md deleted file mode 100644 index a20cc8f..0000000 --- a/changelog.d/18.feat.md +++ /dev/null @@ -1,40 +0,0 @@ -Benchmarks can now be parameterized using decorators. - -```python -import numpy as np -from asv_runner.benchmarks.mark import parameterize - -@parameterize({"n":[10, 100]}) -def time_sort(n): - np.sort(np.random.rand(n)) - -@parameterize({'n': [10, 100], 'func_name': ['range', 'arange']}) -def time_ranges_multi(n, func_name): - f = {'range': range, 'arange': np.arange}[func_name] - for i in f(n): - pass - -@parameterize({"size": [10, 100, 200]}) -class TimeSuiteDecoratorSingle: - def setup(self, size): - self.d = {} - for x in range(size): - self.d[x] = None - - def time_keys(self, size): - for key in self.d.keys(): - pass - - def time_values(self, size): - for value in self.d.values(): - pass - -@parameterize({'n': [10, 100], 'func_name': ['range', 'arange']}) -class TimeSuiteMultiDecorator: - def time_ranges(self, n, func_name): - f = {'range': range, 'arange': np.arange}[func_name] - for i in f(n): - pass -``` - -Usage requires `asv 0.6.0`. diff --git a/changelog.d/19.bugfix.md b/changelog.d/19.bugfix.md deleted file mode 100644 index c514d4c..0000000 --- a/changelog.d/19.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -It is possible to set a default timeout from `asv`. diff --git a/changelog.d/20.feat.md b/changelog.d/20.feat.md deleted file mode 100644 index 3c4c062..0000000 --- a/changelog.d/20.feat.md +++ /dev/null @@ -1,25 +0,0 @@ -Benchmarks can now be skipped during execution. - -```python -from asv_runner.benchmarks.mark import skip_for_params, parameterize, SkipNotImplemented - -# Fast because no setup is called -class SimpleFast: - params = ([False, True]) - param_names = ["ok"] - - @skip_for_params([(False, )]) - def time_failure(self, ok): - if ok: - x = 34.2**4.2 - -@parameterize({"ok": [False, True]}) -class SimpleSlow: - def time_failure(self, ok): - if ok: - x = 34.2**4.2 - else: - raise SkipNotImplemented(f"{ok} is skipped") -``` - -Usage requires `asv 0.6.0`. diff --git a/changelog.d/6.misc.md b/changelog.d/6.misc.md deleted file mode 100644 index 2d18fbe..0000000 --- a/changelog.d/6.misc.md +++ /dev/null @@ -1 +0,0 @@ -Documentation, both long-form and API level has been added. From fbacdacf2aa30bf5710cd1447138e85819016a93 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Feb 2024 19:34:18 +0000 Subject: [PATCH 4/7] MAINT: Release notes for 0.1.0 --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c60df2..7d297f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,23 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang +## [0.1.0](https://github.com/airspeed-velocity/asv_runner/tree/0.1.0) - 11-09-2023 + + +### Bug Fixes + +- Default `max_time` is set to `60.0` seconds to fix `--quick`. + ([#29](https://github.com/airspeed-velocity/asv_runner/issues/29)) +- `asv` will not try to access a missing `colorama` attribute. + ([#32](https://github.com/airspeed-velocity/asv_runner/issues/32)) + +### Other Changes and Additions + +- `pip-tools` and `pip-compile` are used to pin transitive dependencies for + read the docs. + ([#31](https://github.com/airspeed-velocity/asv_runner/issues/31)) + + ## [0.0.9](https://github.com/airspeed-velocity/asv_runner/tree/0.0.9) - 20-08-2023 From 48fd2d2559fe0470204d70b6ae5c896c88114dd9 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Feb 2024 19:40:54 +0000 Subject: [PATCH 5/7] DOC: Add changelog to the documentation --- .gitignore | 2 ++ changelog.d/38.misc.md | 1 + docs/source/conf.py | 11 +++++++++++ docs/source/index.md | 1 + 4 files changed, 15 insertions(+) create mode 100644 changelog.d/38.misc.md diff --git a/.gitignore b/.gitignore index c13b759..c5a3679 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,5 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ .pdm-python +/docs/source/CHANGELOG.md +/docs/html/ diff --git a/changelog.d/38.misc.md b/changelog.d/38.misc.md new file mode 100644 index 0000000..1041909 --- /dev/null +++ b/changelog.d/38.misc.md @@ -0,0 +1 @@ +`asv_runner` now uses `towncrier` to manage the changelog, also adds the changeglog to the generated documentation. diff --git a/docs/source/conf.py b/docs/source/conf.py index a841bc8..253bd4e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,3 +56,14 @@ "source_branch": "main", "source_directory": "docs/", } + + +# ------------- Copying things +import os +import shutil + +docs_source_dir = os.path.abspath(os.path.dirname(__file__)) +project_root_dir = os.path.abspath(os.path.join(docs_source_dir, '..', '..')) +changelog_src = os.path.join(project_root_dir, 'CHANGELOG.md') +changelog_dest = os.path.join(docs_source_dir, 'CHANGELOG.md') +shutil.copyfile(changelog_src, changelog_dest) diff --git a/docs/source/index.md b/docs/source/index.md index abcf22c..bd12b08 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -24,6 +24,7 @@ measure and analyze the performance of your Python packages. apidocs/index bplugin-list +CHANGELOG ``` ## Indices and tables From 1e606c4ab24bb48687d9ed4b740f48e043790418 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Feb 2024 19:56:25 +0000 Subject: [PATCH 6/7] MAINT: Lint --- asv_runner/_aux.py | 3 +-- docs/source/conf.py | 15 +++++---------- pyproject.toml | 4 ++-- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/asv_runner/_aux.py b/asv_runner/_aux.py index ff2d6fb..e0e7514 100644 --- a/asv_runner/_aux.py +++ b/asv_runner/_aux.py @@ -178,8 +178,7 @@ def recvall(sock, size): data += s if not s: raise RuntimeError( - "did not receive data from socket " - "(size {}, got only {!r})".format(size, data) + "did not receive data from socket " f"(size {size}, got only {data!r})" ) return data diff --git a/docs/source/conf.py b/docs/source/conf.py index 253bd4e..c465a4c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,7 +1,5 @@ -# Configuration file for the Sphinx documentation builder. -# -# For the full list of built-in configuration values, see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html +import os +import shutil # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -59,11 +57,8 @@ # ------------- Copying things -import os -import shutil - docs_source_dir = os.path.abspath(os.path.dirname(__file__)) -project_root_dir = os.path.abspath(os.path.join(docs_source_dir, '..', '..')) -changelog_src = os.path.join(project_root_dir, 'CHANGELOG.md') -changelog_dest = os.path.join(docs_source_dir, 'CHANGELOG.md') +project_root_dir = os.path.abspath(os.path.join(docs_source_dir, "..", "..")) +changelog_src = os.path.join(project_root_dir, "CHANGELOG.md") +changelog_dest = os.path.join(docs_source_dir, "CHANGELOG.md") shutil.copyfile(changelog_src, changelog_dest) diff --git a/pyproject.toml b/pyproject.toml index f306174..3a71184 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,10 +45,10 @@ build-backend = "pdm.backend" [tool.ruff] line-length = 88 -extend-ignore = [ +lint.extend-ignore = [ "E741", # Do not use variables named 'I', 'O', or 'l' ] -select = [ +lint.select = [ "E", # pycodestyle "F", # pyflakes "UP", # pyupgrade From 065d65d344fcbb4033ce1ba83457fe4982f24d89 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Feb 2024 19:58:02 +0000 Subject: [PATCH 7/7] MAINT: Use older ruff --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3a71184..f306174 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,10 +45,10 @@ build-backend = "pdm.backend" [tool.ruff] line-length = 88 -lint.extend-ignore = [ +extend-ignore = [ "E741", # Do not use variables named 'I', 'O', or 'l' ] -lint.select = [ +select = [ "E", # pycodestyle "F", # pyflakes "UP", # pyupgrade