Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved the metadata into setup.cfg. #3

Merged
merged 1 commit into from
Apr 7, 2020
Merged

Moved the metadata into setup.cfg. #3

merged 1 commit into from
Apr 7, 2020

Conversation

KOLANICH
Copy link
Contributor

  • ignored some stuff

@alexmojaki
Copy link
Owner

Hi, can you explain what the goal/purpose of these PRs is?

What would be the procedure to release a new version of a package?

Can you fix the travis build?

@KOLANICH
Copy link
Contributor Author

Hi, can you explain what the goal/purpose of these PRs is?

  1. store the metadata as data, not as code. This will allow to phase out metadata stored as code in future. It will also make it more available for tools.
  2. get the version from the git tag automatically.

What would be the procedure to release a new version of a package?

  1. make a new git tag v<version>
  2. python3 -m pep517.build .
  3. twine upload ./dist/*.whl

@alexmojaki
Copy link
Owner

Does this have something to do with IPython?

@KOLANICH
Copy link
Contributor Author

KOLANICH commented Feb 12, 2020

Yes, I have installed a new version of ipython from git and noticed a new dependency; I have looked into it and its dependencies and disliked the way they are packaged, so I have sent PRs to them. Fortunately with the help of setuptools_py2cfg converting the metadata was pretty easy.

.travis.yml Outdated Show resolved Hide resolved
@alexmojaki
Copy link
Owner

Please add pep517 as a test dependency to make packaging easier, and make a shell script out of these steps you just gave.

@KOLANICH
Copy link
Contributor Author

KOLANICH commented Feb 13, 2020

make a shell script out of these steps you just gave.

It is not trivial to read the previous tag describing a version, and increment it in bash. And versions, if they are SemVers, must be incremented by a human.

Please add pep517 as a test dependency

Added to extras and not added to test_requires because it is not needed for testing. In fact it is not really very needed at all, python3 ./setup.py bdist_wheel still works fine, pep517 is just a build system independent interface recently introduced. Shiny new shit it is. We use it on travis only to make sure that the package is compatible to it (pip uses it if it encounters pyproject.toml with build backend assigned).

@alexmojaki
Copy link
Owner

The version can be an argument which I type in manually. I just don't want to have to remember and manually enter three commands.

@alexmojaki
Copy link
Owner

Anyway, thanks for your help and for teaching me new things. Before I merge anything, can you also make the same changes in executing and pure_eval?

make_release.sh Outdated Show resolved Hide resolved
make_release.sh Outdated Show resolved Hide resolved
make_release.sh Outdated Show resolved Hide resolved
+ upgraded setuptools
+ now using pep517 for build
+ ignored some stuff
+ made coverage compute branch coverage
+ made pytest emit a file with the report
@KOLANICH KOLANICH requested a review from alexmojaki March 1, 2020 20:06
@alexmojaki
Copy link
Owner

Next time I want to release a change, I will test this branch out in practice. I'm not keen to merge into master a new set of tools that I'm completely unfamiliar with.

@alexmojaki
Copy link
Owner

OK, I tried using this in practice and ran into a couple of problems.

Firstly, no matter how I run the script, the argument detection fails and it tells me to provide a version:

$ ./make_release.sh 0.0.7
+ '[x]'
./make_release.sh: line 4: [x]: command not found
+ echo './make_release.sh <major>.<minor>.<patch>'
./make_release.sh <major>.<minor>.<patch>
+ exit 1

Secondly, how am I meant to work with version.py in practice? Someone should be able to clone this repo and then run tests, but they hit an import error because version.py doesn't exist. They shouldn't have to build the project to work with it.

@alexmojaki alexmojaki merged commit b87bb0f into alexmojaki:master Apr 7, 2020
@alexmojaki
Copy link
Owner

OK, I fixed the problems and merged in #7.

@alexmojaki
Copy link
Owner

Thank you for this contribution @KOLANICH, I've learned some new stuff!

Can you similarly update your PRs for executing and pure_eval?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants