moat-src 0.8.2__tar.gz → 0.8.4__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.
Files changed (25) hide show
  1. {moat_src-0.8.2/moat_src.egg-info → moat_src-0.8.4}/PKG-INFO +1 -1
  2. {moat_src-0.8.2 → moat_src-0.8.4/debian/moat-src/usr/lib/python3/dist-packages}/moat/src/_main.py +138 -160
  3. moat_src-0.8.4/debian/moat-src/usr/lib/python3/dist-packages/moat/src/_templates/moat/__init__.py +3 -0
  4. moat_src-0.8.4/debian/moat-src/usr/lib/python3/dist-packages/moat/src/_templates/pyproject.default.yaml +146 -0
  5. moat_src-0.8.4/debian/moat-src/usr/lib/python3/dist-packages/moat/src/_templates/pyproject.forced.yaml +77 -0
  6. moat_src-0.8.4/moat/src/__init__.py +0 -0
  7. moat_src-0.8.4/moat/src/_main.py +1113 -0
  8. moat_src-0.8.4/moat/src/_templates/moat/__init__.py +3 -0
  9. moat_src-0.8.4/moat/src/_templates/pyproject.default.yaml +146 -0
  10. moat_src-0.8.4/moat/src/_templates/pyproject.forced.yaml +77 -0
  11. moat_src-0.8.4/moat/src/inspect.py +65 -0
  12. moat_src-0.8.4/moat/src/test.py +89 -0
  13. {moat_src-0.8.2 → moat_src-0.8.4/moat_src.egg-info}/PKG-INFO +1 -1
  14. moat_src-0.8.4/moat_src.egg-info/SOURCES.txt +21 -0
  15. moat_src-0.8.4/moat_src.egg-info/top_level.txt +4 -0
  16. {moat_src-0.8.2 → moat_src-0.8.4}/pyproject.toml +3 -2
  17. moat_src-0.8.2/moat_src.egg-info/SOURCES.txt +0 -11
  18. moat_src-0.8.2/moat_src.egg-info/top_level.txt +0 -1
  19. {moat_src-0.8.2 → moat_src-0.8.4}/LICENSE.txt +0 -0
  20. {moat_src-0.8.2 → moat_src-0.8.4/debian/moat-src/usr/lib/python3/dist-packages}/moat/src/__init__.py +0 -0
  21. {moat_src-0.8.2 → moat_src-0.8.4/debian/moat-src/usr/lib/python3/dist-packages}/moat/src/inspect.py +0 -0
  22. {moat_src-0.8.2 → moat_src-0.8.4/debian/moat-src/usr/lib/python3/dist-packages}/moat/src/test.py +0 -0
  23. {moat_src-0.8.2 → moat_src-0.8.4}/moat_src.egg-info/dependency_links.txt +0 -0
  24. {moat_src-0.8.2 → moat_src-0.8.4}/moat_src.egg-info/requires.txt +0 -0
  25. {moat_src-0.8.2 → moat_src-0.8.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-src
3
- Version: 0.8.2
3
+ Version: 0.8.4
4
4
  Summary: Tools for managing the MoaT sources
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
@@ -67,10 +67,9 @@ class ChangedError(RuntimeError):
67
67
  return f"{s} changed between {tag.name} and {head}"
68
68
 
69
69
  class _Common:
70
- _last_tag:str = None
71
70
 
72
71
  def next_tag(self,major:bool=False,minor:bool=False):
73
- tag = self.last_tag()[0]
72
+ tag = self.last_tag
74
73
  try:
75
74
  n = [ int(x) for x in tag.split('.') ]
76
75
  if len(n) != 3:
@@ -112,6 +111,33 @@ class Package(_Common):
112
111
  def __hash__(self):
113
112
  return hash(self.name)
114
113
 
114
+ @property
115
+ def vers(self):
116
+ v = self._repo.versions[self.dash]
117
+ if not isinstance(v,dict):
118
+ tag,commit = v
119
+ v = attrdict(
120
+ tag=tag,
121
+ pkg=1,
122
+ rev=commit,
123
+ )
124
+ self._repo.versions[self.dash] = v
125
+ return v
126
+
127
+ @vers.setter
128
+ def vers(self,d):
129
+ v = self.vers
130
+ v.update(d)
131
+ return v
132
+
133
+ @property
134
+ def last_tag(self):
135
+ return self.vers.tag
136
+
137
+ @property
138
+ def last_commit(self):
139
+ return self.vers.rev
140
+
115
141
  @property
116
142
  def mdash(self):
117
143
  d=dash(self.name)
@@ -155,30 +181,15 @@ class Package(_Common):
155
181
  if not licd.exists():
156
182
  copyfile("LICENSE.txt", licd)
157
183
 
158
- def last_tag(self, unchanged:bool=False) -> Tag|None:
159
- """
160
- Return the most-recent tag for this subrepo
161
- """
162
- try:
163
- tag,commit = self._repo.versions[self.dash]
164
- except KeyError:
165
- raise KeyError(f"No version for {self.dash} found") from None
166
- if unchanged and self.has_changes(commit):
167
- raise ChangedError(subsys,t,ref)
168
- return tag,commit
169
-
170
- def has_changes(self, tag:Commit=None) -> bool:
184
+ def has_changes(self, main:bool|None=None) -> bool:
171
185
  """
172
- Test whether the given subsystem (or any subsystem)
173
- changed between the head and the @tag commit
186
+ Test whether the given subsystem changed
187
+ between the head and the @tag commit
174
188
  """
175
- if tag is None:
176
- tag,commit = self.last_tag()
177
- else:
178
- commit = tag
189
+ commit = self.last_commit
179
190
  head = self._repo.head.commit
180
- for d in head.diff(commit):
181
- if self._repo.repo_for(d.a_path) != self.name and self._repo.repo_for(d.b_path) != self.name:
191
+ for d in head.diff(self.last_commit):
192
+ if self._repo.repo_for(d.a_path, main) != self.name and self._repo.repo_for(d.b_path, main) != self.name:
182
193
  continue
183
194
  return True
184
195
  return False
@@ -205,7 +216,7 @@ class Repo(git.Repo,_Common):
205
216
  mi = p.parts.index("moat")
206
217
  self.moat_name = "-".join(p.parts[mi:])
207
218
  with open("versions.yaml") as f:
208
- self.versions = yload(f)
219
+ self.versions = yload(f, attr=True)
209
220
 
210
221
  def write_tags(self):
211
222
  with open("versions.yaml","w") as f:
@@ -213,24 +224,30 @@ class Repo(git.Repo,_Common):
213
224
  self.index.add("versions.yaml")
214
225
 
215
226
 
216
- def last_tag(self, unchanged:bool=False) -> Tag|None:
227
+ @property
228
+ def last_tag(self) -> Tag|None:
217
229
  """
218
230
  Return the most-recent tag for this repo
219
231
  """
220
232
  if self._last_tag is not None:
221
- return self._last_tag,self._last_tag
233
+ return self._last_tag
234
+
222
235
  for c in self._repo.commits(self.head.commit):
223
236
  t = self.tagged(c)
224
237
  if t is None:
225
238
  continue
226
239
 
227
240
  self._last_tag = t
228
- if unchanged and self.has_changes(c):
229
- raise ChangedError(subsys,t)
230
- return t,t
241
+ return t
231
242
 
232
243
  raise ValueError(f"No tags found")
233
244
 
245
+ @property
246
+ def last_commit(self) -> str:
247
+ t = self.last_tag
248
+ c = self.tags[t].commit
249
+ return c.hexsha
250
+
234
251
  def part(self, name):
235
252
  return self._repos[dash(name)]
236
253
 
@@ -270,29 +287,31 @@ class Repo(git.Repo,_Common):
270
287
 
271
288
  self._repos["main"].populate(Path("moat"))
272
289
 
273
- def repo_for(self, path:Path|str) -> str:
290
+ def repo_for(self, path:Path|str, main:bool|None) -> str:
274
291
  """
275
292
  Given a file path, returns the subrepo in question
276
293
  """
277
- name = "moat"
278
294
  sc = self._repos["main"]
279
295
  path=Path(path)
280
- try:
281
- if path.parts[0] == "packaging":
282
- return path.parts[1].replace("-",".")
283
- except KeyError:
296
+
297
+ if main is not False and path.parts[0] == "moat":
298
+ name = "moat"
299
+ for p in path.parts[1:]:
300
+ if p in sc.subs:
301
+ name += "."+p
302
+ sc = sc.subs[p]
303
+ else:
304
+ break
284
305
  return name
285
306
 
286
- if path.parts[0] != "moat":
287
- return None
307
+ if main is not True and path.parts[0] == "packaging":
308
+ try:
309
+ return undash(path.parts[1])
310
+ except IndexError:
311
+ return None
312
+
313
+ return None
288
314
 
289
- for p in path.parts[1:]:
290
- if p in sc.subs:
291
- name += "."+p
292
- sc = sc.subs[p]
293
- else:
294
- break
295
- return name
296
315
 
297
316
  def commits(self, ref=None):
298
317
  """Iterate over topo sort of commits following @ref, or HEAD.
@@ -315,16 +334,16 @@ class Repo(git.Repo,_Common):
315
334
  yield ref
316
335
  work.extend(ref.parents)
317
336
 
318
- def has_changes(self, tag:Tag=None) -> bool:
337
+ def has_changes(self, main:bool|None=None) -> bool:
319
338
  """
320
339
  Test whether any subsystem changed since the "tagged" commit
321
340
 
322
341
  """
323
342
  if tag is None:
324
- tag,commit = self.last_tag()
343
+ tag = self.last_tag
325
344
  head = self._repo.head.commit
326
345
  for d in head.diff(tag):
327
- if self.repo_for(d.a_path) == "moat" and self.repo_for(d.b_path) == "moat":
346
+ if self.repo_for(d.a_path, main) == "moat" and self.repo_for(d.b_path, main) == "moat":
328
347
  continue
329
348
  return True
330
349
  return False
@@ -695,49 +714,23 @@ def path_():
695
714
 
696
715
 
697
716
  @cli.command()
698
- @click.option("-s", "--show", is_flag=True, help="Show all tags")
699
- @click.option("-r", "--run", is_flag=True, help="Update all stale tags")
700
- def tags(show,run):
717
+ def tags():
718
+ """
719
+ List all tags
720
+ """
701
721
  repo = Repo(None)
702
722
 
703
- if show:
704
- if run:
705
- raise click.UsageError("Can't display and change the tag at the same time!")
706
-
707
- for r in repo.parts:
708
- try:
709
- tag,commit = r.last_tag()
710
- except ValueError:
711
- print(f"{r.dash} -")
712
- continue
713
- if r.has_changes(commit):
714
- print(f"{r.dash} {tag} STALE")
715
- else:
716
- print(f"{r.dash} {tag}")
717
- return
718
-
719
- if repo.is_dirty(index=True, working_tree=True, untracked_files=True, submodules=False):
720
- print("Repo is dirty. Not tagging globally.", file=sys.stderr)
721
- return
722
-
723
- changed=False
724
723
  for r in repo.parts:
725
- tag,commit = r.last_tag()
726
- if not r.has_changes(commit):
727
- print(repo.dash,tag,"UNCHANGED")
728
- continue
729
-
730
- tag = r.next_tag()
731
- print(repo.dash,tag)
732
- if not run:
724
+ try:
725
+ tag = r.last_tag
726
+ except KeyError:
733
727
  continue
734
-
735
- repo.versions[r.dash] = (tag,repo.head.commit.hexsha[:9])
736
- changed=True
737
-
738
- if changed:
739
- repo.write_tags()
740
-
728
+ if r.has_changes(True):
729
+ print(f"{r.dash} {tag} STALE")
730
+ elif r.has_changes(True):
731
+ print(f"{r.dash} {tag} REBUILD")
732
+ else:
733
+ print(f"{r.dash} {tag}")
741
734
 
742
735
  @cli.command()
743
736
  @click.option("-r", "--run", is_flag=True, help="actually do the tagging")
@@ -747,18 +740,27 @@ def tags(show,run):
747
740
  @click.option("-v", "--tag", "force", type=str, help="Use this explicit tag value")
748
741
  @click.option("-q", "--query","--show","show", is_flag=True, help="Show the latest tag")
749
742
  @click.option("-f", "--force","FORCE", is_flag=True, help="replace an existing tag")
750
- def tag(run,minor,major,subtree,force,FORCE,show):
743
+ @click.option("-b", "--build", is_flag=True, help="set/increment the build number")
744
+ def tag(run,minor,major,subtree,force,FORCE,show,build):
751
745
  """
752
746
  Tag the repository (or a subtree).
747
+
748
+ MoaT versions are of the form ``a.b.c``. Binaries also have a build
749
+ number. This command auto-increments ``c`` and sets the build to ``1``,
750
+ except when you use ``-M|-m|-b``.
753
751
  """
754
752
  if minor and major:
755
753
  raise click.UsageError("Can't change both minor and major!")
756
754
  if force and (minor or major):
757
755
  raise click.UsageError("Can't use an explicit tag with changing minor or major!")
758
756
  if FORCE and (minor or major):
759
- raise click.UsageError("Can't use an explicit tag with changing minor or major!")
757
+ raise click.UsageError("Can't reuse a tag and also change minor or major!")
758
+ if (build or force) and (minor or major or (build and force)):
759
+ raise click.UsageError("Can't update both build and tag!")
760
760
  if show and (run or force or minor or major):
761
761
  raise click.UsageError("Can't display and change the tag at the same time!")
762
+ if build and not subtree:
763
+ raise click.UsageError("The main release number doesn't have a build")
762
764
 
763
765
  repo = Repo(None)
764
766
 
@@ -768,8 +770,8 @@ def tag(run,minor,major,subtree,force,FORCE,show):
768
770
  r = repo
769
771
 
770
772
  if show:
771
- tag,commit = r.last_tag()
772
- if r.has_changes(commit):
773
+ tag = r.last_tag
774
+ if r.has_changes():
773
775
  print(f"{tag} STALE")
774
776
  else:
775
777
  print(tag)
@@ -777,14 +779,23 @@ def tag(run,minor,major,subtree,force,FORCE,show):
777
779
 
778
780
  if force:
779
781
  tag = force
780
- elif FORCE:
781
- tag,_ = r.last_tag()
782
+ elif FORCE or build:
783
+ tag = r.last_tag
782
784
  else:
783
785
  tag = r.next_tag(major,minor)
784
786
 
785
787
  if run or subtree:
786
788
  if subtree:
787
- repo.versions[r.dash] = (tag,repo.head.commit.hexsha[:9])
789
+ sb = repo.part(r.dash)
790
+ if build:
791
+ sb.vers.pkg += 1
792
+ sb.vers.rev=repo.head.commit.hexsha
793
+ else:
794
+ sb.vers = attrdict(
795
+ tag=tag,
796
+ pkg=1,
797
+ rev=repo.head.commit.hexsha,
798
+ )
788
799
  repo.write_tags()
789
800
  else:
790
801
  git.TagReference.create(repo,tag, force=FORCE)
@@ -793,58 +804,6 @@ def tag(run,minor,major,subtree,force,FORCE,show):
793
804
  print(f"{tag} DRY_RUN")
794
805
 
795
806
 
796
- @cli.command()
797
- @click.option("-P", "--no-pypi", is_flag=True, help="don't push to PyPi")
798
- @click.option("-D", "--no-deb", is_flag=True, help="don't debianize")
799
- @click.option("-d", "--deb", type=str, help="Debian archive to push to (from dput.cfg)")
800
- @click.option("-o", "--only", type=str, multiple=True, help="affect only this package")
801
- @click.option("-s", "--skip", type=str, multiple=True, help="skip this package")
802
- async def publish(no_pypi, no_deb, skip, only, deb):
803
- """
804
- Publish modules to PyPi and/or Debian.
805
-
806
- MoaT modules can be given as shorthand, i.e. with dashes and excluding
807
- the "moat-" prefix.
808
- """
809
- repo = Repo(None)
810
- if only and skip:
811
- raise click.UsageError("You can't both include and exclude packages.")
812
-
813
- if only:
814
- repos = (repo.subrepo(x) for x in only)
815
- else:
816
- s = set()
817
- for sk in skip:
818
- s += set(sk.split(","))
819
- repos = (x for x in repo.parts if dash(x.name) not in sk)
820
-
821
- deb_args = "-b -us -uc".split()
822
-
823
- for r in repos:
824
- t,c = r.last_tag
825
- if r.has_changes(c):
826
- print(f"Error: changes in {r.name} since tag {t.name}")
827
- continue
828
-
829
- print(f"Processing {r.name}, tag: {t.name}")
830
- r.copy()
831
- rd=PACK/r.dash
832
-
833
- if not no_deb:
834
- p = rd / "debian"
835
- if not p.is_dir():
836
- continue
837
- subprocess.run(["debuild"] + deb_args, cwd=rd, check=True)
838
-
839
- if not no_pypi:
840
- for r in repos:
841
- p = Path(r.working_dir) / "pyproject.toml"
842
- if not p.is_file():
843
- continue
844
- print(r.working_dir)
845
- subprocess.run(["make", "pypi"], cwd=r.working_dir, check=True)
846
-
847
-
848
807
  @cli.command(epilog="""
849
808
  The default for building Debian packages is '--no-sign --build=binary'.
850
809
  '--no-sign' is dropped when you use '--deb'.
@@ -868,6 +827,7 @@ it is dropped when you use '--dput'.
868
827
  @click.option("-m", "--minor", is_flag=True, help="create a new minor version")
869
828
  @click.option("-M", "--major", is_flag=True, help="create a new major version")
870
829
  @click.option("-t", "--tag", "forcetag", type=str, help="Use this explicit tag value")
830
+ @click.option("-a", "--auto-tag", "autotag", is_flag=True, help="Auto-retag updated packages")
871
831
  @click.option(
872
832
  "-v",
873
833
  "--version",
@@ -876,7 +836,7 @@ it is dropped when you use '--dput'.
876
836
  help="Update external dependency",
877
837
  )
878
838
  @click.argument("parts", nargs=-1)
879
- async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts, pytest_opts, deb_opts, run, version, no_version, no_deb, skip_, major,minor,forcetag):
839
+ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts, pytest_opts, deb_opts, run, version, no_version, no_deb, skip_, major,minor,forcetag,autotag):
880
840
  """
881
841
  Rebuild all modified packages.
882
842
  """
