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

Redundant .jl in new package #10

Closed
lukem12345 opened this issue Jul 23, 2024 · 3 comments
Closed

Redundant .jl in new package #10

lukem12345 opened this issue Jul 23, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@lukem12345
Copy link
Member

I created a package named SEPTransport.jl from AlgebraicTemplate.

I followed the steps in the readme:

 1060  git clone [email protected]:AlgebraicJulia/SEPTransport.jl
 1061  cd SEPTransport.jl/
 1062  ls
 1063  cat init.sh 
 1064  ./init.sh SEPTransport.jl
 1065  history 

The title in the README became SEPTransport.jl.jl i.e. It added an extra .jl.

image
@lukem12345
Copy link
Member Author

lukem12345 commented Jul 23, 2024

Further the main module which should have been named module SEPTransport was named module SEPTransport.jl in src/SEPTransport.jl.

Likewise in docs/literate/literate_example.jl, docs/make.jl, docs/src/api.md, docs/src/index.md, Project.toml, docs/Project.toml.

@jpfairbanks
Copy link
Member

It looks like this check is trying to make sure that it handles both cases SEPTransport.jl and SEPTransport with and implied .jl suffix. Maybe it makes sense to trim a trailing .jl at the top of the script and then the rest of the code can assume that there is no trailing .jl

# rename 
if [[ $REPO == *.jl ]]
then
  mv src/$DEFAULT_REPO.jl src/$REPO
else
  mv src/$DEFAULT_REPO.jl src/$REPO.jl
fi

REPO=$REPO%%.jl should work

[1] https://stackoverflow.com/questions/125281/how-do-i-remove-the-file-suffix-and-path-portion-from-a-path-string-in-bash

@quffaro
Copy link
Member

quffaro commented Jul 24, 2024

@lukem12345 I fixed the init.sh script in this commit and tested locally.

@quffaro quffaro added the bug Something isn't working label Jul 24, 2024
@quffaro quffaro closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants