reference-package 0.1.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.1
2
+ Name: reference_package
3
+ Version: 0.1.8
4
+ Summary: A basic package setup with examples.
5
+ Author: Kaleb Coberly
6
+ Maintainer-email: kaleb.coberly@gmail.com
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: click<9.0.0,>=8.0.0
10
+ Requires-Dist: typeguard<5.0.0,>=4.0.0
11
+ Provides-Extra: dev
12
+ Requires-Dist: reference_package[build]; extra == "dev"
13
+ Requires-Dist: reference_package[doc]; extra == "dev"
14
+ Requires-Dist: reference_package[qc]; extra == "dev"
15
+ Requires-Dist: reference_package[test]; extra == "dev"
16
+ Provides-Extra: build
17
+ Requires-Dist: build; extra == "build"
18
+ Requires-Dist: twine; extra == "build"
19
+ Provides-Extra: doc
20
+ Requires-Dist: furo>=2023.5.20; extra == "doc"
21
+ Requires-Dist: sphinx>=7.0.1; extra == "doc"
22
+ Requires-Dist: sphinx-autodoc-typehints>=1.23.3; extra == "doc"
23
+ Provides-Extra: qc
24
+ Requires-Dist: bandit>=1.7; extra == "qc"
25
+ Requires-Dist: black>=23.3; extra == "qc"
26
+ Requires-Dist: black[jupyter]>=23.3; extra == "qc"
27
+ Requires-Dist: flake8>=6.0.0; extra == "qc"
28
+ Requires-Dist: flake8-annotations>=3.0.1; extra == "qc"
29
+ Requires-Dist: flake8-bandit>=4.1.1; extra == "qc"
30
+ Requires-Dist: flake8-black>=0.3.6; extra == "qc"
31
+ Requires-Dist: flake8-bugbear>=23.7.10; extra == "qc"
32
+ Requires-Dist: flake8-docstrings>=1.7.0; extra == "qc"
33
+ Requires-Dist: flake8-isort>=6.0.0; extra == "qc"
34
+ Requires-Dist: isort>=5.12.0; extra == "qc"
35
+ Requires-Dist: jake>=3.0.1; extra == "qc"
36
+ Requires-Dist: pytype>=2023.6.0; extra == "qc"
37
+ Requires-Dist: reference_package[test]; extra == "qc"
38
+ Requires-Dist: safety>=2.3.1; extra == "qc"
39
+ Provides-Extra: test
40
+ Requires-Dist: coverage[toml]>=7.2.7; extra == "test"
41
+ Requires-Dist: pytest>=7.4; extra == "test"
42
+ Requires-Dist: pytest-cov>=4.1; extra == "test"
43
+
44
+ # Basic package template
45
+
46
+ ## Summary
47
+
48
+ Just a basic package template.
49
+
50
+ ## Credit
51
+
52
+ I borrowed and modified the structure and tools from the idiomatic usage of IHME's Central Computation GBD team when I worked with them in 2023-2024.
53
+
54
+ ## Structure
55
+
56
+ ```bash
57
+ src/reference_package/api Public and internal API.
58
+ src/reference_package/cli Command-line-interface.
59
+ src/reference_package/lib Implementation.
60
+ tests/e2e End-to-end tests.
61
+ test/integration Integration tests.
62
+ tests/unit Unit tests.
63
+ ```
64
+
65
+ ## Dependencies
66
+
67
+ * Python 3.11
68
+ * [make](https://www.gnu.org/software/make/)
69
+
70
+
71
+ ## Library functions
72
+
73
+ `reference_package` is a library from which you can import functions. Import the public example function like this: `from reference_package import wait_a_second`. Or, import the internal version like a power user like this: `from reference_package.api.internal import wait_a_second`.
74
+
75
+ Unless you're developing, avoid importing directly from library, like `from reference_package.lib.example import wait_a_second`.
76
+
77
+ ## CLI
78
+
79
+ Try the example CLI:
80
+
81
+ $ python -m example
82
+ $ python -m example --secs 2
83
+
84
+ ## Dev installation
85
+
86
+ You'll want this package's site-package files to be the source files in this repo so you can test your changes without having to reinstall. We've got some tools for that.
87
+
88
+ First build and activate the env before installing this package:
89
+
90
+ $ make build-env
91
+ $ conda activate reference_package_py3.12
92
+
93
+ Then, install this package and its dev dependencies:
94
+
95
+ $ make install INSTALL_EXTRAS=[dev]
96
+
97
+ This installs all the dependencies in your conda env site-packages, but the files for this package's installation are now your source files in this repo.
98
+
99
+ ## Dev workflow
100
+
101
+ You can list all the make tools you might want to use:
102
+
103
+ $ make list-targets
104
+
105
+ Go check them out in `Makefile`.
106
+
107
+ ### QC and testing
108
+
109
+ Before pushing commits, you'll usually want to rebuild the env and run all the QC and testing:
110
+
111
+ $ make clean format full
112
+
113
+ When making smaller commits, you might just want to run some of the smaller commands:
114
+
115
+ $ make clean format full-qc full-test
116
+
117
+ ### CI test run
118
+
119
+ Before opening a PR or pushing to it, you'll want to run locally the same CI pipeline that GitHub will run (`.github/workflows/QC-and-build.yml`). This runs on multiple images, so you'll need to install Docker and have it running on your machine: https://www.docker.com/
120
+
121
+ Once that's installed and running, you can use `act`. You'll need to install that as well. I develop on a Mac, so I used `homebrew` to install it (which you'll also need to install: https://brew.sh/):
122
+
123
+ $ brew install act
124
+
125
+ Then, run it from the repo directory:
126
+
127
+ $ make ci-run
128
+
129
+ That will run `.github/workflows/QC-and-build.yml` and every other action tagged to the pull_request event. Also, since `act` doesn't work with Mac and Windows architecture, it skips/fails them, but it is a good test of the Linux build.
130
+
131
+ # TODO
132
+
133
+ - Move these to issues.
134
+ - Restrict deployment with GitHub environments: https://docs.github.com/en/actions/use-cases-and-examples/deploying/deploying-with-github-actions, https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment
135
+ - Update deploy jobs to install from deployed package version and run tests again. (https://test.pypi.org/project/reference-package/ `pip install -i https://test.pypi.org/simple/ reference-package==0.1.6`)
136
+ - Add proper branch protection on main and set publishing environments to protected branches only.
137
+ - Add CLI help docs to documentation.
138
+ - Make docs deploy.
139
+ - Add Windows image to matrix.
140
+ - Get a local runner that will work with Windows (other than my laptop)
141
+ - Remove upper pins on dependencies since this is a template and pretty bare? (That way I'll know if a new change is truly breaking to basic usage, and new packages built from this template can choose upper pins based on what they install at that time.)
142
+ - Make a periodic build, with failure/success alerts. https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule, https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event
143
+ - Add license and other standard docs.
144
+ - Verify user for all PRs, not just to main?
145
+ - Install app to only allow PRs from within org?
146
+ - Explain SPEC 0 support window as rationale for matrix build.
147
+ - Ooo, make an experimental doc lint recipe with these neato tools: https://earthly.dev/blog/markdown-lint/
148
+ - And, look more closely at this: https://www.writethedocs.org/guide/docs-as-code/
149
+ - Make repo public.
150
+ - Bump QC to python 3.13 when msgspec update gets released: https://github.com/jcrist/msgspec/issues/698, https://github.com/jcrist/msgspec/issues/698 (Add issue number to inline TODO.)
151
+ - Build package first and install that in base env to clone and then install and run QC, tests, and doc build? Just to be more certain of what we're deploying.
@@ -0,0 +1,108 @@
1
+ # Basic package template
2
+
3
+ ## Summary
4
+
5
+ Just a basic package template.
6
+
7
+ ## Credit
8
+
9
+ I borrowed and modified the structure and tools from the idiomatic usage of IHME's Central Computation GBD team when I worked with them in 2023-2024.
10
+
11
+ ## Structure
12
+
13
+ ```bash
14
+ src/reference_package/api Public and internal API.
15
+ src/reference_package/cli Command-line-interface.
16
+ src/reference_package/lib Implementation.
17
+ tests/e2e End-to-end tests.
18
+ test/integration Integration tests.
19
+ tests/unit Unit tests.
20
+ ```
21
+
22
+ ## Dependencies
23
+
24
+ * Python 3.11
25
+ * [make](https://www.gnu.org/software/make/)
26
+
27
+
28
+ ## Library functions
29
+
30
+ `reference_package` is a library from which you can import functions. Import the public example function like this: `from reference_package import wait_a_second`. Or, import the internal version like a power user like this: `from reference_package.api.internal import wait_a_second`.
31
+
32
+ Unless you're developing, avoid importing directly from library, like `from reference_package.lib.example import wait_a_second`.
33
+
34
+ ## CLI
35
+
36
+ Try the example CLI:
37
+
38
+ $ python -m example
39
+ $ python -m example --secs 2
40
+
41
+ ## Dev installation
42
+
43
+ You'll want this package's site-package files to be the source files in this repo so you can test your changes without having to reinstall. We've got some tools for that.
44
+
45
+ First build and activate the env before installing this package:
46
+
47
+ $ make build-env
48
+ $ conda activate reference_package_py3.12
49
+
50
+ Then, install this package and its dev dependencies:
51
+
52
+ $ make install INSTALL_EXTRAS=[dev]
53
+
54
+ This installs all the dependencies in your conda env site-packages, but the files for this package's installation are now your source files in this repo.
55
+
56
+ ## Dev workflow
57
+
58
+ You can list all the make tools you might want to use:
59
+
60
+ $ make list-targets
61
+
62
+ Go check them out in `Makefile`.
63
+
64
+ ### QC and testing
65
+
66
+ Before pushing commits, you'll usually want to rebuild the env and run all the QC and testing:
67
+
68
+ $ make clean format full
69
+
70
+ When making smaller commits, you might just want to run some of the smaller commands:
71
+
72
+ $ make clean format full-qc full-test
73
+
74
+ ### CI test run
75
+
76
+ Before opening a PR or pushing to it, you'll want to run locally the same CI pipeline that GitHub will run (`.github/workflows/QC-and-build.yml`). This runs on multiple images, so you'll need to install Docker and have it running on your machine: https://www.docker.com/
77
+
78
+ Once that's installed and running, you can use `act`. You'll need to install that as well. I develop on a Mac, so I used `homebrew` to install it (which you'll also need to install: https://brew.sh/):
79
+
80
+ $ brew install act
81
+
82
+ Then, run it from the repo directory:
83
+
84
+ $ make ci-run
85
+
86
+ That will run `.github/workflows/QC-and-build.yml` and every other action tagged to the pull_request event. Also, since `act` doesn't work with Mac and Windows architecture, it skips/fails them, but it is a good test of the Linux build.
87
+
88
+ # TODO
89
+
90
+ - Move these to issues.
91
+ - Restrict deployment with GitHub environments: https://docs.github.com/en/actions/use-cases-and-examples/deploying/deploying-with-github-actions, https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment
92
+ - Update deploy jobs to install from deployed package version and run tests again. (https://test.pypi.org/project/reference-package/ `pip install -i https://test.pypi.org/simple/ reference-package==0.1.6`)
93
+ - Add proper branch protection on main and set publishing environments to protected branches only.
94
+ - Add CLI help docs to documentation.
95
+ - Make docs deploy.
96
+ - Add Windows image to matrix.
97
+ - Get a local runner that will work with Windows (other than my laptop)
98
+ - Remove upper pins on dependencies since this is a template and pretty bare? (That way I'll know if a new change is truly breaking to basic usage, and new packages built from this template can choose upper pins based on what they install at that time.)
99
+ - Make a periodic build, with failure/success alerts. https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule, https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event
100
+ - Add license and other standard docs.
101
+ - Verify user for all PRs, not just to main?
102
+ - Install app to only allow PRs from within org?
103
+ - Explain SPEC 0 support window as rationale for matrix build.
104
+ - Ooo, make an experimental doc lint recipe with these neato tools: https://earthly.dev/blog/markdown-lint/
105
+ - And, look more closely at this: https://www.writethedocs.org/guide/docs-as-code/
106
+ - Make repo public.
107
+ - Bump QC to python 3.13 when msgspec update gets released: https://github.com/jcrist/msgspec/issues/698, https://github.com/jcrist/msgspec/issues/698 (Add issue number to inline TODO.)
108
+ - Build package first and install that in base env to clone and then install and run QC, tests, and doc build? Just to be more certain of what we're deploying.
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.pytest.ini_options]
6
+ markers = [
7
+ "unit",
8
+ "integration",
9
+ "e2e",
10
+ ]
11
+
12
+ junit_family = "xunit2"
13
+ testpaths = [
14
+ "tests/unit",
15
+ "tests/integration",
16
+ "tests/e2e",
17
+ ]
18
+
19
+ [tool.coverage.report]
20
+ show_missing = true
21
+
22
+ [tool.black]
23
+ line_length = 94
24
+ skip-magic-trailing-comma = true
25
+
26
+ [tool.isort]
27
+ line_length = 94
28
+ profile = "black"
29
+ multi_line_output = 3
30
+ known_klub = ["reference_package"]
31
+ # Custom sections and ordering, https:://pypi.org/project/isort/
32
+ sections = ["FUTURE", "STDLIB", "THIRDPARTY", "KLUB", "FIRSTPARTY", "LOCALFOLDER"]
@@ -0,0 +1,63 @@
1
+ [metadata]
2
+ name = reference_package
3
+ version = 0.1.8
4
+ description = A basic package setup with examples.
5
+ long_description = file: README.md
6
+ long_description_content_type = text/markdown
7
+ author = Kaleb Coberly
8
+ maintainer_email = kaleb.coberly@gmail.com
9
+
10
+ [options.entry_points]
11
+ console_scripts =
12
+ example = reference_package.cli.example:main
13
+
14
+ [options]
15
+ python_requires = >=3.11
16
+ package_dir =
17
+ =src
18
+ packages = find:
19
+ install_requires =
20
+ click>=8.0.0,<9.0.0
21
+ typeguard>=4.0.0,<5.0.0
22
+
23
+ [options.packages.find]
24
+ where = src
25
+
26
+ [options.extras_require]
27
+ dev =
28
+ reference_package[build]
29
+ reference_package[doc]
30
+ reference_package[qc]
31
+ reference_package[test]
32
+ build =
33
+ build
34
+ twine
35
+ doc =
36
+ furo>=2023.5.20
37
+ sphinx>=7.0.1
38
+ sphinx-autodoc-typehints>=1.23.3
39
+ qc =
40
+ bandit>=1.7
41
+ black>=23.3
42
+ black[jupyter]>=23.3
43
+ flake8>=6.0.0
44
+ flake8-annotations>=3.0.1
45
+ flake8-bandit>=4.1.1
46
+ flake8-black>=0.3.6
47
+ flake8-bugbear>=23.7.10
48
+ flake8-docstrings>=1.7.0
49
+ flake8-isort>=6.0.0
50
+ isort>=5.12.0
51
+ jake>=3.0.1
52
+ pytype>=2023.6.0
53
+ reference_package[test]
54
+ safety>=2.3.1
55
+ test =
56
+ coverage[toml]>=7.2.7
57
+ pytest>=7.4
58
+ pytest-cov>=4.1
59
+
60
+ [egg_info]
61
+ tag_build =
62
+ tag_date = 0
63
+
@@ -0,0 +1,12 @@
1
+ """Top-level init."""
2
+
3
+ from importlib.metadata import version
4
+
5
+ from reference_package.api.public import wait_a_second
6
+
7
+ try:
8
+ __version__: str = version(__name__)
9
+ except Exception:
10
+ __version__ = "unknown"
11
+
12
+ del version
@@ -0,0 +1 @@
1
+ """Do not define in API, only import."""
@@ -0,0 +1,25 @@
1
+ """Internal functions overlay library and are typically wrapped by public functions.
2
+
3
+ This allows us to maintain a separation of API from implementation.
4
+ Internal functions may come with extra options that public functions don't have, say for
5
+ power users and developers who may want to use an existing DB session or something.
6
+ """
7
+
8
+ from typeguard import typechecked
9
+
10
+ from reference_package.lib import example
11
+
12
+
13
+ @typechecked
14
+ def wait_a_second(
15
+ secs: int = 1, extra_string: str = "Fancy me, calling internal functions."
16
+ ) -> None:
17
+ """Just wait a second, or however many seconds you want.
18
+
19
+ Also prints a message with the number you passed, along with any extra message you want.
20
+
21
+ Arguments:
22
+ secs: How many seconds to wait.
23
+ extra_string: Extra message to add on tail of existing message.
24
+ """
25
+ example.wait_a_second(secs=secs, extra_string=extra_string)
@@ -0,0 +1,21 @@
1
+ """Public functions wrap internal functions which wrap library functions.
2
+
3
+ This allows separation of API from implementation. It also allows a simplified public API
4
+ separate from a more complex internal API with more options for power users.
5
+ """
6
+
7
+ from typeguard import typechecked
8
+
9
+ from reference_package.api.internal import example
10
+
11
+
12
+ @typechecked
13
+ def wait_a_second(secs: int = 1) -> None:
14
+ """Just wait a second, or however many seconds you want.
15
+
16
+ Also prints a message with the number you passed.
17
+
18
+ Arguments:
19
+ secs: How many seconds to wait.
20
+ """
21
+ example.wait_a_second(secs=secs)
@@ -0,0 +1 @@
1
+ """CLI init."""
@@ -0,0 +1,14 @@
1
+ """This is just an example."""
2
+
3
+ import click
4
+ from typeguard import typechecked
5
+
6
+ from reference_package.lib import example
7
+
8
+
9
+ @click.command()
10
+ @click.option("--secs", type=int, required=False, default=1)
11
+ @typechecked
12
+ def main(secs: int = 1) -> None:
13
+ """Wait n seconds."""
14
+ example.wait_a_second(secs=secs)
@@ -0,0 +1 @@
1
+ """lib init."""
@@ -0,0 +1,16 @@
1
+ """This is an example module."""
2
+
3
+ import time
4
+
5
+
6
+ def wait_a_second(secs: int = 1, extra_string: str = "") -> None:
7
+ """Just wait a second, or however many seconds you want.
8
+
9
+ Also prints a message with the number you passed, along with any extra message you want.
10
+
11
+ Arguments:
12
+ secs: How many seconds to wait.
13
+ extra_string: Extra message to add on tail of existing message.
14
+ """
15
+ print(f"Waiting {secs} seconds.{' ' + extra_string if extra_string else ''}")
16
+ time.sleep(secs)
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.1
2
+ Name: reference_package
3
+ Version: 0.1.8
4
+ Summary: A basic package setup with examples.
5
+ Author: Kaleb Coberly
6
+ Maintainer-email: kaleb.coberly@gmail.com
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: click<9.0.0,>=8.0.0
10
+ Requires-Dist: typeguard<5.0.0,>=4.0.0
11
+ Provides-Extra: dev
12
+ Requires-Dist: reference_package[build]; extra == "dev"
13
+ Requires-Dist: reference_package[doc]; extra == "dev"
14
+ Requires-Dist: reference_package[qc]; extra == "dev"
15
+ Requires-Dist: reference_package[test]; extra == "dev"
16
+ Provides-Extra: build
17
+ Requires-Dist: build; extra == "build"
18
+ Requires-Dist: twine; extra == "build"
19
+ Provides-Extra: doc
20
+ Requires-Dist: furo>=2023.5.20; extra == "doc"
21
+ Requires-Dist: sphinx>=7.0.1; extra == "doc"
22
+ Requires-Dist: sphinx-autodoc-typehints>=1.23.3; extra == "doc"
23
+ Provides-Extra: qc
24
+ Requires-Dist: bandit>=1.7; extra == "qc"
25
+ Requires-Dist: black>=23.3; extra == "qc"
26
+ Requires-Dist: black[jupyter]>=23.3; extra == "qc"
27
+ Requires-Dist: flake8>=6.0.0; extra == "qc"
28
+ Requires-Dist: flake8-annotations>=3.0.1; extra == "qc"
29
+ Requires-Dist: flake8-bandit>=4.1.1; extra == "qc"
30
+ Requires-Dist: flake8-black>=0.3.6; extra == "qc"
31
+ Requires-Dist: flake8-bugbear>=23.7.10; extra == "qc"
32
+ Requires-Dist: flake8-docstrings>=1.7.0; extra == "qc"
33
+ Requires-Dist: flake8-isort>=6.0.0; extra == "qc"
34
+ Requires-Dist: isort>=5.12.0; extra == "qc"
35
+ Requires-Dist: jake>=3.0.1; extra == "qc"
36
+ Requires-Dist: pytype>=2023.6.0; extra == "qc"
37
+ Requires-Dist: reference_package[test]; extra == "qc"
38
+ Requires-Dist: safety>=2.3.1; extra == "qc"
39
+ Provides-Extra: test
40
+ Requires-Dist: coverage[toml]>=7.2.7; extra == "test"
41
+ Requires-Dist: pytest>=7.4; extra == "test"
42
+ Requires-Dist: pytest-cov>=4.1; extra == "test"
43
+
44
+ # Basic package template
45
+
46
+ ## Summary
47
+
48
+ Just a basic package template.
49
+
50
+ ## Credit
51
+
52
+ I borrowed and modified the structure and tools from the idiomatic usage of IHME's Central Computation GBD team when I worked with them in 2023-2024.
53
+
54
+ ## Structure
55
+
56
+ ```bash
57
+ src/reference_package/api Public and internal API.
58
+ src/reference_package/cli Command-line-interface.
59
+ src/reference_package/lib Implementation.
60
+ tests/e2e End-to-end tests.
61
+ test/integration Integration tests.
62
+ tests/unit Unit tests.
63
+ ```
64
+
65
+ ## Dependencies
66
+
67
+ * Python 3.11
68
+ * [make](https://www.gnu.org/software/make/)
69
+
70
+
71
+ ## Library functions
72
+
73
+ `reference_package` is a library from which you can import functions. Import the public example function like this: `from reference_package import wait_a_second`. Or, import the internal version like a power user like this: `from reference_package.api.internal import wait_a_second`.
74
+
75
+ Unless you're developing, avoid importing directly from library, like `from reference_package.lib.example import wait_a_second`.
76
+
77
+ ## CLI
78
+
79
+ Try the example CLI:
80
+
81
+ $ python -m example
82
+ $ python -m example --secs 2
83
+
84
+ ## Dev installation
85
+
86
+ You'll want this package's site-package files to be the source files in this repo so you can test your changes without having to reinstall. We've got some tools for that.
87
+
88
+ First build and activate the env before installing this package:
89
+
90
+ $ make build-env
91
+ $ conda activate reference_package_py3.12
92
+
93
+ Then, install this package and its dev dependencies:
94
+
95
+ $ make install INSTALL_EXTRAS=[dev]
96
+
97
+ This installs all the dependencies in your conda env site-packages, but the files for this package's installation are now your source files in this repo.
98
+
99
+ ## Dev workflow
100
+
101
+ You can list all the make tools you might want to use:
102
+
103
+ $ make list-targets
104
+
105
+ Go check them out in `Makefile`.
106
+
107
+ ### QC and testing
108
+
109
+ Before pushing commits, you'll usually want to rebuild the env and run all the QC and testing:
110
+
111
+ $ make clean format full
112
+
113
+ When making smaller commits, you might just want to run some of the smaller commands:
114
+
115
+ $ make clean format full-qc full-test
116
+
117
+ ### CI test run
118
+
119
+ Before opening a PR or pushing to it, you'll want to run locally the same CI pipeline that GitHub will run (`.github/workflows/QC-and-build.yml`). This runs on multiple images, so you'll need to install Docker and have it running on your machine: https://www.docker.com/
120
+
121
+ Once that's installed and running, you can use `act`. You'll need to install that as well. I develop on a Mac, so I used `homebrew` to install it (which you'll also need to install: https://brew.sh/):
122
+
123
+ $ brew install act
124
+
125
+ Then, run it from the repo directory:
126
+
127
+ $ make ci-run
128
+
129
+ That will run `.github/workflows/QC-and-build.yml` and every other action tagged to the pull_request event. Also, since `act` doesn't work with Mac and Windows architecture, it skips/fails them, but it is a good test of the Linux build.
130
+
131
+ # TODO
132
+
133
+ - Move these to issues.
134
+ - Restrict deployment with GitHub environments: https://docs.github.com/en/actions/use-cases-and-examples/deploying/deploying-with-github-actions, https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment
135
+ - Update deploy jobs to install from deployed package version and run tests again. (https://test.pypi.org/project/reference-package/ `pip install -i https://test.pypi.org/simple/ reference-package==0.1.6`)
136
+ - Add proper branch protection on main and set publishing environments to protected branches only.
137
+ - Add CLI help docs to documentation.
138
+ - Make docs deploy.
139
+ - Add Windows image to matrix.
140
+ - Get a local runner that will work with Windows (other than my laptop)
141
+ - Remove upper pins on dependencies since this is a template and pretty bare? (That way I'll know if a new change is truly breaking to basic usage, and new packages built from this template can choose upper pins based on what they install at that time.)
142
+ - Make a periodic build, with failure/success alerts. https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule, https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event
143
+ - Add license and other standard docs.
144
+ - Verify user for all PRs, not just to main?
145
+ - Install app to only allow PRs from within org?
146
+ - Explain SPEC 0 support window as rationale for matrix build.
147
+ - Ooo, make an experimental doc lint recipe with these neato tools: https://earthly.dev/blog/markdown-lint/
148
+ - And, look more closely at this: https://www.writethedocs.org/guide/docs-as-code/
149
+ - Make repo public.
150
+ - Bump QC to python 3.13 when msgspec update gets released: https://github.com/jcrist/msgspec/issues/698, https://github.com/jcrist/msgspec/issues/698 (Add issue number to inline TODO.)
151
+ - Build package first and install that in base env to clone and then install and run QC, tests, and doc build? Just to be more certain of what we're deploying.
@@ -0,0 +1,17 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.cfg
4
+ src/reference_package/__init__.py
5
+ src/reference_package.egg-info/PKG-INFO
6
+ src/reference_package.egg-info/SOURCES.txt
7
+ src/reference_package.egg-info/dependency_links.txt
8
+ src/reference_package.egg-info/entry_points.txt
9
+ src/reference_package.egg-info/requires.txt
10
+ src/reference_package.egg-info/top_level.txt
11
+ src/reference_package/api/__init__.py
12
+ src/reference_package/api/internal.py
13
+ src/reference_package/api/public.py
14
+ src/reference_package/cli/__init__.py
15
+ src/reference_package/cli/example.py
16
+ src/reference_package/lib/__init__.py
17
+ src/reference_package/lib/example.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ example = reference_package.cli.example:main
@@ -0,0 +1,39 @@
1
+ click<9.0.0,>=8.0.0
2
+ typeguard<5.0.0,>=4.0.0
3
+
4
+ [build]
5
+ build
6
+ twine
7
+
8
+ [dev]
9
+ reference_package[build]
10
+ reference_package[doc]
11
+ reference_package[qc]
12
+ reference_package[test]
13
+
14
+ [doc]
15
+ furo>=2023.5.20
16
+ sphinx>=7.0.1
17
+ sphinx-autodoc-typehints>=1.23.3
18
+
19
+ [qc]
20
+ bandit>=1.7
21
+ black>=23.3
22
+ black[jupyter]>=23.3
23
+ flake8>=6.0.0
24
+ flake8-annotations>=3.0.1
25
+ flake8-bandit>=4.1.1
26
+ flake8-black>=0.3.6
27
+ flake8-bugbear>=23.7.10
28
+ flake8-docstrings>=1.7.0
29
+ flake8-isort>=6.0.0
30
+ isort>=5.12.0
31
+ jake>=3.0.1
32
+ pytype>=2023.6.0
33
+ reference_package[test]
34
+ safety>=2.3.1
35
+
36
+ [test]
37
+ coverage[toml]>=7.2.7
38
+ pytest>=7.4
39
+ pytest-cov>=4.1
@@ -0,0 +1 @@
1
+ reference_package