@@ -894,6 +854,8 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
894
854
  print("Warning: not updating moat versions in pyproject files", file=sys.stderr)
895
855
  if minor and major:
896
856
  raise click.UsageError("Can't change both minor and major!")
857
+ if autotag and no_tag:
858
+ raise click.UsageError("Can't change tags without verifying them!")
897
859
  if forcetag and (minor or major):
898
860
  raise click.UsageError("Can't use an explicit tag with changing minor or major!")
899
861
 
@@ -930,11 +892,23 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
930
892
  return
931
893
 
932
894
  # Step 1: check for changed files since last tagging
933
- if not no_tag:
895
+ if autotag:
896
+ for r in repos:
897
+ if r.has_changes(True):
898
+ r.vers = attrdict(
899
+ tag=r.next_tag(),
900
+ pkg=1,
901
+ rev=repo.head.commit.hexsha,
902
+ )
903
+ elif r.has_changes(False):
904
+ r.vers.pkg += 1
905
+ r.vers.rev=repo.head.commit.hexsha
906
+
907
+ elif not no_tag:
934
908
  err = set()
935
909
  for r in repos:
936
910
  try:
937
- tag,commit = r.last_tag()
911
+ tag = r.last_tag
938
912
  except KeyError:
939
913
  rd = PACK/r.dash
