ManderaGeneral / generalpackager

Tools to interface GitHub, PyPI, NPM and local modules / repos. Used for generating files to keep projects dry and synced. Tailored for ManderaGeneral for now.
https://pypi.org/project/generalpackager/
Apache License 2.0
0 stars 0 forks source link

Targets for summary packagers #73

Open Mandera opened 1 year ago

Mandera commented 1 year ago

Readmes weren't being generated for summaries: https://github.com/ManderaGeneral/generalpackager/actions/runs/4501455101/jobs/7922085352#step:7:1238

Mandera commented 1 year ago
Mandera commented 1 year ago
Mandera commented 1 year ago

Allow Files to have multiple targets

Mandera commented 1 year ago

Spreadsheet somewhere (generalpackager readme, collapsed?) with a row for every File and column for every Target

Mandera commented 1 year ago

I need to structure getting a list of packagers in workflow, currently have a few different calls:

Created Packager.workflow_packagers to be used in workflow methods

Mandera commented 1 year ago

How are private ones going to be able to get published? Could they just get added to the workflow?

Mandera commented 1 year ago

Getting packagers isn't very well structured, there are:

Perhaps not worth fixing until #70 is done

Mandera commented 1 year ago

Packager()._get_files_as_tsv()

name | generatable | aesthetic | remove | overwrite | is_file | python | node | django | exe | summary | path -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- CommitEditmsgFile |   | ✅ |   | ✅ | ✅ |   |   |   |   |   | .git/COMMIT_EDITMSG ExamplesFile |   | ✅ |   | ✅ |   |   |   |   |   |   | examples ExeproductFile |   |   |   | ✅ |   |   |   |   |   |   | dist/exetarget ExetargetFile |   |   |   | ✅ | ✅ |   |   |   |   |   | exetarget.py GenerateFile | ✅ | ✅ |   | ✅ | ✅ | ✅ |   |   |   |   | generate.py GitExcludeFile | ✅ | ✅ |   | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | .git/info/exclude IndexJsFile | ✅ | ✅ |   |   | ✅ |   | ✅ |   |   |   | index.js InitFile | ✅ |   |   |   | ✅ | ✅ |   |   |   |   | generalpackager/__init__.py LicenseFile | ✅ | ✅ |   | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | LICENSE ManifestFile | ✅ |   |   | ✅ | ✅ | ✅ |   |   |   |   | MANIFEST.in MetadataFile |   |   |   | ✅ | ✅ |   |   |   |   |   | metadata.json NpmIgnoreFile | ✅ | ✅ |   | ✅ | ✅ |   | ✅ |   |   |   | .npmignore OrgReadmeFile | ✅ | ✅ |   | ✅ | ✅ |   |   |   |   | ✅ | README.md PackageJsonFile | ✅ |   |   | ✅ | ✅ |   | ✅ |   |   |   | package.json PreCommitHookFile |   | ✅ | ✅ | ✅ | ✅ |   |   |   |   |   | .git/hooks/pre-commit PrePushHookFile | ✅ | ✅ |   | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |   | .git/hooks/pre-push ReadmeFile | ✅ | ✅ |   | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |   | README.md SetupFile | ✅ |   |   | ✅ | ✅ | ✅ |   |   |   |   | setup.py TestFile |   |   |   | ✅ |   |   |   |   |   |   | generalpackager/test TestJsFile | ✅ |   |   |   | ✅ |   | ✅ |   |   |   | test.js TestTemplateFile | ✅ | ✅ |   |   | ✅ | ✅ |   |   |   |   | generalpackager/test/test_generalpackager.py WorkflowFile | ✅ |   |   | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |   | .github/workflows/workflow.yml
Mandera commented 1 year ago

[ ] if_publish_bump

  • Is using compare_local_to_pypi, should change to github's and implement github.download(version)
  • self.compare_local_to_pypi(aesthetic=False) will automatically use the latest version - How do I get the latest version for github?

Working on this. Thought I would create get_all_versions for packager host protocol but now I realized that "git", "tag", "-l", "--sort=-v:refname" is a local git command, more suited for localrepo. So making that into a general method seems tough

If I want to keep that method I could use "https://api.github.com/repos///tags" for github