940
914
  p = rd / "pyproject.toml"
@@ -942,7 +916,7 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
942
916
  continue
943
917
  raise
944
918
  tags[r.mdash] = tag
945
- if r.has_changes(commit):
919
+ if r.has_changes():
946
920
  err.add(r.dash)
947
921
  if err:
948
922
  if not run:
@@ -978,7 +952,7 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
978
952
  continue
979
953
  with p.open("r") as f:
980
954
  pr = tomlkit.load(f)
981
- pr["project"]["version"] = r.last_tag()[0]
955
+ pr["project"]["version"] = r.last_tag
982
956
 
983
957
  if not no_version:
984
958
  try:
@@ -1015,9 +989,9 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
1015
989
  try:
1016
990
  res = subprocess.run(["dpkg-parsechangelog","-l","debian/changelog","-S","version"], cwd=rd, check=True, stdout=subprocess.PIPE)
1017
991
  tag = res.stdout.strip().decode("utf-8").rsplit("-",1)[0]
1018
- ltag = r.last_tag()[0]
992
+ ltag = r.last_tag
1019
993
  if tag != ltag:
1020
- subprocess.run(["debchange", "--distribution","unstable", "--newversion",ltag+"-1",f"New release for {forcetag}"] , cwd=rd, check=True)
994
+ subprocess.run(["debchange", "--distribution","unstable", "--newversion",f"{ltag}-{r.vers.pkg}",f"New release for {forcetag}"] , cwd=rd, check=True)
1021
995
  repo.index.add(p/"changelog")
1022
996
 
1023
997
  if debversion.get(r.dash,"") != ltag:
@@ -1038,7 +1012,7 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
1038
1012
  p = rd / "pyproject.toml"
1039
1013
  if not p.is_file():
1040
1014
  continue
1041
- tag = r.last_tag()[0]
1015
+ tag = r.last_tag
1042
1016
  name = r.dash
1043
1017
  if name.startswith("ext-"):
1044
1018
  name=name[4:]
@@ -1075,7 +1049,7 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
1075
1049
  p = rd / "pyproject.toml"
1076
1050
  if not p.is_file():
1077
1051
  continue
1078
- tag = r.last_tag()[0]
1052
+ tag = r.last_tag
1079
1053
  name = r.dash
1080
1054
  if name.startswith("ext-"):
1081
1055
  name=name[4:]
@@ -1102,11 +1076,11 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
1102
1076
  if not dput_opts:
1103
1077
  dput_opts = ["-u","ext"]
1104
1078
  for r in repos:
1105
- ltag = r.last_tag()[0]
1079
+ ltag = r.last_tag
1106
1080
  if not (PACK/r.dash/"debian").is_dir():
1107
1081
  continue
1108
- changes = PACK/f"{r.mdash}_{ltag}-1_{ARCH}.changes"
1109
- done = PACK/f"{r.mdash}_{ltag}-1_{ARCH}.done"
1082
+ changes = PACK/f"{r.mdash}_{ltag}-{r.vers.pkg}_{ARCH}.changes"
1083
+ done = PACK/f"{r.mdash}_{ltag}-{r.vers.pkg}_{ARCH}.done"
1110
1084
  if done.exists():
1111
1085
  continue
1112
1086
  try:
@@ -1122,10 +1096,14 @@ async def build(no_commit, no_dirty, no_test, no_tag, no_pypi, parts, dput_opts,
1122
1096
  return
1123
1097
 
1124
1098
  # Step 8: commit the result
1125
- if run and not no_commit:
1099
+ if run:
1100
+ for r in repos:
1101
+ r.vers.rev = repo.head.commit.hexsha
1126
1102
  repo.write_tags()
1127
- repo.index.commit(f"Build version {forcetag}")
1128
- git.TagReference.create(repo, forcetag)
1103
+
1104
+ if not no_commit:
1105
+ repo.index.commit(f"Build version {forcetag}")
1106
+ git.TagReference.create(repo, forcetag)
1129
1107
 
1130
1108
 
1131
1109
  add_repr(tomlkit.items.String)
@@ -0,0 +1,3 @@
1
+ from __future__ import annotations
2
+
3
+ __path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -0,0 +1,146 @@
1
+ project:
2
+ authors:
3
+ - email: matthias@urlichs.de
4
+ name: Matthias Urlichs
5
+ classifiers:
6
+ - 'Intended Audience :: Developers'
7
+ - 'Programming Language :: Python :: 3'
8
+ - 'Framework :: AsyncIO'
9
+ - 'Framework :: Trio'
10
+ - 'Framework :: Trio'
11
+ - 'Intended Audience :: Developers'
12
+ - 'License :: OSI Approved'
13
+ - 'Development Status :: 4 - Beta'
14
+ dependencies:
15
+ - anyio ~= 3.0
16
+ description: REPLACE ME
17
+ dynamic:
18
+ - version
19
+ keywords:
20
+ - MoaT
21
+ license:
22
+ file: LICENSE.txt
23
+ name: SUBUNDER
24
+ readme: README.rst
25
+ requires-python: '>=3.8'
26
+ urls:
27
+ homepage: https://m-o-a-t.org
28
+ repository: https://github.com/M-o-a-T/SUBNAME
29
+ tool:
30
+ pytest:
31
+ ini_options:
32
+ log_cli_level: DEBUG
33
+ ruff:
34
+ lint:
35
+ select:
36
+ - ALL
37
+ ignore:
38
+ - ANN
39
+ - PTH
40
+ - PERF
41
+ - D105
42
+ - D107
43
+ - A003
44
+ - S101
45
+ - RUF001
46
+ - RUF002
47
+ - PLW1514
48
+ - D2
49
+ - D3
50
+ - D4
51
+ - T2
52
+ - FBT
53
+ - TRY003
54
+ - EM10
55
+ - PLR
56
+ - C
57
+ - RET50
58
+ - TD
59
+ - FIX
60
+ - N
61
+ - ERA
62
+ - BLE001
63
+ explicit-preview-rules: true
64
+ flake8-comprehensions:
65
+ allow-dict-calls-with-keyword-arguments: true
66
+ flake8-builtins:
67
+ builtins-ignorelist:
68
+ - id
69
+ - help
70
+ isort:
71
+ no-lines-before:
72
+ - future
73
+ required-imports:
74
+ - "from __future__ import annotations"
75
+ section-order:
76
+ - future
77
+ - typing
78
+ - standard-library
79
+ - first-party
80
+ - upy
81
+ - moat
82
+ - local-folder
83
+ - third-party
84
+ extra-standard-library:
85
+ - pytest
86
+ - anyio
87
+ force-to-top:
88
+ - moat.util
89
+ sections:
90
+ moat:
91
+ - moat
92
+ upy:
93
+ - micropython
94
+ - machine
95
+ - esp
96
+ typing:
97
+ - typing
98
+ preview: true
99
+ line-length: 99
100
+ black:
101
+ line-length: 99
102
+ flake8:
103
+ max-line-length: 99
104
+ ignore:
105
+ - E123
106
+ - E127
107
+ - E203
108
+ - E231
109
+ - E402
110
+ - E502
111
+ - E731
112
+ - F401 # covered by pylint
113
+ - F841 # covered by pylint
114
+ - W503
115
+ setuptools:
116
+ packages:
117
+ - SUBDOT
118
+ package-data:
119
+ "*": [ "*.yaml" ]
120
+ setuptools_scm: {}
121
+ pylint:
122
+ messages_control:
123
+ disable:
124
+ - fixme
125
+ - invalid-name
126
+ - no-else-continue
127
+ - no-else-return
128
+ - superfluous-parens
129
+ - too-few-public-methods
130
+ - too-many-arguments
131
+ - too-many-branches
132
+ - too-many-instance-attributes
133
+ - too-many-locals
134
+ - too-many-nested-blocks
135
+ - too-many-return-statements
136
+ - too-many-statements
137
+ - ungrouped-imports
138
+ - unspecified-encoding
139
+ - use-dict-literal
140
+ - wrong-import-order
141
+ tox:
142
+ tox:
143
+ isolated_build: True
144
+ envlist:
145
+ - check
146
+